Improving IPC by Kernel Design

Jochen Liedtke, SOSP 1993

Motivation: The IPC Dilemma

Making IPC Faster

100 µs -> 5 µs. Theoretical bound: 3 µs.

Main principles: IPC performance prioritized; consider synergetic effects; cover all levels from architecture down to coding.

Architectural Level

1. Avoid Syscalls

Introduce synchronous syscalls call and reply & receive next (besides the non-blocking send and receive), allowing one syscall per IPC.

2. Complex Message Support

A sequence of send operations can be combined into a single one, if no intermediate reply is required. In their system, one message may contain a direct string (mandatory), indirect strings (optional), and memory objects (optional).

3. Direct Transfer by Temporary Mapping

4. Strict Process Orientation

Threads that are temporarily running in kernel mode are handled in the same way as when running in user mode. One kernel stack per thread is allocated.

5. TCBs in Virtual Array

All TCBs are held in a large virtual array located in the shared part of all address spaces. => permits fast TCB access by offset addressing; saves TLB misses; locking a thread can be easily done by unmapping its TCB; helps to make threads persistent; memory management becomes transparent to IPC.

Algorithmic Level

1. Thread Identifier

2. Handling Virtual Queues

3. Timeouts And Wakeups

4. Lazy Scheduling

5. Direct Process Switch

6. Short Messages via Registers

Interface Level

Coding Level (Kernel)

Remarks