In Section 2.4, we introduced spin locks as one type of mutex lock, suspension-based locks being the other type. A variety of different suspension-suspension-based locks have been presented, for instance the classic SRP [23], the PCP [121]
(both summarized in Section 2.4.3), and the Priority Inheritance Protocol (PIP) [121] for uniprocessor systems. The MSRP [72] presented by Gai et al. (summarized in Section 2.4.4) supports shared-memory multiprocessor systems under P-FP scheduling and uses the suspension-based SRP for local resources and F|N for global resources. Notably, the blocking analysis for the MSRP presented by Gai et al . [72] hence includes an analysis for F|N spin locks, which was the first blocking analysis for spin locks under P-FP scheduling. Devi et al . presented a blocking analysis for F|N spin locks under
global scheduling [58] analogously to the analysis presented by Gai et al . for P-FP scheduling.
Brandenburg presented the holistic blocking analysis [43, Ch. 5] that reduces the pessimism of prior analyses for F|N spin locks by considering all requests a single job can issue together.1 All of these analyses rely on execution time inflation, which is inherently pessimistic. In Chapter 6, we detail this issue and present a blocking analysis approach that avoids this inherent pessimism.
Takada and Sakamura presented SPEPP [126], a protocol using F|P locks under which jobs “help” each other to make progress by letting a blocked job execute earlier-issued requests from other jobs that were possibly preempted while spinning. A related approach is taken by the MrsP [46], a variant of the MSRP presented by Burns and Wellings. In contrast to SPEPP (and the MSRP), the MrsP permits preemptions during critical sections, but ensures that a lock-holding job makes progress when preempted (and other jobs are blocked for the same resource): the lock-holding job can resume execution on a processor with a different blocked job (by migrating the job), or the critical section can be re-executed by a blocked job on a different processor core (assuming critical sections can be committed atomically).
Rajkumar presented the Multiprocessor Priority Ceiling Protocol (MPCP) that is suspension-based for both local and global resources [112]. For distributed systems (i.e., without shared memory), Rajkumar et al . presented the suspension-based DPCP [113].
The FMLP presented by Block et al . [33] distinguishes between long and short requests, and relies on different techniques depending on the request length: the FMLP is suspension-based for long requests, and spin-based for
1Recall that under Gai et al .’s analysis for the MSRP, as summarized in Section 2.5.1, the worst-case spin time for each request is bounded, and then multiplied with the number
short requests. In contrast to the DPCP, under which requests are served in priority-order, the FMLP relies on FIFO-ordering. The FMLP was originally presented for EDF scheduling, but was later adapted to P-FP scheduling as well [38].
Brandenburg and Anderson explored the amount of blocking that is inher-ently unavoidable under any mutex-based locking protocol, and devised the OMLP [40, 42], a suspension-based locking protocol that is asymptoti-cally optimal under suspension-oblivious analysis2 in the sense that it limits blocking to an extent that cannot be avoided under any protocol for global, partitioned and clustered FP and EDF scheduling. The FMLP+ presented by Brandenburg [37, 43, Ch. 6.3] improves upon the FMLP and also ensures optimality under suspension-aware analysis.3 Besides partitioned and global, the FMLP+ also supports clustered scheduling.
For suspension-based mutex locks under P-FP scheduling, Brandenburg developed an improved blocking analysis approach [36] based on linear programming that supports the MPCP, DPCP, FMLP+, and the DFLP [44].
Our blocking analysis for spin locks under P-FP scheduling (Chapter 6) uses a similar technique based on linear programming.
For G-FP scheduling, Easwaran and Andersson presented the PPCP [62], a suspension-based locking protocol extending the PCP. Yang et al . sub-sequently presented an analysis framework for suspension-based locking protocols under G-FP scheduling [141], that incorporates support for the PIP [62, 121], PPCP [62], FMLP [33], and the FMLP+ [37]. The analysis is based on techniques presented by Brandenburg [36] in the context of suspension-based locks under P-FP scheduling.
2Under suspension-oblivious analysis, suspensions are modeled as execution that occupies the processor.
3Under suspension-aware analysis, suspensions are explicitly accounted for and not modeled as execution.
While nesting of requests is allowed under several uniprocessor locking proto-cols such as the PCP,4the increased parallelism on multiprocessors makes the support for nesting in locking protocols challenging. The MDPCP presented by Chen and Tripathi [51] for periodic tasks under P-EDF scheduling, similar to the PCP, relies on resource ceilings and only enables rather coarse-grained locking (to access a single global resource, all global resources accessed by any task from the same processor must be available).
A different technique to support nesting is the group lock, where resources that may be nested within each other are organized in a group. To access a single resource, the corresponding group lock must be obtained, even when other resources in the group are not used. This approach is employed, for instance, by the FMLP and the PWLP [13], a locking protocol using preemptable FIFO-ordered spin locks presented by Alfranseder et al . for global and partitioned FP and EDF scheduling. The RNLP presented by Ward and Anderson [130] is a family of spin- and suspension-based locking protocols supporting nesting without group locks for partitioned, clustered and global FP and EDF scheduling. Notably, the RNLP ensures asymptotically optimal blocking. Biondi et al . presented the nFIFO protocol [32], a relaxation of the classic MSRP, that allows nesting and avoids blocking of non-conflicting requests. The analysis of the nFIFO protocol presented by Biondi et al . is partially based on our analysis approach presented in Chapter 6.