13.4 - 13.4 Monitors a potential problem with semaphores was programmer error(forgetting wait or release monitors make the synchronization

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

View Full Document Right Arrow Icon
1 13.4 Monitors a potential problem with semaphores was programmer error (forgetting wait or release) monitors make the synchronization automatic monitors encapsulate the shared data and synchronization operations in an ADT monitors transfer responsibility for synchronization to the runtime system
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 timeline 1965: Dijkstra's semaphore concept 1973: Hansen's monitor concept 1975: Concurrent Pascal (Wirth, Hansen) 1977: Modula (Wirth: concurrent Pascal + system for separate compilation of modules) Mesa: Xerox Parc, threads, exceptions, GUIs CSP/k: Holt at U of T, for concurrent programming, (Communicating Sequential Processes) now: Ada, Java, C#
Background image of page 2
3 Competition synchronization handled by the monitor implicitly monitor guarantees exclusive access to shared data calls to monitor procedures are implicitly queued if monitor is busy
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Cooperation Synchronization programmer's task to ensure a shared buffer does not have underflow/overflow i.e., this remains a problem with monitors as with semaphores
Background image of page 4
5 program using monitor Process SUB1 Process SUB2 Process SUB3 Process SUB4 Monitor Insert Remove BUFFER to illustrate that the monitor encapsulates the shared data, provides an interface, hides details of synchronization
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Evaluation monitors are better than semaphores for providing competition synchronization monitors and semaphores have equal in power (either can implement the other) Ada 83 had support for monitors Ada 95 added protected objects as a more efficient way to construct monitors using message-passing
Background image of page 6
7 13.5 Message Passing late 1970s, by Hansen and Hoare concurrent tasks sending messages nondeterminism was introduced for fairness in choosing order of simultaneous requests based on Dijkstra's guarded commands for nondeterministic statement level control
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Synchronous Message Passing tasks are often busy and cannot be interrupted by other units task A sends message to busy task B task B can suspend its execution at some convenient point and indicate readiness to accept messages
Background image of page 8
9 rendezvous rendezvous : the mutual transmission and reception of a message between tasks
Background image of page 9

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

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

This note was uploaded on 09/29/2010 for the course COMPUTER S cps615 taught by Professor Pro during the Spring '10 term at Randolph College.

Page1 / 28

13.4 - 13.4 Monitors a potential problem with semaphores was programmer error(forgetting wait or release monitors make the synchronization

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

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