Skip to main content
Log in

A simple token-based algorithm for the mutual exclusion problem in distributed systems

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Solving the problem of mutually exclusive access to a critical resource is a major challenge in distributed systems. In some solutions, there is a unique token in the whole system which acts as a privilege to access a critical resource. Practical and easily implemented, the token-ring algorithm is one of the most popular token-based mutual exclusion algorithms known in this field’s literature. However, it suffers from low scalability and a high average waiting time for resource seekers. The present paper proposes a new algorithm which employs a two-dimensional torus logical structure of N processes and the token-ring algorithm concept. It performs in a way that increasingly raises scalability and reduces the average waiting time of the token-ring algorithm. The token makes a circular movement along the columns of the two-dimensional torus (vertical ring), while the requests for the critical resource make a circular movement along the rows of the torus (horizontal ring). In this algorithm, the number of messages exchanged is between \(2\sqrt{{N}}+1\) and 3\(\sqrt{{N}}+1\) under light load situations and, under heavy load situations, is at the most three messages per critical section invocation. Thus, in contrast with the leading algorithms, the proposed algorithm has gained significant improvements, in addition to having been proved to operate correctly.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3

Similar content being viewed by others

References

  1. Lamport L (1978) Time, clocks, and the ordering of events in a distributed system. Commun ACM 21(7):558–565

    Article  MATH  Google Scholar 

  2. Saxena PC, Rai J (2003) A survey of permission-based distributed mutual exclusion algorithms. Comput Stand Interfaces 25(2):159–181

    Article  Google Scholar 

  3. Thapliyal H, Arabnia HR, Srinivas MB (2009) Efficient reversible logic design of BCD subtractors. In: Gavrilova ML, Kenneth Tan CJ (eds) Transactions on computational science III. Springer, Berlin, pp 99–121 (LNCS 5300)

  4. Lejeune J, Arantes L, Sopena J, Sens P (2015) A fair starvation-free prioritized mutual exclusion algorithm for distributed systems. J Parallel Distrib Comput 83:13–29

    Article  Google Scholar 

  5. Arabnia HR, Oliver MA (1986) Fast operations on raster images with SIMD machine architectures. Comput Graph Forum 5(3):179–188

    Article  Google Scholar 

  6. Thapliyal H, Jayashree HV, Nagamani AN, Arabnia HR (2013) Progress in reversible processor design: a novel methodology for reversible carry look-ahead adder. In: Gavrilova ML, Kenneth Tan CJ (eds) Transactions in Computational Science. Springer, pp 73–97 (LNCS 7420)

  7. Thapliyal H, Arabnia HR, Bajpai R, Sharma KK (2007) Combined integer and variable precision (CIVP) floating point multiplication architecture for FPGAs. In: Proceedings of 2007 International Conference on Parallel and Distributed Processing Techniques and Applications; PDPTA’07. pp 449–450

  8. Thapliyal H, Arabnia HR (2006) reversible programmable logic array (RPLA) using Fredkin and Feynman gates for industrial electronics and applications. In: Proceedings of 2006 International Conference on Computer Design and Conference on Computing in Nanotechnology (CDES’06). pp 70–74

  9. Thapliyal H, Srinivas MB, Arabnia HR (2005) Reversible logic synthesis of half, full and parallel subtractors. In: Proceedings of 2005 International Conference on Embedded Systems and Applications, ESA’05. pp 165–172

  10. Qureshi MB, Alrashed S, Min-Allah N et al (2015) Maintaining the feasibility of hard real-time systems with a reduced number of priority levels. Int J Appl Math Comput Sci 25(4):709–722. doi:10.1515/amcs-2015-0051

    Article  MathSciNet  MATH  Google Scholar 

  11. Alrashed S, Alhiyafi J, Shafi A, Min-Allah N (2016) An efficient schedulability condition for non-preemptive real-time systems at common scheduling points. J Supercomput 72:4651–4661. doi:10.1007/s11227-016-1751-6

    Article  Google Scholar 

  12. Hura GS (1989) The role of atomic actions in a distributed system. Microelectron Reliab 29(2):185–193

    Article  Google Scholar 

  13. Leiserson CE (2016) A simple deterministic algorithm for guaranteeing the forward progress of transactions. Inf Syst 57:69–74

    Article  Google Scholar 

  14. Tamhane SA, Kumar M (2012) A token based distributed algorithm for supporting mutual exclusion in opportunistic networks. Pervasive Mob Comput 8:795–809

    Article  Google Scholar 

  15. Jiang J-R (2011) Nondominated local coteries for resource allocation in grids and clouds. Inf Process Lett 111:379–384

    Article  MathSciNet  MATH  Google Scholar 

  16. Bertier M, Obrovac M, Tedeschi C (2013) Adaptive atomic capture of multiple molecules. J Parallel Distrib Comput 73:1251–1266

    Article  Google Scholar 

  17. Aravind AA (2013) Simple, space-efficient, and fairness improved FCFS mutual exclusion algorithms. J Parallel Distrib Comput 73:1029–1038

    Article  MATH  Google Scholar 

  18. Wu W, Zhang J, Luo A, Cao J (2015) Distributed Mutual Exclusion Algorithms for Intersection Traffic Control. IEEE Trans Parallel Distrib Syst 26:65–74

    Article  Google Scholar 

  19. Ni W, Wu W, Li K (2016) A message efficient intersection control algorithm for intelligent transportation in smart cities. Futur Gener Comput Syst. doi:10.1016/j.future.2016.10.033

  20. Ciuffoletti A (2010) The wandering token: congestion avoidance of a shared resource. Future Gener Comput Syst 26(3):473–478

  21. Tanenbaum AS, Van Steen M (2007) Distributed systems-principles and paradigms. Pearson Prentice Hall, Upper Saddle River

    MATH  Google Scholar 

  22. Paydar S, Naghibzadeh M, Yavari A (2006) A hybrid distributed mutual exclusion algorithm. In: International Conference on Emerging Technologies 2006, ICET’06. IEEE, pp 263–270

  23. Dijkstra EW (1965) Solution of a problem in concurrent programming control. Commun ACM 8:569

    Article  Google Scholar 

  24. Li Z, Yan M, Zhou M (2010) Synthesis of structurally simple supervisors enforcing generalized mutual exclusion constraints in petri nets. IEEE Trans Syst Man Cybern C (Appl Rev) 40:330–340

    Article  Google Scholar 

  25. Hesselink WH (2016) Correctness and concurrent complexity of the Black-White Bakery Algorithm. Formal Asp Comput 28(2):325–341

    Article  MathSciNet  MATH  Google Scholar 

  26. Bienkowski M, Klonowski M, Korzeniowski M, Kowalski DR (2016) Randomized mutual exclusion on a multiple access channel. Distrib Comput 29(5):341–359

    Article  MathSciNet  MATH  Google Scholar 

  27. Taubenfeld G (2014) Tight space bounds for \(\ell \) -exclusion. Distrib Comput 27(3):165–179

    Article  MathSciNet  MATH  Google Scholar 

  28. Park S-H, Lee S-H (2014) Quorum-based mutual exclusion in asynchronous distributed systems with unreliable failure detectors. J Supercomput 67(2):469–484

    Article  Google Scholar 

  29. Aravind AA (2010) Highly-fair bakery algorithm using symmetric tokens. Inf Process Lett 110:1055–1060

    Article  MathSciNet  Google Scholar 

  30. Kakugawa H (2015) Self-stabilizing distributed algorithm for local mutual inclusion. Inf Process Lett 115:562–569

    Article  MathSciNet  MATH  Google Scholar 

  31. Maekawa M (1985) An algorithm for mutual exclusion in decentralized systems. ACM Trans Comput Syst 3(2):145–159

    Article  Google Scholar 

  32. Razzaque MA, Hong CS (2008) Multi-token distributed mutual exclusion algorithm. In: 22nd International Conference on Advanced Information Networking and Applications, 2008, AINA. IEEE, pp 963–970

  33. Ricart G, Agrawala AK (1981) An optimal algorithm for mutual exclusion in computer networks. Commun ACM 24(1):9–17

    Article  MathSciNet  Google Scholar 

  34. Suzuki I, Kasami T (1985) A distributed mutual exclusion algorithm. ACM Trans Comput Syst 3(4):344–349

    Article  Google Scholar 

  35. Raynal M (1991) A simple taxonomy for distributed mutual exclusion algorithms. ACM SIGOPS Oper Syst Rev 25(2):47–50

    Article  Google Scholar 

  36. Naimi M, Trehel M, Arnold A (1996) A log (N) distributed mutual exclusion algorithm based on path reversal. J Parallel Distrib Comput 34(1):1–13

    Article  Google Scholar 

  37. Le Lann G (1977) Distributed systems-towards a formal approach. In: IFIP Congress. Toronto, pp 155–160

  38. Neamatollahi P, Taheri H, Naghibzadeh M (2012) Info-based approach in distributed mutual exclusion algorithms. J Parallel Distrib Comput 72(5):650–665

    Article  MATH  Google Scholar 

  39. Raymond K (1989) A tree-based algorithm for distributed mutual exclusion. ACM Trans Comput Syst 7(1):61–77

    Article  Google Scholar 

  40. Taheri H, Neamatollahi P, Naghibzadeh M (2011) A hybrid token-based distributed mutual exclusion algorithm using wraparound two-dimensional array logical topology. Inf Process Lett 111:841–847

    Article  MathSciNet  MATH  Google Scholar 

  41. Agrawal D, El Abbadi A (1991) An efficient and fault-tolerant solution for distributed mutual exclusion. ACM Trans Comput Syst 9(1):1–20

    Article  Google Scholar 

  42. Kakugawa H (2015) Mutual inclusion in asynchronous message-passing distributed systems. J Parallel Distrib Comput 77:95–104

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Peyman Neamatollahi.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Neamatollahi, P., Sedaghat, Y. & Naghibzadeh, M. A simple token-based algorithm for the mutual exclusion problem in distributed systems. J Supercomput 73, 3861–3878 (2017). https://doi.org/10.1007/s11227-017-1985-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-017-1985-y

Keywords

Navigation