Abstract
LetX 1,...,X c be variables shared by a number of processorsP 1,...,P q that operate in a totally asynchronous and wait-free manner. An operation by a processor is either a write to one of the variables or a read of the values ofall variables. Operations arenot assumed to be instantaneous and may arbitrarily overlap in time. A succession of possibly overlapping operationsa 1,...,a n (i.e., a run) is said to be atomic, if these operations can be serialized in a way compatible with any existing precedences among them and so that any read operation returns for each variable the value of the most recent — with respect to the serialization — write operation on this variable. This paper examines the complexity of the combinatorial problem of testing a run for atomicity. First, it is pointed out that when there is only one shared variable or when only one processor is allowed to write to each variable, known theorems lead to polynomial-time algorithms for checking the atomicity of a run (the variable of the time-complexity function is the number of operations in the run). It is then proved that checking atomicity has polynomial-time complexity in the general case of more than one variables and with all processors allowed to read and write each variable. For the proof, the atomicity problem is reduced to the problem of consecutive 1s in matrices. The reduction entails showing a combinatorial result that might be interesting on its own.
Similar content being viewed by others
References
Afek, Y., Attiya, H., Dolev, D., Gafni, E., Merritt, M., Shavit, N.: Atomic snapshots of shared memory. J. ACM40, 873–890 (1993)
Anderson, J.H.: Composite registers. Distributed Computing6, 141–154 (1993)
Anderson, J.H., Gouda, M.G.: A Criterion for atomicity. Formal Aspects of Computing: The International Journal of Formal Methods4(3), 273–298 (1992)
Awerbuch, B., Kirousis, L., Kranakis, E., Vitányi, P.: A proof technique for register atomicity (preliminary version). Foundations of Software Technology and Theoretical Computer Science, Proceedings 8th Conference, 1988 (LNCS, Springer-Verlag, 1988), pp. 286–303
Booth, K.S., Lueker, G.S.: Testing for the consecutive ones property, interval graphs, and graph planarity using PQ-tree algorithms. Journal of Computer and System Sciences13, 335–379 (1976)
Haldar, S., K. Vidyasankar, K.: Elegant constructions of atomic snapshot variables. Technical Report 9204, 1992, Memorial University of Newfoundland, Canada
Herlihy, M.: Randomized wait-free concurrent objects. Proceedings of the 10th ACM Symposium on Principles of Distributed Computing, 1991 (ACM Press, 1991), pp. 11–21
Herlihy, M.P., Wing, M.: Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems12, 463–492 (1991)
Israeli, A., Li, M.: Bounded time-stamps. Distributed Computing6, 205–209 (1993)
Israeli, A., Shaham, A.: Optimal multi-writer, multi-reader atomic register. Proceedings of the 11th ACM Symposium on Principles of Distributed Computing, 1992 (ACM Press, 1992), pp. 71–82
Kirousis, L.M., Kranakis, E., Vitányi, P.M.B.: Atomic multireader register. Distributed Algorithms, Proceedings 2nd International Workshop, 1987 (LNCS, Springer-Verlag, 1988), pp. 278–296
Kirousis, L.M., Spirakis, P., Tsigas, Ph.: Simple atomic snapshots: a solution with unbounded timestamps. Advances in Computing and Information, Proceedings of International Conference on Computing and Information, 1991 (LNCS, Springer-Verlag, 1991), pp. 582–587
Kirousis, L.M., Spirakis, P., Tsigas, Ph.: Reading many variables in one atomic operation: solutions with linear complexity. Distributed Algorithms, Proceedings 5th International Workshop, 1991 (LNCS, Springer-Verlag, 1992), pp. 229–241. Also to appear in: IEEE Transactions in Parallel and Distributed Systems
Kirousis, L.M., Tsigas, Ph., Veneris, A.G.: An atomicity criterion for composite registers. Proceedings of the IMACS/IFAC International Symposium on Parallel and Distributed Computing in Engineering Systems, 1991 (North-Holland, 1992), pp. 31–34
Lamport, L.: Time, clocks and the ordering of events in a distributed system. Commun. ACM21, 558–565 (1978)
Lamport, L.: On interprocess communication, part i: basic formalism, part ii: basic algorithms. Distributed Computing1, 77–101 (1986)
Li, M., Tromp, J., Vitányi P.M.B.: How to share concurrent wait-free variables. ITLI Prepublication Series for Computation and Complexity Theory CT-91-02, 1991, University of Amsterdam, The Netherlands
Papadimitriou, C.: The Theory of Database Concurrency Control. Computer Science Press, 1986
Peterson, G.L., Burns, J.E.: Concurrent reading while writing II: the multi-writer case. Proceedings of the 28th Symposium on Foundations of Computer Science, 1987 (IEEE Computer Society Press, 1987), pp. 383–392
Singh, A.K., Anderson, J.H.,Gouda, M.G.: The elusive atomic register revisited. Proceedings 6th ACM Symposium on Principles of Distributed Computing, 1987 (ACM Press, 1987) pp. 206–221
Vidyasankar, K.: Concurrent reading while writing revisited. Distributed Computing4, 81–85 (1990)
Vitányi, P., Awerbuch, B.: Atomic shared register access by asynchronous hardware. Proc. 27th IEEE Symp. on Foundations of Computer Science, 1986 (IEEE Computer Society Press, 1986) pp. 233–243
Author information
Authors and Affiliations
Additional information
The research of the first author was partially supported by the European Union ESPRIT Basic Research Projects ALCOM II (contract no. 7141) and Insight II (contract no. 6019).
The research of the second author was carried out while he was a student at the University of Patras and also during subsequent visits of his to Patras.
Rights and permissions
About this article
Cite this article
Kirousis, L.M., Veneris, A.G. Efficient algorithms for checking the atomicity of a run of read and write operations. Acta Informatica 32, 155–170 (1995). https://doi.org/10.1007/BF01177745
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF01177745