Chapter 11 Resource Allocation by Mikhail Nesterenko “Distributed Algorithms” by Nancy A. Lynch.

Slides:



Advertisements
Similar presentations
Modeling issues Book: chapters 4.12, 5.4, 8.4, 10.1.
Advertisements

CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
Mutual Exclusion – SW & HW By Oded Regev. Outline: Short review on the Bakery algorithm Short review on the Bakery algorithm Black & White Algorithm Black.
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
CS542 Topics in Distributed Systems Diganta Goswami.
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
Deadlock Prevention, Avoidance, and Detection
Operating Systems Lecture Notes Deadlocks Matthew Dailey Some material © Silberschatz, Galvin, and Gagne, 2002.
Deadlock Prevention, Avoidance, and Detection.  The Deadlock problem The Deadlock problem  Conditions for deadlocks Conditions for deadlocks  Graph-theoretic.
Paris, 3 Dec 2007MPRI Course on Concurrency MPRI – Course on Concurrency Lecture 12 Probabilistic process calculi Catuscia Palamidessi LIX, Ecole Polytechnique.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
6. Deadlocks 6.1 Deadlocks with Reusable and Consumable Resources
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.
Chapter 15 Basic Asynchronous Network Algorithms
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
Gibbs sampler - simple properties It’s not hard to show that this MC chain is aperiodic. Often is reversible distribution. If in addition the chain is.
Dining Philosophers (Diners) Problem n definition n Chandy and Misra solution n extension to drinking philosophers.
1 Maximal Independent Set. 2 Independent Set (IS): In a graph G=(V,E), |V|=n, |E|=m, any set of nodes that are not adjacent.
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Chapter 3 The Critical Section Problem
Linearizing Peer-to-Peer Systems with Oracles by Rizal Mohd Nor Mikhail Nesterenko Sébastien Tixeuil SSS 2013 Nov 13-16, 2013.
Entropy Rates of a Stochastic Process
Planning under Uncertainty
1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent.
CS 582 / CMPE 481 Distributed Systems
Ordering and Consistent Cuts Presented By Biswanath Panda.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Distributed Coloring in Õ(  log n) Bit Rounds COST 293 GRAAL and.
Bakery Algorithm - Proof
Approximation Algorithms
EXPANDER GRAPHS Properties & Applications. Things to cover ! Definitions Properties Combinatorial, Spectral properties Constructions “Explicit” constructions.
New Algorithm DOM for Graph Coloring by Domination Covering
CS 603 Dining Philosopher’s Problem February 15, 2002.
Maximal Independent Set Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Backtracking.
The Problem The Mutual exclusion problem involves the allocation of a single indivisible,nonshareable resource among n users.(U1,U2….,Un). Critical region:The.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Solve Equations with Variables on Both Sides
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: Sequencing Properties Copyright , Matt Dwyer, John Hatcliff,
Mutual Exclusion Presented by: Rohan Sen (Distributed Algorithms Ch. 10)
MPRI – Course on Concurrency Probabilistic methods in Concurrency Catuscia Palamidessi INRIA Futurs and LIX
DISTRIBUTED SYSTEMS II A POLYNOMIAL LOCAL SOLUTION TO MUTUAL EXCLUSION Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Learning the Structure of Related Tasks Presented by Lihan He Machine Learning Reading Group Duke University 02/03/2006 A. Niculescu-Mizil, R. Caruana.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
Mutual Exclusion Using Atomic Registers Lecturer: Netanel Dahan Instructor: Prof. Yehuda Afek B.Sc. Seminar on Distributed Computation Tel-Aviv University.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Implicit Hitting Set Problems Richard M. Karp Erick Moreno Centeno DIMACS 20 th Anniversary.
COSC 2007 Data Structures II
Anish Arora Ohio State University Mikhail Nesterenko Kent State University Local Tolerance to Unbounded Byzantine Faults.
Great Theoretical Ideas in Computer Science for Some.
Anish Arora Ohio State University Mikhail Nesterenko Kent State University Local Tolerance to Unbounded Byzantine Faults.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
1 Distributed Vertex Coloring. 2 Vertex Coloring: each vertex is assigned a color.
Academic Year 2014 Spring Academic Year 2014 Spring.
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
Deadlocks Copyright ©: University of Illinois CS 241 Staff1.
Chapter 10 Mutual Exclusion Presented by Yisong Jiang.
Theory of Computational Complexity Probability and Computing Lee Minseon Iwama and Ito lab M1 1.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
Theory of Computational Complexity Yusuke FURUKAWA Iwama Ito lab M1.
Krishnendu ChatterjeeFormal Methods Class1 MARKOV CHAINS.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Bakery Algorithm - Proof
Dining Philosophers (Diners) Problem
Spanning Trees Longin Jan Latecki Temple University based on slides by
Enumerating Distances Using Spanners of Bounded Degree
Maximal Independent Set
Spanning Trees Longin Jan Latecki Temple University based on slides by
Applications of Regular Closure
Presentation transcript:

