Structures of OS
Structures of OS
Simple Structure :
There are many operating systems that
have a rather simple structure.
These started as small systems and
rapidly expanded much further than
their scope.
A common example of this is MS-DOS.
It was designed simply for a niche
amount for people.
Disadvantage :
There was no CPU Execution Mode
(user and kernel), and so errors in
applications could cause the
whole system to crash. An image to illustrate the structure of MS-DOS
Monolithic Approach
Monolithic Approach
• The entire operating system works in the kernel space
in the monolithic system.
• This increases the size of the kernel as well as the
operating system.
• This is different than the microkernel system where the
minimum software that is required to correctly
implement an operating system is kept in the kernel.
• The kernel provides various services such as memory
management, file management, process scheduling
etc. using function calls. This makes the execution of
the operating system quite fast as the services are
implemented under the same address space.
Monolithic Approach
Advantages of Monolithic Kernel –
• One of the major advantage of having monolithic kernel is that it
provides CPU scheduling, memory management, file management
and other operating system functions through system calls.
• The other one is that it is a single large process running entirely in a
single address space.
• It is a single static binary file. Example of some Monolithic Kernel
based OSs are: Unix, Linux, Open VMS, XTS-400, z/TPF.
Disadvantages of Monolithic Kernel –
• One of the major disadvantage of monolithic kernel is that, if
anyone service fails it leads to entire system failure.
• If user has to add any new service. User needs to modify entire
operating system.
Layered structure of OS
Layered structure of OS
• This approach breaks up the operating system into
different layers.
• This allows implementers to change the inner
workings, and increases modularity.
• As long as the external interface of the routines don’t
change, developers have more freedom to change the
inner workings of the routines.
• With the layered approach, the bottom layer is the
hardware, while the highest layer is the user interface.
• The main advantage is simplicity of construction and
debugging.
Layered structure of OS
Hardware
• This layer interacts with the system hardware and coordinates with all the peripheral devices used such as
printer, mouse, keyboard, scanner etc. The hardware layer is the lowest layer in the layered operating
system architecture.
CPU Scheduling
• This layer deals with scheduling the processes for the CPU. There are many scheduling queues that are
used to handle processes. When the processes enter the system, they are put into the job queue. The
processes that are ready to execute in the main memory are kept in the ready queue.
Memory Management
• Memory management deals with memory and the moving of processes from disk to primary memory for
execution and back again. This is handled by the third layer of the operating system.
Process Management
• This layer is responsible for managing the processes i.e assigning the processor to a process at a time. This
is known as process scheduling. The different algorithms used for process scheduling are FCFS (first come
first served), SJF (shortest job first), priority scheduling, round-robin scheduling etc.
I/O Buffer
• I/O devices are very important in the computer systems. They provide users with the means of interacting
with the system. This layer handles the buffers for the I/O devices and makes sure that they work correctly.
User Programs
• This is the highest layer in the layered operating system. This layer deals with the many user programs and
applications that run in an operating system such as word processors, games, browsers etc.
Layered structure of OS
Advantages of Layered architecture:
• Dysfunction of one layer will not affect the entire operating system
• Easier testing and debugging due to isolation among the layers.
• Adding new functionalities or removing the obsolete ones is very
easy.