Kernel
The kernel is the core component of an operating system, managing the system's resources, facilitating communication between hardware and software, and providin...
The kernel is the core component of an operating system (OS), acting as the primary interface between the system's hardware and the software applications running on it. It manages the system's resources, including the CPU, memory, and I/O devices, and provides essential services such as [process management](/uk/terms/process-management), memory management, and device management. When a user application needs to access hardware resources, it makes a system call to the kernel. The kernel then translates this request into instructions that the hardware can understand and execute. It also handles task scheduling, deciding which processes get to use the CPU and for how long, and manages memory allocation, ensuring that processes have the memory they need without interfering with each other. Furthermore, the kernel is responsible for inter-process communication (IPC), allowing different applications to exchange data and synchronize their operations. Its modular design often allows for dynamic loading and unloading of modules, such as device drivers, which can be added or removed without rebooting the system. The kernel's primary goal is to provide a stable and efficient environment for applications to run while abstracting away the complexities of the underlying hardware.
graph LR
Center["Kernel"]:::main
Rel_advanced_propulsion_systems["advanced-propulsion-systems"]:::related -.-> Center
click Rel_advanced_propulsion_systems "/terms/advanced-propulsion-systems"
Rel_instruction_set["instruction-set"]:::related -.-> Center
click Rel_instruction_set "/terms/instruction-set"
Rel_os_kernel["os-kernel"]:::related -.-> Center
click Rel_os_kernel "/terms/os-kernel"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 Простими словами
The kernel is like the brain of your computer, telling all the different parts (like the screen, keyboard, and programs) how to work together and share things fairly.
🤓 Expert Deep Dive
Архітектури ядра можна умовно розділити на монолітні, мікроядерні та гібридні. Монолітні ядра, як-от Linux, інтегрують більшість служб операційної системи (керування процесами, керування пам'яттю, файлові системи, драйвери пристроїв) в один великий виконуваний файл. Це забезпечує високу продуктивність завдяки прямим викликам функцій, але може призвести до збільшення обсягу коду та потенційних проблем зі стабільністю у разі збою одного компонента. Натомість мікроядра переносять неосновні служби в простір користувача, залишаючи в ядрі лише фундаментальні функції (міжпроцесна взаємодія, базове планування, керування пам'яттю). Це підвищує модульність і безпеку, але призводить до накладних витрат на продуктивність через часті перемикання контексту та міжпроцесну взаємодію. Гібридні ядра намагаються збалансувати ці компроміси, включаючи більше служб, ніж чисте мікроядро, зберігаючи при цьому певний ступінь модульності. Ключові виклики в проєктуванні ядра включають ефективне планування ресурсів (наприклад, часу ЦП, пропускної здатності вводу-виводу), надійні механізми захисту пам'яті для запобігання підвищенню привілеїв та пошкодженню даних, а також безпечні протоколи міжпроцесної взаємодії.