- 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:

- Getting Started with ResearchKit
- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- PHP程序設計(慕課版)
- 機器人Python青少年編程開發實例
- C程序設計實踐教程
- 用戶體驗可視化指南
- Visual Basic程序設計基礎
- Android嵌入式系統程序開發(基于Cortex-A8)
- Sitecore Cookbook for Developers
- React.js實戰
- Raspberry Pi開發實戰
- R Data Visualization Cookbook
- 片上系統設計思想與源代碼分析
- HTML5與CSS3權威指南(第2版·上冊)
- Balsamiq Wireframes Quickstart Guide