The kernel does not implements either ``processes'' nor any other ``resource-container'' abstractions. Users allocate system resources and release them back to the kernel when they are no longer needed. None of the system resources is responsible for containing the resources of a given application.
Besides, as we will see, the system resource that is the most similar to the traditional process abstraction (the ``shuttle'') does not contain the resources accessed during its execution. Thus, how are bookkeeping tasks accomplished? And, how are resources released upon application crashes?
Certainly, a user-level (i.e. a non-kernel) process or ``application'' abstraction is needed. To help on this task, the kernel delegates resource bookkeeping to its users.
Users should implement resource domains containing a set of resources used by a user application. This concept is introduced in the system in order to help solving the three following problems:
Whenever a user issues a resource allocation request, it provides a
target domain identifier tdi for that new resource. Then,
the kernel entitles that resource to the domain identified by tdi
(i.e. sets the r_domain of the Resource being allocated to the
supplied domain identifier -- as defined in
).
When the resource gets finally unused, the kernel notifies that using its domain identifier as a portal name, so that users could update their allocation tables. Thus, domain identifiers must be portal identifiers.
As we said, the meaning of a domain is defined by the user, not by the kernel (although the DM can be loaded into the kernel for efficiency).
The 2K operating system will utilize this basic mechanism for implementing the concept of nested domains. From a single abstraction, it will be possible to implement replacements for traditional OS abstractions like group of users, user, process group, process, and thread. This will be possible because nothing forbids domains to persist, so that a permanent user can be seen as a persistent domain.
2K will also be able to support new abstractions like, for example, temporary users. They would be implemented as non-persistent domains and could be created by regular users inheriting a subset of the creator permissions. This would add flexibility compared to existing systems in which usually only a ``super-user'' is allowed to create new users.
A resource could be also logically moved from one domain to another by
changing its r_domain. There is nothing in the system architecture
forbidding such feature.