Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE) PDF Download

Microkernel in Operating Systems

Kernel is the core part of an operating system which manages system resources. It also acts like a bridge between application and hardware of the computer. It is one of the first programs loaded on start-up (after the Bootloader).

Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

Kernel mode and User mode of CPU operationThe CPU can execute certain instruction only when it is in the kernel mode. These instruction are called privilege instruction. They allow implementation of special operation whose execution by the user program could interface with the functioning of operating system or activity of another user program. For example, instruction for managing memory protection.

  • The operating system puts the CPU in kernel mode when it is executing in the kernel so, that kernel can execute some special operation.
  • The operating system puts the CPU in user mode when a user program is in execution so, that user program cannot interface with the operating system program.
  • User-level instruction does not require special privilege. Example are ADD,PUSH,etc.

Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

The concept of modes can be extended beyond two, requiring more than a single mode bit CPUs that support virtualization use one of these extra bits to indicate when the virtual machine manager, VMM, is in control of the system. The VMM has more privileges than ordinary user programs, but not so many as the full kernel.
System calls are typically implemented in the form of software interrupts, which causes the hardware’s interrupt handler to transfer control over to an appropriate interrupt handler, which is part of the operating system, switching the mode bit to kernel mode in the process. The interrupt handler checks exactly which interrupt was generated, checks additional parameters ( generally passed through registers ) if appropriate, and then calls the appropriate kernel service routine to handle the service requested by the system call.
User programs’ attempts to execute illegal instructions ( privileged or non-existent instructions ), or to access forbidden memory areas, also generate software interrupts, which are trapped by the interrupt handler and control is transferred to the OS, which issues an appropriate error message, possibly dumps data to a log ( core ) file for later analysis, and then terminates the offending program.

What is Microkernel?
Microkernel is one of the classification of the kernel. Being a kernel it manages all system resources. But in a microkernel, the user services and kernel services are implemented in different address space. The user services are kept in user address space, and kernel services are kept under kernel address space, thus also reduces the size of kernel and size of operating system as well.

Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

It provides minimal services of process and memory management. The communication between client program/application and services running in user address space is established through message passing, reducing the speed of execution microkernel. The Operating System remains unaffected as user services and kernel services are isolated so if any user service fails it does not affect kernel service. Thus it adds to one of the advantages in a microkernel. It is easily extendable i.e. if any new services are to be added they are added to user address space and hence requires no modification in kernel space. It is also portable, secure and reliable.

Microkernel Architecture
Since kernel is the core part of the operating system, so it is meant for handling the most important services only. Thus in this architecture only the most important services are inside kernel and rest of the OS services are present inside system application program. Thus users are able to interact with those not-so important services within the system application. And the microkernel is solely responsible for the most important services of operating system they are named as follows:

  • Inter process-Communication
  • Memory Management
  • CPU-Scheduling

Advantages of Microkernel

  • The architecture of this kernel is small and isolated hence it can function better.
  • Expansion of the system is easier, it is simply added in the system application without disturbing the kernel.

Monolithic Kernel and key differences from Microkernel

Apart from microkernel, Monolithic Kernel is another classification of Kernel. Like microkernel this one also manages system resources between application and hardware, but user services and kernel services are implemented under same address space. It increases the size of the kernel, thus increases size of operating system as well.
This kernel provides CPU scheduling, memory management, file management and other operating system functions through system calls. As both services are implemented under same address space, this makes operating system execution faster.
Below is the diagrammatic representation of Monolithic Kernel:

Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

If any service fails the entire system crashes, and it is one of the drawbacks of this kernel. The entire operating system needs modification if user adds a new service.

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.

Key differences between Monolithic Kernel and Microkernel
Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

Difference between User Level thread and Kernel Level thread
Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

The document Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Operating System.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
10 videos|99 docs|33 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Microkernel & Monolithic Kernel - Operating System - Computer Science Engineering (CSE)

1. What is a microkernel in operating systems?
Ans. A microkernel is a type of kernel architecture in an operating system where the kernel is kept minimalistic and only essential services are included. It provides a small set of functionality such as process management, memory management, and inter-process communication, while other services are implemented as user-level processes or servers.
2. How does a microkernel differ from a monolithic kernel?
Ans. In a monolithic kernel, the entire operating system runs in kernel mode and provides all services, including device drivers, file systems, and networking protocols, within a single address space. On the other hand, in a microkernel, only essential services are implemented in the kernel, while other services run as user-level processes. This separation of services improves modularity, flexibility, and robustness in a microkernel-based system.
3. What are the advantages of using a microkernel architecture?
Ans. Some advantages of microkernel architecture include: 1. Modularity: The separation of services into user-level processes allows for easy addition, removal, and modification of functionalities without affecting the kernel. 2. Fault isolation: If a service crashes in a microkernel-based system, it does not affect the stability of the kernel or other services, as they are isolated from each other. 3. Security: By keeping the kernel minimalistic, the attack surface is reduced, making it harder for malicious code to exploit vulnerabilities. 4. Portability: Microkernels are usually more portable as they have fewer dependencies on hardware and architecture-specific code. 5. Extensibility: New services can be added without modifying the kernel itself, making it possible to tailor the operating system to specific needs.
4. Are there any disadvantages of using a microkernel architecture?
Ans. Yes, there are some disadvantages of using a microkernel architecture: 1. Performance overhead: The communication between user-level processes and the microkernel introduces additional overhead, which can impact the overall system performance. 2. Complexity: Developing and maintaining a microkernel-based operating system can be more complex compared to a monolithic kernel, as it requires careful design and coordination between different services. 3. Limited hardware support: Some hardware features, such as certain device drivers, may be more challenging to implement in a microkernel architecture compared to a monolithic kernel. 4. Increased development time: Due to the modular nature of a microkernel, more time may be required for developing and testing separate user-level processes for each service. 5. Compatibility issues: Porting existing monolithic kernel-based software to a microkernel-based system may require significant modifications, leading to compatibility issues.
5. Which operating systems use a microkernel architecture?
Ans. Some notable operating systems that use a microkernel architecture include: 1. QNX: It is a real-time operating system used in various embedded systems, including automotive, industrial, and medical devices. 2. MINIX: Originally developed as an educational tool, MINIX is a microkernel-based operating system known for its simplicity and ease of understanding. 3. L4: The L4 microkernel family has been used in various research and commercial operating systems, including Fiasco.OC and seL4. 4. HURD: As a GNU project, HURD aims to create a fully free and flexible operating system using a microkernel architecture. 5. Symbian OS: Although now obsolete, Symbian OS was widely used in early smartphones and featured a microkernel architecture for better reliability and security.
10 videos|99 docs|33 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

MCQs

,

Exam

,

Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

,

ppt

,

shortcuts and tricks

,

Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

,

past year papers

,

Extra Questions

,

Viva Questions

,

Sample Paper

,

Important questions

,

Summary

,

Previous Year Questions with Solutions

,

Microkernel & Monolithic Kernel | Operating System - Computer Science Engineering (CSE)

,

Free

,

practice quizzes

,

pdf

,

study material

,

Semester Notes

,

Objective type Questions

,

mock tests for examination

,

video lectures

;