CS533 Concepts of Operating Systems Class 3 - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

CS533 Concepts of Operating Systems Class 3

Description:

CS533 Concepts of Operating Systems Class 3 Monitors – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 15
Provided by: walpole
Learn more at: http://www.cs.pdx.edu
Category:

less

Transcript and Presenter's Notes

Title: CS533 Concepts of Operating Systems Class 3


1
CS533 Concepts of Operating SystemsClass 3
  • Monitors

2
Questions
  • Which multi-threaded programming problems do
    monitors address?
  • Are monitors useful as a programming convention,
    i.e., without compiler support?
  • What is the convention?
  • With compiler support for monitors, what are the
    important tasks of the compiler?
  • How does encapsulation help with synchronization?
  • How can mutual exclusion in a monitor be
    enforced?
  • on uniprocessors and multiprocessors?

3
Questions
  • Do monitors solve the deadlock problem?
  • Why restrict signal to affect only waiting
    processes in the same monitor?
  • Why hand-off the resource directly from the
    signaling process to the signaled waiting
    process?
  • What is the advantage of restricting signal calls
    to be the last statement of a monitor procedure?
  • What implications does this have for assumptions
    that can be made by processes waking up from a
    wait?

4
Questions
  • 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)?
  • How might the queuing discipline for waiting
    processes avoid starvation?

5
Questions
  • In Hoares bounded buffer example, he assumes
    that the time taken to produce or consume is very
    large in comparison with the time taken to append
    or remove an item from a list
  • What are the implications of this?
  • Are there similar assumptions in the
    readers/writers example?

6
Questions
  • What are the implications of allowing monitor
    calls to make calls to different monitors?
  • Which kinds of monitor procedures do not need to
    acquire/release the monitor lock?

7
Questions
  • How does non-preemption solve concurrency
    problems?
  • What problem does it have on multiprocessors?
  • What problem does I/O present?
  • What problem does page faults present?

8
Questions
  • Mesa operates in an environment that doesnt use
    hardware protection
  • What are the implications for the cost of monitor
    operations?
  • How is processes creation in Mesa similar to
    thread creation in Pthreads?
  • Why join?
  • Why detatch?
  • Why might you still use p after calling Detachp?

9
Questions
  • How is handling exceptions in root procedures of
    processes more complicated than in normal Mesa
    procedures?
  • What issues arise when an exception is generated
    within a monitor procedure?
  • What does UNWIND do in Mesa?

10
Questions
  • What is the difference between Hoares semantics
    for wait/signal and Mesas wait/notify?
  • What invariants can be assumed in each case?
  • What implications does this have for code
    surrounding a wait call?
  • What is the advantage of Hoares semantics for
    wait/signal vs Mesas wait/notify?
  • Why do Hoare semantics require more context
    switches?
  • Why do they require the signaling mechanism to be
    reliable?

11
Questions
  • What are the advantages of Mesas wait/notify
    semantics?
  • Why does it help to enable timeouts for waiting
    processes?
  • Why does it help to enable broadcast?
  • Why is Mesas use of broadcast encouraged by
    their use of compiler-supported protection in a
    single user environment?

12
Questions
  • How might you use monitors for I/O
  • Can interrupts be treated as signals?
  • What if no process was waiting?
  • How can devices make monitor calls?
  • If a device cant wait on the monitor lock, how
    can it update monitor state?
  • What is a naked notify, and who is waiting on it?
  • Why is a wakeup-waiting switch needed with naked
    notifies?

13
Questions
  • Why implement process creation as a monitor?
  • How is fork implemented?
  • How are join and end implemented?
  • Why is fork/join so expensive compared to other
    operations?

14
Reminder
  • Please mail me your slides to put on the web page
  • The next paper is work in progress, presented by
    Paul McKenney of IBM.
Write a Comment
User Comments (0)
About PowerShow.com