官术网_书友最值得收藏!

The illusion called address space

Modern-day computing platforms are expected to handle a plethora of processes efficiently. Operating systems thus must deal with allocating unique memory to all contending processes within the physical memory (often finite) and also ensure their reliable execution. With multiple processes contending and executing simultaneously (multi-tasking), the operating system must ensure that the memory allocation of every process is protected from accidental access by another process.

To address this issue, the kernel provides a level of abstraction between the process and the physical memory called virtual address space. Virtual address space is the process' view of memory; it is how the running program views the memory.

Virtual address space creates an illusion that every process exclusively owns the whole memory while executing. This abstracted view of memory is called virtual memory and is achieved by the kernel's memory manager in coordination with the CPU's MMU. Each process is given a contiguous 32 or 64-bit address space, bound by the architecture and unique to that process. With each process caged into its virtual address space by the MMU, any attempt by a process to access an address region outside its boundaries will trigger a hardware fault, making it possible for the memory manger to detect and terminate violating processes, thus ensuring protection.

The following figure depicts the illusion of address space created for every contending process:

主站蜘蛛池模板: 自贡市| 东海县| 渭南市| 日土县| 阜平县| 浙江省| 新干县| 突泉县| 徐汇区| 玉山县| 丰县| 玉环县| 双鸭山市| 闸北区| 灵武市| 壤塘县| 柳江县| 亳州市| 陵川县| 高尔夫| 理塘县| 松原市| 泌阳县| 定南县| 台安县| 沙湾县| 鹤壁市| 鲜城| 叙永县| 文山县| 育儿| 赤城县| 招远市| 乐安县| 汉寿县| 布尔津县| 顺平县| 两当县| 芜湖市| 灌云县| 响水县|