next up previous
Next: Summary Up: User-level DMA without Kernel Previous: Performance Evaluation

User-Level Atomic Operations

Recently, several network interfaces that provide a shared-memory abstraction on a Network of Workstations have been developed [9, 14]. To facilitate shared-memory programming, these interfaces also provide atomic operations that allow different processes to protect their accesses to shared data. Such atomic operations include atomic_add, fetch_and_store, compare_and_swap, etc. All these operations need to pass one physical address to the network interface, one or more data arguments, and return back the result of the atomic operation. In most processors, at least two instructions are needed to pass all these arguments to the network interface securely. These instructions also need to execute atomically, otherwise a malicious user may disrupt the atomic operations done by legitimate users.

Initiating atomic operations from inside the operating system kernel (in order to achieve protection and atomicity) would result in significant overhead, since the operating system overhead would be much higher than the time it takes to do the atomic operation itself. Thus, atomic operations will benefit significantly if initiated from user-space. Fortunately, the user-level DMA methods that we described in the previous section can be easily adapted to initiate atomic operations from user-level. User-level initiation of atomic operations is a similar problem to user-level DMA, albeit somewhat simpler, since only one physical address is needed for each atomic operation.

Evangelos Markatos
Fri Nov 8 12:27:33 EET 1996