Chapter 24 Microkernels: Mach and CHORUS

Exercises

24-1 How is a port transferred from one task to another in Mach and from one actor to another in CHORUS?

A Mach message contains typed data. Port is a type. A port name is a capability with port identifier and rights protected by encryption. A port is not permanently bound to one process. Ports, with associated rights, are transferred in messages.

A CHORUS port is attached to a single actor at any time but can be transferred from one actor to another by means of a system call. A message is untyped.

24-2 What is the difference between Mach and CHORUS port sets?

A Mach port set is a single logical unit with a single message queue. Any process with receive rights for the port set can take a message from the queue.

Each port in a CHORUS port group is bound to a single actor. The concept is used to implement multicast. A message sent to a port group is sent to each port in the group.

24-3 What functions have been implemented inside the microkernel in Mach and CHORUS. Which functions are implemented as servers above the kernel?

Mach; tasks, threads, IPC (messages, ports, port sets), hardware exception handling, minimal memory management with the possibility of additional pagers at user level (file I/O is done by mapping memory objects). Network communication is achieved by message passing via a user level server.

CHORUS: actors, threads, IPC (messages, ports, port groups), hardware exception handling, basic memory management with the possibility of user level servers called mappers. Some functions are provided as supervisor actors that have the kernel ‘s level of privilege but are dynamically linkable.

24-4 To what extent do Mach and CHORUS support real-time execution?

They are not specifically real-time kernels. They have more chance of meeting real time requirements than, say, UNIX because they support multiprocessor operation, thread priorities and pre-emptive thread scheduling.

24-5 What are the implementation languages of Mach and CHORUS? C, C++.

24-6 How are memory management techniques used to avoid physical copying of data in Mach and CHORUS?

Data is transferred by message passing. Both systems now use page mapping and copy on write to avoid data copying. In Mach, if an asynchronous send is performed the data is first mapped into the kernel address space, and into the destination address space on receive.

24-7 Which objects in Mach and CHORUS are given globally unique identifiers?

Mach: tasks, ports, port sets

Chorus: actors, ports, port groups.

How are the objects referenced by these identifiers located in each system?

A full answer is not available to this question.

Ports, port sets and port groups are the destination addresses for messages; that is, the IPC mechanism is responsible for locating these objects. For IPC within a single system, the local OS has full knowledge of the names it manages and the bindings between them, for example, of ports and port sets to tasks. For distributed IPC, the names used must be bound to locations by a technique such as those described in Section 14.9. Mach employs a dedicated network server process at each node to handle non-local IPC.