Matrices
A matrix is a segment with a segment keeper. At one time there are a set of allocated disjoint portions in a matrix. A portion is a consecutive range of pages. The segment keeper will, upon request, allocate or deallocate a portion. When a matrix is created there are no allocated portions and no valid addresses in the segment. A memory key may be passed to the matrix to be installed at an allocated portion in the matrix segment. {These portions are designated by the relative address of the beginning of the portion.} A matrix has an inherent size. A matrix key is a segment key to the matrix segment. A matrix remembers what portions in the segment have been allocated and the sizes of those allocated portions.
If M is a matrix key then M(?,((5,page count));==>c,((5,location));) allocates a contiguous portion of the segment if possible. c will be 0 if it is possible and 1 otherwise. 'location' will be the relative location within the segment (in page frames) of the allocated portion. M(?,((5,portion));==>c;) deallocates a portion; "portion" must be the beginning of a previously allocated portion. M(?,((5,portion));MK==>c;) installs the memory key MK at the indicated portion of the matrix; c will be 0 if this is possible and 1 if "portion" does not indicate an allocated portion. M(kt;==>c,((5,size));) returns the inherent size of M in "size" and LOOSE END in c.
A facade consists of an array of 2**48/4096 p-slots {each corresponding to a page address} and a memory key to another segment.
A p-slot is either (_void) or (_present).
A reference to a void p-slot of a facade is a reference to the corresponding address of the other segment {defined by the memory key in the facade}.
A reference to a present p-slot is a reference to the page of that p-slot.
DEFERRED-COPY: Sometime between now and when I {the segment key holder} store into this page, COPY it.
GUARD: Make this p-slot RO.
Writes are trapped. Reads are passed to the background segment. If there is a page at that address, you get the data. If there is no page at that address:
You are given a private zero page.
You are given a private zero page.
You are given a private zero page.
In the save mode such a reference will result in installing a new page with data copied from the corresponding page in the kernel dump range.
In the dead mode such a reference will result in a fault to the referencing domain indicating that the data is unavailable.
Switch between save and show modes.
Indicate saved page count.
Usage
If CDUMP needs to make room it might decide to delete the large DSEG's before the small ones.