Core component of an operating system, responsible for managing the system’s hardware and software resources.
#Importance
- Modularity and portability
- Process management
- Filesystem
- Pipes and Filters
- Inter-Process Communication (IPC)
- Security and Permission Model
- Standard POSIX
- Set of APIs that made operating systems be compatible.
#Kernel Architecture
Monolithic (Windows, Linux(not really), BSD, etc) vs Microkernel
Microkernell has basically nothing incorporated in the kernel (basics of memory and storage). Others are added as modules.
Monolithic has everything in it. Used more today. Advantage because of speed.
MacOS X uses a hybrid approach. Most features are monolithic, some are microkernel. MACH kernel.
#Components
- Virtual File System
- Memory Manager
- Process Scheduler
- Inter-Process Communication
- Network Interface
#Boot Process
- BIOS/UEFI Stage
- Bootloader (GRUB/LILO)
- Kernel Intialization
- Init/Systemd process
#Kernel Modules
- lsmod
- modinfo Mac
- kmutil showloaded
#System Calls
fork()
- create a new processexec()
- execute a new program in the context of an existing process.read()
,write()
- read from and write to files and devices.open()
,close()
- to open and close file descriptors.wait()
- wait for a process to change statesocket()
- create a socket for network communication
#Kernel Space vs User Space