The idea is to try to model a space bank after the meter. We want to introduce a bank keeper to complete the ancient idea of the non-prompt bank and also remove some hairy policy from the bank and support new policy without burdening just about everyone’s TCB. We must beware the hot page scam and the confinement bug. This design is very much in flux, as will be apparent. I should try for a Guttag definition.
I speak here as if a bank creates a page.
The scheme described below is a bit like the ideas of the unprompt bank except that int this scheme one bank plays both roles.
To buy a [page|node] from a bank the bank rejects the order if the Limit is zero or if the superior bank rejects the same order. If the Limit is 0 then the bank’s keeper is invoked. The returned [page|node] key will be the only key to a [page|node]. Quibble: well actually the bank and superior banks retain a key to the page just as commercial banks can get into your safety deposit box. But if you believe that the returned key is to a page you may as well equally believe that you have the only key to the (new) page.
If you sell a page to a bank the page must be Of the bank. The Limit will be incremented and the page key (and its copies) will be rescinded. There are several bugs in the above but I think the intent is clear. The biggest question is which resume key is passed to the bank keeper, and which other capabilities.
To buy a page promptly, the reserve must be positive, else the order is rejected.
The proposed bank limits are almost exactly like meter counters. Service stops when the counter reaches zero. These bank limits however can move either direction.
Pinning down a reserve for a bank is a bit like pinning down a RAM frame—something that Keykos kernel does not do, but something that may be needed. The reason in both cases is for functions that are broken if they are not quick. The concept of quick is a bit different, however.
Banks form a tree as in the original scheme. This defines the transitive superior and inferior relations between banks. There is for each bank a service key rather analogous to the meter service key.
Every frame is in just one of three states:
A reserved frame is reserved at just one bank.
An allocated frame is allocated at just one bank.
A frame is under a bank B iff it is allocated at B
or at some bank that is inferior to B.
Every bank has a non-negative integer, its limit.
To buy a page non promptly from bank B, if the limits of B and of the superior banks are all positive then an available frame is allocated at B and all of those limits are decremented. A page is thereby created and returned the the buyer. If one of the limits is 0 then the bank keeper of the lowest bank with 0 limit is invoked with arguments: ....
To sell a page non promptly to bank B, the frame of that page must be allocated at B. The limits of B and all of its superior banks are incremented.