LM.Lecture5 - Distributed Operating Systems CS551 Colorado...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Distributed Operating Systems CS551 Colorado State University at Lockheed-Martin Lecture 5 -- Spring 2001
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
28 February 2001 CS-551, Lecture 5 2 CS551: Lecture 5 Topics Concurrency Control (Chapter 5) Mutex and Critical Regions Semaphores Monitors Locks Software Locks Token-Passing Mutual Exclusion Deadlocks Distributed Process Management (Chapter 7)
Background image of page 2
28 February 2001 CS-551, Lecture 5 3 Mutual Exclusion Mutex = mutual exclusion “ensures that multiple processes that share resources do not attempt to share the same resource at the same time” (Galli) The “concurrent access to a shared resource by several uncoordinated user-requests is serialized to secure the integrity of the shared resource” (Singhal & Shivaratri)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
28 February 2001 CS-551, Lecture 5 4 Critical Section/Region “the portion of code or program accessing a shared resource” Must prevent concurrent execution by more than one process at a time Mutual exclusion is one part of the solution to this problem Critical regions, as used in monitors, developed by Hoare and by Brinch Hansen
Background image of page 4
28 February 2001 CS-551, Lecture 5 5 Critical Section/Region Problem “Consider a system consisting of n processes { P 0 , P 1 , …, P n-1 }. Each process has a segment of code, called a critical section … The important feature of the system is that, when one process is executing in its critical section, no other process is to be allowed to execute in its critical section …the execution of critical sections … is mutually exclusive in time.” (Silberschatz & Galvin, 1998)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
28 February 2001 CS-551, Lecture 5 6 Figure 5.1 Critical Regions Protecting a Shared Variable. (Galli,p.106)
Background image of page 6
28 February 2001 CS-551, Lecture 5 7 Solutions to the Critical Section/ Region Problem Three-point test (Galli) Solution must ensure that two processes do not enter critical regions at same time Solution must prevent interference from processes not attempting to enter their critical regions Solution must prevent starvation
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
28 February 2001 CS-551, Lecture 5 8 Critical Section Solutions Recall: Silberschatz & Galvin A solution to the critical section problem must show that mutual exclusion is preserved progress requirement is satisfied bounded-waiting requirement is met
Background image of page 8
28 February 2001 CS-551, Lecture 5 9 Mutual Exclusion is Preserved “If process P 1 is executing in its critical section, then no other processes can be executing in their critical sections” (Silberschatz & Galvin)
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
28 February 2001 CS-551, Lecture 5 10 Progress Requirement is Satisfied “If no process is executing in its critical section and there exist some processes that wish to enter their critical sections, then only those processes that are not executing in their remainder section can participate in the decision of which will enter its critical section next, and this selection cannot be postponed indefinitely.” (S & G)
Background image of page 10
28 February 2001 CS-551, Lecture 5 11 Bounded Waiting is Met “There exists a bound on the number of
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/12/2011 for the course CS 551 taught by Professor Staff during the Summer '08 term at Colorado State.

Page1 / 45

LM.Lecture5 - Distributed Operating Systems CS551 Colorado...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online