- Mastering Linux Kernel Development
- Raghu Bharadwaj
- 255字
- 2021-07-08 09:47:12
Kernel and user space
Modern operating systems not only prevent one process from accessing another but also prevent processes from accidentally accessing or manipulating kernel data and services (as the kernel is shared by all the processes).
Operating systems achieve this protection by segmenting the whole memory into two logical halves, the user and kernel space. This bifurcation ensures that all processes that are assigned address spaces are mapped to the user space section of memory and kernel data and services run in kernel space. The kernel achieves this protection in coordination with the hardware. While an application process is executing instructions from its code segment, the CPU is operating in user mode. When a process intends to invoke a kernel service, it needs to switch the CPU into privileged mode (kernel mode), which is achieved through special functions called APIs (application programming interfaces). These APIs enable user processes to switch into the kernel space using special CPU instructions and then execute the required services through system calls. On completion of the requested service, the kernel executes another mode switch, this time back from kernel mode to user mode, using another set of CPU instructions.
The following figure depicts a virtualized memory view:

- Spring Boot 2實戰之旅
- Java面向對象思想與程序設計
- Getting Started with PowerShell
- Python編程與幾何圖形
- iOS開發實戰:從入門到上架App Store(第2版) (移動開發叢書)
- 劍指大數據:企業級數據倉庫項目實戰(在線教育版)
- Linux C編程:一站式學習
- Quantum Computing and Blockchain in Business
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Python 快速入門(第3版)
- 讓Python遇上Office:從編程入門到自動化辦公實踐
- Swift Essentials(Second Edition)
- Java Web入門很輕松(微課超值版)
- Hands-On Data Visualization with Bokeh
- PHP高性能開發:基礎、框架與項目實戰