Advertisement

Distributed Computing

, Volume 32, Issue 6, pp 565–586 | Cite as

Efficient randomized test-and-set implementations

  • George Giakkoupis
  • Philipp WoelfelEmail author
Article
  • 36 Downloads

Abstract

We study randomized test-and-set (TAS) implementations from registers in the asynchronous shared memory model with n processes. We introduce the problem of group election, a natural variant of leader election, and propose a framework for the implementation of TAS objects from group election objects. We then present two group election algorithms, each yielding an efficient TAS implementation. The first implementation has expected max-step complexity \(O(\log ^*k)\) in the location-oblivious adversary model, and the second has expected max-step complexity \(O(\log \log k)\) against any read/write-oblivious adversary, where \(k\le n\) is the contention. These algorithms improve the previous upper bound by Alistarh and Aspnes (in: Proceedings of the 25th International Symposium on Distributed Computing, 2011) of \(O(\log \log n)\) expected max-step complexity in the oblivious adversary model. We also propose a modification to a TAS algorithm devised by Alistarh, Attiya, Gilbert, Giurgiu, and Guerraoui (in: Proceedings of the 24th International Symposium on Distributed Computing, DISC 2010) for the strong adaptive adversary, which improves its space complexity from super-linear to linear, while maintaining its \(O(\log n)\) expected max-step complexity. We then describe how this algorithm can be combined with any randomized TAS algorithm that has expected max-step complexity T(n) in a weaker adversary model, so that the resulting algorithm has \(O(\log n)\) expected max-step complexity against any strong adaptive adversary and O(T(n)) in the weaker adversary model. Finally, we prove that for any randomized 2-process TAS algorithm, there exists a schedule determined by an oblivious adversary such that with probability at least \(1/4^t\) one of the processes needs at least t steps to finish its TAS operation. This complements a lower bound by Attiya and Censor-Hillel (SIAM J Comput 39(8):3885–3904, 2010) on a similar problem for \(n\ge 3\) processes.

Notes

Acknowledgements

We thank Dan Alistarh for pointing out Styer and Peterson’s \(\varOmega (\log n)\) space lower bound for deadlock-free leader election [21]. We also thank the anonymous reviewers for their helpful feedback.

