OS Lecture 5
OS Lecture 5
Part 2: Lecture 8
Operating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013
Different approaches or
Structures of Operating
Systems
Operating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013
OS Structure
Operating System Concepts – 9th Edition 2.3 Silberschatz, Galvin and Gagne ©2013
Simple Structure
Operating System Concepts – 9th Edition 2.4 Silberschatz, Galvin and Gagne ©2013
Example Simple OS
Operating System Concepts – 9th Edition 2.5 Silberschatz, Galvin and Gagne ©2013
Simple structure:
No well defined structure
Small, simple and limited systems
The interfaces and levels of functionality are not well separated
Example
MS DOS
MS-DOS application programs are
able to access the basic I/O routines.
These types of operating system cause
the entire system to crash if one of the
user programs fails.
Operating System Concepts – 9th Edition 2.6 Silberschatz, Galvin and Gagne ©2013
Advantages/ Disadvantages of Simple
Structured OS
Advantages of Simple structure:
It delivers better application performance because of the few interfaces
between the application program and the hardware.
Easy for kernel developers to develop such an operating system.
Operating System Concepts – 9th Edition 2.7 Silberschatz, Galvin and Gagne ©2013
Layered structure:
OS is broken into number of layers (levels) .
Use modular approach.
More control on system
The bottom layer (layer 0) is the hardware and the topmost layer (layer N) is
the user interface
Each layer uses the functions of the lower level layers only.
This simplifies the debugging process as if lower level layers are debugged
and an error occurs during debugging then the error must be on that layer
only as the lower level layers have already been debugged
Example
UNIX, LINUX
Operating System Concepts – 9th Edition 2.8 Silberschatz, Galvin and Gagne ©2013
Advantages of Layered OS
Easy to Improve and Modify
• Each layer is independent, meaning we can update or change one
layer without affecting the others.
• If we want to improve security, performance, or add new features,
we can do so without rewriting the entire system.
Easier Debugging and System Verification
• Since each layer is separate, if an error occurs, we only need to check
that specific layer instead of searching through the whole system.
• Debugging is more organized and faster because issues are confined to a
particular layer.
Operating System Concepts – 9th Edition 2.9 Silberschatz, Galvin and Gagne ©2013
Disadvantages of Layered OS
Slower Performance
• Since each layer depends on the one below it, every operation must pass
through multiple layers.
• This extra processing slows down the system compared to simpler
structures like MS-DOS, where programs can directly interact with
hardware.
Higher Risk of System Breakdown
• If one layer has an issue, it can affect the layers above it, leading to
system failure.
• More layers mean more points where something can go wrong.
Complex Design and Planning
• Each layer should be carefully designed so that it only uses functions
from lower layers.
• If not planned properly, the system may become inefficient or difficult to
maintain.
Operating System Concepts – 9th Edition 2.10 Silberschatz, Galvin and Gagne ©2013
Micro-Kernal OS
User
Mode
Kernal
Mode
Operating System Concepts – 9th Edition 2.11 Silberschatz, Galvin and Gagne ©2013
Micro-kernel:
a system architecture where only essential services run in the kernel, while
other services operate in user space.
This result in a smaller kernel called the micro-kernel.
User Applications – Programs like browsers, text editors, and games run
in user space and request services from the system.
System Services – Higher-level OS functions (such as file systems,
network management, and UI management) operate outside the kernel.
Device Drivers – Unlike monolithic OS structures, device drivers run in
user space, reducing the risk of system crashes
Microkernel Core (Minimal OS Core) – Only contains essential functions:
1. Process Management – Controls how applications execute.
2. Interprocess Communication (IPC) – Manages communication between
different programs.
3. Memory Management – Allocates memory to processes efficiently
Hardware Layer – The physical components (CPU, RAM, storage, etc.) of the
system.
Operating System Concepts – 9th Edition 2.12 Silberschatz, Galvin and Gagne ©2013
Advantages of Micro-kernel
Advantages of Micro-kernel structure:
2. Better Security – Running drivers and services outside the kernel reduces
the risk of malicious attacks affecting the core system.
3. Modular & Scalable – New features can be added without modifying the
kernel, making it flexible for modern operating systems.
Operating System Concepts – 9th Edition 2.13 Silberschatz, Galvin and Gagne ©2013
Disadvantages of Micro-kernal
1. Slower Performance
• Since many essential services (like file systems and device drivers) run
outside the kernel, they need to communicate frequently.
• This frequent communication (called Interprocess Communication or
IPC) can slow down the system.
2. Complex Design
• microkernel is harder to design and develop compared to a monolithic
kernel.
• needs careful planning to ensure efficient communication between
different system components.
3. More Overhead ⚙️
• Since system services run separately, they need to send messages back
and forth.
• This increases the overhead (extra processing work), which can reduce
efficiency
Operating System Concepts – 9th Edition 2.14 Silberschatz, Galvin and Gagne ©2013
Modular structure or approach:
Considered as the best approach for an OS. It involves designing of a
modular kernel.
The kernel has only set of core components and other services are added
as dynamically loadable modules to the kernel either during run time or boot
time.
Module can communicate with other with the help of kernal.
Example: Solaris OS
Operating System Concepts – 9th Edition 2.15 Silberschatz, Galvin and Gagne ©2013
Solaris Modular Approach
Operating System Concepts – 9th Edition 2.16 Silberschatz, Galvin and Gagne ©2013