{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Midterm paper - 5 Write down the solution of the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 1. Name the differences between process and thread 2. Specify the hardware support necessary for memory protection and explain briefly how it works. a. Monitor/user mode b. Privileged instructions c. Timer d. Memory protection 3. Show the correctness criteria for the producer-consumer problem. (1) No underflow: consumer must wait for producer to fill buffers. counter variable should not be less then zero, because consumer decrements it (2) No overflow: producer must wait if all buffer space is in use. Counter variable should not increase more than buffer size, because producer increments value of count. (3) Only one process must manipulate buffer pool at once. Mutual exclusion of processes, only one process manipulates buffer at a time. 4. Write down the solution of the Producer-Consumer problem using monitor. Let N be the buffer size
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 5. Write down the solution of the Readers-Writers problem using 3 semaphores (mutex, OkToRead, OkToWrite) 6. Synchronisation has two parts mutual exclusion and scheduling. Discuss how they are provided in monitors. 7. Draw the state transition diagram of a process and indicate which transitoin can be incurred by wait and signal operations o 8. In the semaphore solution of readers-writers can OKToWrite ever get greater than 1?What about OKToRead?Explain how i 9. In the monitor solution of dining-philosopher problem from the text book, is FIFO order guaranteed for Philosophers (i.e., th e 10. Regarding the monitor solution of dining-philosopher problem from the textbook, if the philosopher (P1) is inside the putdo w...
View Full Document

{[ snackBarMessage ]}