Advertisement

Real-Time Systems

, Volume 55, Issue 2, pp 296–348 | Cite as

Real-time multiprocessor locks with nesting: optimizing the common case

  • Catherine E. NemitzEmail author
  • Tanya Amert
  • James H. Anderson
Article
  • 25 Downloads

Abstract

In prior work on multiprocessor real-time locking protocols, only protocols within the RNLP family support unrestricted lock nesting while guaranteeing asymptotically optimal priority-inversion blocking bounds. However, these protocols support nesting at the expense of increasing the cost of processing non-nested lock requests, which tend to be the common case in practice. To remedy this situation, a new fast-path mechanism is presented herein that extends prior RNLP variants by ensuring that non-nested requests are processed efficiently. This mechanism yields overhead and blocking costs for such requests that are nearly identical to those seen in the most efficient single-resource locking protocols. In experiments, the proposed fast-path mechanism enabled observed blocking times for non-nested requests that were up to 18 times lower than under an existing RNLP variant and improved schedulability over that variant and a simple group lock.

Keywords

Multiprocess locking protocols Nested locks Priority-inversion blocking Reader/writer locks Real-time locking protocols 

Notes

Supplementary material

References

  1. 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, pp 41–51. IEEEGoogle Scholar
  2. 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, pp 1–11. IEEEGoogle Scholar
  3. Afshar S, Behnam M, Bril R, Nolte T (2018) Per processor spin-based protocols for multiprocessor real-time systems. Leibniz Trans Embed Syst 4(2):1–30Google Scholar
  4. Afshar S, Behnam M, Nolte T (2013) Integrating independently developed real-time applications on a shared multi-core architecture. ACM SIGBED Rev 10(3):49–56CrossRefGoogle Scholar
  5. Afshar S, Khalilzad N, Nemati F, Nolte T (2015) Resource sharing among prioritized real-time applications on multiprocessors. ACM SIGBED Rev 12(1):46–55CrossRefGoogle Scholar
  6. Bacon D, Konuru R, Murthy C, Serrano M (1998) Thin locks: featherweight synchronization for Java. In: ACM SIGPLAN Notices, vol 33, pp 258–268. ACMGoogle Scholar
  7. Baker TP (1991) Stack-based scheduling of realtime processes. Real-Time Syst 3(1):67–99MathSciNetCrossRefGoogle Scholar
  8. Baruah S (2007) Techniques for multiprocessor global schedulability analysis. In: Proceedings of the 28th IEEE real-time systems symposium, pp 119–128. IEEEGoogle Scholar
  9. 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, pp 291–302. IEEEGoogle Scholar
  10. 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, pp 71–80. IEEEGoogle Scholar
  11. Brandenburg B (2011) Scheduling and locking in multiprocessor real-time operating systems. Ph.D. thesis, University of North Carolina, Chapel Hill, NCGoogle Scholar
  12. 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, pp 61–71. IEEEGoogle Scholar
  13. 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, pp 19–28Google Scholar
  14. Brandenburg B, Anderson J (2008) A comparison of the M-PCP, D-PCP, and FMLP on LITMUS\(^{{\text{RT}}}\). In: Proceedings of the 12th international conference on principles of distributed systems, pp 105–124. SpringerGoogle Scholar
  15. Brandenburg B, Anderson J (2008) An implementation of the PCP, SRP, D-PCP, M-PCP, and FMLP real-time synchronization protocols in LITMUS\(^{{\text{ RT }}}\). In: Proceedings of the 14th IEEE international conference on embedded and real-time computing systems and applications, pp 185–194. IEEEGoogle Scholar
  16. Brandenburg B, Anderson J (2010) Spin-based reader-writer synchronization for multiprocessor real-time systems. Real-Time Syst 46(1):25–87CrossRefzbMATHGoogle Scholar
  17. 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, pp 69–78. ACMGoogle Scholar
  18. Brandenburg B, Anderson J (2013) The OMLP family of optimal multiprocessor real-time locking protocols. Des Autom Embed Syst 17(2):277–342CrossRefGoogle Scholar
  19. Burns A, Wellings A (2013) A schedulability compatible multiprocessor resource sharing protocol—MrsP. In: Proceedings of the 25th euromicro conference on real-time systems, pp 282–291. IEEEGoogle Scholar
  20. 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, pp 99–108Google Scholar
  21. Chen C, Tripathi S (1994) Multiprocessor priority ceiling based protocols. Tech. Rep. CS-TR-3252, University of MarylandGoogle Scholar
  22. Courtois P, Heymans F, Parnas D (1971) Concurrent control with readers and writers. Commun ACM 14(10):667–668CrossRefGoogle Scholar
  23. Dijkstra E (1978) Two starvation free solutions to a general exclusion problem. EWD 625, Plataanstraat 5, 5671 Al Nuenen, The NetherlandsGoogle Scholar
  24. Elliott G, Anderson J (2013) An optimal k-exclusion real-time locking protocol motivated by multi-GPU systems. Real-Time Syst 49(2):140–170CrossRefzbMATHGoogle Scholar
  25. Faggioli D, Lipari G, Cucinotta T (2010) The multiprocessor bandwidth inheritance protocol. In: Proceedings of the 22nd euromicro conference on real-time systems, pp 90–99. IEEEGoogle Scholar
  26. Faggioli D, Lipari G, Cucinotta T (2012) Analysis and implementation of the multiprocessor bandwidth inheritance protocol. Real-Time Syst 48(6):789–825CrossRefzbMATHGoogle Scholar
  27. 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, pp 189–198. IEEEGoogle Scholar
  28. 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, pp 73–83. IEEEGoogle Scholar
  29. 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, pp 73–86. SpringerGoogle Scholar
  30. Havender J (1968) Avoiding deadlock in multitasking systems. IBM Syst J 7(2):74–84CrossRefGoogle Scholar
  31. Herlihy M, Wing J (1990) Linearizability: a correctness condition for concurrent objects. ACM Trans Progr Lang Syst 12(3):463–492CrossRefGoogle Scholar
  32. Huang H, Pillai P, Shin K (2002) Improving wait-free algorithms for interprocess communication in embedded real-time systems. In: Proceedings of the general track of the annual conference on USENIX annual technical conference, pp 303–316. USENIX AssociationGoogle Scholar
  33. 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, pp 3–12. ACMGoogle Scholar
  34. Joung Y (2000) Asynchronous group mutual exclusion. Distrib Comput 13(4):189–206CrossRefGoogle Scholar
  35. Keane P, Moir M (1999) A simple local-spin group mutual exclusion algorithm. In: Proceedings of the 18th annual ACM symposium on principles of distributed computing, pp 23–32. ACMGoogle Scholar
  36. 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, pp 469–478. IEEEGoogle Scholar
  37. Mellor-Crummey J, Scott M (1991) Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Trans Comput Syst 9(1):21–65CrossRefGoogle Scholar
  38. 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, pp 251–261. IEEEGoogle Scholar
  39. 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, pp 38–47. ACMGoogle Scholar
  40. 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, pp 25:1–25:24. Schloss Dagstuhl–Leibniz-Zentrum für InformatikGoogle Scholar
  41. Rajkumar R (1990) Real-time synchronization protocols for shared memory multiprocessors. In: Proceedings of the 10th international conference on distributed computing systems, pp 116–123. IEEEGoogle Scholar
  42. Rajkumar R (1991) Synchronization in real-time systems: a priority inheritance approach. Kluwer Academic Publishers, BostonCrossRefzbMATHGoogle Scholar
  43. Rajkumar R, Sha L, Lehoczky J (1988) Real-time synchronization protocols for multiprocessors. In: Proceedings of the 9th IEEE real-time systems symposium, pp 259–269. IEEEGoogle Scholar
  44. Sha L, Rajkumar R, Lehoczky JP (1990) Priority inheritance protocols: an approach to real-time synchronization. IEEE Trans Comput 39(9):1175–1185MathSciNetCrossRefzbMATHGoogle Scholar
  45. SchedCAT: schedulability test collection and toolkit. http://www.mpi-sws.org/bbb/projects/schedcat. Accessed 31 May 2018
  46. 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, pp 160–167. IEEEGoogle Scholar
  47. 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, pp 70–76. IEEEGoogle Scholar
  48. Ward B (2015) Relaxing resource-sharing constraints for improved hardware management and schedulability. In: Proceedings of the 36th IEEE real-time systems symposium, pp 153–164. IEEEGoogle Scholar
  49. Ward B (2016) Sharing non-processor resources in multiprocessor real-time systems. Ph.D. thesis, University of North Carolina, Chapel Hill, NCGoogle Scholar
  50. Ward B, Anderson J (2012) Supporting nested locking in multiprocessor real-time systems. In: Proceedings of the 23rd euromicro conference on real-time systems, pp 223–232. IEEEGoogle Scholar
  51. 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, pp 67–76. ACMGoogle Scholar
  52. 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, pp 177–186. IEEEGoogle Scholar
  53. 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, pp 280–289. IEEEGoogle Scholar
  54. 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, pp 45–56. IEEEGoogle Scholar
  55. 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, pp 106–117. IEEEGoogle Scholar
  56. 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, pp 1–12. IEEEGoogle Scholar
  57. 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, pp 1–10. IEEEGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Department of Computer ScienceUNC-Chapel HillChapel HillUSA

Personalised recommendations