📌 Linux Kernel
Nearly everything that the kernel does revolves around main memory. One of the kernel’s tasks is to split memory into many subdivisions, and it must maintain certain state information about those subdivisions at all times. Each process gets its own share of memory, and the kernel must ensure that each process keeps to its share. The kernel is in charge of managing tasks in four general system areas:
-
Processes The kernel is responsible for determining which processes are allowed to use the CPU.
-
Memory The kernel needs to keep track of all memory—what is currently allocated to a particular process, what might be shared between processes, and what is free.
-
Device drivers The kernel acts as an interface between hardware (such as a disk) and processes. It’s usually the kernel’s job to operate the hardware.
-
System calls and support Processes normally use system calls to communicate with the kernel. We’ll now briefly explore each of these areas.
📌 Kernel Architecture
-
Most older Operating system are monolithic that is whole operating system is a single executable file that runs in kernel mode.
-
This binary contains the process management , memort management , file system and the rest (Ex. Unix)
-
The alternative is microkernel base system , in which most of the OS run as separate processes , mostly outside the kernel
-
They communicate by message passing the kernels job is to handle the message passing, interrupt handling , low-level process management and possible the I/O . ( Ex. Mach , GNU Hurd )
📌 Difference between Monolithic and Microlithic kernel
Monolithic Kernel | Microlithic Kernel |
---|---|
Kernel Size Increases because kernel + kernel subsystems compiled as single binary | kernel size is small because kernel subsystem |
Difficult to extension or buh fixing | Easily extensible and bug fixing |
Need to Compile entire source code | Easy recover from crash |
bad maintainability | slow due to complex message passing between services |
fast , run as single binary | Process Management is complex |
Communication between service is faster | Communication is slow |
No Cash Recovery | Easily recoverable from crashing |
More Secure | |
Linux , window etc | MACos , Windows NT , QNX etc |