This section describes how the reader-writer-lock/RCU analogy described in Section 2.5 was used to break up the global locks used by Linux's System V IPC primitives. These locks guard the following: (1) mapping from IPC identifiers to corresponding kern_ipc_perm structures, (2) expanding the mapping arrays, and (3) individual IPC operations. A straightforward modification would replace these global locks with reader-writer locks, allowing mapping operations to be performed in parallel.
However, we took the additional step of following the analogy, replacing the global locks with RCU [Cao02] to guard the mapping arrays and per-kern_ipc_perm locks to guard the IPC operations, which resulted in significant system-level speedups on database benchmarks. This modification also serves to illustrate use of explicit memory barriers and use of a deleted flag to prevent access to stale data.
The remainder of this section focuses on the changes to the System V semaphores; analogous changes were made to message queues and shared memory.