Distributed Real-Time and Embedded Systems
|
|
- Shanna Price
- 6 years ago
- Views:
Transcription
1 Context Deadlock voidance for Goal: Formalization of Middleware Services Distributed Real-Time and Embedded Systems pplication H e n n y S i p m a S t a n f o r d U n i v e r s i t y C e s a r V e n k i t a U n i v e r s i t y a t N o v 7, 6 S t pplication Middleware J o i n t w o r k w i t h S a n c h e z, z o h a r m a n n a, S u b r a m o n i a n, C h r i s G i l l Wa s h i n g t o n pplication Real-time Event Channel Event Filtering Deadlock avoidance Event Correlation OS L o u i s OS OS OS4 Scheduler OS5 OS6 Washington University, November 7, 6 Motivation Deadlock Deadlock is a classical problem in Computer Science Deadlock is the situation in which resources have been allocated to various tasks in such a way that none of the tasks can continue. Conditions:.Mutual exclusion.hold and wait.no preemption 4.Circular wait Habermann, 969 Classical example: Dining philosophers Washington University, November 7, 6 4 Washington University, November 7, 6 4
2 Solutions: Deadlock Detection Deadlock Prevention pproach: pproach! Statically break the circular wait Make one of the components release its resources and go back to an earlier state Disadvantages: 4 Sacrifices concurrency and reduces resource utilization Problem: Common in databases, but not practical in embedded systems Burden on the programmer 5 Washington University, November 7, 6 Washington University, November 7, Deadlock avoidance problem space Solutions: Deadlock voidance CENTRLIZED pproach:? DISTRIBUTED Unsolvable Dynamically assign resources on request based on availability and other processes needs Unsolvable Max utilization Impractical [Dijkstra, 65] [Singhal, 95] Call sequences [delfaro, 5] FMS [Sanchez++,5,6] Dijkstra s Banker s algorithm 7 Washington University, November 7, Washington University, November 7, 6 8
3 Solutions objective method centralized distributed prevention detection " " " " Banker s algorithm: maximum # resources avoidance Flexible manufacturing systems: # resources + order of request 9 Design a deadlock avoidance protocol that! is local to each component (does not require any communication between components) impractical in general [Singhal95]! makes use of static information (call graphs)! allows maximum concurrency! can be implemented efficiently practical with more a priori knowledge of process structure: Call Graphs [Sanchez++ 5,6,6,6] Washington University, November 7, 6 Washington University, November 7, 6 9 outline distributed real-time embedded system! Introduction! Deadlock avoidance protocols! Liveness! Distributed priority inheritance! Related Work! Conclusions n n4 B n distributed components, B, C, D, E n C E n5 D n B Sequence of calls Washington University, November 7, 6 n n C n4 n5 E Washington University, November 7, 6
4 distributed real-time embedded system example of deadlock ssumptions: Two components with two threads each! synchronous distributed system! Limited resources! Remote method invocations! WaitOnConnection policy! rbitrary number of processes spawned! ll processes terminate Two call graphs B n n B m B Resources are threads or execution contexts Washington University, November 7, 6 4 Distributed system model system! Introduction! Deadlock avoidance protocols! Liveness! Distributed priority inheritance! Related Work! Conclusions Each component maintains local variables including T: (constant) total number of threads t: number of threads currently available! G: {G,G,...}, a set of acyclic call graphs m B n B n 4 outline S: <R,G>! R: {,B,...}, a set of components. Washington University, November 7, 6 n C n4 n5 E 5 Washington University, November 7, Washington University, November 7, 6 6
5 Deadlock avoidance protocol annotated call graph Protocol schema: (executed for every incoming method call) when Enabledn(V) do Inn(V,V ) n:: f() m B n B entry section n n! Global call graph: G = G C n5 E n4 method invocation Outn(V,V ) exit section annotation represents the minimum number of threads that should be reserved for other processes (executing the same or other call graph) : update to local variables if thread is granted Outn(V,V ) : update to local variables when thread is released 7... = < V,E> G! nnotation # : V $!, mapping nodes to natural numbers EnablednV) : condition evaluated over local variables of if true: a thread can be granted Inn(V,V ) Washington University, November 7, 6 8 Washington University, November 7, protocol basic-p n:: protocol basic-p when Enabledn(V) do Inn(V,V ) entry section f() method invocation Outn(V,V ) when t > #(n) do t++ n:: : t++ f() method invocation t-- exit section EnablednV) : t > #(n) Inn(V,V ) entry section exit section Question: What conditions must # satisfy to ensure deadlock freedom? t: number of currently available threads Outn(V,V ) : t- 9 Washington University, November 7, 6 9 Washington University, November 7, 6
6 annotated call graph annotation theorem nswer: # must have no cyclic dependencies Example: n n B m B m when t > #(n) do t++ Node v directly depends on node w if n::! v makes a method call to w, or! v, w run in the same component and Basic-P f() t-- #(v) % #(w) Node v depends on node w if Theorem Let # be an annotation of the global call graph. If Basic-P is used in all components to decide allocation of threads, and # is acyclic, then the system is deadlock free.! there is a path from v to w that includes at least one! is acyclic if! no node depends on itself Washington University, November 7, 6 Washington University, November 7, 6 annotation theorem is tight annotation theorem is tight: example n C! nnotation Theorem provides a sufficient condition for deadlock freedom! Question: Is it also a necessary condition? m Theorem Let # be an annotation of the global call graph. If Basic-P is used in all components to decide allocation of threads, and! is not acyclic, then, given sufficient resources, a deadlock is always reachable. C n n B m B No deadlocks are reachable with But, deadlocks are reachable with TC= TC = Increasing the total number of threads may turn a deadlock-free system into a system that is not deadlock-free Checking whether a system with a cyclic annotation is deadlock-free is NP-complete Washington University, November 7, 6 4 Washington University, November 7, 6 4
7 how to compute an acyclic annotation?! Simplest solution: height in the graph 4 n D n n C n B n4 How to compute an acyclic annotation?! Not a solution: local height in the graph n5 E n n B m B T = 4 TB = TC = TD = 5 TE = Minimum number of threads required:! Need something in between Wastes resources! Washington University, November 7, How to compute an acyclic annotation?! Introduction! Deadlock avoidance protocols " Liveness! Distributed priority inheritance! Related Work! Conclusions Fix some reverse topological order on the nodes For each node n in the order compute the set of nodes S reachable via ($ &)* set #(n) = + #(m) where m S and m resides in the same component as n! No unique minimal solution B B 7 6 outline! Polynomial-time algorithm B Washington University, November 7, 6 B Washington University, November 7, Washington University, November 7, 6 8
8 Basic-P: shortcomings Basic-P: shortcomings Basic-P may cause starvation: Basic-P may cause starvation: G G G n n B m B B G continuous stream of processes executing G will stop processes executing G forever 9 n n B m B B continuous stream of processes executing G will stop processes executing G forever Washington University, November 7, 6 Washington University, November 7, 6 9 Liveness under Fair scheduler Essential invariant For deadlock avoidance it is sufficient to maintain the invariant: {... p... } llocation Manager for every component, for every i: p Scheduler t[i] ' T - i t[i]: number of active processes in with annotation i or greater llocation manager determines set of processes for which taking the resource is safe " Maintaining this invariant precisely requires T storage space Scheduler selects the process that gets the resource " has only one variable; it maintains the invariant by always assuming the worst case Objective: Design protocol for allocation manager that provides liveness provided the scheduler is fair " Question: can we maintain it precisely? What do we gain? Washington University, November 7, 6 Washington University, November 7, 6
9 versus when ((n) do allocate(n) n:: when t > #(n) do t++ f() f() deallocate(n) t-- with ((n): i>#(n). t[i] ' T - i # allocate(n): i'#(n). t[i]++ deallocate(n): i'#(n). t[i]-- i'#(n). t[i] +' T - i t[] t[] t[] t[] t Washington University, November 7, 6 Washington University, November 7, 6 4 versus 4 versus t[] t[] t[] t[] t[] t {} {} t[] t[] t {} 5 t[] {} Washington University, November 7, Washington University, November 7, 6 6
10 versus versus t[] t[] t[] t[] t[] t t[] t[] t[] t {,} {,} {,} {,} Washington University, November 7, Washington University, November 7, 6 7 versus! 8 allows more concurrency than Theorem (Deadlock avoidance): If protocol is used to determine whether thread allocation is safe and # is acyclic then no deadlock is reachable. t[] t[] t[] t[] Theorem (Liveness) If protocol is used to select a process for thread allocation then every waiting process is eventually selected t {,,} {,} 9 Washington University, November 7, Washington University, November 7, 6 4
11 versus versus n n B m B n n B m B t[] t[] t[] t Washington University, November 7, 6 4 t[] t {m} {m} Washington University, November 7, versus versus n 4 n n B m B n n! t[] t[] {m} 4 m B t {m} n B t[] n t[] t {n,m} {m} Washington University, November 7, Washington University, November 7, 6 44
12 versus versus n n n B m B! n n n B m B t[] t[] t[] t {n,m} {m} {m,m} Washington University, November 7, 6 45 t {n,m} t[] Washington University, November 7, versus versus leaves n 46 n n B m B leaves n t[] 47 m B t[] t {n,m} n B t[] n t[] t {m,m} {n} {m} Washington University, November 7, Washington University, November 7, 6 48
13 versus versus n n n B m B n t[] t[] t[] {n} {m} {n} Washington University, November 7, 6 49 m B t n B t[] n t {m} - {m,m} - {m} - {m,m}... 5 Washington University, November 7, Basic-P vs Live-P: concurrency when ((n) do allocate(n) verage maximum legal annotation, for T = and varying load Maximum Legal nnotation n:: 8 when t > #(n) do t++ f() f() deallocate(n) 6 t-- with 4 ((n): i>#(n). t[i] ' T - i # allocate(n): i'#(n). t[i]++ deallocate(n): i'#(n). t[i]-- i'#(n). t[i] +' T - i Load 5 Washington University, November 7, Washington University, November 7, 6 5
14 Live-P: implementation! Basic-P : Experiments () one instruction per allocation Time for 6 operation pairs, for uniform α and L = 9 rray 8 Complete RedBlack 7 data structure time space array O(T) O(T) O(log T) O(T) binary tree Time(ms)! Live-P : red-black tree O(log L) O(L) T: total number of threads in the component L: total number of processes executing in the component Total number of resources T Washington University, November 7, 6 5 Washington University, November 7, Experiments () 54 versus Time for 6 operation pairs, for uniform α and L = T 4 9 Time(ms) rray 8 Complete RedBlack 7! t[] t[] t[] t[] t Total number of resources T 55 {,,} {,} Washington University, November 7, Washington University, November 7, 6 56
15 versus reachable state space allocation sequences allocation sequences t[] t[] t[] t[] {,,} -- t {,,} state {,,} state space -- Washington University, November 7, 6 58 Washington University, November 7, 6 57 intermediate protocols 58 mixing Protocols allocation sequences Theorem: Every allocation protocol that! is enabled whenever is enabled, and! is disabled whenever is disabled k- state space guarantees freedom from deadlock k- k- for k =..T : " k storage space " guarantees liveness up to annotation k- 59 Washington University, November 7, Washington University, November 7, 6 6
16 varying levels of concurrency outline! Introduction! Deadlock avoidance protocols " Liveness! Distributed priority inheritance! Related Work! Conclusions 6 Washington University, November 7, 6 Washington University, November 7, motivation 6 Priority inheritance! It is common in DRE systems to assign priorities to processes to ensure " Priority inheritance requires a decrease in annotation that more critical tasks meet their deadlines! Schedulers then give preference to higher-priority tasks! Possibility of priority inversion! Priority inheritance protocols help alleviate priority inversions! Distributed priority inheritance hard to achieve (n,) (m,) B (r,) (m,) B (r,) B (r,) B (r,) (r,) B " Deadlock avoidance is preserved, because new state is reachable by 6 Washington University, November 7, Washington University, November 7, 6 64
17 outline Related work Classical deadlock avoidance:! Introduction! Deadlock avoidance protocols " Liveness! Distributed priority inheritance " Related Work! Conclusions! E.W. Dijkstra, Cooperating sequential processes, EWD-, 965.!.N. Habermann, Prevention of system deadlocks, CCM, 969.! J.W. Havender, voiding deadlocks in multi-tasking systems, IBM Systems Journal, 968.! R.C. Holt, Some deadlock properties of computing systems, CM Computer Surveys, 97.! E.C. Coffman, M.J. Elphick, and. Shoshani, System deadlocks, Computing Surveys, Washington University, November 7, 6 66 Washington University, November 7, 6 65 Related work Related work Flexible Manufacturing Systems: Middleware and distributed systems:! S..Reveliotics, M.. Lawley, P.M. Ferreira, Polynomial complexity! D.C. Schmidt, M. Stal, H. Rohnert, F. Bushmann, Pattern-oriented deadlock avoidance policies for sequential RS, IEEE Transactions on utomatic Control, 997.! K.Y. Xing, B.S. Hu, H.X. Chen, Deadlock avoidance policy for petri net modeling of FMSs with shared resources, IEEE Transactions on utomatic Control, 996.! M.P. Fanti, B. Maione, S. Mascolo, B. Turchiano, Event-based feedback control for deadlock avoidance in flexible production systems, IEEE Transactions on Robotics and utomation, 997.! M.V. Iordache, J.G. Moody, P.J. ntsaklis, Synthesis of deadlock prevention supervisors using petri nets, IEEE Transactions on Robotics and utomation,.! J. Ezpeleta, F. Tricas, F. Garcia-Valles, J.M. Colom, Banker s solution for deadlock avoidance in FMS with flexible routing and multiresource states, IEEE Transactions on Robotics and utomation, software architecture: Patterns for concurrent and networked objects, Volume,.! V. Subramonian and C.D. Gill, generative programming framework for adaptive middleware, HICSS, 4.! D.C. Schmidt, S. Munfee, S. Flores-Gaitan,.S. Gokhale, lleviating priority inversion and non-determinism in real-time CORB ORB core architectures, RTS, 998.! L. de lfaro, V. Raman, M. Faella, R. Majumdar, Code aware resource management, EMSOFT, 5.! F. Muller, Priority inheritance and ceilings for distributed mutual exclusion, RTSS, 999. Washington University, November 7, Washington University, November 7, 6 68
18 outline Conclusions! Introduction! Deadlock avoidance protocols " Liveness! Distributed priority inheritance! Related Work " Conclusions "... : a spectrum of deadlock avoidance protocols that! require no communication between components! make use of static information of the processes! allow varying levels of concurrency! provide varying levels of liveness! vary in complexity of implementation and space required! support priority inheritance " Proofs of correctness based on parameterized transition systems " Experimentation in CE in progress " Partial results for recursive call graphs 69 Washington University, November 7, 6 7 Washington University, November 7, 6 69 papers 7 future work! C. Sanchez, H.B. Sipma, Z. Manna, C.D. Gill, V. Subramonian, Thread allocation protocols for distributed real-time and embedded systems, FORTE, 5.! C. Sanchez, H.B. Sipma, Z. Manna, V. Subramonian, C.D. Gill, On efficient distributed deadlock avoidance for real-time and embedded systems, IPDPS, 6.! C. Sanchez, H.B. Sipma, Z. Manna, C.D. Gill, Efficient distributed deadlock avoidance with liveness guarantees, EMSOFT, 6.! V. Subramonian, C.D. Gill, C. Sanchez, H.B. Sipma, Reusable models for timing and liveness analysis of middleware for distributed real-time embedded systems, EMSOFT 6.! C. Sanchez, H.B. Sipma, C.D. Gill, Z. Manna, Distributed priority inheritance for real-time and embedded systems, OPODIS, 6.! C. Sanchez, H.B. Sipma, Z. Manna, Reachable state spaces of distributed deadlock avoidance protocols, submitted. 7! Formal characterization and measurement of levels of concurrency allowed by the different protocols! Process placement to obtain optimal concurrency! Incorporation of more information on the call graph to increase concurrency! Static analysis methods to obtain call graphs! Mixed WaitOnConnection - WaitOnReactor allocation policy! Integration with scheduling Washington University, November 7, Washington University, November 7, 6 7
On Efficient Deadlock Avoidance for Distributive Recursive Processes
On Efficient Deadlock Avoidance for Distributive Recursive Processes César Sánchez, Henny B. Sipma, and Zohar Manna Computer Science Department Stanford University, Stanford, CA 94305, USA {cesar,sipma,zm}@cs.stanford.edu
More informationGenerating Efficient Distributed Deadlock Avoidance Controllers
Generating Efficient Distributed Deadlock Avoidance Controllers César Sánchez Henny B. Sipma Zohar Manna Stanford University Computer Science Department Stanford, CA 9435 USA E-mail: {cesar,sipma,zm}@cs.stanford.edu
More informationOn Efficient Distributed Deadlock Avoidance for Real-Time and Embedded Systems
On Efficient Distributed Deadlock Avoidance for Real-Time and Embedded Systems César Sánchez Henny B. Sipma Zohar Manna Venkita Subramonian Christopher Gill Stanford University Computer Science Dept. Stanford,
More informationEfficient Distributed Deadlock Avoidance with Liveness Guarantees
Efficient Distributed Deadlock Avoidance with Liveness Guarantees César Sánchez Henny B. Sipma Zohar Manna Computer Science Department Stanford University Stanford, CA 90, USA Christopher D. Gill Computer
More informationDUH! Deadlocks. Concurrency Issues. The TENEX Case. If a process requests all systems buffers, operator console tries to print an error message
1 Concurrency Issues Past lectures: Problem: Safely coordinate access to shared resource Solutions: Use semaphores, monitors, locks, condition variables Coordinate access within shared objects Deadlocks
More informationCISC 7310X. C10: Deadlocks. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/12/2018 CUNY Brooklyn College
CISC 7310X C10: Deadlocks Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/12/2018 CUNY Brooklyn College 1 Outline Concept of deadlock Necessary conditions Models of deadlocks
More informationDeadlock. Concurrency: Deadlock and Starvation. Reusable Resources
Concurrency: Deadlock and Starvation Chapter 6 Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate with each other No efficient solution Involve conflicting
More informationOperating Systems: William Stallings. Starvation. Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall
Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 6 Concurrency: Deadlock and Starvation Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Deadlock
More informationDeadlock Avoidance For Flexible Manufacturing Systems With Choices Based On Digraph Circuit Analysis
Deadlock Avoidance For Flexible Manufacturing Systems With Choices Based On Digraph Circuit Analysis Wenle Zhang and Robert P. Judd School of Electrical Engineering and Computer Science Ohio University
More informationDEADLOCK AVOIDANCE FOR FLEXIBLE MANUFACTURING SYSTEMS WITH CHOICES BASED ON DIGRAPH CIRCUIT ANALYSIS
Asian Journal of Control, Vol. 9, No. 2, pp. 111-120, June 2007 111 DEADLOCK AVOIDANCE FOR FLEXIBLE MANUFACTURING SYSTEMS WITH CHOICES BASED ON DIGRAPH CIRCUIT ANALYSIS Wenle Zhang and Robert P. Judd ABSTRACT
More informationChapters 5 and 6 Concurrency
Operating Systems: Internals and Design Principles, 6/E William Stallings Chapters 5 and 6 Concurrency Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Concurrency When several processes/threads
More informationBasics of Deadlock Theory. Deadlocks
CMSC 621, Advanced Operating Systems. Fall 2003 Basics of Deadlock Theory Dr. Kalpakis Deadlocks deadlock occurs when there is a set of processes which have outstanding requests for resources that can
More informationAdvanced Synchronization and Deadlock
Advanced Synchronization and Deadlock A house of cards? Locks + CV/signal a great way to regulate access to a single shared object......but general multi-threaded programs touch multiple shared objects
More informationOperating Systems 2006/2007
Operating Systems 2006/2007 Blocking and locking Johan Lukkien 1 Blocking & locking Blocking: waiting for a certain condition to become true Starvation: unpredictable, even infinite blocking times the
More informationECS 150 (Operating Systems) Goal To examine what causes deadlock, and what to do about it. Spring Quarter
D e a d l o c k Goal To examine what causes deadlock, and what to do about it. Spring Quarter 1999 1 The resource manager is that part of the kernel responsible for managing resources. Its process interface
More informationOperating Systems: Quiz2 December 15, Class: No. Name:
Operating Systems: Quiz2 December 15, 2006 Class: No. Name: Part I (30%) Multiple Choice Each of the following questions has only one correct answer. Fill the correct one in the blank in front of each
More informationECE519 Advanced Operating Systems
IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (6 th Week) (Advanced) Operating Systems 6. Concurrency: Deadlock and Starvation 6. Outline Principles of Deadlock
More informationPESIT Bangalore South Campus
INTERNAL ASSESSMENT TEST II Date: 04/04/2018 Max Marks: 40 Subject & Code: Operating Systems 15CS64 Semester: VI (A & B) Name of the faculty: Mrs.Sharmila Banu.A Time: 8.30 am 10.00 am Answer any FIVE
More informationConcurrency: Principles of Deadlock. Processes and resources. Concurrency and deadlocks. Operating Systems Fall Processes need resources to run
Concurrency: Principles of Deadlock Operating Systems Fall 2002 Processes and resources Processes need resources to run CPU, memory, disk, etc process waiting for a resource cannot complete its execution
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 11 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Multilevel Feedback Queue: Q0, Q1,
More informationProcess Management. Deadlock. Process Synchronization. Management Management. Starvation
Process Management Deadlock 7 Cases of Deadlock Conditions for Deadlock Modeling Deadlocks Strategies for Handling Deadlocks Avoidance Detection Recovery Starvation Process Synchronization Deadlock Starvation
More informationOperating Systems 2010/2011
Operating Systems 2010/2011 Blocking and locking (with figures from Bic & Shaw) Johan Lukkien 1 Blocking & locking Blocking: waiting for a certain condition to become true Starvation: unpredictable, even
More informationOutline. G Honors Operating Systems. Deadlock Avoidance. Review: Deadlock Prevention. Lecture 11: Deadlocks Avoidance, Detection, and Recovery
Outline G22.3250 Honors Operating Systems Lecture 11: Deadlocks Avoidance, Detection, and Recovery Process deadlocks (contd.) deadlock avoidance deadlock detection deadlock recovery combined approach to
More information! What is a deadlock? ! What causes a deadlock? ! How do you deal with (potential) deadlocks? Maria Hybinette, UGA
Chapter 8: Deadlock Questions? CSCI 4730 Operating Systems! What is a deadlock?! What causes a deadlock?! How do you deal with (potential) deadlocks? Deadlock Deadlock: What is a deadlock? Example: Two
More informationA Modification to the Chandy-Misra Dining Philosophers Algorithm to Support Dynamic Resource Conflict Graphs
A Modification to the Chandy-Misra Dining Philosophers Algorithm to Support Dynamic Resource Conflict Graphs Kenneth Goldman and Joe Hoffert {kjg,joeh}@cs.wustl.edu Distributed Programing Environments
More informationChapter 7: Deadlocks. Operating System Concepts 8th Edition, modified by Stewart Weiss
Chapter 7: Deadlocks, Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance (briefly) Deadlock Detection
More information6. Concurrency: Deadlock
CSC400 - Operating Systems 6. Concurrency: Deadlock J. Sumey Deadlock one problem that results from multiprogramming def: a process (or thread) is said to be deadlocked if it is waiting for an event that
More informationLast Class: Monitors. Real-world Examples
Last Class: Monitors Monitor wraps operations with a mutex Condition variables release mutex temporarily C++ does not provide a monitor construct, but monitors can be implemented by following the monitor
More informationDeadlocks. Mehdi Kargahi School of ECE University of Tehran Spring 2008
Deadlocks Mehdi Kargahi School of ECE University of Tehran Spring 2008 What is a Deadlock Processes use resources in the following sequence: Request Use Release A number of processes may participate in
More informationDeadlock. Concepts to discuss. A System Model. Deadlock Characterization. Deadlock: Dining-Philosophers Example. Deadlock: Bridge Crossing Example
Concepts to discuss Deadlock CSCI 315 Operating Systems Design Department of Computer Science Deadlock Livelock Spinlock vs. Blocking Notice: The slides for this lecture have been largely based on those
More informationThe Deadlock Problem (1)
Deadlocks The Deadlock Problem (1) A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 disk drives. P 1 and P 2
More informationChapter 6 Concurrency: Deadlock and Starvation
Operating Systems: Internals and Design Principles Chapter 6 Concurrency: Deadlock and Starvation Seventh Edition By William Stallings Edited by Rana Forsati CSE410 Outline Principles of deadlock Deadlock
More informationUNIT 4 DEADLOCKS 4.0 INTRODUCTION
UNIT 4 DEADLOCKS Deadlocks Structure Page Nos 4.0 Introduction 69 4.1 Objectives 70 4.2 Deadlocks 70 4.3 Characterisation of a Deadlock 71 4.3.1 Mutual Exclusion Condition 4.3.2 Hold and Wait Condition
More informationSystem Model. Types of resources Reusable Resources Consumable Resources
Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock System Model Types
More informationSOLVING DEADLOCK STATES IN MODEL OF RAILWAY STATION OPERATION USING COLOURED PETRI NETS
SOLVING DEADLOCK STATES IN MODEL OF RAILWAY STATION OPERATION USING COLOURED PETRI NETS Michal Žarnay University of Žilina, Faculty of Management Science and Informatics, Address: Univerzitná 8215/1, Žilina,
More informationCS450/550 Operating Systems
CS450/550 Operating Systems Lecture 3 Deadlocks Dr. Xiaobo Zhou Department of Computer Science CS450/550 Deadlocks.1 Review: Summary of Chapter 2 Sequential process model Multi-threading: user-space vs.
More informationOperating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy
Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference
More informationTDDB68 + TDDD82. Lecture: Deadlocks
TDDB68 + TDDD82 Lecture: Deadlocks Mikael Asplund, Senior Lecturer Real-time Systems Laboratory Department of Computer and Information Science Thanks to Simin Nadjm-Tehrani and Christoph Kessler for much
More informationConcurrency Issues. Past lectures: What about coordinated access across multiple objects? Today s lecture:
Deadlock 1 Concurrency Issues Past lectures: Ø Problem: Safely coordinate access to shared resource Ø Solutions: Use semaphores, monitors, locks, condition variables Coordinate access within shared objects
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 16 Deadlock Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Does a cycle in a resource
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 1018 L14 Deadlocks Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Mutex vs Semaphore 2 2 FAQ Does
More informationA house of cards? Advanced Synchronization and Deadlock. Contra Threads: Events. Contra Threads: Events
A house of cards? Advanced Synchronization and Deadlock Locks + CV/signal a great way to regulate access to a single shared object......but general multi-threaded programs touch multiple shared objects
More informationA Novel Deadlock Avoidance Algorithm and Its Hardware Implementation
A Novel Deadlock Avoidance Algorithm and Its Hardware Implementation Jaehwan Lee Georgia Institute of Technology Atlanta, Georgia, U.S.A. jaehwan@ece.gatech.edu Vincent John Mooney III Georgia Institute
More informationChapter 3. Deadlocks
Chapter 3 Deadlocks 3.1 Resource 3.2 Introduction to deadlocks 3.3 The ostrich algorithm 3.4 Deadlock detection and recovery 3.5 Deadlock avoidance 3.6 Deadlock prevention 3.7 Other issues Resources Examples
More informationInterprocess Communication By: Kaushik Vaghani
Interprocess Communication By: Kaushik Vaghani Background Race Condition: A situation where several processes access and manipulate the same data concurrently and the outcome of execution depends on the
More informationPetri Nets ee249 Fall 2000
Petri Nets ee249 Fall 2000 Marco Sgroi Most slides borrowed from Luciano Lavagno s lecture ee249 (1998) 1 Models Of Computation for reactive systems Main MOCs: Communicating Finite State Machines Dataflow
More informationOperating Systems. Deadlocks
Operating Systems Deadlocks Deadlocks Example: two processes want to scan a document, and then save it on a CD P0 down(scanner); down(cd_writer); scan_and_record(); up(cd_writer); up(scanner); P1 down(cd_writer);
More informationConcurrency: Deadlock and Starvation. Chapter 6
Concurrency: Deadlock and Starvation Chapter 6 Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate with each other Involve conflicting needs for resources
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 1018 L11 Synchronization Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Multilevel feedback queue:
More informationCMSC 412. Announcements
CMSC 412 Deadlock Reading Announcements Chapter 7 Midterm next Monday In class Will have a review on Wednesday Project 3 due Friday Project 4 will be posted the same day 1 1 The Deadlock Problem A set
More informationWhat is the Race Condition? And what is its solution? What is a critical section? And what is the critical section problem?
What is the Race Condition? And what is its solution? Race Condition: Where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular
More information!! What is a deadlock? !! What causes a deadlock? !! How do you deal with (potential) deadlocks? Maria Hybinette, UGA
Chapter 8: Deadlock Questions? CSCI [4 6]730 Operating Systems!! What is a deadlock?!! What causes a deadlock?!! How do you deal with (potential) deadlocks? Deadlock 2 Deadlock: What is a deadlock? Example:
More informationOPERATING SYSTEMS. Deadlocks
OPERATING SYSTEMS CS3502 Spring 2018 Deadlocks Chapter 7 Resource Allocation and Deallocation When a process needs resources, it will normally follow the sequence: 1. Request a number of instances of one
More informationConcurrency: Deadlock and Starvation
Concurrency: Deadlock and Starvation Chapter 6 E&CE 354: Processes 1 Deadlock Deadlock = situation in which every process from a set is permanently blocked, i.e. cannot proceed with execution Common cause:
More informationMain Points of the Computer Organization and System Software Module
Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a
More informationDeadlock. Pritee Parwekar
Deadlock Each request requires that the system consider the,, to decide whether the current request can be satisfied or must wait to avoid a future possible deadlock. a) resources currently available b)
More informationOperating Systems ECE344. Ding Yuan
Operating Systems ECE344 Ding Yuan Deadlock Synchronization is a live gun we can easily shoot ourselves in the foot Incorrect use of synchronization can block all processes We have talked about this problem
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 23 Deadlocks Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Chapter 7: Deadlocks Objectives:
More informationDeadlock. CS 450 : Operating Systems Michael Lee
Deadlock CS 450 : Operating Systems Michael Lee deadlock noun 1 [in sing. ] a situation, typically one involving opposing parties, in which no progress can be made : an attempt to break the
More informationSSC - Concurrency and Multi-threading Java multithreading programming - Synchronisation (II)
SSC - Concurrency and Multi-threading Java multithreading programming - Synchronisation (II) Shan He School for Computational Science University of Birmingham Module 06-19321: SSC Outline Outline of Topics
More informationLiveness properties. Deadlock
Liveness properties From a theoretical viewpoint we must ensure that we eventually make progress i.e. we want to avoid : blocked threads/processes waiting for each other Livelock: processes/threads execute
More informationThe Deadlock Problem
Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock The Deadlock
More informationSilberschatz, Galvin and Gagne 2013! CPU cycles, memory space, I/O devices! " Silberschatz, Galvin and Gagne 2013!
Chapter 7: Deadlocks Chapter 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock 7.2 Chapter
More informationThe Deadlock Lecture
Concurrent systems Lecture 4: Deadlock, Livelock, and Priority Inversion DrRobert N. M. Watson The Deadlock Lecture 1 Reminder from last time Multi-Reader Single-Writer (MRSW) locks Alternatives to semaphores/locks:
More informationChapter 7: Deadlocks. Operating System Concepts 9th Edition DM510-14
Chapter 7: Deadlocks Chapter 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock 7.2 Chapter
More informationcsci 3411: Operating Systems
csci 3411: Operating Systems Deadlocks Gabriel Parmer Slides evolved from Silberschatz and West Deadlocks:Synchronization Gone Wild A set of blocked processes each Hold a resource (critical section, using
More informationThe Deadlock Problem. A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set.
Deadlock The Deadlock Problem A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set Example semaphores A and B, initialized to 1 P 0 P
More informationOPERATING SYSTEMS. Prescribed Text Book. Operating System Principles, Seventh Edition. Abraham Silberschatz, Peter Baer Galvin and Greg Gagne
OPERATING SYSTEMS Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne 1 DEADLOCKS In a multi programming environment, several processes
More informationConcurrency Control Algorithms
Concurrency Control Algorithms Given a number of conflicting transactions, the serializability theory provides criteria to study the correctness of a possible schedule of execution it does not provide
More informationCSI3131 Final Exam Review
CSI3131 Final Exam Review Final Exam: When: April 24, 2015 2:00 PM Where: SMD 425 File Systems I/O Hard Drive Virtual Memory Swap Memory Storage and I/O Introduction CSI3131 Topics Process Computing Systems
More informationChapter 7: Deadlocks
Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Chapter
More informationChapter 6 Concurrency: Deadlock and Starvation
Operating Systems: Internals and Design Principles Chapter 6 Concurrency: Deadlock and Starvation Seventh Edition By William Stallings Operating Systems: Internals and Design Principles When two trains
More informationChapter 7: Deadlocks
Chapter 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock
More informationLast Class: Synchronization Problems. Need to hold multiple resources to perform task. CS377: Operating Systems. Real-world Examples
Last Class: Synchronization Problems Reader Writer Multiple readers, single writer In practice, use read-write locks Dining Philosophers Need to hold multiple resources to perform task Lecture 10, page
More informationDeadlocks. Today. Next Time. ! Resources & deadlocks! Dealing with deadlocks! Other issues. ! Memory management
Deadlocks Today! Resources & deadlocks! Dealing with deadlocks! Other issues Next Time! Memory management Introduction to deadlocks A set of threads is deadlocked if each thread in the set is waiting for
More informationDeadlocks. Today. Next Time. Resources & deadlocks Dealing with deadlocks Other issues. I/O and file systems
Deadlocks Today Resources & deadlocks Dealing with deadlocks Other issues Next Time I/O and file systems That s some catch, that Catch-22 Thread A: lock(l1); lock(l2);... A Thread B: lock(l2); lock(l1);...
More informationThe deadlock problem
Deadlocks Arvind Krishnamurthy Spring 2004 The deadlock problem A set of blocked processes each holding a resource and waiting to acquire a resource held by another process. Example locks A and B P 0 P
More informationLast Class: Synchronization Problems!
Last Class: Synchronization Problems! Reader Writer Multiple readers, single writer In practice, use read-write locks Dining Philosophers Need to hold multiple resources to perform task Lecture 11, page
More informationCHAPTER 7: DEADLOCKS. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.
CHAPTER 7: DEADLOCKS By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention
More informationDeadlocks Prof. James L. Frankel Harvard University. Version of 7:05 PM 7-Mar-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved.
Deadlocks Prof. James L. Frankel Harvard University Version of 7:05 PM 7-Mar-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Introduction to Deadlocks Computer resources Files Database
More informationChapter 7: Deadlocks. Operating System Concepts with Java 8 th Edition
Chapter 7: Deadlocks 7.1 Silberschatz, Galvin and Gagne 2009 Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock
More informationOperating Systems. Deadlock. Lecture 7 Michael O Boyle
Operating Systems Deadlock Lecture 7 Michael O Boyle 1 2 Definition A thread is deadlocked when it s waiting for an event that can never occur I m waiting for you to clear the intersection, so I can proceed
More informationChapter 7: Deadlocks. Operating System Concepts 8 th Edition,
Chapter 7: Deadlocks, Silberschatz, Galvin and Gagne 2009 Chapter Objectives To develop a description of deadlocks, which prevent sets of concurrent processes from completing their tasks To present a number
More informationDeadlock. Disclaimer: some slides are adopted from Dr. Kulkarni s and book authors slides with permission 1
Deadlock Disclaimer: some slides are adopted from Dr. Kulkarni s and book authors slides with permission 1 Recap: Synchronization Race condition A situation when two or more threads read and write shared
More informationCS370 Operating Systems
CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 1018 L10 Synchronization Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Development project: You
More informationUNIT:2. Process Management
1 UNIT:2 Process Management SYLLABUS 2.1 Process and Process management i. Process model overview ii. Programmers view of process iii. Process states 2.2 Process and Processor Scheduling i Scheduling Criteria
More informationChapter 7: Deadlocks. Operating System Concepts 9 th Edition
Chapter 7: Deadlocks Silberschatz, Galvin and Gagne 2013 Chapter 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection
More informationDeadlocks. Operating System Concepts - 7 th Edition, Feb 14, 2005
Deadlocks Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock 7.2 Silberschatz,
More informationChapter 8: Deadlocks. Bridge Crossing Example. The Deadlock Problem
Chapter 8: Deadlocks Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock 8.1 Bridge Crossing Example Bridge has one
More informationProcess-1 requests the tape unit, waits. In this chapter, we shall analyze deadlocks with the following assumptions:
Chapter 5 Deadlocks 5.1 Definition In a multiprogramming system, processes request resources. If those resources are being used by other processes then the process enters a waiting state. However, if other
More informationDeadlock Prevention, Avoidance, and Detection
Deadlock Prevention, Avoidance, and Detection The Deadlock problem In a computer system deadlocks arise when members of a group of processes which hold resources are blocked indefinitely from access to
More informationCS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University
CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):
More informationResource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems
Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems Insup Lee 1, Oleg Sokolsky 1, Anna Philippou 2 1 RTG (Real-Time Systems Group) Department of
More informationCS 153 Design of Operating Systems Winter 2016
CS 153 Design of Operating Systems Winter 2016 Lecture 12: Scheduling & Deadlock Priority Scheduling Priority Scheduling Choose next job based on priority» Airline checkin for first class passengers Can
More informationChapter 7: Deadlocks CS370 Operating Systems
Chapter 7: Deadlocks CS370 Operating Systems Objectives: Description of deadlocks, which prevent sets of concurrent processes from completing their tasks Different methods for preventing or avoiding deadlocks
More informationChapter 7: Deadlocks. Operating System Concepts 9 th Edition
Chapter 7: Deadlocks Silberschatz, Galvin and Gagne 2013 Chapter 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection
More informationPotential Deadlock Example
Deadlock Handling Notice: The slides for this lecture have been largely based on those accompanying an earlier edition of the course text Operating Systems Concepts, 9th ed., by Silberschatz, Galvin, and
More informationOperating Systems. Deadlocks. Stephan Sigg. November 30, Distributed and Ubiquitous Systems Technische Universität Braunschweig
Operating Systems Deadlocks Stephan Sigg Distributed and Ubiquitous Systems Technische Universität Braunschweig November 30, 2010 Stephan Sigg Operating Systems 1/86 Overview and Structure Introduction
More informationChapter 7: Deadlocks. Operating System Concepts 8 th Edition,
Chapter 7: Deadlocks, Silberschatz, Galvin and Gagne 2009 Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance
More informationMC7204 OPERATING SYSTEMS
MC7204 OPERATING SYSTEMS QUESTION BANK UNIT I INTRODUCTION 9 Introduction Types of operating systems operating systems structures Systems components operating systems services System calls Systems programs
More information