Design and Analysis of Lock-free Data Structures

No Thumbnail Available

Date

2007-07-31

Journal Title

Series/Report No.

Journal ISSN

Volume Title

Publisher

Abstract

The advent of multi-processor systems has motivated programmers to develop multi-threaded and multi-process applications on shared memory data structures. In these applications, multiple processes read and update shared data structure concurrently, which may lead to race conditions resulting in incoherent memory. To ensure exclusivity of access to this shared memory, programmers have been using locks. Lock-based concurrency is a pessimistic approach that assumes conflicts among concurrent processes to occur frequently.However, if few conflicts occur, lock-based concurrency unnecessarily reduce concurrency. One solution to improve concurrency, is to allow non-conflicting processes to execute in parallel. This can be gained by using fine locks, but programming with them is complex and error-prone. Consequently, researchers have devised an optimistic concurrency mechanism known as lock-free algorithms. Various lock-free libraries have been developed that are either data structure specific or universal constructs. However, these lock-free libraries have been restricted to simple data structures that do not meet the requirements of a real-world application. This work focuses on implementing a lock-free data structure suitable for a real-world application. The suitability of various implementations is analyzed. Design choices are made based upon the requirements and the suitability of lock-free implementations to the specific application considered. Finally, the performance of the lock-free implementation versus lock-based implementation are compared. Along with it, certain insights related to reduced complexity of the implementation and atomicity of lock-free implementation that make it robust are discussed.

Description

Keywords

Lock-Free, Data Structures, Multi-processors

Citation

Degree

MS

Discipline

Computer Engineering

Collections