Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Sunday, September 11, 2011

Booting

Today let's discuss about booting and what actually happens when a system boots.

During the early days of computers, the boot program is made read only and is put in hardware chips. This boot program is called a bootstrap in computer terminology. The bootstrap initiates all the CPU registers, device controllers and finally loads the operating system into memory. The advantage of this scheme is that, since the bootstrap is read only, no virus can effect it. But the disadvantages outweigh this. First, if we want to add any external hardware,  it's device driver needs to be loaded when the system starts. But, since the bootstrap is read only, we need to change the hardware chips. Also, the operating system must be in a fixed location as specified in the boot strap, if we install the operating system in a different area, then also there is a need to change the chip.


So our computer scientists thought over this and came up with a simple solution. Instead of making ROM's with complete bootstrap program in them, they started making ROM's with tiny bootstrap program's called bootstrap loader. And the main bootstrap program is stored in the disk. Since changing the bootstrap program simply requires a write to the disk, our problem is solved. The bootstrap program on the disk is generally stored in first sector of the hard disk called boot sector.

But... a new problem arrived -- Boot sector virus

Enough of computer terminology, now I will explain in simple terms. BIOS is generally present in non-volatile ROM chips as you know, and this generally initiates the main memory, CPU registers, device controllers and starts the tiny bootstrap loader that is present in it. The BIOS is built at the time of manufacture of a PC and when you start the PC, it is the first software that normally executes, even before the main memory or disk gets initialised. It looks as below


The full bootstrap program as I told earlier, is stored in first sector of harddisk called boot sector. After initialisation of all aspects, the BIOS loads this program to main memory and hands the baton to it for execution. This boot sector in windows computers is called Master Boot Record or simply MBR. MBR contains the full boot code, along with a partition table. This partition table contains the information of partitions along with information whether an Operating system is present in each one or not. If only one OS is present, it is shown or by default it's loaded since there is no need for user to make choice. If more than one OS is present, the user is presented with options to load what ever operating system he wants to be loaded.


Last, about boot sector virus. To prevent boot sector virus, there is an option in BIOS, which makes the bootstrap program on the disk read-only. When ever you think you are not going to install any more OS, check it on and when you want to change your OS, check it off. Happy now...virus problem also solved

Tuesday, August 23, 2011

Operating Systems - 3

In case you missed part-1 and 2, below are the links for them

http://systemspro.blogspot.com/2011/06/operating-systems-win-or-loss-of.html

http://systemspro.blogspot.com/2011/06/operating-systems-2.html

Also, the code for different problems related to operating systems, that you come across in your under graduate studies, is made available in the link below

http://operatingsystemscode.blogspot.com/

Today, let's discuss about Kernel

Kernel is a piece of software, that generally comes bundled with operating system and is more closer to the hardware. It provides an abstract layer for the user programs to interact with the hardware and allocate apropos resources to them. In short, it is the heart of any operating system.

Windows operating systems use Windows NT Kernel which was developed and released along with NT based OS in the year 1993, that made windows, a more generic player in the operating systems field. It's success was so huge, that Microsoft never dared to remove "NT" from it's OS names. But in 2000, with the release of Windows 2000, it dropped NT, but gave it a tagline "Built on NT technology". With XP, it dropped that tag also. Presently windows operating systems like Windows 7 and Windows Vista use a hybrid version of the same kernel.

Linux distributions like Ubuntu, Red hat use Linux Kernel, that was first developed by Linus Torvalds in 1991. No one thought that a college kid could invent it. Even the professor who taught him, damned it. And the remaining story, need not be told..

Another Linux kernel called "Hurd" was in the development stages, before 1991, but it  never reached it's completion due to the invention of Linux