Mutual exclusion for uniprocessors
journal contributionposted on 01.03.1999, 00:00 by Brian N. Bershad
Abstract: "We discuss and evaluate four mutual exclusion primitives appropriate for uniprocessors: memory interlocked instructions, software reservation, kernel emulation and restartable atomic sequences. A restartable atomic sequence is a code fragment that, if interrupted, is resumed by software at the beginning of the sequence, guaranteeing that the sequence is eventually executed to completion atomically.We describe two implementations of restartable atomic sequences for the Mach operating system, and show that restartable atomic sequences perform significantly better than either kernel emulation or software reservation, making them an attractive alternative for use on uniprocessors that do not support atomic read-modify-write instructions. Further, on many processor architectures that do support such instructions, we show that restartable atomic sequences can have better performance. We show that improving the performance of low-level mutual exclusion mechanisms can have a substantial effect on application performance."