References

  1. 1.
    Afek, Y., Gafni, E., Tromp, J., Vitányi, P.M.: Wait-free test-and-set. In: Proceedings of the 6th International Workshop on Distributed Algorithms (WDAG), pp. 85–94. (1992)Google Scholar
  2. 2.
    Alistarh, D., Aspnes, J.: Sub-logarithmic test-and-set against a weak adversary. In: Proceedings of the 25th International Symposium on Distributed Computing (DISC), pp. 97–109. (2011)Google Scholar
  3. 3.
    Alistarh, D., Aspnes, J., Censor-Hillel, K., Gilbert, S., Zadimoghaddam, M.: Optimal-time adaptive strong renaming, with applications to counting. In: Proceedings of the 30th ACM Symposium on Principles of Distributed Computing (PODC), pp. 239–248. (2011)Google Scholar
  4. 4.
    Alistarh, D., Aspnes, J., Gilbert, S., Guerraoui, R.: The complexity of renaming. In: Proceedings of the 52nd IEEE Symposium on Foundations of Computer Science (FOCS), pp. 718–727. (2011)Google Scholar
  5. 5.
    Alistarh, D., Attiya, H., Gilbert, S., Giurgiu, A., Guerraoui, R.: Fast randomized test-and-set and renaming. In: Proceedings of the 24th International Symposium on Distributed Computing (DISC), pp. 94–108. (2010)Google Scholar
  6. 6.
    Aspnes, J.: Faster randomized consensus with an oblivious adversary. In: Proceedings of the 31st ACM Symposium on Principles of Distributed Computing (PODC), pp. 1–8. (2012)Google Scholar
  7. 7.
    Attiya, H., Censor-Hillel, K.: Lower bounds for randomized consensus under a weak adversary. SIAM J. Comput. 39(8), 3885–3904 (2010)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Attiya, H., Kuhn, F., Plaxton, C.G., Wattenhofer, M., Wattenhofer, R.: Efficient adaptive collect using randomization. Distrib. Comput. 18(3), 179–188 (2006)CrossRefGoogle Scholar
  9. 9.
    Buhrman, H., Panconesi, A., Silvestri, R., Vitányi, P.M.B.: On the importance of having an identity or, is consensus really universal? Distrib. Comput. 18(3), 167–176 (2006)CrossRefGoogle Scholar
  10. 10.
    Doerr, B.: Analyzing randomized search heuristics: tools from probability theory. In: Theory of Randomized Search Heuristics: Foundations and Recent Developments, pp. 1–20. World Scientific, Singapore (2011)Google Scholar
  11. 11.
    Eberly, W., Higham, L., Warpechowska-Gruca, J.: Long-lived, fast, waitfree renaming with optimal name space and high throughput. In: Proceedings of the 12th International Symposium on Distributed Computing (DISC), pp. 149–160. (1998)Google Scholar
  12. 12.
    Giakkoupis, G., Helmi, M., Higham, L., Woelfel, P.: An \(O(\sqrt{n})\) space bound for obstruction-free leader election. In: Proceedings of the 27th International Symposium on Distributed Computing (DISC), pp. 46–60. (2013)Google Scholar
  13. 13.
    Giakkoupis, G., Helmi, M., Higham, L., Woelfel, P.: Test-and-set in optimal space. In: Proceedings of the 47th ACM Symposium on Theory of Computing (STOC), pp. 615–623. (2015)Google Scholar
  14. 14.
    Giakkoupis, G., Woelfel, P.: On the time and space complexity of randomized test-and-set. In: Proceedings of the 31st ACM Symposium on Principles of Distributed Computing (PODC), pp. 19–28. (2012)Google Scholar
  15. 15.
    Golab, W., Hendler, D., Woelfel, P.: An \(O(1)\) RMRs leader election algorithm. SIAM J. Comput. 39, 2726–2760 (2010)MathSciNetCrossRefGoogle Scholar
  16. 16.
    Jägersküpper, J.: Algorithmic analysis of a basic evolutionary algorithm for continuous optimization. Theor. Comput. Sci. 279(3), 329–347 (2007)MathSciNetCrossRefGoogle Scholar
  17. 17.
    Kruskal, C.P., Rudolph, L., Snir, M.: Efficient synchronization on multiprocessors with shared memory. ACM Trans. Program. Lang. Syst. 10(4), 579–601 (1988)CrossRefGoogle Scholar
  18. 18.
    McDiarmid, C.: Concentration. In: Habib, M., McDiarmid, C., Ramirez-Alfonsin, J., Reed, B., (eds.) Probabilistic Methods for Algorithmic Discrete Mathematics, pp. 195–248. Springer, New York (1998)Google Scholar
  19. 19.
    Moir, M., Anderson, J. H.: Fast, long-lived renaming. In: Proceedings of the 8th International Workshop on Distributed Algorithms (WDAG), pp. 141–155. (1994)Google Scholar
  20. 20.
    Panconesi, A., Papatriantafilou, M., Tsigas, P., Vitányi, P.M.B.: Randomized naming using wait-free shared variables. Distrib. Comput. 11(3), 113–124 (1998)CrossRefGoogle Scholar
  21. 21.
    Styer, E., Peterson, G.L.: Tight bounds for shared memory symmetric mutual exclusion problems. In: Proceedings of the 8th ACM Symposium on Principles of Distributed Computing (PODC), pp. 177–192. (1989)Google Scholar
  22. 22.
    Tromp, J., Vitányi, P.M.B.: Randomized wait-free test-and-set. Manuscript, (1990)Google Scholar
  23. 23.
    Tromp, J., Vitányi, P.M.B.: Randomized two-process wait-free test-and-set. Distrib. Comput. 15(3), 127–135 (2002)CrossRefGoogle Scholar
  24. 24.
    Yao, A.C.C.: Probabilistic computations: towards a unified measure of complexity. In: Proceedings of the 17th IEEE Symposium on Foundations of Computer Science (FOCS), pp. 222–227. (1977)Google Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.INRIARennesFrance
  2. 2.University of CalgaryCalgaryCanada

Personalised recommendations