Kernel
- The core of OS.
- It directly talks to the hardware.
- Never interact with the kernel directly as a user.
In each OS
- Linux → Linux Kernel
- Windows → NT Kernel
- macOS → XNU Kernel (Mach + BSD)
Responsible for
- Process Management
- Create, schedule, and kill processes
- Context switching between processes/threads
- Memory Management
- Allocate RAM
- Virtual memory, paging, swapping
- Hardware Management
- Communicates with devices via drivers
- Disk, keyboard, mouse, network card, GPU
- System Calls
- Provides APIs for programs to request services
- Example: read file, write file, open socket
Diagram
Applications (Chrome, Java app, Docker)
↓
Shell / GUI
↓
Kernel
↓
Hardware (CPU, RAM, Disk)