3. Definition of Kernel
• The fundamental part of an operating system.
• Responsible for providing secure access to the
machine's hardware for various programs.
• Responsible for deciding when and how long a
program can use a certain hardware.
4.
5.
6. Hardware must provide at least two
execution levels:
• Kernel mode In this mode, the software has
access to all the instructions and every piece
of hardware.
• User mode In this mode, the software is
restricted and cannot execute some
instructions, and is denied access to some
hardware.
9. Monolithic Kernels
• All OS services operate in kernel space
• Good performance
• Execute all of their code in the same address
space (kernel space)
• Rich and powerful hardware access
• Monolithic Kernel : Kernel Image = (Kernel
Core+Kernel Services). When system boots up
entire services are loaded and resides in
memory.
• Example: Windows and Unix.
11. Disadvantages
Disadvantages
The dependencies between system components
A bug in a driver might crash the entire system
Large kernels → very difficult to maintain
• E.g. Unix, Linux
12.
13. Microkernels
• Minimalist approach
– IPC, virtual memory, thread scheduling
• Put the rest into user space
– Device drivers, networking, file system, user interface
• Run most of their services in user space
→improve maintainability and modularity
• Micro kernel : Kernel Image = Kernel Core. Services are
build into special modules which can be loaded and
unloaded as per need.
15. • Disadvantages
– Lot of system calls and context switches
• E.g. Mach, L4, AmigaOS, K42
16.
17. Operating System Architecture
Monolithic Kernel Microkernel
S4
Server: Dynamically loaded Kernel code and data: server program:
17
.......
.......
Key:
S1 .......
S1 S2 S3
S2 S3 S4
Figure 5. Monolithic kernel and microkernel
Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005
18.
19.
20. Summary: Kernels
• Monolithic kernels
– Advantages: performance
– Disadvantages: difficult to debug and maintain
• Microkernels
– Advantages: more reliable and secure
– Disadvantages: more overhead
• Hybrid Kernels
– Advantages: benefits of monolithic and microkernels
– Disadvantages: same as monolithic kernels
• Nano kernel & Exo kernels
– Advantages: minimal and simple
– Disadvantages: more work for application developers