ACM Home Page
Please provide us with feedback. Feedback
Concurrent programming without locks
Full text PdfPdf (1.58 MB)
Source
ACM Transactions on Computer Systems (TOCS) archive
Volume 25 ,  Issue 2  (May 2007) table of contents
Article No. 5  
Year of Publication: 2007
ISSN:0734-2071
Authors
Keir Fraser  University of Cambridge Computer Laboratory, Cambridge, UK
Tim Harris  Microsoft Research Cambridge, Cambridge, UK
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 60,   Downloads (12 Months): 544,   Citation Count: 7
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1233307.1233309
What is a DOI?

ABSTRACT

Mutual exclusion locks remain the de facto mechanism for concurrency control on shared-memory data structures. However, their apparent simplicity is deceptive: It is hard to design scalable locking strategies because locks can harbor problems such as priority inversion, deadlock, and convoying. Furthermore, scalable lock-based systems are not readily composable when building compound operations. In looking for solutions to these problems, interest has developed in nonblocking systems which have promised scalability and robustness by eschewing mutual exclusion while still ensuring safety. However, existing techniques for building nonblocking systems are rarely suitable for practical use, imposing substantial storage overheads, serializing nonconflicting operations, or requiring instructions not readily available on today's CPUs.

In this article we present three APIs which make it easier to develop nonblocking implementations of arbitrary data structures. The first API is a multiword compare-and-swap operation (MCAS) which atomically updates a set of memory locations. This can be used to advance a data structure from one consistent state to another. The second API is a word-based software transactional memory (WSTM) which can allow sequential code to be reused more directly than with MCAS and which provides better scalability when locations are being read rather than being updated. The third API is an object-based software transactional memory (OSTM). OSTM allows a simpler implementation than WSTM, but at the cost of reengineering the code to use OSTM objects.

We present practical implementations of all three of these APIs, built from operations available across all of today's major CPU families. We illustrate the use of these APIs by using them to build highly concurrent skip lists and red-black trees. We compare the performance of the resulting implementations against one another and against high-performance lock-based systems. These results demonstrate that it is possible to build useful nonblocking data structures with performance comparable to, or better than, sophisticated lock-based designs.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
2
3
4
 
5
Dice, D., Shalev, O., and Shavit, N. 2006. Transactional locking II. In Proceedings of the 20th International Symposium on Distributed Computing (DISC).
 
6
Fich, F., Luchangco, V., Moir, M., and Shavit, N. 2005. Obstruction-Free algorithms can be practically wait-free. In Distributed Algorithms, P. Fraigniaud, Ed. Lecture Notes in Computer Science, vol. 3724. Springer Verlag, Berlin. 78--92.
 
7
Fraser, K. 2003. Practical lock freedom. Ph.D. thesis, Computer Laboratory, University of Cambridge. Also available as Tech. Rep. UCAM-CL-TR-639, Cambridge University.
 
8
9
10
 
11
 
12
 
13
 
14
Harris, T. 2004. Exceptions and side-effects in atomic blocks. In Proceedings of the PODC Workshop on Synchronization in Java Programs. 46--53. Proceedings published as Memorial University of Newfoundland CS Tech. Rep. 2004-01.
15
16
17
 
18
Heller, S., Herlihy, M., Luchangco, V., Moir, M., Scherer, B., and Shavit, N. 2005. A lazy concurrent list-based set algorithm. In 9th International Conference on Principles of Distributed Systems (OPODIS).
 
19
20
 
21
Herlihy, M. 2005. SXM1.1: Software transactional memory package for C#. Tech. Rep., Brown University and Microsoft Research. May.
22
 
23
24
25
26
 
27
Hoare, C. A. R. 1972. Towards a theory of parallel programming. In Operating Systems Techniques. A.P.I.C. Studies in Data Processing, vol. 9. Academic Press, 61--71.
28
29
 
30
31
32
33
 
34
35
36
37
 
38
 
39
 
40
Moir, M. 2002. Personal communication.
 
41
Moore, K. E., Hill, M. D., and Wood, D. A. 2005. Thread-Level transactional memory. Tech. Rep.: CS-TR-2005-1524, Deptartment of Computer Sciences, University of Wisconsin, Motorola Inc., Phoenix, AZ. 1--11.
 
42
 
43
 
44
Rajwar, R. and Goodman, J. R. 2002. Transactional lock-free execution of lock-based programs. ACM SIGPLAN Not. 37, 10 (Oct.), 5--17.
45
 
46
Riegel, T., Felber, P., and Fetzer, C. 2006. A lazy snapshot algorithm with eager validation. In Proceedings of the 20th International Symposium on Distributed Computing (DISC).
47
48
49
50
51
52
 
53
Welc, A., Jagannathan, S., and Hosking, T. 2004. Transactional monitors for concurrent objects. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP). 519--542.
 
54



REVIEW

"A. Squassabia : Reviewer"

Transactional memory technology reduces the granularity of synchronization from the relatively coarse level of mutual exclusion locks to the finer level of memory access. This comprehensive paper contains valuable insights and working code to asse  more...