On Beyond Registers: WaitFree Readable Objects - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

On Beyond Registers: WaitFree Readable Objects

Description:

On Beyond Registers: Wait-Free Readable Objects. Maurice Herlihy. Brown University. 10/4/09 ... Readable! 10/4/09. 18. Question ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 46
Provided by: Maurice69
Learn more at: https://cs.brown.edu
Category:

less

Transcript and Presenter's Notes

Title: On Beyond Registers: WaitFree Readable Objects


1
On Beyond Registers Wait-Free Readable Objects
  • Maurice Herlihy
  • Brown University

2
Leslies Contribution
  • First to ask fundamental questions
  • Synchronization
  • Communication
  • Registers
  • Reading and writing shared memory
  • Without locking

3
Register Constructions
readers
Atomic snapshot
writers
Dozens of researchers
Register algorithm space
Register size
1-bit 1-reader, 1-writer
4
Register Research Today?
  • Claim
  • the answers come and go
  • but the questions live on
  • Premise
  • properly interpreted, LLs original questions
    remain productive

5
One Approach
  • Hilbert-like list of open problems
  • Advantage solemn
  • Disadvantage not serious

6
Another Approach
  • Look at one subarea (of many)
  • Continuation of LL program
  • LL citations everywhere you turn
  • Survey some past work
  • Express opinionated views

7
Premise
  • Not enough to read LL opus, must also interpret
  • Narrow, fundamentalist interpretations not
    promising

8
Devils Advocate
  • Real memory doesnt act like read/write registers
  • Weird correctness conditions total store
    ordering, processor consistency,
  • Exotic operations memory barriers, inconsistent
    reads and writes

9
Devils Advocate
  • Real memory hardware is different
  • No safe bits
  • Elaborate cache-coherence protocols
  • Complicated, not complex

10
Devils Advocate
  • Read/Write synchronization
  • Mutual exclusion
  • Not that you would, but you could?
  • Use read-modify-write operations instead
  • Lock-free or wait-free
  • Mostly impossible
  • Some exotic exceptions

11
Nevertheless
  • Fundamental questions
  • about synchronization and communication
  • live on
  • Lamports original inspiration still rocks
  • Proof by rambling example

12
Registers vs Objects
  • No reason to privilege read/write registers
  • Rather the reverse
  • Wait-free objects have been studied
  • Focus on replacing writes
  • What about read operations?

13
Shared Objects
Set of operations
Set of states
14
Sequential Objects
Abstract Object
Refinement Map
0010
Implementation
15
Concurrent Objects
1
  • It is universally acknowledged that
  • People not good at concurrent reasoning
  • Concurrent correctness is some kind of
    equivalence to sequential executions
  • Sectarian differences exist on nature of
    equivalence

1. or it should be
16
Concurrent Objects
  • Sequential Consistency Lamport 79
  • Reorder concurrent operations
  • Linearizability HerlihyWing 90
  • Also respect real-time order

17
Question
  • A logical snapshot atomically reads and returns
    an objects state
  • SC or linearizable (take your pick)
  • Call such an object
  • Snapshootable? Nah
  • Readable!

18
Question
  • For which objects can we implement wait-free or
    lock-free logical snapshots?
  • What does it mean if we can or cant?

19
A One-Banana Problem?
  • Objects are bits in memory
  • Use a known atomic snapshot scan algorithm to
    capture the bits

20
Snapshot Scan
Afek et al. 90
Anderson 90
Multi-reader/multi-writer shared memory
21
Snapshot Scan
Instantaneous picture of array in a consistent
state
22
Atomic Snapshots
  • A collect
  • Read bits one-by-one (non-atomically)
  • May overlap with operations that modify memory
  • A clean collect
  • Does not overlap with modifying operations

23
Atomic Snapshots
  • Lock-free
  • Detect a clean collect
  • Return results
  • Wait-free
  • Memory-modifying threads help collector
  • Eventually clean collect occurs

24
Memory Operations
  • Notion of clean collect does not require write
    operations
  • Can snapshot against any operations
  • Test-and-set
  • Compare-and-swap
  • Fetch-and-mumble

25
Opinionated Aside
  • Can atomic snapshots be made truly practical?
  • Software seems implausible
  • Architecture?
  • Modify cache coherence protocols
  • Minor hardware support

26
Problem Solved?
  • No, snapshot of underlying bits may not be a
    snapshot of object
  • Proof by PowerPoint

27
PO-Set Object
last
first
last
last
28
PO-Set Enqueue
last
first
last
last
29
PO-Set Dequeue
last
gone
last
last
30
Correctness
  • Operations take time
  • Operations respect Lamports happens before
    order
  • Non-overlapping PO_Enq operations leave
    totally-ordered items in queue
  • Not a SC spec!
  • Can be made so, however

31
FIFO Queue Implementation
Linearizable Implementation
FIFO queue
PO-set
32
Claims
  • FIFO_Enq is PO_Enq
  • FIFO_Deq is PO_Deq
  • Claim
  • Linearizable implementation
  • Deterministic sequential spec
  • Non-determinism absorbed by linearizability
    condition

33
The Consensus Task
Before private inputs
After agree on one input
34
Claim
  • PO-set registers
  • Cannot solve 3-process consensus
  • Usual FLP-style proof
  • Under the influence
  • Therefore neither can FIFO queue registers

35
Claim
  • FIFO queue snapshot
  • Solves consensus for any number of processes
  • Algorithm
  • Enqueue your id
  • Take snapshot
  • Take winners value

36
Consequence
  • Example of wait-free linearizable FIFO queue
    implementation
  • Cannot implement snapshots
  • See HerlihyWing 86 for less contrived
    construction using swap, fetchinc.

37
Refinement Maps
  • Snapshot operations closely related to refinement
    maps
  • Snapshot is an algorithm
  • Refinement map is a mathematical construct

38
Abadi-Lamport 91
  • Refinement maps always exist, given
  • History variables
  • Record the past
  • Prophecy variables
  • Predict the future
  • some minor technicalities

39
Implications
  • Refinement map does not imply snapshot
  • Cant implement prophecy variables
  • Cant always implement history variables in
    concurrent settings?

40
Opinion
  • Need Abadi-Lamport theorem for snapshot
    operations
  • Characterize when they exist
  • How to implement them

41
Consensus Theory
  • Robustness Jayanti
  • Can objects with low consensus numbers be
    combined to reach a higher consensus number?

42
Consensus Theory
  • Readable Objects Ruppert
  • Objects with snapshots are robust
  • Consensus numbers computable for finite-state
    objects

43
Open Question
  • What are implications of snapshot operations for
    consensus hierarchy?

44
Open Questions
  • Snapshots enable fault-tolerance
  • Checkpoints
  • Roll-backs
  • Atomic transactions
  • Implications for fault-tolerant computation?

45
Clip Art
Write a Comment
User Comments (0)
About PowerShow.com