Skip to main content
Log in

Efficient dependency tracking for relevant events in concurrent systems

  • Original Article
  • Published:
Distributed Computing Aims and scope Submit manuscript

Abstract

In a concurrent system with N processes, vector clocks of size N are used for tracking dependencies between the events. Using vectors of size N leads to scalability problems. Moreover, association of components with processes makes vector clocks cumbersome and inefficient for systems with a dynamic number of processes. We present a class of logical clock algorithms, called chain clock, for tracking dependencies between relevant events based on generalizing a process to any chain in the computation poset. Chain clocks are generally able to track dependencies using fewer than N components and also adapt automatically to systems with dynamic number of processes. We compared the performance of Dynamic Chain Clock (DCC) with vector clock for multithreaded programs in Java. With 1 % of total events being relevant events, DCC requires 10 times fewer components than vector clock and the timestamp traces are smaller by a factor of 100. For the same case, although DCC requires shared data structures, it is still 10 times faster than vector clock in our experiments. We also study the class of chain clocks which perform optimally for posets of small width and show that a single algorithm cannot perform optimally for posets of small width as well as large width.

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.

Similar content being viewed by others

References

  1. Alagar, S., Venkatesan, S.: Techniques to tackle state explosion in global predicate detection. IEEE Trans. Softw. Eng. 27(8), 704 –714 (2001)

    Article  Google Scholar 

  2. Arora, A., Kulkarni, S.S., Demirbas, M.: Resettable vector clocks. In: Proceedings of the 19th ACM Symposium on Principles of Distributed Computing (PODC), pp. 269–278 (2000)

  3. Audenaert, K.: Clock trees: Logical clocks for programs with nested parallelism. IEEE Trans. Softw. Eng. 23(10), 646–658 (1997)

    Article  Google Scholar 

  4. Babaoglu, O., Marzullo, K.: Consistent global states of distributed systems: Fundamental concepts and mechanisms. In: Mullender, S. (ed.) Distributed Systems, pp. 55–96. Addison-Wesley (1993)

  5. Baldoni, R., Melideo, G.: Tradeoffs in message overhead versus detection time in causality tracking. Tech. Rep. 06-01, Dipartimento di Informatica e Sistemistica, Univ. of Rome (2000)

  6. Birman, K.P.: The process group approach to reliable distributed computing. Commun. ACM 36(12), 37–53 (1993)

    Article  Google Scholar 

  7. Birman, K.P., Joseph, T.A.: Reliable communication in the presence of failures. ACM Trans. Comput. Syst. 5(1), 47–76 (1987)

    Article  Google Scholar 

  8. Cain, H.W., Lipasti, M.H.: Verifying sequential consistency using vector clocks. In: Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures, pp. 153–154. ACM Press (2002)

  9. Charron-Bost, B.: Concerning the size of logical clocks in distributed systems. Inf. Process. Lett. 39, 11–16 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  10. Cooper, R., Marzullo, K.: Consistent detection of global predicates. In: Proc. of the Workshop on Parallel and Distributed Debugging, pp. 163–173. ACM/ONR, Santa Cruz, CA (1991)

  11. Davey, B.A., Priestley, H.A.: Introduction to Lattices and Order. Cambridge University Press (1990)

  12. Dilworth, R.P.: A decomposition theorem for partially ordered sets. Ann. Math. 51, 161–166 (1950)

    Article  MATH  MathSciNet  Google Scholar 

  13. Dinning, A., Schonberg, E.: An empirical comparison of monitoring algorithms for access anomaly detection. In: Proceedings of the second ACM SIGPLAN symposium on Principles & practice of parallel programming, pp. 1–10. ACM Press (1990)

  14. Felsner, S.: On-line chain partitions of orders. Theor. Comput. Sci. 175, 283–292 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  15. Fidge, C.: Timestamps in message-passing systems that preserve the partial ordering. In: Proceedings of the 11th Australian Computer Science Conference, 10(1), 56–66 (1988)

  16. Fowler, J., Zwaenepoel, W.: Causal distributed breakpoints. In: Proceedings of the 10th International Conference on Distributed Computing Systems, pp. 134–141. IEEE, Paris, France (1990)

  17. Garg, V.K., Skawratananond, C.: String realizers of posets with applications to distributed computing. In: 20th Annual ACM Symposium on Principles of Distributed Computing (PODC-00), pp. 72–80. ACM (2001)

  18. Garg, V.K., Skawratananond, C.: On timestamping synchronous communications. In: 22nd International Conference on Distributed Computing Systems (ICDCS’ 02), pp. 552–560. IEEE (2002)

  19. Garg, V.K., Waldecker, B.: Detection of unstable predicates. In: Proceedings of the Workshop on Parallel and Distributed Debugging. ACM/ONR, Santa Cruz, CA (1991)

  20. Gidenstam, A., Papatriantafilou, M.: Adaptive plausible clocks. In: 24th International Conference on Distributed Computing Systems (ICDCS’ 04), pp. 86–93. IEEE (2004)

  21. Johnson, D.B., Zwaenepoel, W.: Recovery in distributed systems using optimistic message logging and checkpointing. J. Algorithms 11(3), 462–491 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  22. Kierstead, H.A.: Recursive colorings of highly recursive graphs. Can. J. Math 33(6), 1279–1290 (1981)

    MATH  MathSciNet  Google Scholar 

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

    Article  MATH  Google Scholar 

  24. Marzullo, K., Sabel, L.: Efficient detection of a class of stable properties. Distributed Comput. 8(2), 81–91 (1994)

    Article  Google Scholar 

  25. Mattern, F.: Algorithms for distributed termination detection. Distributed Comput. 2(3), 161–175 (1987)

    Article  Google Scholar 

  26. Mattern, F.: Virtual time and global states of distributed systems. In: Parallel and Distributed Algorithms: Proceedings of the Int’l Workshop on Parallel and Distributed Algorithms, pp. 215–226 (1989)

  27. Mellor-Crummey, J.: On-the-fly detection of data races for programs with nested fork-join parallelism. In: Proceedings of the 1991 ACM/IEEE Conference on Supercomputing, pp. 24–33. ACM Press (1991)

  28. Mostefaoui, A., Theel, O.: Reduction of timestamp sizes for causal event ordering. Tech. rep., Irisa (1996)

  29. Netzer, R., Miller, B.: Detecting data races in parallel program executions. In: Advances in Languages and Compilers for Parallel Processing, pp. 109–130. MIT Press (1990)

  30. Netzer, R.H.B., Miller, B.P.: Optimal tracing and replay for debugging message-passing parallel programs. In: Proceedings of the 1992 ACM/IEEE conference on Supercomputing, pp. 502–511. IEEE Computer Society Press (1992)

  31. Raynal, M., Schiper, A., Toueg, S.: The causal ordering abstraction and a simple way to implement it. Inf. Process. Lett. 39(6), 343–350 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  32. Sen, K., Rosu, G., Agha, G.: Runtime safety analysis of multithreaded programs. In: Proc. of the 11th ACM Symposium on the Foundations of Software Engineering 2003 (2003)

  33. Singhal, M., Kshemkalyani, A.: An efficient implementation of vector clocks. Inf. Process. Lett. 43(10), 47–52 (1992)

    Article  MATH  Google Scholar 

  34. Strom, R.E., Yemeni, S.: Optimistic recovery in distributed systems. ACM Trans. Comput. Syst. 3(3), 204–226 (1985)

    Article  Google Scholar 

  35. Torres-Rojas, F., Ahamad, M.: Plausible clocks: Constant size logical clocks for distributed systems. In: Proceedings of 10th Int’l Workshop Distributed Algorithms, pp. 71–88 (1996)

  36. Ward, P.A.S.: A framework algorithm for dynamic, centralized dimension-bounded timestamps. In: Proceedings of the 2000 conference of the Centre for Advanced Studies on Collaborative research, p. 14 (2000)

  37. West, D.B.: The Art of Combinatorics Volume III: Order and Optimization. Preprint edition

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anurag Agarwal.

