[Return to Top] [Primary Objects]

EROS Object Reference

Primary Objects

Page

D R A F T

Description

A page provides a persistent page of storage. Pages are the basic unit of data storage in the EROS system, and hold an architecture defined number of bytes (currently 4096 in all implementations). Every page corresponds to one or more unique locations on some physical storage medium, such as a disk drive. In most installations, pages are therfore available in large supply.

Page keys come in two types: a read write page key conveys the authority to mutate the page, while a read only page key conveys only sufficient authority to examine the page's content. Applications acquire page keys by requesting them from a Space Bank.


Operations

Check Alleged Key Type (OC = KT)

Returns the alleged type of the key.
Reply R1 AKT_Page: Invoked key is a read-write key to a page.

AKT_RoPage: Invoked key is a read-only key to a page.

Make Read-Only Page Key (OC = 1)

Returns a read-only page key to the page.
Response RK0 A read-only key to the page.

Zero Page (OC = 2)

Clears the content of the page to zeros. This operation is more efficient than writing zeros to the page, because the page need not always be brought in to memory for the operation to proceed.

The zero page operation is not permitted on a read-only page key.
Result 0 All bytes of the page are zero
RC_NoAccess The page key is read-only. The page remains unchanged.

Clone Page (OC = 3)

Makes the called page's data identical to the passed in page. The old contents are destroyed.

The Clone Page operation is not permitted on a read-only page key.
Request SK0 The Page Key to be cloned from.
Result 0 Success. The page now holds the same data as SK0.
RC_RequestError SK0 is not a Page key.
RC_NoAccess The invoked page key is read-only. The page remains unchanged.


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