Lecture22Full - Click to edit Master subtitle style 8/1/11...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Click to edit Master subtitle style 8/1/11 Lecture 22 COP 4600 Operating Systems Fall 2010 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:30-4:30 PM Lecture 22 8/1/11 n Last time: n Presentation of the paper Programming with Threads by Andrew Birell n Thread coordination with a bounded buffer. WAIT NOTIFY n Today: n Thread coordination with a bounded buffer. AWAIT ADVANCE SEQUENCE TICKET n Semaphores n Deadlock and Wait for Graphs n Enforced modularity on the Intel x86 architecture n Virtual Machines n Next Time Scheduling Algorithms Lecture 22 Thursday November 4, 2010 Lecture 22 22 Lecture 22 8/1/11 Coordination with bounded buffer n WAIT and NOTIFY can be used to coordinate the SEND and RECIVE systems calls. n This solution creates problems when a NOTIFY is sent before the WAIT. The thread in the WAITING state will never wake up. Lecture 22 33 Lecture 22 8/1/11 Lecture 22 44 1 2 N-1 N-2 out in Read from the buffer location pointed by out Write to the buffer location pointed by out shared structure buffer message instance message[N] integer in initially integer out initially procedure SEND (buffer reference p, message instance msg) while p.in p.out = N do nothing /* if buffer full wait p.message [p.in modulo N] msg /* insert message into buffer cell p.in p.in + 1 /* increment pointer to next free cell procedure RECEIVE (buffer reference p) while...
View Full Document

This note was uploaded on 07/30/2011 for the course COP 4600 taught by Professor Montagne during the Spring '08 term at University of Central Florida.

Page1 / 21

Lecture22Full - Click to edit Master subtitle style 8/1/11...

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

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