ABSTRACT

This chapter introduces a different method of object sharing, known as lock and wait-free communication. The main difference with respect to lock-based object sharing is that the former is able to guarantee the consistency of an object shared by many concurrent processes without ever forcing any process to wait for another. The chapter first looks at a very specific method, namely, a lock-free algorithm for sharing data among multiple, concurrent readers and one single writer. It then presents another method which solves the problem in more general terms and allows objects of any kind to be shared in a lock-free way. The chapter represents an example of two distinct ways of approaching the problem: the first one is a simple, ad-hoc algorithm that addresses a very specific concurrent programming problem, whereas the second one is more general and serves as a foundation to build many different classes of lock-free objects.