260 likes | 399 Views
Local-spin, Abortable Mutual Exclusion. Joe Rideout. Outline. Review - Mutual Exclusion Current themes Measuring e fficiency Abortability Summary of current results Open problems Summary. Outline. Review - Mutual Exclusion Current themes Measuring e fficiency Abortability
E N D
Local-spin, Abortable Mutual Exclusion Joe Rideout
Outline • Review - Mutual Exclusion • Current themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Outline • Review - Mutual Exclusion • Current themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Mutual Exclusion a shared resource of critical importance should be used by at most one person at any one time! (exclusion) if someone is waiting to get in, he/she should eventually get access (starvation-freedom)
More formally… whiletruedo Noncritical Section (NCS); Entry Section; Critical Section (CS); Exit Protocol (EP) od • Exclusion - If a process p is in the CS, then no process q≠p is in the CS concurrently with p. • Starvation Freedom - If a process p enters the trying protocol, then p eventually enters the CS • Bounded Exit - If a process enters the EP, it returns to the NCS in a bounded number of its own steps.
Early Solutions • Dijkstra, 1965 - Livelock free • Knuth, 1966 - Starvation free • Lamport, 1974 - Bakery Algorithm
Outline • Review - Mutual Exclusion • Current themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Hasn’t this been solved? • Time efficiency • Local-spin, “fast” and adaptive mutual exclusion • Use of primitives • Read/Write vs. Read-modify-write • Variations • Group and abortable mutual exclusion
Hasn’t this been solved? • Time efficiency • Local-spin, “fast” and adaptive mutual exclusion • Use of primitives • Read/Write vs. Read-modify-write • Variations • Group and abortable mutual exclusion
Outline • Review - Mutual Exclusion • Recent themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Time Complexity • What is a good measure of efficiency? • Number of steps taken in entry/exit sections? • No. Busy-waiting will make these unbounded. • Better: number of remote memory references
Remote Memory References (RMR) • References that cause an interconnect traversal • In DSM… reading/writing the memory of another process • In CC… writing or reading an updated value • We speak of RMR time complexity
Local-spin • A mutual exclusion algorithm is local-spin if it makes a bounded number of RMRs in its entry and exit protocols • In other words, “spin variables” that are repeatedly tested must be local or locally cached
Outline • Review - Mutual Exclusion • Recent themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Abortable Mutual Exclusion • A process can abort its attempt to acquire a lock • Need arises in database and realtime systems • Bounded abort - after a process p enters the Abort section it leaves the Abort section within a bounded number of its own steps.
Outline • Review - Mutual Exclusion • Recent themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Current Results † J.-H. Yang and J. Anderson. A fast, scalable mutual exclusion algorithm. Distributed Computing, 9(1):51-60, August 1995. ‡ J. Mellor-Crummey and M. Scott. Algorithms for scalable synchronization on shared-memory multi-processors. ACM Transactions on Computer Systems, 9(1):21-65, Februaru 1991. ¥ P. Jayanti. Adaptive and Efficient Abortable Mutual Exclusion. Proceedings of the 22nd Annual Symposium on Principles of Distributed Computing, July 2003,
Current Results + Lower Bounds † J. Anderson and Y,-J. Kim. An improved lower bound for the time complexity of mutual exclusion. In Proceedings of the 20th Annual ACM Symposium on Principles of Distributed Computing, pages 90-99, August 2001.
Outline • Review - Mutual Exclusion • Recent themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Open Problems • Abortable mutual exclusion with O(1) RMR using read-modify-write primitives? • Ω(logN) RMR lower bound for mutual exclusion using only read/write primitives? • Abortable mutual exclusion with O(logN) RMR using only read/write primitives • Modify the Yang-Anderson algorithm?
Open Problems • Abortable mutual exclusion with O(1) RMR using read-modify-write primitives? • Ω(logN) RMR lower bound for mutual exclusion using only read/write primitives? • Abortable mutual exclusion with O(logN) RMR using only read/write primitives • Modify the Yang-Anderson algorithm?
Outline • Review - Mutual Exclusion • Recent themes • Measuring efficiency • Abortability • Summary of current results • Open problems • Summary
Summary • Mutual exclusion - classic but not dead • Efficiency - RMR and local-spin • Abortable - a property of interest • Primitives - Read/Write vs. other • Q: Can local-spin abortable mutual exclusion be achieved using only atomic reads and writes?