Every process has its own address space, so every process table entry contains a pointer to an address space structure just for that process. The structure serves mostly as an anchor for a list of segments, which describe the valid ranges of virtual addresses that each individual process has. The structure contains global pieces of information, such as a flag that indicates that the entire process is locked in memory, and a count of the number of physical pages actually in use by this process (the a_rss field: the resident set size ). A few functions deal with the address space as a whole. Some of these are:
There are more functions; they have similar names and deal with various requirements at this level: locking and unlocking address ranges, finding an empty memory range for mapping something in, adding a segment to the list, and so forth. |