This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: School of Electrical Engineering and Computer Science University of Central Florida COP5611 - Advanced Operating Systems Spring 2009 (dcm) Homework 6. Due Wednesday April 8, 2009. Consider a circular buffer, in other words n ≥ 1 buffers: buf(0), buf(1), ... buf(n-1) linked in a circular list such that buf(k) if preceded by buf(k-1) and followed by buf(k+1) . A user process U and a system IO driver S use two pointers NextFullBuf and NextEmptyBuf to read the data from the buffer and use it for the computation and to read the data from the disk and fill out a buffer, respectively. The two processes are implemented as coroutines. A coroutine is a program component that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations; a subroutine can return only once; in contrast, while a coroutines can return (yield) several times. As an example consider two coroutines put and get : var buf := new queue coroutine put loop while buf is not full...
View Full Document
This note was uploaded on 02/15/2012 for the course COP 4600 taught by Professor Montagne during the Fall '08 term at University of Central Florida.
- Fall '08
- Operating Systems