Functions of Kernel

Kernel mode is the most privileged mode in an operating system, it interacts with the hardware to compute the process/execute an application.

Key functions of the kernel: -

  1. Process Management:

Responsible for creating, scheduling, and terminating processes. It manages the execution of processes, including resource allocation, synchronization, and inter-process communication.

  1. Memory Management:

Manages the allocation and deallocation of memory space to processes. It ensures that each process has sufficient memory while optimizing the use of RAM and preventing memory leaks.

  1. I/O Device Management:

Manages input and output devices, providing an abstraction layer that hides hardware specifics from applications. It includes buffering, caching, and spooling to enhance performance and efficiency.

  1. File Management:

Responsible for the organization, storage, retrieval, naming, sharing, and protection of files on storage devices. It provides a hierarchical file system and manages file permissions and access controls.

  1. Security Management:

Ensures that unauthorized users do not access system resources. It includes user authentication, access control mechanisms, and encryption to protect data integrity and confidentiality.

  1. Network Management:

Manages network connections and data transmission between devices. It includes protocols for communication, data transfer, and resource sharing across networks.

  1. Command Interpreter:

Also known as the shell, it provides a user interface for interacting with the operating system. Users can execute commands, run programs, and manage system resources through this interface.


Types of kernel

Monolithic kernel:

  • All the functions discussed above are bundled into the kernel, resulting in a bulky size and more memory utilization to run.
  • It is less reliable, as if one module has errors it can break down the whole kernel.
  • Provides high performance because of less mode switching.
  • E.g.: - Linux, Unix, MS-DOS.

Micro kernel:

  • Functionalities like memory and process management are bundled into the kernel.
  • Other functionalities like file and I/O management are kept in user space.
  • Smaller in size, more reliable than monolithic as they are separated and are stable.
  • Provides slow performance because of mode-switching overheads between user and kernel mode.
  • Eg.: - L4 Linux, Symbian OS, MINIX etc.

Hybrid Kernel:

  • Hybrid types of the kernel are designed to take advantage of both worlds: Monolithic and Micro.
  • File management is kept in user space, while the remaining functionalities are put in the kernel.
  • Provides performance and design of Monolithic while Modularity and stability of Micro.
  • E.g.: - MacOS, Windows NT/7/10.

Nano/Exo kernels...