Abortable Reader-Writer Locks Are No More Complex Than Abortable Mutex Locks

  • Prasad Jayanti
  • Zhiyu Liu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7611)


When a process attempts to acquire a mutex lock, it may be forced to wait if another process currently holds the lock. In certain applications, such as real-time operating systems and databases, indefinite waiting can cause a process to miss an important deadline [19]. Hence, there has been research on designing abortable mutual exclusion locks, and fairly efficient algorithms of O(logn) RMR complexity have been discovered [11,14] (n denotes the number of processes for which the algorithm is designed).

The abort feature is just as important for a reader-writer lock as it is for a mutual exclusion lock, but to the best of our knowledge there are currently no abortable reader-writer locks that are starvation-free. We show the surprising result that any abortable, starvation-free mutual exclusion algorithm of RMR complexity t(n) can be transformed into an abortable, starvation-free reader-writer exclusion algorithm of RMR complexity O(t(n)). Thus, we obtain the first abortable, starvation-free reader-writer exclusion algorithm of O(logn) RMR complexity. Our results apply to the Cache-Coherent (CC) model of multiprocessors.


concurrent algorithm synchronization reader-writer exclusion mutual exclusion abortability RMR complexity shared memory algorithm 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Anderson, J.H., Kim, Y.-J., Herman, T.: Shared-memory mutual exclusion: major research trends since 1986. Distrib. Comput. 16(2-3), 75–110 (2003)CrossRefGoogle Scholar
  2. 2.
    Anderson, T.E.: The performance of spin lock alternatives for shared-memory multiprocessors. IEEE Trans. Parallel Distrib. Syst. 1(1), 6–16 (1990)CrossRefGoogle Scholar
  3. 3.
    Bhatt, V., Jayanti, P.: Constant rmr solutions to reader writer synchronization. In: PODC 2010: Proceedings of the 29th Annual ACM Symposium on Principles of Distributed Computing, pp. 468–477. ACM, New York (2010)Google Scholar
  4. 4.
    Bhatt, V., Jayanti, P.: Specification and constant rmr algorithm for phase-fair reader-writer lock. In: ICDCN 2011: Proceedings of the 12th International Conference on Distributed Computing and Networking, pp. 119–130 (2011)Google Scholar
  5. 5.
    Brandenburg, B.B., Anderson, J.H.: Reader-writer synchronization for shared-memory multiprocessor real-time systems. In: ECRTS 2009: Proceedings of the 2009 21st Euromicro Conference on Real-Time Systems, pp. 184–193. IEEE Computer Society, Washington, DC (2009)Google Scholar
  6. 6.
    Courtois, P.J., Heymans, F., Parnas, D.L.: Concurrent control with “readers” and “writers”. Commun. ACM 14(10), 667–668 (1971)CrossRefGoogle Scholar
  7. 7.
    Dijkstra, E.W.: Solution of a problem in concurrent programming control. Commun. ACM 8(9), 569 (1965)CrossRefGoogle Scholar
  8. 8.
    Fischer, M.J., Lynch, N.A., Burns, J.E., Borodin, A.: Resource allocation with immunity to limited process failure. In: SFCS 1979: Proceedings of the 20th Annual Symposium on Foundations of Computer Science, pp. 234–254. IEEE Computer Society, Washington, DC (1979)CrossRefGoogle Scholar
  9. 9.
    Hadzilacos, V.: A note on group mutual exclusion. In: PODC 2001: Proceedings of the Twentieth Annual ACM Symposium on Principles of Distributed Computing, pp. 100–106. ACM, New York (2001)CrossRefGoogle Scholar
  10. 10.
    Danek, R., Hadzilacos, V.: Local-Spin Group Mutual Exclusion Algorithms. In: Guerraoui, R. (ed.) DISC 2004. LNCS, vol. 3274, pp. 71–85. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  11. 11.
    Jayanti, P.: Adaptive and efficient abortable mutual exclusion. In: PODC 2003: Proceedings of the Twenty-Second Annual Symposium on Principles of Distributed Computing, pp. 295–304. ACM, New York (2003)CrossRefGoogle Scholar
  12. 12.
    Joung, Y.-J.: Asynchronous group mutual exclusion (extended abstract). In: PODC 1998: Proceedings of the Seventeenth Annual ACM Symposium on Principles of Distributed Computing, pp. 51–60. ACM, New York (1998)CrossRefGoogle Scholar
  13. 13.
    Lamport, L.: A new solution of Dijkstra’s concurrent programming problem. Commun. ACM 17(8), 453–455 (1974)MathSciNetzbMATHCrossRefGoogle Scholar
  14. 14.
    Lee, H.: Fast Local-Spin Abortable Mutual Exclusion with Bounded Space. In: Lu, C., Masuzawa, T., Mosbah, M. (eds.) OPODIS 2010. LNCS, vol. 6490, pp. 364–379. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  15. 15.
    Lev, Y., Luchangco, V., Olszewski, M.: Scalable reader-writer locks. In: SPAA 2009: Proceedings of the Twenty-First Annual Symposium on Parallelism in Algorithms and Architectures, pp. 101–110. ACM, New York (2009)CrossRefGoogle Scholar
  16. 16.
    Mellor-Crummey, J.M., Scott, M.L.: Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Trans. Comput. Syst. 9(1), 21–65 (1991)CrossRefGoogle Scholar
  17. 17.
    Mellor-Crummey, J.M., Scott, M.L.: Scalable reader-writer synchronization for shared-memory multiprocessors. In: PPOPP 1991: Proceedings of the Third ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 106–113. ACM, New York (1991)CrossRefGoogle Scholar
  18. 18.
    Scott, M.L.: Non-blocking timeout in scalable queue-based spin locks. In: Proceedings of the 21st Annual Symposium on Principles of Distributed Computing, pp. 31–40 (2002)Google Scholar
  19. 19.
    Scott, M.L., Scherer III, W.N.: Scalable queue-based spin locks with timeout. In: Proceedings of the 8th Symposium on Principles and Practice of Parallel Programming, pp. 44–52 (2001)Google Scholar
  20. 20.
    Zheng, N.: Constant-rmr abortable reader-priority reader-writer algorithm. Technical Report TR2011-685, Dartmouth College, Computer Science, Hanover, NH (June 2011)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Prasad Jayanti
    • 1
  • Zhiyu Liu
    • 1
  1. 1.Department of Computer ScienceDartmouth CollegeHanoverUSA

Personalised recommendations