Virtual Process Address Space

The virtual address space of each process starts at address 0 and extends to task_size - 1; the kernel address space begins above this. On IA-32 systems with 232 = 4 GiB, the total address space is usually split in a 3:1 ratio on which we focus in the information below. The kernel is assigned 1 GiB, while 3 GiB is available to each userspace process. Other ratios are possible but yield benefits only on very specific configurations and with certain work loads, as discussed above.

A very important aspect relating to system integrity is that user programs may access only the lower part of the overall address space but not the kernel part. Neither is it possible for a user process to manipulate parts of the address space of another process without previous "agreement," simply because these parts are invisible to it.

The contents of the virtual address space portion of the kernel are always the same regardless of which user process is currently active. Depending on hardware, this is achieved either by manipulating the page tables of user processes so that the upper part of the virtual address space always appears to be identical or by instructing the processor itself to provide a separate address space for the kernel, which is mapped above each user address space. Recall that this is visualized in Figure 1-3 in the Introduction.

The virtual address space is made up of many sections of varying sizes that serve different purposes and must be handled differently. For example, in most cases, it is not permitted to modify the text segment, but it must be possible to execute its contents. On the other hand, it must be possible to modify the contents of a text file mapped into the address space but not to execute such contents as this doesn't make sense — it's just data and not machine code.

Continue reading here: Layout of the Process Address Space

Was this article helpful?

0 0