[Return to Top] [Standard Processes]

EROS Object Reference

Standard Processes

Space Bank

D R A F T

Description

Space banks are the basic storage allocator of the EROS system. They are the source of unique keys to new nodes and pages. THIS NEEDS TO BE RE-WRITTEN

Space banks control access to pages and nodes over specific ranges on eros volumes. A single process may have access to multiple space banks which will allow the process to chose where it's data will be stored. This is particularly useful when controlling the use of removable media. In addition this will allow different space banks to control different levels of security within a system. Space banks are arranged in a hierarchical system where a sub-space bank controls a subset of the original space bank's ranges.

When a process is finished using a page or a node it returns it to the space banks. A page or node is only able to be reclaimed by a space bank if that space bank (or one of it's sub-space banks) originally assigned the space to the process. The reclamation of a node or page could also fail if the space specified by the key has already been reclaimed.

Space banks may have the property of being official. This requires the bank to return the only key to a new node or page. Sub-space banks inherit this property from their parent bank. Space banks may be prompt. Banks with this feature will not be delayed by calling time consuming processes. This allows for fast response time in real time systems.


Operations

Check Alleged Key Type (OC = KT)

Returns the alleged type of the key.
ReplyR1AKT_SpaceBank: The alleged key type of the space bank.

Alloc One Node (OC = 1)

Purchases a single node from the space bank. The returned key is guaranteed to be the only valid key in existence to the returned object.
ReplyRK0New node key.
ResultsRC_OKSucessful completion of node creation.
1The node limit has been reached.

Alloc Two Nodes (OC = 2)

Purchases two nodes from the space bank. The returned keys are guaranteed to be the only valid keys in existence to the returned objects.
ReplyRK0First new node key.
RK1Second new node key.
ResultsRC_OKSucessful completion of node creation.
1The node limit has been reached.

Alloc Three Nodes (OC = 3)

Purchases three nodes from the space bank. The returned keys are guaranteed to be the only valid keys in existence to the returned objects.
ReplyRK0First new node key.
RK1Second new node key.
RK2Third new node key.
ResultsRC_OKSucessful completion of node creation.
1The node limit has been reached.

Reclaim One Node (OC = 4)

Restores the passed node key to the space bank to be handed out to another party. All outstanding keys to the node are rescinded.
RequestSK0A strong node key.
ResultsRC_OKAll keys to the node have been removed.
1SK0 was not a strong node key, or this space bank does not have authority over the node specified by SK0. The key remains a valid node key.

Reclaim Two Nodes (OC = 5)

Restores the passed node keys to the space bank to be handed out to another party. All outstanding keys to these nodes are rescinded.
RequestSK0A strong node key.
SK1A strong node key.
ResultsRC_OKAll keys to the nodes have been removed.
1..3If bit 0 (1) of the return code is 0, the node denoted by SK0 (SK1) was successfully reclaimed, and all outstanding keys to this node have been rescinded.If bit 0 (1) of the return code is 1, the node denoted by SK0 (SK1) was not a strong node key, or this space bank does not have authority over the node specified by SK0 (SK1). Unreclaimed node keys remain valid.

Reclaim Three Nodes (OC = 6)

Restores the passed node keys to the space bank to be handed out to another party. All outstanding keys to these nodes are rescinded.
RequestSK0A strong node key.
SK1A strong node key.
SK2A strong node key.
ResultsRC_OKAll keys to the nodes have been removed.
1..7If bit 0 (1, 2) of the return code is 0, the node denoted by SK0 (SK1, SK2) was successfully reclaimed, and all outstanding keys to this node have been rescinded.If bit 0 (1, 2) of the return code is 1, the node denoted by SK0 (SK1, SK2) was not a strong node key, or this space bank does not have authority over the node specified by SK0 (SK1, SK2). Unreclaimed node keys remain valid.

Reclaim Nodes From Node (OC = 7)

Given a node key, iterates through the slots of the node. If any slot contains a writable node key, the associated node is returned to the space bank to be handed out to another party. All outstanding keys to these nodes are rescinded. The node itself is not rescinded.
RequestSK0A node key.
ResultsRC_OKAll keys to the nodes have been removed.
WIf bit s (0, 1, ... ) of the return code is 0, then slot s contained a node key that was successfully reclaimed, and all outstanding keys to this node have been rescinded.If bit s (0, 1, ... ) of the return is 1, then the key in slot s was not a strong node key, or this space bank does not have authority over the designated node. Unreclaimed node keys remain valid.

Sever a Node (OC = 8)

NOT CURRENTLY SUPPORTED

Rescinds the node named by SK0, and returns to the caller a node key to the newly severed object. The returned key is guaranteed to be the only valid key in existence to this object.
RequestSK0Node key.
ReplyRK0New node key.
ResultsRC_OKAll keys have been removed to the node. A new key has been issued (RK0).
1The node key was not a node key or this space bank does not have authority over the node specified.

Alloc One Page (OC = 17)

Purchases a single page from the space bank. The returned key is guaranteed to be the only valid key in existence to the returned object.
ReplyRK0New page key.
ResultsRC_OKSucessful completion of page creation.
1The page limit has been reached.

Alloc Two Pages (OC = 18)

Purchases two pages from the space bank. The returned keys are guaranteed to be the only valid key in existence to the returned objects.
ReplyRK0First new page key.
RK1Second new page key.
ResultsRC_OKSucessful completion of page creation.
1The page limit has been reached.

Alloc Three Pages (OC = 19)

Purchases three pages from the space bank. The returned keys are guaranteed to be the only valid key in existence to the returned objects.
ReplyRK0First new page key.
RK1Second new page key.
RK2Third new page key.
ResultsRC_OKSucessful completion of page creation.
1The page limit has been reached.

Reclaim One Page (OC = 20)

Restores the passed page key to the space bank to be handed out to another party. All outstanding keys to the page are rescinded.
RequestSK0A strong page key.
ResultsRC_OKAll keys to the page have been removed.
1SK0 was not a strong page key, or this space bank does not have authority over the page specified by SK0. The key remains a valid page key.

Reclaim Two Pages (OC = 21)

Restores the passed page keys to the space bank to be handed out to another party. All outstanding keys to the pages are rescinded.
RequestSK0A strong page key.
SK1A strong page key.
ResultsRC_OKAll keys to the pages have been removed.
1..3If bit 0 (1) of the return code is 0, the page denoted by SK0 (SK1) was successfully reclaimed, and all outstanding keys to this page have been rescinded.If bit 0 (1) of the return code is 1, the page denoted by SK0 (SK1) was not a strong page key, or this space bank does not have authority over the page specified by SK0 (SK1). Unreclaimed page keys remain valid.

Reclaim Three Pages (OC = 22)

Restores the passed page keys to the space bank to be handed out to another party. All outstanding keys to the pages are rescinded.
RequestSK0A strong page key.
SK1A strong page key.
SK2A strong page key.
ResultsRC_OKAll keys to the pages have been removed.
1..7If bit 0 (1, 2) of the return code is 0, the page denoted by SK0 (SK1, SK2) was successfully reclaimed, and all outstanding keys to this page have been rescinded.If bit 0 (1, 2) of the return code is 1, the node denoted by SK0 (SK1, SK2) was not a page key, or this space bank does not have authority over the page specified by SK0 (SK1, SK2). Unreclaimed page keys remain valid.

Reclaim Pages From Node (OC = 23)

Given a node key, iterates through the slots of the node. If any slot contains a writable page key, the associated page is returned to the space bank to be handed out to another party. All outstanding keys to these pages are rescinded. The node itself is not rescinded
RequestSK0A node key.
ResultsRC_OKAll keys to the pages have been removed.
WIf bit s (0, 1, ... ) of the return code is 0, then slot s contained a page key that was successfully reclaimed, and all outstanding keys to this page have been rescinded.If bit s (0, 1, ... ) of the return is 1, then the key in slot s was not a strong page key, or this space bank does not have authority over the designated page. Unreclaimed page keys remain valid.

Sever a Page (OC = 24)

NOT CURRENTLY SUPPORTED

Rescinds the page named by SK0, and returns to the caller a page key to the newly severed object. The returned key is guaranteed to be the only valid key in existence to this object.
RequestSK0Page key.
ReplyRK0New page key.
ResultsRC_OKAll keys have been removed to the page. A new key has been issued (RK0).
KT+2The key was not a page key or this space bank does not have authority over the node specified.

Preclude destroy rights (OC = 257)
Preclude query Rights (OC = 258)
Preclude destroy and query rights (OC = 259)
Preclude limit change rights (OC = 260)
Preclude limit change and destroy rights (OC = 261)
Preclude limit change and query rights (OC = 262)
Preclude limit change, destroy, and query rights (OC = 263)

This call returns a restricted key to the space bank. Note that these restrictions are additive (if you have a key which is precluded from destroys, any key you make with this call will also be precluded from destroys).
ReplyRK0A key to the same space bank, except with reduced rights.
ResultsRC_OKThe requested precluded key has been returned

Verify Bank Key (OC = 1024)

Verifies that a key is a key to an official space bank. Note that to be able to call this, you must have a key that you know is a key to an official space bank. There is a publically available key, called the Bank Verifyer, which can be used to this purpose.
RequestSK0Key to be verified.
ReplyR10: SK0 is not a key to an official space bank.

1: SK0 is a key to an official space bank.

-1SK0 is NOT a key to an official space bank.
ResultsRC_OKOperation completed successfully.

Create Child Bank (OC = 528)

Returns an unrestricted key to a newly created Space Bank. The new Bank's parent is the invoked Bank.
ReplyRK0An unrestricted key to a new Space Bank.
ResultsRC_OKThe new Space Bank was successfully created.
1The new Space Bank could not be created due to either a node or page limit being reached.

Destroy (OC = KT + 4)

Destroys the space bank. All space handed out by this space bank remains valid, and is now managed by the space bank's parent bank. The prime space bank refuses this order.
ResultsRC_OKThe space bank and it's subspace banks have been destroyed. Any space allocated by them remains allocated.
RC_UnknownRequestThe invoked key did not have destroy rights. No action is taken.

Destroy Bank and Space (OC = 536)

Destroys the space bank. All space handed out by this space bank is rescinded, and the resulting unallocated objects are now managed by the space bank's parent bank. The prime space bank refuses this order.
ResultsRC_OKThe space bank and it's subspace banks have been destroyed. Any space allocated has be destroyed by returning it to the superior space bank. THE REST OF THIS IS A FALSEHOOD All the resume keys contained in the nodes were invoked using KT+1 to notify their processes.
RC_UnknownRequestThe invoked key did not have destroy rights. The space and banks are left unchanged.


Copyright 1998, 2001, Jonathan Shapiro. All rights reserved. For terms of redistribution, see the GNU General Public License