Iterative computations with ordered readwrite locks
We introduce the framework of ordered readwrite locks, ORWL, that are characterized by two main features: a strict FIFO policy for access, and the attribution of access to lock-handles instead of processes or threads. These two properties together allow applications to have a controlled pro-active access to resources and thereby to achieve a high degree of asynchronicity between different tasks of the same application. For the case of iterative computations with many parallel tasks which access their resources in a cyclic pattern, we provide a generic technique to implement them by means of ORWL. We show that the possible execution patterns for such a system correspond to a combinatorial lattice structure and that this lattice is finite if and only if the configuration contains a potential deadlock. In addition, we provide efficient algorithms: one that allows for a deadlock-free initialization of such a system and another one for the detection of deadlocks in an already initialized system.
synchronization iterative algorithms read-write locks