Additional information

This is a revised and extended version of the paper “Efficient Dependency Tracking for Relevant Events in Shared Memory System” which appeared in PODC 2005.

Anurag Agarwal received his B.Tech. degree in computer science and engineering from the Indian Institute of Technology, Kanpur in 2003. He is currently a student in the Department of Computer Science at the University of Texas, Austin. His research interests include distributed systems, program verification and security.

Vijay K. Garg received his B.Tech. degree in computer science from the Indian Institute of Technology, Kanpur in 1984 and M.S. and Ph.D. degrees in electrical engineering and computer science from the University of California at Berkeley in 1985 and 1988, respectively. He is currently a full professor in the Department of Electrical and Computer Engineering and the director of the Parallel and Distributed Systems Laboratory at the University of Texas, Austin. His research interests are in the areas of distributed systems and discrete event systems. He is the author of the books Concurrent and Distributed Computing in Java (Wiley & Sons, 2004), Elements of Distributed Computing (Wiley & Sons, 2002), Principles of Distributed Systems (Kluwer, 1996) and a co-author of the book Modeling and Control of Logical Discrete Event Systems (Kluwer, 1995). Prof. Garg is also an IEEE Fellow.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Agarwal, A., Garg, V.K. Efficient dependency tracking for relevant events in concurrent systems. Distrib. Comput. 19, 163–183 (2007). https://doi.org/10.1007/s00446-006-0004-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00446-006-0004-y

Navigation