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

- Learning Apex Programming
- 程序設計與實踐(VB.NET)
- Java EE框架整合開發入門到實戰:Spring+Spring MVC+MyBatis(微課版)
- JMeter 性能測試實戰(第2版)
- PhoneGap:Beginner's Guide(Third Edition)
- UML 基礎與 Rose 建模案例(第3版)
- Kotlin編程實戰:創建優雅、富于表現力和高性能的JVM與Android應用程序
- Scala Reactive Programming
- 圖數據庫實戰
- Getting Started with Python and Raspberry Pi
- jQuery從入門到精通(微課精編版)
- Software Architecture with Python
- 例說FPGA:可直接用于工程項目的第一手經驗
- Real-time Analytics with Storm and Cassandra
- ReactJS Blueprints