Table of contents
1.
Introduction
1.1.
Kernel
1.2.
Types of Kernel
2.
Monolithic Kernel
2.1.
Advantages
2.2.
Disadvantages
3.
Differences between Monolithic Kernel and Microkernel
4.
Frequently Asked Questions 
4.1.
What is user mode?
4.2.
What is kernel mode?
4.3.
What is the dual-mode operation?
4.4.
What are interrupts in OS?
5.
Conclusion
Last Updated: Mar 27, 2024

Monolithic Kernel and Key differences from Microkernel

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?
Operating Systems

Introduction

An operating system (OS) is a software program that serves as a conduit between computer hardware and the user. It is a piece of software that coordinates the execution of application programs, software resources, and computer hardware. It also aids in the control of software and hardware resources such as file management, memory management, input/output, and a variety of peripheral devices such as a disc drive, printers, and so on. To run other applications, every computer system must have at least one operating system. Browsers, MS Office, Notepad Games, and other applications require an environment to execute and fulfill their functions. This blog explains the objectives of operating systems.

Also See, FCFS Scheduling Algorithm, Multiprogramming vs Multitasking

Kernel

The kernel is a computer program present at the very core of the OS. It acts as the central controlling part of the OS.

  • The kernel manages hardware and software operations and acts as an interface between user applications and hardware. 
  • The bootstrap program locates and loads into memory the operating system kernel. 
  • The main functions of the kernel are process management, memory management, device management, I/O communication, and interrupt handling.
  • A Kernel has its own protected ‘kernel space, a separate memory space inaccessible to other application programs. The kernel's code is loaded into the kernel space. The memory used by other applications is known as ‘user space’.
Kernal

Also see, Kernal in I/O Subsystem

Types of Kernel

There are five types of kernel 

  1. Monolithic Kernel
  2. Microkernel
  3. Hybrid Kernel
  4. Nano Kernel
  5. Exo Kernel

 

In this blog, we will be focusing on monolithic kernels.

Click here to read about Yarn vs NPM here. 

Monolithic Kernel

A monolithic Kernel is a computer system architecture where user and kernel services are implemented using the same memory space. 

  • As the same memory space is used, the size of the kernel and the size of the operating system increases.
  • Monolithic kernels provide CPU scheduling, device management, file management, memory management, process management, and other OS functions using system calls.
  • One disadvantage of this kernel is that if any system process or service fails, the entire system will crash. 
  • The execution of processes is fast in the case of a monolithic kernel.

 

Some monolithic kernel operating systems are Unix, Linux, OS/360, OpenVMS, Multics, AIX, BSD, etc.

Structure of Monolithic Kernal

Advantages

  • Process execution is faster in monolithic kernels.
  • The various services provided by monolithic kernels are CPU scheduling, device management, file management, memory management, process management, and other OS functions.
  • Fewer lines of codes need to be written for a monolithic kernel.
  • This kind of kernel is easy to design and implement.

Disadvantages

  • The whole system will crash if one component fails.
  • For adding a new service in a monolithic kernel, the user has to modify the entire operating system.
  • The code written in this OS is difficult to port.
  • There is a tendency to generate errors in the monolithic kernel as the user and kernel processes use the same memory.
  • It is challenging to manage and debug.
     

You can also read about the memory hierarchy, Open Source Operating System.

Differences between Monolithic Kernel and Microkernel

The significant differences between monolithic kernel and microkernel are

Monolithic kernal v/s MIcrokernal

You can also read about layered structure of operating system.

Frequently Asked Questions 

What is user mode?

A computer system is said to be in user mode when the system is executing on behalf of the user.

What is kernel mode?

Whenever the operating system takes over the control of the computer system, it is said to be in kernel mode. The hardware switches from user mode to kernel mode when an interrupt/trap occurs. This mode is also known as supervisor mode/ system mode/  privileged mode.

What is the dual-mode operation?

There are two modes of operation in OS to ensure proper execution of the OS and provide security to the OS. These two modes are
1) User mode
2) Kernel-mode
A ‘mode’ bit is added to the computer’s hardware to indicate the current mode. Kernel mode is represented by 0, and user mode is represented by 1. To switch from user mode to kernel mode, the mode bit should be 0 and vice versa.

What are interrupts in OS?

Interrupts are signals sent to the CPU from hardware or software. OS preempts the currently running process to handle the interrupt.

Conclusion

In this blog, we discussed monolithic kernels in Operating systems. We also talked about the critical differences between monolithic kernels and microkernels.

If you are preparing for interviews, don’t forget to study Operating System - as it is one of the most asked topics in interviews. You should check our amazing course on Operating systems here, designed specifically for you! 

Recommended Readings:


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, Uber, Microsoft, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, DBMS, System Design, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Happy Learning Ninja!

Live masterclass