Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computing With Infinitely Many Processes

Similar presentations


Presentation on theme: "Computing With Infinitely Many Processes"— Presentation transcript:

1 Computing With Infinitely Many Processes
Michael Merritt Gadi Taubenfeld

2 Computing With Infinitely Many Processes
Michael Merritt Gadi Taubenfeld

3 Motivation More general model illuminates fine structure:
processes/concurrency/participation In practice, the number of participating processes is often unknowable Leads to adaptive algorithms (cannot use n)

4 Model parameters Processes: known, unknown, infinite
Concurrency: # simultaneously active Participation: required, not required Fault-tolerance: fault-free, wait-free

5 Concurrency: Simultaneously active processes
Finite – single bound over all runs Bounded – in each run a bound exists Unbounded – finite at any point, no bound Infinite – within a single state

6 Participation [l,u]-participation – at least l and at most u
processes participate in the algorithm Participation required: [n,n] Participation not required: [1,n]

7 Example 1: Election with registers
Bound Concur- rency Partici-pation Space # size Lower c [c, ] infinite state space Upper infinite bits 1 L/U [1, ] log c +1 no need to know who is the leader (t&s)

8 2-register election for concurrency c
P Q R Q P R 1 Leader Marked P, Q, R P, R Q P Union

9 Election for concurrency c
if Marked = 0 then (Leader,Marked) = (i,0) fi lunion1 = Union while |lunion1| < c and Marked = 0 do if ¬(lunion lunion1) then Union = lunion1 lunion2 fi lunion2 = lunion1 lunion2 lunion1 = Union od lleader = Leader (Leader,Marked) = (lleader,1) return (Leader) Leader Marked empty Union lleader, lunion1 lunion2 = {i}

10 Example 2: mutual exclusion with registers
Bound Concurrency Space Ref. Lower c BL93 Upper SP89 bounded infinite Upper/Adaptive unbounded

11 Lamport’s Splitter + + At most n-1 can move right
win win 1 right n-1 At most n-1 can move right At most n-1 can move down At most 1 can win (+ solo) (Latecomers move right) down down If a process wins then nobody moves down Redefine n to be the earlybirds (non-latecomers)

12 Election using a chain of the new splitters: infinite infinite-1 win
right n-1 Election using a chain of the new splitters: n’ n’-1 win 1 right n’-1 down

13 Implementing the new splitter
b=1 1 win z=1 b=1 right n-1 b 1 z=1 await (b=1 or z=1) z 1 down

14 The code of the new splitter
x= i if y = 1 then b = 1; go right y = 1 if x = i then z = 1 if b = 0 then go win else go down fi else await b = 1 or z = 1 if z = 1 then go right else go down fi fi x y z b win right down

15 Code: adaptive mutex for unbounded concurrency
start: level := next repeat x[level] = i if y[level] then b[level] = 1; await level < next; goto start fi y[level] = 1 if x[level] i then await b[level] = 1 or z[level] = 1 if z[level] = 1 then await level < next; goto start else level = level+1 fi else z[level] = 1 if b[level] = 0 then win = 1 else level = level+1 fi fi until win = 1 critical section next := level+1

16 Registers vs. stronger objects
With registers, infinite state space is usually necessary even for ‘simple’ problems These problems are trivially solved with stronger primitives (T&S, RMW, Semaphores) What about ‘more complicated’ problems?

17 Example 3: SF mutex for unbounded concurrency with stronger objects
Space Ref. L/U RW+ T&S infinite # of objects Pet84 RMW infinite state space B+82, F+89 Upper Semaphore 2 sem + 2 RW FP87

18 Bounded vs. Unbounded Problem: Naming – assigning unique names
Model: wait-free; test-and-set only Bound Concurrency Space Lower/Upper bounded infinite Lower unbounded no algorithm

19 Conclusions Concurrency affects space
Registers: infinite processes imply infinite state space Stronger primitives are useful (I.e., semaphore) Bounded concurrency + Symmetry = Adaptive Distinction between: Processes & concurrency & participation


Download ppt "Computing With Infinitely Many Processes"

Similar presentations


Ads by Google