Each meter node has three counters each of which is a data key. These counters count down as the resources are used. They are:
See (p2,soon-sets) for function available now.
A linear combination of CPU time {as measured by the meter}, and page and node faults out of the charge set.
(_Elapsed time, when the meter is designated by a segment node. The meter is under a charge set and the size of that set determines the meter rates.)
(_A page fault for a page under a segment node with a meter. The charge set is that of the faulting process.)
General Points
When a jump occurs, the jumpee's domain root and meters may be added to the jumper's charge set. {Can't charge them to the jumpee until the new meter is intact.}
Some meters have a charge set key in slot 7. Such a meter node is said to (_hold) a charge set. A meter is said to be (_under) a charge set if the meter holds the charge set or holds no charge set but depends on a meter under the charge set. The primordial meter holds a charge set and thus every meter is under just one charge set. A domain is under a charge set if the meter it designates is under the charge set. An action by the process in that domain that uses a page or node {other than a gratis page or node {(p1,gp)}} that is not in the charge set causes that page or node to be added to the charge set at the expense of the domain's meter.
If a node of a memory tree is a segment node that depends on {(p1,memdepmt)} a meter then that node is under the same charge set as the meter. Otherwise a node or page of a memory tree is under the same charge set as the node of the memory tree that designates it. If a page or node is designated by more than one memory tree slot it may belong to more than one charge set, but it will not belong to one charge set twice. The root of a memory tree is under the same charge set as the domain.
Some pages and nodes are (_gratis). Such pages and nodes need not belong to a charge set in order to be accessed. See (p2,gratis-use) for other ramifications.
When a page or node of a charge set has been unused after some amount of headway it will be removed from the charge set. This amount is implementation dependent.
Segments have meters and thus charge-sets {as now officially specified},
We must decide whether it is important for different meters to hold the same charge-set.
There seems to be two ideas here that might be separated:
Using meters {and thus chargesets} in red segment nodes to handle the shared page table problem.
CS(1==>n,(8,tod)) "count nodes" where CS is a charge set key, n is the number of nodes in the charge set, and tod is the TOD clock value when the charge set was last activated.
CS(2==>0) "reset charge set" where CS is a charge set key clears all pages and nodes from the charge set and automatically re-activates the charge set.
A Variation
When some page is to be added to the set hash its CDA into some bit offset into the hunk and turn on that bit. {Ignore whether it was on.} When Order code 0 is done on the charge set key return the bit count adjusted for the expected number of conflicts. {I will look up the formula.}
There is never an overflow.
Less code {I think}.
Defeatable {but we could change the hash algorithm occasionally and defeat any attack that I can think of.}
This is some sort of violation of information hiding but:
Its being wrong is not catastrophic.
We only need one scheduler and thus need not spread the CS keys far. Indeed we might wrap the SCS key in a domain wherein this kernel data is hidden while providing "synergy measures" -- a classic application of abstract types {and operations thereon}. This is what we do with the KID in order to ameliorate the existence of the UNSPEC key.