Top Banner
Local-spin, Abortable Mutual Exclusion Joe Rideout
26

Local-spin, Abortable Mutual Exclusion

Jan 03, 2016

Download

Documents

beau-berry

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 - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Local-spin, Abortable Mutual Exclusion

Local-spin, Abortable Mutual Exclusion

Joe Rideout

Page 2: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual Exclusion

• Current themes

• Measuring efficiency

• Abortability

• Summary of current results

• Open problems

• Summary

Page 3: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual ExclusionReview - Mutual Exclusion

• Current themes

• Measuring efficiency

• Abortability

• Summary of current results

• Open problems

• Summary

Page 4: Local-spin, Abortable Mutual Exclusion

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)

Page 5: Local-spin, Abortable Mutual Exclusion

A Violation of Mutual Exclusion

Page 6: Local-spin, Abortable Mutual Exclusion

More formally…

• 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.

while true do Noncritical Section (NCS); Entry Section; Critical Section (CS); Exit Protocol (EP)od

Page 7: Local-spin, Abortable Mutual Exclusion

Early Solutions

• Dijkstra, 1965 - Livelock free

• Knuth, 1966 - Starvation free

• Lamport, 1974 - Bakery Algorithm

Page 8: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual Exclusion• Current themesCurrent themes• Measuring efficiency• Abortability• Summary of current results• Open problems• Summary

Page 9: Local-spin, 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

Page 10: Local-spin, 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

Page 11: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual Exclusion• Recent themes• Measuring eMeasuring efficiencyfficiency• Abortability• Summary of current results• Open problems• Summary

Page 12: Local-spin, Abortable Mutual Exclusion

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

Page 13: Local-spin, Abortable Mutual Exclusion

Two architectural Paradigms

Page 14: Local-spin, Abortable Mutual Exclusion

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

Page 15: Local-spin, Abortable Mutual Exclusion

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

Page 16: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual Exclusion• Recent themes• Measuring efficiency• AbortabilityAbortability• Summary of current results• Open problems• Summary

Page 17: Local-spin, Abortable Mutual Exclusion

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.

Page 18: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual Exclusion• Recent themes• Measuring efficiency• Abortability• Summary of current resultsSummary of current results• Open problems• Summary

Page 19: Local-spin, Abortable Mutual Exclusion

Current Results

Read/Write Read-modify-write

Local-spin O(logN) RMR† O(1) RMR‡

Abortable /Local-spin

? O(logN) RMR¥

† 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,

Page 20: Local-spin, Abortable Mutual Exclusion

Current Results + Lower Bounds

Read/Write Read-modify-write

Local-spin O(logN) RMRΩ(logN/loglogN)†

O(1) RMRΩ(1)

Abortable /Local-spin

? Ω(logN/loglogN)† O(logN) RMRΩ(1)

† 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.

Page 21: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual Exclusion• Recent themes• Measuring efficiency• Abortability• Summary of current results• Open problemsOpen problems• Summary

Page 22: Local-spin, Abortable Mutual Exclusion

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?

Page 23: Local-spin, Abortable Mutual Exclusion

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?

Page 24: Local-spin, Abortable Mutual Exclusion

Outline

• Review - Mutual Exclusion• Recent themes• Measuring efficiency• Abortability• Summary of current results• Open problems• SummarySummary

Page 25: Local-spin, Abortable Mutual Exclusion

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?

Page 26: Local-spin, Abortable Mutual Exclusion