Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS533 - Concepts of Operating Systems 1 Class Discussion.

Similar presentations


Presentation on theme: "CS533 - Concepts of Operating Systems 1 Class Discussion."— Presentation transcript:

1 CS533 - Concepts of Operating Systems 1 Class Discussion

2 CS533 - Concepts of Operating Systems 2 Questions  Which concurrent programming problems do monitors address?  Are monitors useful as a programming convention, i.e., without compiler support? o What is the convention?  With compiler support for monitors, what are the important tasks of the compiler?  Why does encapsulation help with synchronization?

3 CS533 - Concepts of Operating Systems 3 Questions  Do monitors solve the deadlock problem?  How might the queuing discipline for waiting processes avoid starvation?  Why do we need condition variables instead of a single waiting queue per monitor?  Does a condition variable have a value (such as true/false)?

4 CS533 - Concepts of Operating Systems 4 Questions  What are the implications of allowing monitor calls to make calls to different monitors? o Should the monitor lock be released before such a call?  Which kinds of monitor procedures do not need to acquire/release the monitor lock, and why?

5 CS533 - Concepts of Operating Systems 5 Questions  How does non-preemptive scheduling solve concurrency problems? o What problem does it have on multiprocessors? o What problem does I/O present? o Why are page faults a problem for this approach?  How can mutual exclusion in a monitor be enforced? o … on uniprocessors and multiprocessors?

6 CS533 - Concepts of Operating Systems 6 Questions  Mesa operates in an environment that doesn’t use hardware protection o How does this affect the cost of monitor operations?  How is processes creation in Mesa similar to thread creation in Pthreads? o Why join? o Why detatch? o Why might you still use p after calling Detach[p]? o What dangling reference problems can arise with process pointers?

7 CS533 - Concepts of Operating Systems 7 Questions  What is the difference between Hoare’s semantics for wait/signal and Mesa’s wait/notify? o What invariants can be assumed in each case? o What implications does this have for code surrounding a wait call?  What is the advantage of Hoare’s semantics for wait/signal vs Mesa’s wait/notify? o Why do Hoare semantics require more context switches?

8 CS533 - Concepts of Operating Systems 8 Questions  What are the advantages of Mesa’s wait/notify semantics? o In what way does it enable the use of timeouts? o In what way does it encourage the use of broadcast?

9 CS533 - Concepts of Operating Systems 9 Questions  How can devices make monitor calls? o If a device can’t wait on the monitor lock, how can it update monitor state? o What is a naked notify, and who is waiting on it? o Why is a wakeup-waiting switch needed with naked notifies?

10 CS533 - Concepts of Operating Systems 10 Questions  Why implement process creation as a monitor? o How is fork implemented? o How are join and end implemented?  Why is fork/join so expensive compared to other operations?

11 CS533 - Concepts of Operating Systems 11 Reminder  Check that you have been assigned a paper to present!  Please mail me your presentation slides to put on the web page  The next paper is work in progress, presented by me


Download ppt "CS533 - Concepts of Operating Systems 1 Class Discussion."

Similar presentations


Ads by Google