Computing With Infinitely Many Processes

Slides:



Advertisements
Similar presentations
CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
Advertisements

Mutual Exclusion – SW & HW By Oded Regev. Outline: Short review on the Bakery algorithm Short review on the Bakery algorithm Black & White Algorithm Black.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Chapter 4 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
Synchronization Algorithms and Concurrent Programming
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Mutual Exclusion By Shiran Mizrahi. Critical Section class Counter { private int value = 1; //counter starts at one public Counter(int c) { //constructor.
1 Chapter 2 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2007 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld.
5.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 5: CPU Scheduling.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Multiprocessor Synchronization Algorithms ( ) Lecturer: Danny Hendler The Mutual Exclusion problem.
Process Synchronization. Module 6: Process Synchronization Background The Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores.
Deadlocks, Message Passing Brief refresh from last week Tore Larsen Oct
1 Course Syllabus 1. Introduction - History; Views; Concepts; Structure 2. Process Management - Processes; State + Resources; Threads; Unix implementation.
1 Chapter 3 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Multiprocess Synchronization Algorithms ( )
CPSC 668Set 6: Mutual Exclusion in Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
1 Course Syllabus 1. Introduction - History; Views; Concepts; Structure 2. Process Management - Processes; State + Resources; Threads; Unix implementation.
Shared Memory Coordination We will be looking at process coordination using shared memory and busy waiting. –So we don't send messages but read and write.
CPSC 668Set 6: Mutual Exclusion in Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 8: More Mutex with Read/Write Variables1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
1 Adaptive and Efficient Mutual Exclusion Presented by: By Hagit Attya and Vita Bortnikov Mian Huang.
Wait-Free Consensus with Infinite Arrivals James Aspnes Gauri Shah Jatin Shah Yale University STOC 2002.
Concurrency in Distributed Systems: Mutual exclusion.
OS Fall’02 Concurrency Operating Systems Fall 2002.
1 Chapter 9 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
THIRD PART Algorithms for Concurrent Distributed Systems: The Mutual Exclusion problem.
1 Chapter 10 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE
Synchronization Producer/Consumer Problem. Synchronization - PC with Semaphores2 Abstract The producer/consumer problem is a classical synchronization.
Mutual Exclusion Using Atomic Registers Lecturer: Netanel Dahan Instructor: Prof. Yehuda Afek B.Sc. Seminar on Distributed Computation Tel-Aviv University.
1 Chapter 2 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
Mutual Exclusion A History. Agenda Model Registers History.
Chapter 6 – Process Synchronisation (Pgs 225 – 267)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 8: More Mutex with Read/Write Variables 1.
Hwajung Lee.  Models are simple abstractions that help understand the variability -- abstractions that preserve the essential features, but hide the.
Asynchronous Exclusive Selection Bogdan Chlebus, U. Colorado Darek Kowalski, U. Liverpool.
1 Lecture #24 Shared Objects and Concurrent Programming This material is not available in the textbook. The online powerpoint presentations contain the.
CPSC 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 6: Mutual Exclusion in Shared Memory 1.
Operating System Concepts and Techniques Lecture 13 Interprocess communication-2 M. Naghibzadeh Reference M. Naghibzadeh, Operating System Concepts and.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
The Concurrency Hierarchy and Algorithms for Unbounded Concurrency Eli Gafni Michael Merritt Gadi Taubenfeld.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
OS Winter’03 Concurrency. OS Winter’03 Bakery algorithm of Lamport  Critical section algorithm for any n>1  Each time a process is requesting an entry.
Process Management Deadlocks.
Bakery Algorithm - Proof
The Design and Analysis of Algorithms
Background on the need for Synchronization
“Language Mechanism for Synchronization”
Data Structures and Algorithms
O(log n / log log n) RMRs Randomized Mutual Exclusion
Distributed Transactions and Spanner
Leader Election (if we ignore the failure detection part)
Concurrent Distributed Systems
Course Syllabus 1. Introduction - History; Views; Concepts; Structure
Lecture 2 Part 2 Process Synchronization
Mutual Exclusion CS p0 CS p1 p2 CS CS p3.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Course Syllabus 1. Introduction - History; Views; Concepts; Structure
Multiprocessor Synchronization Algorithms ( )
Course Syllabus 1. Introduction - History; Views; Concepts; Structure
Lecture 1: Introduction
Chapter 6: Synchronization Tools
Course Syllabus 1. Introduction - History; Views; Concepts; Structure
Course Syllabus 1. Introduction - History; Views; Concepts; Structure
Syllabus 1. Introduction - History; Views; Concepts; Structure
Presentation transcript:

Computing With Infinitely Many Processes Michael Merritt Gadi Taubenfeld

Computing With Infinitely Many Processes Michael Merritt Gadi Taubenfeld

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)

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

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

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]

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)

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

Election for concurrency c if Marked = 0 then (Leader,Marked) = (i,0) fi lunion1 = Union while |lunion1| < c and Marked = 0 do if ¬(lunion2 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}

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

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)

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

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

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

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

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?

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

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

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