Chap05
Chap05
Dave Bremer
9/28/10 Otago Polytechnic, N.Z.
©2008, ice all
Semaphores Functions in a
Bounded Buffer
• .
Producer Consumer
Demonstration Roadmap
Animations
• Producer/Consumer • Principals of Concurrency
Illustrates the operation of a producer-consumer
Mutual Exclusion: Hardware Support
–
•
buffer.
• Bounded-Buffer Problem Using Semaphores
• Semaphores
– Demonstrates the bounded-buffer consumer/producer • Monitors
problem using semaphores. • Message Passing
• Readers/Writers Problem
Monitors Chief characteristics
• The monitor is a programming-language • Local data variables are accessible only
construct that provides equivalent by the monitor
functionality to that of semaphores and • Process enters monitor by invoking one of
that is easier to control. its procedures
• Implemented in a number of programming • Only one process may be executing in the
languages, including monitor at a time
– Concurrent Pascal, Pascal-Plus,
– Modula-2, Modula-3, and Java.
Message Passing