All About Number Keys

(aka “data keys”, aka “number capabilities”)

There is not much to say about the number key.

“Number keys” (still called “data keys” on most of this site) do little more than afford the convenience of keeping an 88 bit integer in an otherwise unused node slot along with related keys in other slots. We thus gain the convenience of saying that a slot of a node always holds a capability. For each integer n such that 0≤n<288, DK(n) denotes the number key that denotes n. DK(0) displaces keys that denote objects that cease to exist. It is convenient to say that number keys designate numbers. Then we can say that every key designates something — harmless pedantry. It also makes intuition more likely correct regarding keys within messages.

The ‘format key’ within a red segment node is packed with bits with meaning to Keykos segment logic. Those bits are created by domain programs such as segment keepers that define details of segments. Those bits are consulted by the kernel to build hardware memory maps.

Within a node that serves as a meter are several number keys that serve as resource counters with semantics understood by both the kernel and meter keepers.

Within a domain are slots with number keys with the bits that belong in registers of the program that the domain obeys. From outside the kernel those slots are accessible via the domain service key and always appear up-to-date.

The above instances are conventions between user code and kernel code. Number keys are also convenient to user mode programs, some of which may avoid allocations RAM to store data that is associated with a node with an unused slot.

Whence

Originally only DKC created number keys given an 11 byte data string. Grudgingly we added an order on a node key that would create number keys within the node given enough bytes. This violated a pattern where there was just one bottom source for some primitive sort of thing. Invoking a number key returns its integer as a string. Another node key order returns bytes from adjacent slots. This was mere performance engineering.