hw05 - CS 411 Operating Systems II Homework Assignment #5...

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

View Full Document Right Arrow Icon
CS 411 Operating Systems II Spring 2009 Homework Assignment #5 To be discussed in class 1. Following is an algorithm for solving the critical section problem. Does this solve the problem of mutual exclusion? If so, prove it. If not, give an example that disproves it. Shared boolean variables are initialized:. Shared data initialization: inT1 = inT2 = false Process1 Process2 while(1){ while(inT2) ; //do nothing inT1 = true; // critical section inT1 = false; // remainder section while(1){ while(inT1) ; //do nothing inT2 = true; // critical section inT2 = false; // remainder section 2. Suppose that synchronization is implemented using monitors. o Why must a process wait outside a monitor for a resource? o Describe the structure of a Java condition variable o True or False : Each monitor contains exactly one condition variable. 3. Give an example of how an improperly coded process might cause indefinite postponement. 4. Ordinarily processes that use semaphores for synchronization are implemented with some form of wait(mutex); //critical section signal(mutex);
Background image of page 1

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

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

Page1 / 2

hw05 - CS 411 Operating Systems II Homework Assignment #5...

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

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