Operating System Structures
Operating System Structures
1. Simple Structure
2. Monolithic Structure
3. Micro-Kernel Structure
4. Layered Structure
5. Modular Structure
6. Virtual Machines
65 65
Simple Structure
66 66
SIMPLE STRUCTURE
68 68
Monolithic Structure
70
Layered Structure
• The OS is separated into layers or levels in this kind of arrangement. Layer 0 (the lowest
layer) contains the hardware, and layer 1 (the highest layer) contains the user interface
(layer N).
• These layers are organized hierarchically, with the top-level layers making use of the
capabilities of the lower-level ones.
• Layered structures are hierarchical, debugging is simpler, therefore all lower-level layers
are debugged before the upper layer is examined. As a result, the present layer alone has
to be reviewed since all the lower layers have already been examined.
71
LAYERED STRUCTURE
72
Layered Structure
• Advantages of Layered Structure:
• Work duties are separated since each layer has its own functionality, and there is some
amount of abstraction.
• Debugging is simpler because the lower layers are examined first, followed by the top
layers.
• Disadvantages of Layered Structure:
• Performance is compromised in layered structures due to layering.
• Construction of the layers requires careful design because upper layers only make use of
lower layers' capabilities.
73
Micro Kernel Structure
• The operating system is created using a micro-kernel framework that strips the kernel of
any unnecessary parts. Systems and user applications are used to implement these
optional kernel components. So, Micro-Kernels is the name given to these systems that
have been developed.
• Each Micro-Kernel is created separately and is kept apart from the others. As a result,
the system is now more trustworthy and secure. If one Micro-Kernel malfunctions, the
remaining operating system is unaffected and continues to function normally.
74
Microkernel Structure
Kernel is made as small as possible only the most important services are put inside
the kernel and rest of the OS service are present in the system application program.
The user can easily interact with those not-so important services within the system
applications kernel is solely responsible for the three most important services
of operating system namely:
Inter-Process communication
Memory management
CPU scheduling
Microkernel and system applications can interact with each other by message
passing as and when required.
This is extremely advantageous architecture since burden of kernel is reduced and
less crucial services are accessible to the user and hence security is improved too.
It is being highly adopted in the present-day systems.
75 75
MICROKERNEL STRUCTURE
76
Micro Kernel Structure
77
MICROKERNEL STRUCTURE
78
Micro Kernel Structure
• Advantages of Micro-Kernel Structure:
• It enables portability of the operating system across platforms.
• Due to the isolation of each Micro-Kernel, it is reliable and secure.
• The reduced size of Micro-Kernels allows for successful testing.
• The remaining operating system remains unaffected and keeps running properly even if
a component or Micro-Kernel fails.
• Disadvantages of Micro-Kernel Structure:
• The performance of the system is decreased by increased inter-module communication.
• The construction of a system is complicated.
79
Modular Structure
It is considered as the best approach for an OS. It
involves designing of a modular kernel. The
kernel has only a set of core components and
other services are added as dynamically loadable
modules to the kernel either during runtime or
boot time. It resembles layered structure due to
the fact that each kernel has defined and protected
interfaces, but it is more flexible than a layered
structure as a module can call any other
module. For example Solaris OS is organized as
shown in the figure.
80
Virtual Machines
• The hardware of our personal computer, including the CPU, disc drives, RAM, and NIC
(Network Interface Card), is abstracted by a virtual machine into a variety of various
execution contexts based on our needs, giving us the impression that each execution
environment is a separate computer. A virtual box is an example of it.
• An operating system enables us to run multiple processes concurrently while making it
appear as though each one is using a different processor and virtual memory by using
CPU-Scheduling and virtual memory techniques.
• The fundamental issue with the virtual machine technique is disc systems. Let’s say the
physical machine only has three disc drives, but it needs to host seven virtual machines.
• The program that creates virtual machines would need a significant amount of disc space
in order to provide virtual memory and spooling, so it should be clear that it is
impossible to assign a disc drive to every virtual machine. The answer is to make virtual
discs available.
81