next up previous
Next: Rbufs Up: Remote Invocation Previous: Remote Invocation

Standard mechanism

The `baseline' IDC invocation transport mechanism in Nemesis operates very much like a conventional RPC mechanism. The bind process creates a pair of event channels between client and server. Each side allocates a shared memory buffer and ensures that it is mapped read-only into the other domain. The server creates a thread which waits on the incoming event channel.

An invocation copies the arguments (and the operation to be invoked) into the client's buffer and sends an event on its outgoing channel, before waiting on the incoming event channel. The server thread wakes up, unmarshals the arguments and calls the concrete interface. Results are marshalled back into the buffer, or any exception raised by the server is caught and marshalled. The server then sends an event on its outgoing channel, causing the client thread to wake up. The client unmarshals the results and re-raises any exceptions.

Stubs for this transport are entirely generated by the MIDDL compiler, and the system is used for cases where performance is not critical. Measurements have been taken of null RPC times between two domains an otherwise unloaded DEC3000/400 Sandpiper. Most calls take about 30 µs, which compares very favourably with those reported in [29] for Mach (88 µs) and Opal (122 µs) on the same hardware. Some calls (20% in the experiments) take between 55 µs; and 65s; these have experienced more than one reschedule between event transmissions. Nemesis does not currently implement full memory protection for its domains; the cost of a full protection domain switch consists of a single instruction to flush the 21064 data translation buffer (DTB), followed by a few DTB misses. This cost of a DTB fill on the current hardware has been estimated at less than 1 µs.

I. Leslie, D. McAuley, R. Black, T. Roscoe, P. Barham, D. Evers, R. Fairbairns & E. Hyden