0% found this document useful (0 votes)
17 views2 pages

Understanding the System Boot Process

The bootstrap program is responsible for initializing the system and loading the operating system kernel into memory at startup. It resides in read-only memory (ROM) and performs tasks like running diagnostics before loading the kernel. For most systems, the bootstrap loader loads an initial boot program from disk into memory, which then loads the full operating system. This two-step process allows the operating system to be stored on disk for easy updating rather than in limited and expensive ROM.

Uploaded by

Jorge Alegre
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Understanding the System Boot Process

The bootstrap program is responsible for initializing the system and loading the operating system kernel into memory at startup. It resides in read-only memory (ROM) and performs tasks like running diagnostics before loading the kernel. For most systems, the bootstrap loader loads an initial boot program from disk into memory, which then loads the full operating system. This two-step process allows the operating system to be stored on disk for easy updating rather than in limited and expensive ROM.

Uploaded by

Jorge Alegre
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SYSTEM BOOT

After an operating system is generated, it must be made available for use by the
hardware. But how does the hardware know where the kernel is or how to load that
kernel? The procedure of starting a computer by loading the kernel is known as
booting the system.

On most computer systems, a small piece of code known as the bootstrap program
or bootstrap loader locates the kernel, loads it into main memory, and starts its
execution. Some computer systems, such as PCs, use a two-step process in which a
simple bootstrap loader fetches a more complex boot program from disk, which in
turn loads the kernel. When a CPU receives a reset event—for instance, when it is
powered up or rebooted—the instruction register is loaded with a predefined
memory location, and execution starts there. At that location is the initial bootstrap
program. This program is in the form of read-only memory (ROM), because the RAM
is in an unknown state at system startup. ROM is convenient because it needs no
initialization and cannot easily be infected by a computer virus.

The bootstrap program can perform a variety of tasks. Usually, one task is to run
diagnostics to determine the state of the machine. If the diagnostics pass, the
program can continue with the booting steps. It can also initialize all aspects of the
system, from CPU registers to device controllers and the contents of main memory.
Sooner or later, it starts the operating system. Some systems—such as cellular
phones, PDAs, and game consoles—store the entire operating system in ROM.
Storing the operating system in ROM is suitable for small operating systems, simple
supporting hardware, and rugged operation. A problem with this approach is that
changing the bootstrap code requires changing the ROM hardware chips. Some
systems resolve this problem by using erasable programmable read-only memory
(EPROM), which is read only except when explicitly given a command to become
writable.

All forms of ROM are also known as firmware, since their characteristics fall
somewhere between those of hardware and those of software. A problem with
firmware in general is that executing code there is slower than executing code in
RAM. Some systems store the operating system in firmware and copy it to RAM for
fast execution. A final issue with firmware is that it is relatively expensive, so usually
only small amounts are available. For large operating systems (including most
general-purpose operating systems like Windows, Mac OS X, and UNIX) or for systems
that change frequently, the bootstrap loader is stored in firmware, and the operating
system is on disk. In this case, the bootstrap runs diagnostics and has a bit of code
that can read a single block at a fixed location (say block zero) from disk into memory
and execute the code from that boot block. The program stored in the boot block
may be sophisticated enough to load the entire operating system into memory and
begin its execution. More typically, it is simple code (as it fits in a single disk block)
and knows only the address on disk and length of the remainder of the bootstrap
program. GRUB is an example of an open-source bootstrap program for Linux
systems.

All of the disk-bound bootstrap, and the operating system itself, can be easily
changed by writing new versions to disk. A disk that has a boot partition is called a
boot disk or system disk. Now that the full bootstrap program has been loaded, it
can traverse the file system to find the operating system kernel, load it into memory,
and start its execution. It is only at this point that the system is said to be running.

Common questions

Powered by AI

A boot block on a disk contains fundamental code that assists in loading the rest of the operating system. This code, often simple to fit within a single disk block, includes the address and length information of the remaining bootstrap program. Once this boot block code is executed, it can traverse the file system to locate the operating system kernel, load it into the main memory, and begin execution. The ability to change this code easily by writing new versions to disk allows for flexibility and ease of update .

GRUB's significance in Linux systems lies in its versatility and open-source nature, allowing for extensive customization and control over the booting process. As a bootstrap program, GRUB facilitates the simple loading of the Linux kernel by reading from a disk, making boot data manageable and easily updateable. Additionally, GRUB's ability to handle multiple operating systems and comprehensive control over boot configurations underscores its importance in diverse Linux environments .

In PCs, a two-step booting process starts with a simple bootstrap loader present in the firmware. This loader's task is to fetch a more complex boot program from the disk. Initially, at system startup, this instruction comes from a predefined memory location loaded into the CPU via a reset event. Once the complex boot program is fetched, it loads the kernel into the main memory, setting the system fully in operation. This division into two steps allows for a more sophisticated, flexible boot process with the additional ability to execute a broad range of initializations and diagnostics .

The execution of code in firmware is slower than in RAM because firmware, such as ROM or EPROM, is designed for permanent storage and not optimized for speed compared to the volatile and fast-access RAM. To address this issue, some systems load the operating system from firmware into RAM after startup. This strategy combines the reliability of firmware storage with the speed of RAM execution, allowing systems to run more efficiently after initial boot processes .

A predefined memory location acts as the starting point for the CPU during the system boot process. It holds the initial bootstrap program loaded into the instruction register following a reset event, such as powering on the system. This location ensures the CPU begins executing a known, stable sequence of instructions meant to load the operating system, providing consistency and stability at startup .

A boot disk is distinct from other disks because it contains a boot partition with the specific data required to initialize the booting process, such as the boot block containing crucial bootstrap code. Its essential role is to facilitate the loading of the operating system by providing the necessary bootstrap data that the firmware instructions can execute to begin the system setup. This specialized disk is crucial for starting the system and ensuring the necessary files are accessible and executable .

Using a disk-based approach offers advantages such as greater flexibility and cost-effectiveness for large and frequently updated operating systems. The ability to store vast amounts of data on a disk also allows for sophisticated operating systems suited to general-purpose computing. However, this method can introduce vulnerabilities due to dependence on more complex and potentially under-secured hardware and software. In contrast, storing an operating system in firmware, while offering stable, rugged operation suitable for simple or single-purpose systems, limits flexibility for updates and requires dealing with slower execution speeds and higher costs for scalable memory capacity .

Storing an operating system in firmware on devices like cellular phones and game consoles implicates several factors: the simplicity of supporting hardware, smaller size requirements, and rugged operation capabilities. Firmware suits these devices because it offers stability, retaining the operating system without power. However, the downside includes slower operation speed in firmware compared to RAM and the challenges involved in updating the code, unless using an EPROM or similar rewritable technology. These characteristics make firmware a trade-off between reliability and flexibility .

Diagnostics during the bootstrap process enhance system reliability by performing health checks and ensuring hardware components are functioning correctly before loading the operating system. By detecting and addressing errors or malfunctions early, diagnostics prevent the system from running with faulty hardware, which can cause system crashes or data corruption. This initial verification is crucial for maintaining robust operation and integrity in computing systems .

ROM is advantageous for storing a bootstrap program because it requires no initialization, preventing it from being easily infected by viruses. ROM is non-volatile, meaning it retains its content without power. However, changing the bootstrap code requires altering the ROM chips, which is a major limitation. EPROM, which allows reprogramming, offers more flexibility to update code by making it writable with explicit commands. Despite this advantage, both ROM and EPROM have the downside of slower code execution compared to RAM, and their cost prohibits storing large volumes of data .

You might also like