Os Mod 1.4
Os Mod 1.4
2
Operating system structures:
1. Layered
1. Monolithic and
1. Microkernel
3
Layered Architecture of OS
The operating system can be implemented with the help of various structures.
The structure of the OS depends mainly on how the various common components of the
operating system are interconnected and melded into the kernel.
Depending on this, we have to follow the structures of the operating system.
The layered structure approach breaks up the operating system into different layers and
retains much more control on the system.
The bottom layer (layer 0) is the hardware, and the topmost layer (layer N) is the user
interface.
These layers are so designed that each layer uses the functions of the lower-level layers
only.
It simplifies the debugging process as if lower-level layers are debugged, and an error occurs
during debugging. 4
The error must be on that layer only as the lower-level layers have already been debugged.
Layered Architecture of OS
Layered Architecture of OS
Architecture of Layered Structure
This type of operating system was created as an improvement over the early monolithic
systems. The operating system is split into various layers in the layered operating system, and
each of the layers has different functionalities. There are some rules in the implementation of
the layers as follows.
● A particular layer can access all the layers present below it, but it cannot access them.
That is, layer n-1 can access all the layers from n-2 to 0, but it cannot access the nth
● Layer 0 deals with allocating the processes, switching between processes when
interruptions occur or the timer expires. It also deals with the basic multiprogramming of
the CPU.
Thus if the user layer wants to interact with the hardware layer, the response will be traveled
through all the layers from n-1 to 1. Each layer must be designed and implemented such 6
that it
will need only the services provided by the layers below it.
Advantages of Layered Structure
There are several advantages of the layered structure of operating system design, such as:
1. Modularity: This design promotes modularity as each layer performs only the tasks it is
scheduled to perform.
2. Easy debugging: As the layers are discrete so it is very easy to debug. Suppose an error
occurs in the CPU scheduling layer. The developer can only search that particular layer to
debug, unlike the Monolithic system where all the services are present.
3. Easy update: A modification made in a particular layer will not affect the other layers.
4. No direct access to hardware: The hardware layer is the innermost layer present in the
design. So a user can use the services of hardware but cannot directly modify or access it,
unlike the Simple system in which the user had direct access to the hardware.
5. Abstraction: Every layer is concerned with its functions. So the functions and
7
implementations of the other layers are abstract to it.
Disadvantages of Layered Structure
Though this system has several advantages over the Monolithic and Simple design, there are also
some disadvantages, such as:
1. Complex and careful implementation: As a layer can access the services of the layers below it, so
the arrangement of the layers must be done carefully. For example, the backing storage layer uses
the services of the memory management layer. So it must be kept below the memory management
layer. Thus with great modularity comes complex implementation.
2. Slower in execution: If a layer wants to interact with another layer, it requests to travel through all
the layers present between the two interacting layers. Thus it increases response time, unlike the
Monolithic system, which is faster than this. Thus an increase in the number of layers may lead to a
very inefficient design.
3. Functionality: It is not always possible to divide the functionalities. Many times, they are
interrelated and can't be separated. 8
► OS execution fast
10
11
Advantages of the monolithic operating
system
► Simple structure
12
Limitations of a monolithic operating system
• If user has to add any new service. User needs to modify entire
operating system.
13
Microkernel System Structure
14
Microkernel System Structure
► to keep the kernel as small as possible
► Microkernel and system applications can interact with each other by message passing
► microkernel is solely responsible for the three most important services of operating
system namely:
1. Inter-Process communication
2. Memory management
3. CPU scheduling
15
Microkernel System Structure
16
➢ Secure
➢ Microkernels are modular, and the different modules can be replaced, reloaded,
modified without even touching the Kernel.
• Context switch or a function call needed when the drivers are implemented as
procedures or processes, respectively.
18
Microkernel System Structure
19
20
?
s
r ie
u e
Q
ny
A
22