Scalable reader-writer synchronization for shared-memory multiprocessors
PPOPP '91 Proceedings of the third ACM SIGPLAN symposium on Principles and practice of parallel programming
DISC'06 Proceedings of the 20th international conference on Distributed Computing
Hi-index | 0.00 |
Most software transactional memory implementations execute code using fine-grained optimistic concurrency control. This does not perform well with low contention data structures where fine grained conflict detection means manipulating metadata for every object touched and optimistic concurrency control imposes the overhead of making thread private shadow copies. Also, a purely optimistic approach does not coexist naturally with legacy code that is either already concurrent using locks or does IO operations that cannot be revoked. We try to address these problems by presenting a new form of the reader writer locks used by the vast majority of concurrent code today. Along with the traditional lock/unlock operations, these new locks support STM-like management of shadow versions that can be used when desired by the programmer. We show how existing lock based code can be scaled to perform as well as an STM, with few changes to the existing code base. We also show as a corollary that our design allows construction of data structures that retain strict fairness between threads, while simultaneously allowing disjoint access parallelism.