All computers are faced with the problem that they need instructions in order to be able to read in the instructions they need to operate. The usual solution to this conundrum is to store a small program called a “loader” in a ROM (read-only memory) chip. When the computer is switched on, this chip is activated and runs the loader. The loader program has the instructions needed to be able to access the disk containing the full operating system. This process is called booting (short for “bootstrapping”).
Booting a PC
While the details of the boot sequence vary with the hard-ware and operating system used, a look at the booting of a “Wintel” machine (IBM architecture PC running DOS and Microsoft Windows) can serve as a practical example.
When the power is turned on, a chip called the BIOS (basic input-output system) begins to execute a small pro-gram (see bios). The first thing it does is to run a rou-tine called the POST (power-on self test) that sends a query over the system bus (see bus) to each of the key devices (memory, keyboard, video display, and so on) for a response that indicates it is functioning properly. If an error is detected, the system generates a series of beeps, the number of which indicates the area where the problem was found, and then halts.
Assuming the test runs successfully (sometimes indi-cated by a single beep), the BIOS program then queries the devices to see if they have their own BIOS chips, and if so, executes their programs to initialize the devices, such as the video card and disk controllers. At this point, since the video display is available, informational and error messages can be displayed as appropriate. The BIOS also sets various parameters such as the organization of the disk drive, using information stored in a CMOS chip. (There is generally a way the user can access and change these information screens, such as when installing additional memory chips.)
The BIOS now looks for a disk drive that is bootable— that is, that contains files with the code needed to load the operating system. This is generally a hard drive, but could be a floppy disk or even a CD-ROM or USB device. (The order in which devices are checked can be configured.) On a hard drive, the code needed to start the operating system is found in a “master boot record.”
The booting of the operating system (DOS) involves the determination of the disk structure and file system and the loading of the operating system kernel (found in files called IO.SYS and MSDOS.SYS), and a command interpreter (COM-MAND.COM). The latter can then read the contents of the files AUTOEXEC.BAT and CONFIG.SYS, which specify sys-tem parameters, device drivers, and other programs to be loaded into memory at startup. If the system is to run Micro-soft Windows, that more elaborate operating system will then take over, building upon or replacing the foundation of DOS.
No comments:
Post a Comment