Efficient lock free privatization

  • Authors:
  • Yehuda Afek;Hillel Avni;Dave Dice;Nir Shavit

  • Affiliations:
  • Tel-Aviv University, Tel-Aviv, Israel;Tel-Aviv University, Tel-Aviv, Israel;Sun Labs at Oracle, Burlington, MA;Tel-Aviv University, Tel-Aviv, Israel and Sun Labs at Oracle, Burlington, MA

  • Venue:
  • OPODIS'10 Proceedings of the 14th international conference on Principles of distributed systems
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Working on shared mutable data requires synchronization through barriers, locks or transactional memory mechanisms. To avoid this overhead a thread may privatize part of the data and work on it locally. By privatizing a data item a thread is guaranteed that it is the only one accessing this data, i.e., that it accesses the data item in exclusion. The most robust and yet lock-free privatization algorithms, are lockfree reference counting (LFRC). These algorithms attach a counter to each node, which counts the number of references to the node. However, these counters are shared by all threads in the system and thus are contention prone, and must be updated with expensive atomic operations such as CAS. We present a new privatization algorithm, Public Guard (PG); an algorithm which eliminates most of the contention of LFRC algorithms, while maintaining their robustness and non blocking nature. Our evaluation shows that PG improves performance by up to 50% in many work loads. Another problematic issue with LFRC, that we address in this paper, is that a counter of a private node, may be accessed by a slow thread. This may prevent LFRC from freeing memory to the system. In another contribution of this paper we suggest a method with minimal overhead to allow LFRC to reclaim memory.