简体   繁体   中英

How does an operating system abstract programs' memory?

How does an operating system ensure that a process won't access the memory of another process? How is this stuff done?

There are a number of approaches that have been used. The most common is logical memory addressing. The address space is divided into two zones: user and kernel.

Every process has its own user memory zone. All processes share the same kernel memory zone. A process has no means for accessing the user mode address space of another process. All user mode memory references go to the process's own memory space, and cannot reference those of another process.

The kernel address space is restricted so that it can only be accessed in kernel mode. The OS restricts the ways in which a process can enter kernel mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM