Causes of deadlocks. Four necessary conditions for deadlock to occur are: The first three properties are generally desirable

Similar documents
They must have different numbers of electrons orbiting their nuclei. They must have the same number of neutrons in their nuclei.

Physics 302 Exam Find the curve that passes through endpoints (0,0) and (1,1) and minimizes 1

5.1 The Nuclear Atom

Frequency Response & Digital Filters

COMP108 Algorithmic Foundations

1985 AP Calculus BC: Section I

Dual P-Channel 12 V (D-S) MOSFET

Dual N-Channel 30 V (D-S) MOSFET

Statistics 3858 : Likelihood Ratio for Exponential Distribution

Lecture contents. Density of states Distribution function Statistic of carriers. Intrinsic Extrinsic with no compensation Compensation

Chapter 2 Infinite Series Page 1 of 11. Chapter 2 : Infinite Series

Slide 1. Slide 2. Slide 3 DIGITAL SIGNAL PROCESSING CLASSIFICATION OF SIGNALS

LECTURE 13 Filling the bands. Occupancy of Available Energy Levels

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

07 - SEQUENCES AND SERIES Page 1 ( Answers at he end of all questions ) b, z = n

ENGG 1203 Tutorial. Difference Equations. Find the Pole(s) Finding Equations and Poles

Digital Signal Processing, Fall 2006

Probability & Statistics,

Ordinary Differential Equations

PURE MATHEMATICS A-LEVEL PAPER 1

Lectures 9 IIR Systems: First Order System

Steinberg s Conjecture is false

Frequency Measurement in Noise

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

Problem Statement. Definitions, Equations and Helpful Hints BEAUTIFUL HOMEWORK 6 ENGR 323 PROBLEM 3-79 WOOLSEY

(Reference: sections in Silberberg 5 th ed.)

Time : 1 hr. Test Paper 08 Date 04/01/15 Batch - R Marks : 120

A Review of Complex Arithmetic

AP Calculus BC Problem Drill 16: Indeterminate Forms, L Hopital s Rule, & Improper Intergals

Option 3. b) xe dx = and therefore the series is convergent. 12 a) Divergent b) Convergent Proof 15 For. p = 1 1so the series diverges.

Problem Value Score Earned No/Wrong Rec -3 Total

EECE 301 Signals & Systems Prof. Mark Fowler

Searching Linked Lists. Perfect Skip List. Building a Skip List. Skip List Analysis (1) Assume the list is sorted, but is stored in a linked list.

Further Results on Pair Sum Graphs

CS September 2018

Sequential Tests for the Detection of Voice Activity and the Recognition of Cyber Exploits *

CS553 Lecture Register Allocation I 3

Discrete Fourier Transform. Nuno Vasconcelos UCSD

Folding of Hyperbolic Manifolds

B. Maddah ENMG 622 ENMG /27/07

Solutions to Homework 5

A Simple Proof that e is Irrational

Chapter 6 Folding. Folding

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

MA1506 Tutorial 2 Solutions. Question 1. (1a) 1 ) y x. e x. 1 exp (in general, Integrating factor is. ye dx. So ) (1b) e e. e c.

XGFIT s Curve Fitting Algorithm with GSL

Chapter Five. More Dimensions. is simply the set of all ordered n-tuples of real numbers x = ( x 1

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Utilizing exact and Monte Carlo methods to investigate properties of the Blume Capel Model applied to a nine site lattice.

Final Exam Solutions

Chapter 3 Fourier Series Representation of Periodic Signals

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018

3 a b c km m m 8 a 3.4 m b 2.4 m

SP490/SP491. Full Duplex RS-485 Transceivers. Now Available in Lead Free Packaging

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Quantum Mechanics & Spectroscopy Prof. Jason Goodpaster. Problem Set #2 ANSWER KEY (5 questions, 10 points)

Probability Translation Guide

1 Introduction to Modulo 7 Arithmetic

Motivation. We talk today for a more flexible approach for modeling the conditional probabilities.

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

MCE503: Modeling and Simulation of Mechatronic Systems Discussion on Bond Graph Sign Conventions for Electrical Systems

ASSERTION AND REASON

CDS 101: Lecture 5.1 Reachability and State Space Feedback

CE 530 Molecular Simulation

Roadmap. XML Indexing. DataGuide example. DataGuides. Strong DataGuides. Multiple DataGuides for same data. CPS Topics in Database Systems

General Notes About 2007 AP Physics Scoring Guidelines

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

How many neutrino species?

APPENDIX: STATISTICAL TOOLS

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

Solution of Assignment #2

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

Bifurcation Theory. , a stationary point, depends on the value of α. At certain values

Chapter 4 - The Fourier Series

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

COLLECTION OF SUPPLEMENTARY PROBLEMS CALCULUS II

EEO 401 Digital Signal Processing Prof. Mark Fowler

8. Barro Gordon Model

GRAPHS IN SCIENCE. drawn correctly, the. other is not. Which. Best Fit Line # one is which?

2008 AP Calculus BC Multiple Choice Exam

Constructive Geometric Constraint Solving

UNTYPED LAMBDA CALCULUS (II)

N-Channel 30 V (D-S) MOSFET

Planar Upward Drawings

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

Sec 2.3 Modeling with First Order Equations

H2 Mathematics Arithmetic & Geometric Series ( )

KISS: A Bit Too Simple. Greg Rose

Narayana IIT Academy

Acid Base Reactions. Acid Base Reactions. Acid Base Reactions. Chemical Reactions and Equations. Chemical Reactions and Equations

Codes on Planar Graphs

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

Problem Session (3) for Chapter 4 Signal Modeling

217Plus TM Integrated Circuit Failure Rate Models

Periodic Structures. Filter Design by the Image Parameter Method

Ch. 24 Molecular Reaction Dynamics 1. Collision Theory

Chain DOUBLE PITCH TYPE RS TYPE RS POLY-STEEL TYPE

Molecules and Covalent Bond

Transcription:

auss of dadloks Four ssary oditios for dadlok to our ar: Exlusiv ass: prosss rquir xlusiv ass to a rsour Wait whil hold: prosss hold o prviously aquird rsours whil waitig for additioal rsours No prmptio: a rsours aot prmptd from a pross without aortig th pross irular wait: thr is a st of lokd prosss ivolvd i a irular wait Th first thr proprtis ar grally dsiral rsptivly to i) prsrv rsour itgrity, ii) iras rsour utilizatio, iii) rdu wast of PU tim

Dadlok hadlig poliis Dadlok prvtio th systm is dsigd so that gratig rqusts vr lads to a dadlok Dadlok dttio th systm priodially (or wh dadlok susptd) hks for dadloks, ad a rovry produr is startd if o is dttd Dadlok avoida rsours ar gratd oly if th rsultig systm stat is saf i.. thr is at last o squ of xutio i whih all prosss ru to ompltio

akr s algorithm Dfiitios for a systm with prossors ad m rsours: ( ) a m a a matrix - vail Max m m m Max - laim matrix m m m urrt lloatio matrix ( ) k m k d d d D matrix vail urrt m m m E E E E urrt Nd matrix ( ) i m i i i f f f F tor Rqust v

lgorithm stps Stp - ttativ apt of rqust D : D - F // updat urrt vail matrix D i : i + F i // updat urrt llo vtor i E i : E i - F i // updat urrt Nd matrix E i Stp - saf-stat hkig tst s xt slid i whih frmoy D loa[i] i d[i] E i Stp 3 - if tst positiv dfiitiv apt of rqust, othrwis roll ak th updats of stp

akr at work: saf-stat hkig Whil (last_itratio_sussful) last_itratio_sussful fals ; for i to N do if (fiishdoutful[i] ND d[i] frmoy) th // d laim - loa, how // muh pross i still ds fiishdoutful[i] fals ; last_itratio_sussful tru fr moy fr moy + loa[i] ; // pross a fiish aus // d fr rsours // pross is al to fiish thus // it will rpay th loa ak d if d for Ed whil if (fr moy apital) th saf! ls ot saf! ;

akr s algorithm xampl () Systm with 3 prossors ad 3 rsours, ad with th followig matris: Rqust F ( ) should gratd? ( ) 3 4 matrix - vail Max - laim matrix Max lloatio matrix urrt ( ) k k D matrix urrt vail E urrt Nd matrix

akr s algorithm xampl () Suppos th rqust is gratd, th rsultig stat would th followig: lloatio matrix urrt ( ) k k D matrix urrt vail E urrt Nd matrix

akr s algorithm xampl (3) Th w stat is saf P 3 a omplt (aus E 3 D) ad thus a rtur ( ) to th pool of availal rsours D oms ( ); th outstadig ds of oth P ad P a satisfid

Dadlok aalysis Dadlok aalysis is ompliatd y th umr of variats of th pross-rsour rlatioship how may ad xatly whih rsours ar dd? How may tims a rsour a usd? How may prosss a simultaously us a rsour? W will study: simpl modls usd to rprsts rqusts ad rsour typs Irasigly sophistiatd graph-asd thiqus for dadlok aalysis

Modls of dadlok Dpdig o th typ of rsour rqust, a dadlok a lassifid aordig to o of four typs Sigl-uit rqust modl: vailla varity ND rqust modl: I d a PU ND a disk ND a pritr OR rqust modl: I d a disk OR a pritr ND-OR rqust modl: I d a PU ND (a disk OR a pritr)... P-out-of-Q rqust modl: I d at last thr ossus vots out of fiv

Wait-for-graph (WFG) To study dadloks th stat of a systm is oft rprstd with a wait-for graph p i p j p i ds a rsour hld y p j yl i th graph rprsts a irular wait

Dfiitio of kot kot of a graph is a sust K of ods suh that th rahal st of ah od i K is xatly K Exampls: D D,, ar i a yl ad also i a kot,, ar i a yl, ot i a kot

Modl diffrs Sigl-uit rqust modl: a dadlok orrspods to a yl i th WFG ND rqust modl: sam as aov (if vry rsour is i sigl opy), ut a pross ow a ivolvd i mor tha o dadlok OR rqust modl: a kot is a suffiit oditio for a dadlok ND-OR rqust modl: a kot is a suffiit oditio for a dadlok P-out-of-Q rqust modl: a kot is a suffiit oditio for a dadlok