Home Linux Kernel in Operating System

Kernel in Operating System

by Team Impactmillions
7 minutes read

Kernel is central component of an operating system that manages operations of computer and hardware. It basically manages operations of memory and CPU time. It is core component of an operating system. Kernel acts as a bridge between applications and data processing performed at hardware level using inter-process communication and system calls. 

  • Kernel loads first into memory when an operating system is loaded and remains into memory until operating system is shut down again. It is responsible for various tasks such as disk management, task management, and memory management. 
  • Kernel has a process table that keeps track of all active processes
  • Process table contains a per process region table whose entry points to entries in region table.
  • Kernel loads an executable file into memory during ‘exec’ system call’.

It decides which process should be allocated to processor to execute and which process should be kept in main memory to execute. It basically acts as an interface between user applications and hardware. The major aim of kernel is to manage communication between software i.e. user-level applications and hardware i.e., CPU and disk memory. 

Objectives of Kernel

  • To establish communication between user level application and hardware. 
  • To decide state of incoming processes.  
  • To control disk management.  
  • To control memory management. 
  • To control task management. 

Types of Kernel

1. Monolithic Kernel

It is one of types of kernel where all operating system services operate in kernel space. It has dependencies between systems components. It has huge lines of code which is complex. 

Monolithic Kernel
Monolithic Kernel

Example: 

Unix, Linux, Open VMS, XTS-400 etc. 

Advantage:
It has good performance.  

Disadvantage: 
It has dependencies between system component and lines of code in millions. 

2. Micro Kernel 

It is kernel types which has minimalist approach. It has virtual memory and thread scheduling. It is more stable with less services in kernel space. It puts rest in user space. 

Micro Kernel 

Example : 
 

Mach, L4, AmigaOS, Minix, K42 etc.
  • Advantage : 
    It is more stable.  
  • Disadvantage : 
    There are lots of system calls and context switches.  

3. Hybrid Kernel

It is the combination of both monolithic kernel and microkernel. It has speed and design of monolithic kernel and modularity and stability of microkernel. 

Example : 
 

Windows NT, Netware, BeOS etc.
  • Advantage : 
    It combines both monolithic kernel and microkernel.  
  • Disadvantage : 
    It is still similar to monolithic kernel.  

4. Exo Kernel

It is the type of kernel which follows end-to-end principle. It has fewest hardware abstractions as possible. It allocates physical resources to applications. 

Example : 
 

Nemesis, ExOS etc.
  • Advantage : 
    It has fewest hardware abstractions.  
  • Disadvantage : 
    There is more work for application developers.  

5. Nano Kernel

It is the type of kernel that offers hardware abstraction but without system services. Micro Kernel also does not have system services therefore the Micro Kernel and Nano Kernel have become analogous. 

Example : 

EROS etc.
  • Advantage : 
    It offers hardware abstractions without system services.  
  • Disadvantage : 
    It is quite same as Micro kernel hence it is less used.  

What is Kernel Panic?

A kernel panic is a critical system halt caused by a severe error the operating system (OS) can’t handle. It occurs when the kernel, the core of the OS, encounters a low-level issue it can’t resolve on its own.

Here’s why a kernel panic occurs:

  • Improper memory access: The OS attempts to access or modify memory incorrectly.
  • Software problems: Bugs in software or malware can trigger a panic.
  • Kernel errors: Errors within the kernel itself, including faulty drivers.
  • Hardware malfunctions: Faulty RAM, hard drive issues, or malfunctioning processors can all cause kernel panics.
  • Unsupported hardware: Using hardware incompatible with the system can lead to panics.
  • Missing or damaged components: Missing drives, corrupted partitions, or incompatible device drivers can also be culprits.

related posts

Leave a Comment

Enable Notifications OK No thanks