Kernel Constructs
Atomic Constructs
There are several types of keys. There is no general way for a program to discover the type of a key that it holds. {See however (p2,discrim) and (p3,alleged).}
Nodes are stored in memory where the user program cannot directly access them. Only Gnosis kernel calls can modify them. The program provides the initiative to modify a node, but the Gnosis kernel verifies that the rules described herein are followed. Nodes are themselves designated by keys. A node key is one of the types of key that designates a node. Programs holding a node key to a node may modify any slot in that node by placing a held key in that slot. Programs explicitly create and delete nodes. See (p2,node) about nodes.
Some nodes may have (_processes) in them. The kernel considers such nodes {according to the logic described in (p1,domain)} as domain roots. The actions caused by processes in domain roots are entirely responsible for the evolution of the state of the total system. See (p1,process) for more about processes.
Nodes also play the role of control blocks in other operating systems. For example, a node is used to define a process to Gnosis.
If a key designates a node, the key type may limit what the key holder may do with the key to that node. With the node key, the program can place any key that it holds into any slot of the node, and can copy {and use} any key therein. With a different kind of key to the same node, the program is restricted to using the node for a very limited and specific function. A fetch key to a node allows the holder of the key to use and make copies of keys in the node. In effect the program holds the keys in the nodes for which it holds fetch keys.
A domain is somewhat like a subroutine in that it can be called by a program in another domain with an appropriate key.
In a domain there are keys that the program holds and can use directly. A domain includes a key that designates a segment that constitutes the address space of the program in the domain. The domain also includes a meter key that designates a meter that counts and limits the resources used by the domain. The program in the domain can access the data of the domain and exercise some of the authority of the domain.
The authority to call a domain does not grant the authority held by the domain. The program of the domain is thus in a position to grant the caller synthesized authority according to the logic of the program and the authority of the domain.
Domains were designed primarily to directly solve the following fundamental programming problems:
Hiding complexity and secrets: You may communicate with a domain who knows more and less than you.
Distinguishing situations: They provide multiple contexts for the same program.
A domain has memory between calls; a call to a domain may change its state according to the logic of the program. That is, a domain is not a pure procedure. Only one process may be in a domain at one time; IBM would call domains serially reusable.
Domains are built from nodes but few programs depend on this fact.
See (p1,domain) about domains.
The node hierarchy of meters {(p1,meter)} has its root high, but the keys in nodes designate nodes closer to the root of the hierarchy.