Definition:

  • Heart of Operating System
    • The kernel also controls all the hardware devices plugged into the system. It is one of the first elements to be loaded on startup and remains in the main memory during the computer’s operation.
  • Sits between Software and Hardware
  • ex:

Kernel space vs User space:

  • The kernel space is simply where the kernel executes the services that it provides.
  • The user space is the area of memory that includes everything outside of kernel space.
    • Software running in user space can access resources provided by kernel space through the use of system calls.

Kernel Module

  • system-level object that extends the functionality of the kernel
  • It can be dynamically loaded or unloaded into the kernel when required. It enables the kernel to update or recompile itself without requiring the system to reboot.
  • .ko extension

Kernel panic:

  • mechanism by which the system detects a fatal system error and responds to it. A
  • fatal error typically results in the system becoming unstable or totally unusable.
  • Software that handles kernel panics will display an error message to the user and dump the current state of kernel memory to a storage device for later debugging.
  • Depending on how the system is configured, the panic handler will either reboot the system automatically or wait for the user to do so.

Types of kernels:

Monolithic Kernel
Micro Kernel
Hybrid Kernel