ABOELHA: A Nanokernel for
Distributed Environment

In order to supply Nó//'s applications with an efficient and highly flexible environment, we proposed a new kernel, named ABOELHA. It was conceived to be lighter than conventional micro-kernels, like Mach [ACC86]and Amoeba [TAN92b], but more robust than the exo-kernel proposed by Engler [ENG94]. Actually, ABOELHA solely deal with basic memory and process management, supplying processes with mechanisms to synchronize and communicate (see figure 2).

Note that there are no I/O drivers inside the kernel. Most Nó//'s applications will not do I/O anyway, so, putting drivers into the kernel would mean pure overhead to them. However, some form of I/O support is handled by the kernel in order to allow applications to control devices. It is possible for an application to securely map I/O ports and hardware interrupts into its address space.

Figure 1: ABOELHA architecture.

Another important observation is that, even we are not officially working with real time systems yet, all ABOELHA system calls, but "send", "receive", "P" and "V" (blocking calls), have well known times inside the kernel. Moreover, the process manager scheduler present some real time desirable characteristics.

ABOELHA's Objects

ABOELHA has been conceived to be free from most conventional systems abstractions, like hierarchy, grouping and ownership. Although, some minimum level of abstraction over physical resources is expected, so applications can easily be constructed. To achieve this, all physical and kernel's resources are presented to application as objects, identified and protected through a capability scheme similar to that proposed by Tanembaum [TAN92a, FRÖ94a, FRÖ94c].

Memory Management

ABOELHA's memory manager [FRÖ96b] uses hardware paging capabilities to provide protected logical segments to processes. Each logical segment is a distinct object with its own capability. Holding a segment capability, a thread can change its size, attach it to any part of its address space or share it with other tasks.

Process Management

ABOELHA's process manager [FRÖ96c] supports concurrent processes by means of combinations of tasks and threads, where tasks are passive entities consisting of protected memory segments for code and global data; and threads are active entities that are eventually scheduled to execute some task's code. Each thread is an independent execution flow, with its own context and stack.

Process scheduling mechanisms are very flexible, in such a fashion that different policies can be implemented, even outside the kernel. Each created thread has associated a priority interval, which can be modified at any time by its creator. When a thread is scheduled, the kernel sets a timer to restrict its execution time to a certain limit. When the thread leaves the CPU, its priority is re-computed based on the portion of the time-slice it has used, and than adjusted to the interval defined for it. Once the interval can be redefined by anyone holding the thread capability, an user level scheduler can be implemented.

Synchronization

In order to support cooperative processing, ABOELHA supports a unique and simple synchronization mechanism: semaphores. Semaphores can efficiently synchronize threads of a single task or can be shared among task to synchronize their threads. ABOELHA's implementation of semaphores conforms to Dijkstra definitions [DIJ69, FRÖ96b], so the only and atomic ways to alter a semaphore value is through P and V.

Communication

Over the physical communication mechanisms supplied by the Transputer links and the crossbar, ABOELHA implements a connection oriented link level protocol [SIL95, FRÖ96a], which allows message exchange between any two work nodes in the multicomputer.

Over the link level, it is implemented a mailbox scheme [FRÖ94a, FRÖ94c, FRÖ96a] that supports a synchronous, reliable datagram service to applications. Like all other kernel's objects, mailboxes are identified and protected through capabilities, thus, any thread holding a valid capability for a mailbox can receive messages from it, i. e., a mailbox can have many receivers at the same time. Figure 3 depicts a message exchange in Nó//.

Figure 2: An example of message exchange in Nó//.

ABOELHA in other Environments

ABOELHA's prototype has been developed to run in Nó// to support parallel applications, nevertheless, it can be used as the basis for a general purpose distributed operating system as well. We are now working on a Ethernet + IP server that will make possible for ABOELHA to run in a standard PC network and in an Ethernet switched multicomputer.