Chapter 11 Resource Allocation by Mikhail Nesterenko “Distributed Algorithms” by Nancy A. Lynch

Outline specification for resource allocation problems –explicit resource specification, exclusion specification general resource allocation problem –its properties dining philosophers problem –lack of symmetric solution –RightLeft solution generalization to resource allocation problem –coloring –using hierarchical coloring to solve the problem randomized symmetric solution to dining philosophers

Explicit Resource and Exclusion Specifications Two ways of describing conflict relationships among users explicit resource specification –a finite set of resources –a subset of resources for each process (to perform its work) two users conflict if their resource sets intersect (see Example ) exclusion specification –exclusion set E – a collection of sets of processes which cannot perform their work simultaneously, exclusion set is closed under superset (if a set S contains a subset in E then S is also in E) Example – exclusion set contains any subset of processes with cardinality greater than 1, Example – k-exclusion explicit resource spec gives rise to exclusion spec (see.Example ) reverse is not true, example?

Resource Allocation Problem user cycles through R(emainder), T(rying), C(rticial) and E(xit) regions Properties are similar to MX problem (ch.10) well-formedness – interactions between the users and algorithms are well-formed (no CS access without request, etc.) exclusion – no reachable system state where the set of users is in the exclusion set progress (for T) – if a process is in T then some user enters C (same for E) independent progress (for T) – if process is in T and all conflicting users are in R then eventually the process enters C or some conflicting user enters T (same for E) Note: independent progress is rather weak, any stronger properties?

Stronger Liveness Properties of RAP lockout freedom (for T) – if all users always return the resource, then any user that reaches T eventually enters C (same for E) time bound (for T) – – if each user always returns the resource within constant time and time between successive steps of each process is bounded then each user enters C in finite time bounded bypass (from MX, how is it different for RAP?) – while one process remains in T another process can only enter C at most some bounded number of times Lemma 11.1 if resource allocation algorithm has any time bound, then it is lockout- free if an algorithm guarantees well-formedness and lockout-freedome then it also guarantees progress

Dining Philosophers Problem (DP) special case of RAP processes (philosophers) are connected in a ring, each pair of neighboring processes has exactly one resource conflict (fork), see Fig 11.1 we only consider solutions with one read-modify-write shared variable associated with each resource symmetric algorithms – processes are identical, shared variables have the same initial values (a process cannot distinguish itself from others) Theorem 11.2 there is no symmetric solution to DP –idea – there is no way to break the symmetry between processes so there is no way for one neighbor to enter C while another waits what’s wrong with the following solution? –each process picks up its right fork (if its available, if not – waits) and then picks up its left fork (if its available, if not – waits)

Right-Left DP Solution waiting chain – a set sequence of processes where each consequent process waits on the resource held by the preceding process (see Fig 11.3) –processes in the waiting chain must enter the CS sequentially (is this so?) RightLeftDP solution: odd processes go for the right fork first, even – for the left Theorem 11.4 (simplified) – RightLeftDP solves DP and guarantees, lockout-freedom, independent progress, and a constant time bound

Generalization to RAP: Resource Graph assume resources are totally ordered (hierarchical resource allocation) idea – if process I waits for a resource held by process J, then J could only be delayed by waiting for a resource that is strictly larger (in resource ordering) than what I is waiting for resource graph –each node is a resource –two nodes are connected by an edge if there is a process that needs both resources color the resource graph, order colors (see figs 11.4, 11.5) –this way the resources for each process are totally ordered

Generalization to RAP: Algorithm each process obtains resources in the increasing order of the colors –each resource has a queue associated with it –process requests resource by placing its index at the end of the queue, process removes its index in E process gets the resource when its index is at the top of the queue a process I may be waiting on another process J only if J is obtaining a higher color –hence, the largest length of the waiting chain is the number of colors in the graph Theorem 11.5 (simplified) If the max number of colors and max number of users of a single resource is constant the coloring algorithm has a constant time bound

Randomized DP Algorithm idea – a trying process executes a loop, in each iteration the process randomly selects a fork waits until it is available (why can’t we just drop it and randomly select a different fork?) checks to see if the other is available –if yes – go to C –if no – drop both forks the algorithm –solves DP even if the processes are identical –guarantees exclusion (with certainty) –ensures progress with probability 1

Properties of the Randomized Algorithm deterministically guarantees well-formedness, exclusion, and individual progress Example : the randomized algorithm does not deterministically guarantee progress –consider the case where all processes make the same random choices Theorem The randomized algorithm guarantees progress with probability 1