Abstract
When designing a real-time multiprocessor locking protocol, the allowance of lock nesting creates complications that can inhibit parallelism. Such protocols are typically designed by focusing on the arbitration of resource requests that should be prohibited from executing concurrently. This paper proposes “concurrency groups,” a new concept that reflects an alternative point of view that focuses instead on requests that can be allowed to execute concurrently. A concurrency group is simply a group of lock requests, determined offline, that can safely execute together. This paper’s main contribution is the CGLP, a new real-time multiprocessor locking protocol that supports lock nesting through the use of concurrency groups. The CGLP is able to reap runtime parallelism benefits that have eluded prior protocols by investing effort offline in the construction of concurrency groups. A schedulability study is presented to quantify these benefits, as well as an approach to determining such groups using an Integer Linear Program (ILP) solver, which we show to be efficient in practice.
Similar content being viewed by others
Notes
We assume the use of dynamic group locks (Ward and Anderson 2013), which coalesce all resources a task may require concurrently under a single request. For example, if a task requires access to \({\ell } _a\) and then conditionally requires access to either \({\ell } _b\) or \({\ell } _c\), it issues a single request for \(\{{\ell } _a, {\ell } _b, {\ell } _c\}\).
Note that this work presents a change in the definition of slot from that by Nemitz et al. (2019b).
We use a single MCS lock (Mellor-Crummey and Scott 1991) to protect all resources for the group lock. We leave it to future work to compare to a set of resource-ordered locks.
References
AUTOSAR Release 4.4 (2019) Classic platform, specification of operating system. https://www.autosar.org/. Accessed 20 May 2019
Afshar S, Behnam M, Bril R, Nolte T (2014) Flexible spin-lock model for resource sharing in multiprocessor real-time systems. In: Proceedings of the 9th IEEE International Symposium on Industrial Embedded Systems
Afshar S, Behnam M, Bril R, Nolte T (2017) An optimal spin-lock priority assignment algorithm for real-time multi-core systems. In: Proceedings of the 23rd IEEE International Conference on Embedded and Real-Time Computing Systems and Applications
Afshar S, Behnam M, Bril R, Nolte T (2018) Per processor spin-based protocols for multiprocessor real-time systems. Leibniz Trans Embed Syst https://doi.org/10.4230/LITES-v004-i002-a003
Afshar S, Behnam M, Nolte T (2013) Integrating independently developed real-time applications on a shared multi-core architecture. ACM SIGBED Review’13
Afshar S, Khalilzad N, Nemati F, Nolte T (2015) Resource sharing among prioritized real-time applications on multiprocessors. ACM SIGBED Review’15
Bacon D, Konuru R, Murthy C, Serrano M (1998) Thin locks: featherweight synchronization for Java. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation
Bandh T, Carle G, Sanneck H (2009) Graph coloring based physical-cell-id assignment for LTE networks. In: Proceedings of the 2009 International Conference on Wireless Communications and Mobile Computing: Connecting the World Wirelessly
Barnier N, Brisset P (2004) Graph coloring for air traffic flow management. Ann Oper Res 130(1–4):163–178
Baruah S (2007) Techniques for multiprocessor global schedulability analysis. In: Proceedings of the 28th IEEE Real-Time Systems Symposium
Biondi A, Brandenburg B, Wieder A (2016) A blocking bound for nested FIFO spin locks. In: Proceedings of the 37th IEEE Real-Time Systems Symposium
Block A, Leontyev H, Brandenburg B, Anderson J (2007) A flexible real-time locking protocol for multiprocessors. In: Proceedings of the 13th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications
Brandenburg B (2011) Scheduling and locking in multiprocessor real-time operating systems. Ph.D. thesis, University of North Carolina, Chapel Hill, NC
Brandenburg B (2014) The FMLP+: an asymptotically optimal real-time locking protocol for suspension-aware analysis. In: Proceedings of the 26th Euromicro Conference on Real-Time Systems
Brandenburg B, Anderson J (2007) Feather-trace: a lightweight event tracing toolkit. In: Proceedings of the 3rd International Workshop on Operating Systems Platforms for Embedded Real-Time Applications
Brandenburg B, Anderson J (2008a) A comparison of the M-PCP, D-PCP, and FMLP on \(\text{LITMUS}^{{{\rm RT}}}\). In: Proceedings of the 12th International Conference on Principles of Distributed Systems
Brandenburg B, Anderson J (2008b) An implementation of the PCP, SRP, D-PCP, M-PCP, and FMLP real-time synchronization protocols in \(\text{ LITMUS}^{{{\rm RT}}}\). In: Proceedings of the 14th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications
Brandenburg B, Anderson J (2010) Spin-based reader-writer synchronization for multiprocessor real-time systems. Real-Time Syst 46(1):25–87
Brandenburg B, Anderson J (2011) Real-time resource-sharing under clustered scheduling: mutex, reader-writer, and \(k\)-exclusion locks. In: Proceedings of the 9th ACM International Conference on Embedded Software
Brandenburg B, Anderson J (2013) The OMLP family of optimal multiprocessor real-time locking protocols. Design Autom Embed Syst 17(2):277–342
Burns A, Wellings A (2013) A schedulability compatible multiprocessor resource sharing protocol—MrsP. In: Proceedings of the 25th Euromicro Conference on Real-Time Systems
Chaitin G, Auslander M, Chandra A, Cocke J, Hopkins M, Markstein P (1981) Register allocation via coloring. Comput Lang 6(1):45–57
Chang Y, Davis R, Wellings A (2010) Reducing queue lock pessimism in multiprocessor schedulability analysis. In: Proceedings of the 18th International Conference on Real-Time and Network Systems
Chen C, Tripathi S (1994) Multiprocessor priority ceiling based protocols. Department of Computer Science, University of Maryland. Technical Report, CS-TR-3252, April
Dijkstra E (1978) Two starvation free solutions to a general exclusion problem. EWD 625, Plataanstraat 5, 5671 Al Nuenen, The Netherlands
Elliott G, Anderson J (2013) An optimal k-exclusion real-time locking protocol motivated by multi-GPU systems. Real-Time Syst 49(2):140–170
Faggioli D, Lipari G, Cucinotta T (2010) The multiprocessor bandwidth inheritance protocol. In: Proceedings of the 22nd Euromicro Conference on Real-Time Systems
Faggioli D, Lipari G, Cucinotta T (2012) Analysis and implementation of the multiprocessor bandwidth inheritance protocol. Real-Time Syst 48(6):789–825
Gai P, Di Natale M, Lipari G, Ferrari A, Gabellini C, Marceca P (2003) A comparison of MPCP and MSRP when sharing resources in the Janus multiple-processor on a chip platform. In: Proceedings of the 9th IEEE Real-Time and Embedded Technology and Applications Symposium
Gai P, Lipari G, Di Natale M (2001) Minimizing memory utilization of real-time task sets in single and multi-processor systems-on-a-chip. In: Proceedings of the 22nd IEEE Real-Time Systems Symposium
Garrido J, Zhao S, Burns A, Wellings A (2017) Supporting nested resources in MrsP. In: Proceedings of the Ada-Europe International Conference on Reliable Software Technologies
Gurobi Optimization, L.: Gurobi optimizer reference manual (2018). http://www.gurobi.com
Havender J (1968) Avoiding deadlock in multitasking systems. IBM Syst J 7(2):74–84
Jarrett C, Ward B, Anderson J (2015) A contention-sensitive fine-grained locking protocol for multiprocessor real-time systems. In: Proceedings of the 23rd International Conference on Real-Time Networks and Systems
Lakshmanan K, Niz D, Rajkumar R (2009) Coordinated task scheduling, allocation and synchronization on multiprocessors. In: Proceedings of the 30th IEEE Real-Time Systems Symposium
Marx D (2004) Graph colouring problems and their applications in scheduling. Period Polytech Electr Eng 48(1–2):11–16
Mellor-Crummey J, Scott M (1991) Algorithms for scalable synchronization of shared-memory multiprocessors. Trans Comput Syst 9(1):21–65
Nemati F, Behnam M, Nolte T (2011) Independently-developed real-time systems on multi-cores with shared resources. In: Proceedings of the 23rd Euromicro Conference on Real-Time Systems
Nemitz C, Amert T, Anderson J (2017) Real-time multiprocessor locks with nesting: optimizing the common case. In: Proceedings of the 25th International Conference on Real-Time Networks and Systems
Nemitz C, Amert T, Anderson J (2018) Using lock servers to scale real-time locking protocols: chasing ever-increasing core counts. In: Proceedings of the 30th Euromicro Conference on Real-Time Systems
Nemitz C, Amert T, Anderson J (2019a) Real-time multiprocessor locks with nesting: optimizing the common case. Real-Time Syst 55(2):296
Nemitz C, Amert T, Goyal M, Anderson J (2019b) Concurrency groups: a new way to look at real-time multiprocessor lock nesting. In: Proceedings of the 27th International Conference on Real-Time Networks and Systems
Nemitz C, Amert T, Goyal M, Anderson J (2021) Concurrency groups: a new way to look at real-time multiprocessor lock nesting (extended version). http://www.cs.unc.edu/~anderson/papers.html
Palladino S (2010) Modelling graph coloring with integer linear programming. https://manas.tech/blog/2010/09/16/modelling-graph-coloring-with-integer-linear-programming.html
Rajkumar R (1990) Real-time synchronization protocols for shared memory multiprocessors. In: Proceedings of the 10th International Conference on Distributed Computing Systems
Rajkumar R (1991) Synchronization in real-time systems: a priority inheritance approach. Kluwer Academic Press, Reading, MA
Rajkumar R, Sha L, Lehoczky J (1988) Real-time synchronization protocols for multiprocessors. In: Proceedings of the 9th IEEE Real-Time Systems Symposium
SchedCAT: Schedulability test collection and toolkit (2019). https://github.com/brandenburg/schedcat Accessed 02 July 2019
Takada H, Sakamura K (1995) Real-time scalability of nested spin locks. In: Proceedings of the 2nd IEEE International Workshop on Real-Time Computing Systems and Applications
Wang C, Takada H, Sakamura K (1996) Priority inheritance spin locks for multiprocessor real-time systems. In: Proceedings of the 2nd IEEE International Symposium on Parallel Architectures, Algorithms, and Networks
Ward B (2015) Relaxing resource-sharing constraints for improved hardware management and schedulability. In: Proceedings of the 36th IEEE Real-Time Systems Symposium
Ward B (2016) Sharing non-processor resources in multiprocessor real-time systems. Ph.D. thesis, University of North Carolina, Chapel Hill, NC
Ward B, Anderson J (2012) Supporting nested locking in multiprocessor real-time systems. In: Proceedings of the 23rd Euromicro Conference on Real-Time Systems
Ward B, Anderson J (2013) Fine-grained multiprocessor real-time locking with improved blocking. In: Proceedings of the 21st International Conference on Real-Time Networks and Systems
Ward B, Anderson J (2014) Multi-resource real-time reader/writer locks for multiprocessors. In: Proceedings of the 28th IEEE International Parallel and Distributed Processing Symposium
Ward B, Elliott G, Anderson J (2012) Replica-request priority donation: a real-time progress mechanism for global locking protocols. In: Proceedings of the 18th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications
Wieder A, Brandenburg B (2013) On spin locks in AUTOSAR: blocking analysis of FIFO, unordered, and priority-ordered spin locks. In: Proceedings of the 34th IEEE Real-Time Systems Symposium
Wieder A, Brandenburg B (2014) On the complexity of worst-case blocking analysis of nested critical sections. In: Proceedings of the 35th IEEE Real-Time Systems Symposium
Yang M, Wieder A, Brandenburg B (2015) Global real-time semaphore protocols: a survey, unified analysis, and comparison. In: Proceedings of the 36th IEEE Real-Time Systems Symposium
Zhao S, Garrido J, Burns A, Wellings A (2017) New schedulability analysis for MrsP. In: Proceedings of the 23rd IEEE International Conference on Embedded and Real-Time Computing Systems and Applications
Acknowledgements
Work supported by NSF Grants CNS 1409175, CNS 1563845, CNS 1717589, and CPS 1837337, ARO Grant W911NF-17-1-0294, and funding from General Motors. This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. DGS-1650116. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Nemitz, C.E., Amert, T., Goyal, M. et al. Concurrency groups: a new way to look at real-time multiprocessor lock nesting. Real-Time Syst 57, 190–226 (2021). https://doi.org/10.1007/s11241-020-09361-0
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11241-020-09361-0