Grâl is an object-oriented operating system, i.e. all components of the system are treated as abstract objects.
Unlike other operating systems, Grâl does not have processes, instead it provides an environment for unchangeable automatons to communicate with other automatons (referred to in early Grâl papers as "P-objects"). Every such automaton exists in a context, i.e. the array of accesses (i.e. references and permissions to use) to objects. Indices of accesses in a context are called local addresses. An automaton can be unprogrammable, or read its program from a memory referred to via an access found in its context.
The Grâl kernel provides a set of system calls, or a set of operations to manipulate the objects and perform synchronization between the automatons. The internal structure of automatons is implementation dependent.
In conventional computers, the automatons are merely virtual processors and memory units, with the instruction set consisting of the non-privileged instructions and system calls, and possibly featuring several concurrent threads of execution, and cache memory allowing those virtual processors to read and write large blocks of data from and to a file system.
For convenience, the term process will be used hereafter to mean an automaton together with its context. Reader should be aware that it is not the same as traditional notion of processes which also includes memory and a program stored in the memory.
Grâl kernel allows processes to create abstract objects and serve the requests to those objects initiated by other processes. User-defined objects can be used everywhere in place of intrinsic objects (i.e. objects serviced by the kernel). The process issuing requests to an object is called client, and the process performing requested actions is called server.
The single act of interaction between client and server is called a transaction. Transaction types are identified by request codes, or integer numbers from 0 to 31. Every access has an associated bit mask allowing only transactions with particular request codes to be initiated using the access. A transaction as seen from the client side is called C-transaction, and S-transaction as seen from the server side.
A unique and subtle feature of Grâl is that the transactions do not
carry any data, but can only be used to transport accesses between
processes.
Accesses being transported by a transaction are called arguments
of the transaction.
The life cycle of a transaction has four distinctive stages:
As a result, client is given a pointer to the transaction, as viewed
from the client's side, or access to C-transaction.
This access can be used by client to wait for the completion of the
transaction or to cancel the transaction (the semantics of
cancelation will be described later).
Creation of transaction causes an event in the server process
to tell it when to start to process the request.
After that server may start performing the requested operations
using received accesses.
Accesses obtained from in-arguments of a transaction are by
default temporary, i.e. can only be used until the transaction
is completed; client may choose to override the default by setting
one or more arguments to carry permanent accesses which will
remain useful even after the transaction was completed.
Note that after completion of the transaction the temporary
access held by the server is no longer useful, it expired.
Completing transaction by server causes an event in client.
An access to C-transaction can be used to cancel the
transaction.
The cancelation is advisory, i.e. if server already accepted
the transaction it may disregard the cancelation and complete
the processing.
If transaction is not yet accepted it will be destroyed
immediately, if transaction is already completed cancelation
will have no effect.
As was mentioned before, transactions in Grâl do not transport
any user data between processes.
This a very important architectural feature based on the
observation that if two automatons are attempting to communicate
they must have the common medium and common "language",
i.e. something which can be represented by a first-class
object.
In Grâl framework the act of communication consists only in
passing the access to that object and letting the other
party to know that it is wanted to communicate.
The Grâl design recognizes that all interactions take some
non-zero physical time, and provides means to signal the
end of the interaction (that is the reason for the asymmetrical
client-server scheme).
The protocols are represented by special entities called types.
Every Grâl object has associated type.
Types form inheritance trees; multiple inheritance is not supported.
Unlike accesses to objects, accesses to types cannot be used to
initiate transactions, or be passed to other processes.
The only way to pass a type to another process is to give it an
access to object of that type.
The only use for a type is to check if some other object has
a compatible type; i.e. if it supports the same protocol.
The reason for not allowing accesses to types to be passed to
other processes the same way as accesses to regular objects is
to enforce locality of type information; i.e. to make
transparent type translation possible.
The most basic protocol in Grâl implementation on traditional
computers is the memory protocol representing
operations on arrays of bytes.