Address spaces


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:

  • as_segat() ” Find and return the segment that contains the specified address.

  • as_alloc() ” Allocate a new address space structure.

  • as_dup() ” Create a copy of an existing structure.

  • as_fault() ” Handle a fault at the given address for "size" bytes. This function is the one eventually called to handle a page fault.

  • as_unmap() ” Unmap all the segments that cover the given address range.

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.



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net