1ST Unit
1ST Unit
COURSE OBJECTIVES:
• To understand the basics and functions of operating systems.
• To understand processes and threads
• To analyze scheduling algorithms and process synchronization.
• To understand the concept of deadlocks.
• To analyze various memory management schemes.
• To be familiar with I/O management and file systems.
• To be familiar with the basics of virtual machines and Mobile OS like iOS and
Android.
UNIT I INTRODUCTION
Computer System - Elements and organization; Operating System Overview -
Objectives and Functions - Evolution of Operating System; Operating System
Structures – Operating System Services - User Operating System Interface - System
Calls – System Programs - Design and Implementation - Structuring methods.
UNIT
PROCESS MANAGEMENT
II
Processes - Process Concept - Process Scheduling - Operations on Processes - Inter-
process Communication; CPU Scheduling - Scheduling criteria - Scheduling
algorithms: Threads - Multithread Models – Threading issues; Process Synchronization
- The Critical-Section problem - Synchronization hardware – Semaphores – Mutex -
Classical problems of synchronization - Monitors; Deadlock - Methods for handling
deadlocks, Deadlock prevention, Deadlock avoidance, Deadlock detection, Recovery
from deadlock.
UNIT
MEMORY MANAGEMENT
III
Main Memory - Swapping - Contiguous Memory Allocation – Paging - Structure of the
Page Table - Segmentation, Segmentation with paging; Virtual Memory - Demand
Paging – Copy on Write - Page Replacement - Allocation of Frames –Thrashing.
UNIT
STORAGE MANAGEMENT
IV
Mass Storage system – Disk Structure - Disk Scheduling and Management; File-System
Interface - File concept - Access methods - Directory Structure - Directory organization
- File system mounting - File Sharing and Protection; File System Implementation -
File System Structure - Directory implementation - Allocation Methods - Free Space
Management; I/O Systems – I/O Hardware, Application I/O interface, Kernel I/O
subsystem.
UNIT
VIRTUAL MACHINES AND MOBILE OS
V
Virtual Machines – History, Benefits and Features, Building Blocks, Types of Virtual
Machines and their Implementations, Virtualization and Operating-System
Components; Mobile OS - iOS and Android.
TOTAL: 45 PERIODS
COURSE OUTCOMES: At the end of this course, the students will be able to:
CO1 : Analyze various scheduling algorithms and process synchronization.
CO2 : Explain deadlock prevention and avoidance algorithms.
CO3 : Compare and contrast various memory management schemes.
CO4 : Explain the functionality of file systems, I/O systems, and Virtualization
CO5 : Compare iOS and Android Operating Systems.
TEXT BOOKS:
1. Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”‖, 10th Edition, John Wiley and Sons Inc., 2018.
2. Andrew S Tanenbaum, "Modern Operating Systems", Pearson, 5th Edition, 2022
New Delhi.
REFERENCES:
1. Ramaz Elmasri, A. Gil Carrick, David Levine, “ Operating Systems – A Spiral
Approach”, Tata McGraw Hill Edition, 2010.
2. William Stallings, "Operating Systems: Internals and Design Principles", 7th
Edition, Prentice Hall, 2018.
3. Achyut S.Godbole, Atul Kahate, “Operating Systems”, McGraw Hill Education,
2016.
UNIT- I INTRODUCTION
i) Processor: It Controls the operation of the computer and performs its data processing
functions. When there is only one processor, it is often referred to as the central
processing unit.
ii) Main memory: It Stores data and programs. This memory is typically volatile; that
is, when the computer is shut down, the contents of the memory are lost. Main
memory is also referred to as real memory or primary memory.
iii) I/O modules: It moves data between the computer and its external environment. The
external environment consists of a variety of devices, including secondary memory
devices (e. g., disks), communications equipment, and terminals.
iv) System bus: It provides the communication among processors, main memory, and
I/O modules.
➢ One of the processor’s functions is to exchange data with memory. For this purpose, it
typically makes use of two internal registers
i) A memory address registers (MAR), which specifies the address in memory for the
next read or write.
ii) A memory buffer register (MBR), which contains the data to be written into
memory or which receives the data read from memory.
PROCESSOR REGISTERS:
A processor includes a set of registers that provide memory that is faster and smaller than
main memory. Processor registers serve two functions:
i) User-visible registers: Enable the machine or assembly language programmer
to minimize main memory references by optimizing register use.
ii) Control and status registers: Used by the processor to control the operation
of the processor and by privileged OS routines to control the execution of programs.
1. User-Visible Registers:
A user-visible register is generally available to all programs, including application
programs as well as system programs. The types of User visible registers are
i) Data Registers
ii) Address Registers
Data Registers can be used with any machine instruction that performs operations on data.
Address registers contain main memory addresses of data and instructions. Examples of address
registers include the following:
• Index register.
• Segment pointer
• Stack pointer
2. Control and status register:
A variety of processor registers are employed to control the operation of the processor. In
addition to the MAR, MBR, I/OAR, and I/OBR register the following are essential to instruction
execution:
• Program counter (PC): Contains the address of the next instruction to be fetched.
• Instruction register (IR): It contains the instruction most recently fetched.
All processor designs also include a register or set of registers, often known as the
program status word (PSW) that contains status information. The PSW typically contains
condition codes plus other status information, such as an interrupt enable/disable bit and a
kernel/user mode bit, carry bit, auxiliary carry bit.
➢ Program development
➢ Program execution
➢ Access to I/O devices
➢ Controlled access to files
➢ System access
➢ Error detection and response
➢ Accounting:
i) The Operating System as Resource Manager
❖ A computer is a set of resources for the movement, storage, and processing of data
and for the control of these functions. The OS is responsible for managing these
resources.
❖ The OS functions in the same way as ordinary computer software; that is, it is a
program or suite of programs executed by the processor.
❖ The OS frequently relinquishes control and must depend on the processor to allow it
to regain control.
❖ The OS directs the processor in the use of the other system resources and in the
timing of its execution of other programs.
❖ The allocation of this resource (main memory) is controlled jointly by the OS and
memory management hardware in the processor.
❖ The OS decides when an I/O device can be used by a program in execution and controls
access to and use of files.
❖ The processor itself is a resource, and the OS must determine how much processor time is
to be devoted to the execution of a particular user program. In the case of a multiple-
processor system, this decision must span all of the processors.
ii) Setup time: A single program, called a job, could involve loading the compiler plus
the high-level language program (source program) into memory, saving the compiled
program (object program) and then loading and linking together the object program
and common functions. Thus, a considerable amount of time was spent just in setting
up the program to run.
❖ This mode of operation could be termed serial processing, reflecting the fact that users
have access to the computer in series
❖ The central idea behind the simple batch-processing scheme is the use of a piece of
software known as the monitor.
❖ With this type of OS, the user no longer has direct access to the processor. Instead, the
user submits the job on cards or tape to a computer operator, who batches the jobs
together sequentially and places the entire batch on an input device, for use by the
monitor.
❖ Each program is constructed to branch back to the monitor when it completes processing,
and the monitor automatically begins loading the next program.
❖ The monitor controls the sequence of events. For this the monitor must always be in main
memory and available for execution. That portion is referred to as the resident monitor.
❖ The monitor reads in jobs one at a time from the input device .As it is read in, the current
job is placed in the user program area, and control is passed to this job.
❖ Once a job has been read in, the processor will encounter a branch instruction in the
monitor that instructs the processor to continue execution at the start of the user program.
S.GANESAN AP/CSE, Computer Science And Engineering
P.T. Lee Chengalvaraya Naicker College of Engineering & Technology
Oovery, Veliyur Post, Kanchipuram, 631 502.
The processor will then execute the instructions in the user program until it encounters an
ending or error condition.
❖ When the job is completed, it returns control to the monitor, which immediately reads in
the next job. The results of each job are sent to an output device, such as a printer, for
delivery to the user.
❖ The monitor performs a scheduling function: A batch of jobs is queued up, and jobs are
executed as rapidly as possible, with no intervening idle time.
❖ With each job, instructions are included in a form of job control language (JCL) which
are denoted by the beginning $. This is a special type of programming language used to
provide instructions to the monitor.
❖ The overall format of the job is given as
❖ The hardware features that are added as a part of simple batch systems include,
i) Memory protection
ii) Timer
iii) Privileged instructions
iv) Interrupts.
❖ The memory protection leads to the concept of dual mode operation.
➢ User Mode
➢ Kernel Mode.
❖ Thus the simple batch system improves utilization of the computer
❖ Even in simple batch operating system, the processor is often idle. The problem is that
I/O devices are slow compared to the processor.
❖ Let us consider a program that processes a file of records and performs, on average, 100
machine instructions per record. The computer spends over 96% of its time waiting for
I/O devices to finish transferring data to and from the file.
S.GANESAN AP/CSE, Computer Science And Engineering
P.T. Lee Chengalvaraya Naicker College of Engineering & Technology
Oovery, Veliyur Post, Kanchipuram, 631 502.
❖ In uniprogramming we will have a single program in the main memory. The processor
spends a certain amount of time executing, until it reaches an I/O instruction. It must then
wait until that I/O instruction concludes before proceeding. This inefficiency is not
necessary.
❖ In Multiprogramming we will have OS and more user programs. When one job needs to
wait for I/O, the processor can switch to the other job, which is likely not waiting for
I/O.This approach is known as multiprogramming, or multitasking.
❖ The most notable feature that is useful for multiprogramming is the hardware that
supports I/O interrupts and DMA (direct memory access).
❖ With interrupt-driven I/O or DMA, the processor can issue an I/O command for one job
and proceed with the execution of another job while the I/O is carried out by the device
controller.
❖ When the I/O operation is complete, the processor is interrupted and control is passed to
an interrupt-handling program in the OS.The OS will then passes control to another job.
❖ Multiprogramming operating systems are fairly sophisticated compared to single-
program, or uniprogramming, systems. To have several jobs ready to run, they must be
kept in main memory, requiring some form of memory management.
❖ In addition, if several jobs are ready to run, the processor must decide which one to run,
this decision requires an algorithm for scheduling.
❖ In time sharing systems the processor time is shared among multiple users.
❖ In a time-sharing system, multiple users simultaneously access the system through
terminals, with the OS interleaving the execution of each user program in a short burst or
quantum of computation.
❖ If there are n users actively requesting service at one time, each user will only see on the
average 1/n of the effective computer capacity.
❖ Batch Multiprogramming Vs Time Sharing systems
❖ One of the first time-sharing operating systems to be developed was the Compatible
Time-Sharing System (CTSS)
❖ The system ran on a computer with 32,000 36-bit words of main memory, with the
resident monitor consuming 5000 of that. When control was to be assigned to an
interactive user, the user’s program and data were loaded into the remaining 27,000
words of main memory.
❖ A program was always loaded to start at the location of the 5000th word
❖ A system clock generated interrupts at a rate of approximately one every 0.2 seconds.
❖ At each clock interrupt, the OS regained control and could assign the processor to
another user. This technique is known as time slicing.
Example: Assume that there are four interactive users with the following memory requirements,
in words:
JOB1: 15,000
JOB2: 20,000
JOB3: 5000
JOB4: 10,000
❖ Computer system organization deals with the structure of the computer system.
❖ A modern general-purpose computer system consists of one or more CPUs and a number
of device controllers connected through a common bus that provides access to shared
memory.
❖ For a computer to start running when it is powered up or rebooted—it needs to have an
initial program to run. This initial program is called as the Bootstrap program.
❖ It is stored within the computer hardware in read-only memory (ROM) or electrically
erasable programmable read-only memory (EEPROM), known by the general term
firmware.
❖ The bootstrap loader It initializes all aspects of the system, from CPU registers to device
controllers to memory contents.
❖ The bootstrap program loads the operating system and start executing that system.
❖ Once the kernel is loaded and executing, it can start providing services to the system and
its users. When is the system is booted it waits for some event to occur.
❖ The occurrence of an event is usually signaled by an interrupt from either the hardware
or the software.
❖ When the CPU is interrupted, it stops what it is doing and immediately transfers
execution to a fixed location. That contains the starting address of the service routine for
the interrupt.
❖ The interrupt service routine executes; on completion, the CPU resumes the interrupted
computation.
Storage structure:
❖ The CPU can load instructions only from memory, so any programs to run must be stored
in main memory.
❖ Main memory commonly is implemented in a semiconductor technology called dynamic
random-access memory
❖ ROM is a read only memory that is used to store the static programs such as bootstrap
loader.
❖ All forms of memory provide an array of bytes. Each byte has its own address. The
operations are done through load or store instructions.
❖ The load instruction moves a byte or word from main memory to an internal register
within the CPU, whereas the store instruction moves the content of a register to main
memory.
❖ Ideally, we want the programs and data to reside in main memory permanently. This
arrangement usually is not possible for the following two reasons
i) Main memory is usually too small to store all needed programs and data
permanently
ii) Main memory is a volatile storage device that loses its contents when power is
turned off or otherwise lost.
I/O Structure:
❖ A large portion of operating system code is dedicated to managing I/O, both because of
its importance to the reliability and performance of a system.
❖ A general-purpose computer system consists of CPUs and multiple device controllers that
are connected through a common bus. Each device controller is in charge of a specific
type of device.
❖ The device controller is responsible for moving the data between the peripheral devices
that it controls and its local buffer storage
❖ Operating systems have a device driver for each device controller. This device driver
understands the device controller and provides the rest of the operating system with a
uniform interface to the device.
❖ To start an I/O operation, the device driver loads the appropriate registers within the
device controller.
❖ The controller starts the transfer of data from the device to its local buffer. Once the
transfer of data is complete, the device controller informs the device driver via an
interrupt that it has finished its operation. This is called as interrupt driven I/O.
❖ The direct memory access I/O technique transfers a block of data directly to or from its
own buffer storage to memory, with no intervention by the CPU. Only one interrupt is
generated per block, to tell the device driver that the operation has completed,
❖ The operating systems are large and complex. A common approach is to partition the task
into small components, or modules, rather than have one monolithic system.
❖ The structure of an operating system can be defined the following structures.
▪ Simple structure
▪ Layered approach
▪ Microkernels
▪ Modules
▪ Hybrid systems
Simple structure:
❖ The Simple structured operating systems do not have a well defined structure. These
systems will be simple, small and limited systems.
Example: MS-DOS.
❖ In MS-DOS, the interfaces and levels of functionality are not well separated.
❖ In MS-DOS application programs are able to access the basic I/O routines. This causes
the entire systems to be crashed when user programs fail.
Layered approach:
❖ A system can be made modular in many ways. One method is the layered approach, in
which the operating system is broken into a number of layers (levels). The bottom layer
(layer 0) is the hardware; the highest (layer N) is the user interface.
Microkernels:
❖ In the mid-1980s, researchers at Carnegie Mellon University developed an operating
system called Mach that modularized the kernel using the microkernel approach.
❖ This method structures the operating system by removing all nonessential components
from the kernel and implementing them as system and user-level programs.
Modules:
❖ The best current methodology for operating-system design involves using loadable
kernel modules
❖ The kernel has a set of core components and links in additional services via modules,
either at boot time or during run time.
❖ The kernel provides core services while other services are implemented dynamically, as
the kernel is running.
❖ Linking services dynamically is more comfortable than adding new features directly to
the kernel, which would require recompiling the kernel every time a change was made.
Example: Solaris OS
❖ The Solaris operating system structure is organized around a core kernel with seven types
of loadable kernel modules:
▪ Scheduling classes
▪ File systems
▪ Loadable system calls
▪ Executable formats
▪ STREAMS modules
▪ Miscellaneous
▪ Device and bus drivers
Hybrid Systems:
❖ The Operating System combines different structures, resulting in hybrid systems that
address performance, security, and usability issues.
❖ They are monolithic, because having the operating system in a single address space
provides very efficient performance.
❖ However, they are also modular, so that new functionality can be dynamically added to
the kernel.
❖ Example: Linux and Solaris are monolithic (simple) and also modular, IOS.
❖ Apple IOS Structure
Dual-Mode :
❖ In order to ensure the proper execution of the operating system, we must be able to
distinguish between the execution of operating-system code and user defined code.
❖ The computer systems provide hardware support that allows us to differentiate among
various modes of execution.
❖ There are two separate modes of operation
▪ User mode
▪ Kernel mode(Supervisor mode or system mode or privileged mode)
S.GANESAN AP/CSE, Computer Science And Engineering
P.T. Lee Chengalvaraya Naicker College of Engineering & Technology
Oovery, Veliyur Post, Kanchipuram, 631 502.
❖ A bit, called the mode bit, is added to the hardware of the computer to indicate the
current mode: kernel (0) or user (1)
❖ The mode bit, can distinguish between a task that is executed on behalf of the operating
system and one that is executed on behalf of the user.
❖ When the computer system is executing on behalf of a user application, the system is in
user mode and when a user application requests a service from the operating system the
system must make a transition from user to kernel mode
❖ At system boot time, the hardware starts in kernel mode. The operating system is then
loaded and starts user applications in user mode.
❖ Whenever a trap or interrupt occurs, the hardware switches from user mode to kernel
mode (that is, changes the state of the mode bit to 0).
❖ The dual mode of operation provides us with the means for protecting the operating
system from errant users—and errant users from one another
❖ The hardware allows privileged instructions to be executed only in kernel mode. If an
attempt is made to execute a privileged instruction in user mode, the hardware does not
execute the instruction but rather treats it as illegal and traps it to the operating system
❖ System calls provide the means for a user program to ask the operating system to perform
tasks reserved for the operating system on the user program’s behalf.
❖ The lack of a hardware-supported dual mode can cause serious shortcomings in an
operating system.MS-DOS was written for the Intel 8088 architecture, which has no
mode bit and therefore no dual mode
❖ Once hardware protection is in place, it detects errors that violate modes. These errors are
normally handled by the operating system.
Timer:
❖ The operating system maintains control over the CPU. We cannot allow a user program
to get stuck in an infinite loop or to fail to call system services and never return control to
the operating system.
❖ A timer can be set to interrupt the computer after a specified period. A variable timer is
generally implemented by a fixed-rate clock and a counter.
❖ The operating system sets the counter. Every time the clock ticks, the counter is
decremented. When the counter reaches 0, an interrupt occurs
SYSTEM CALLS:
❖ The system call provides an interface to the operating system services.
❖ Application developers often do not have direct access to the system calls, but can access
them through an application programming interface (API). The functions that are included
in the API invoke the actual system calls.
❖ Systems execute thousands of system calls per second. Application developers design
programs according to an application programming interface (API).
❖ For most programming languages, the Application Program Interface provides a system
call interface that serves as the link to system calls made available by the operating
system.
❖ The system-call interface intercepts function calls in the API and invokes the necessary
system calls within the Operating system.
❖ Example: System calls for writing a simple program to read data from one file and
copy them to another file
❖ The caller of the system call need know nothing about how the system call is implemented or
what it does during execution.
❖ The caller need only obey the API and understand what the operating system will do as a
result of the execution of that system call.
❖ Three general methods are used to pass parameters to the operating system
o pass the parameters in registers
o parameters are generally stored in a block, or table, in memory, and the address of
the block is passed as a parameter in a register
o Parameters also can be placed, or pushed, onto the stack by the program and
popped off the stack by the operating system.
Types of System Calls:
❖ System calls can be grouped roughly into six major categories
➢ Process control,
➢ File manipulation,
➢ Device manipulation,
➢ Information maintenance,
➢ Communications,
➢ Protection.
PROCESS CONTROL:
❖ A Running program needs to be able to halt its execution either normally (end ()) or
abnormally (abort()).
❖ Under either normal or abnormal circumstances, the operating system must transfer
control to the invoking command interpreter.
❖ A process or job executing one program may want to load() and execute() another
program. This feature allows the command interpreter to execute a program as directed
by, for example, a user command, the click of a mouse, or a batch command.
❖ If we create a new job or process, or perhaps even a set of jobs or processes, we should
be able to control its execution that requires to determine and reset the attributes of a job
or process, including the job’s priority, its maximum allowable execution time, and so on
(get process attributes() and set process attributes()).
❖ We may also want to terminate a job or process that we created (terminate process()) if
we find that it is incorrect or is no longer needed.
❖ When a process has been created We may want to wait for a certain amount of time to
pass (wait time()) or we will want to wait for a specific event to occur (wait event()).
❖ The jobs or processes should then signal when that event has occurred (signal event()
❖ To start a new process, the shell executes a fork() system call. Then, the selected program
is loaded into memory via an exec() system call, and the program is executed
❖ When the process is done, it executes an exit() system call to terminate, returning to the
invoking process a status code of 0 or a nonzero error code.
FILE MANAGEMENT:
❖ In order to work with files We first need to be able to create () and delete () files. Either
system call requires the name of the file and perhaps some of the file’s attributes. Once
the file is created, we need to open() it and to use it.
❖ We may also read (), write (), or reposition ().Finally, we need to close () the file,
indicating that we are no longer using it.
❖ In addition, for either files or directories, we need to be able to determine the values of
various attributes and perhaps to reset them if necessary.
❖ File attributes include the file name, file type, protection codes, accounting information,
and so on. At least two system calls, get file attributes () and set file attributes (), are
required for this function.
❖ The System calls associated with File management includes
o File management
o create file, delete file
o open, close
o read, write, reposition
o get file attributes, set file attributes
DEVICE MANAGEMENT:
❖ A process may need several resources to execute—main memory, disk drives, access to
files, and so on. If the resources are available, they can be granted, and control can be
returned to the user process. Otherwise, the process will have to wait until sufficient
resources are available.
❖ A system with multiple users may require us to first request() a device, to ensure
exclusive use of it.
❖ After we are finished with the device, we release() it. These functions are similar to the
open() and close() system calls for files.
Once the device has been requested (and allocated to us), we can read(), write(), and (possibly)
reposition() the device, just as we can with files.
❖ I/O devices are identified by special file names, directory placement, or file attributes.
❖ The System calls associated with Device management includes
S.GANESAN AP/CSE, Computer Science And Engineering
P.T. Lee Chengalvaraya Naicker College of Engineering & Technology
Oovery, Veliyur Post, Kanchipuram, 631 502.
SYSTEM PROGRAMS:
❖ System programs, also known as system utilities, provide a convenient environment for
program development and execution.
❖ They can be divided into these categories:
o File management
o Status information
o File modification.
o Programming-language support
o Program loading and execution
o Communications
o Background services
i)File Management:
❖ These programs create, delete, copy, rename, print, dump, list, and generally manipulate
files and directories.
ii)Status Information:
❖ Some programs simply ask the system for the date, time, amount of available memory or
disk space, number of users, or similar status information.
❖ Others are more complex, providing detailed performance, logging, and debugging
information.
iii)File Modification:
❖ Several text editors may be available to create and modify the content of files stored on
disk or other storage devices
❖ There may also be special commands to search contents of files or perform
transformations of the text.
iv)Programming Language support:
❖ Compilers, assemblers, debuggers, and interpreters for common programming languages
(such as C, C++, Java, and PERL) are often provided with the operating system.
v)Program Loading and Execution:
❖ Once a program is assembled or compiled, it must be loaded into memory to be executed.
S.GANESAN AP/CSE, Computer Science And Engineering
P.T. Lee Chengalvaraya Naicker College of Engineering & Technology
Oovery, Veliyur Post, Kanchipuram, 631 502.
OS GENERATION:
❖ The operating systems are designed to run on any of a class of machines at a variety of
sites with a variety of peripheral configurations.
❖ The Computer system must then be configured or generated for each specific computer
site, a process sometimes known as system generation SYSGEN.
❖ The operating system is normally distributed on disk, on CD-ROM or DVD-ROM, or as
an “ISO” image, which is a file in the format of a CD-ROM or DVD-ROM.
❖ To generate a system, the special program called SYSGEN program reads from a given
file, or asks the operator of the system for information concerning the specific
configuration of the hardware system.
❖ The following kinds of information must be determined.
o What CPU is to be used?
o How will the boot disk be formatted?
o How much memory is available?
o What devices are available?
o What operating-system options are desired, or what parameter values are to be
used?
❖ A system administrator can use this information to modify a copy of the source code of
the operating system. The operating system then is completely compiled.
❖ The system description can lead to the creation of tables and the selection of modules
from a precompiled library. These modules are linked together to form the generated
operating system
❖ It is also possible to construct a system that is completely table driven. All the code is
always part of the system, and selection occurs at execution time, rather than at compile
or link time.
SYSTEM BOOT:
❖ The procedure of starting a computer by loading the kernel is known as booting the
system.
❖ 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.
❖ In some computer systems system booting is a two step process.
o First a simple bootstrap loader fetches a more complex boot program from disk
o A complex boot program loads the OS
❖ The bootstrap program can perform a variety of tasks. Usually, one task is to run
diagnostics to determine the state of the machine.
❖ It can also initialize all aspects of the system, from CPU registers to device controllers
and the contents of main memory and then it starts the Operating system.
❖ 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 the bootstrap loader is stored in firmware, and the operating
system is on disk.
❖ The Bootstrap program has a piece of code that can read a single block at a fixed location
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.
❖ A disk that has a Boot partition is called as a Boot Disk.
❖ GRUB is an example of an open-source bootstrap program for Linux systems.