CS533 Concepts of Operating Systems Class 3 Monitors.

Slides:



Advertisements
Similar presentations
Operating Systems ECE344 Midterm review Ding Yuan
Advertisements

CAS3SH3 Midterm Review. The midterm 50 min, Friday, Feb 27 th Materials through CPU scheduling closed book, closed note Types of questions: True & False,
CS533 - Concepts of Operating Systems 1 Presentation Summary of “Experiences with Processes and Monitors in Mesa” By Burke Ellett.
Cpr E 308 Spring 2004 Recap for Midterm Introductory Material What belongs in the OS, what doesn’t? Basic Understanding of Hardware, Memory Hierarchy.
CS533 Concepts of Operating Systems Class 5 Integrated Task and Stack Management.
“THREADS CANNOT BE IMPLEMENTED AS A LIBRARY” HANS-J. BOEHM, HP LABS Presented by Seema Saijpaul CS-510.
Chapter 5 Processes and Threads Copyright © 2008.
CS533 Concepts of Operating Systems Class 8 Remote Procedure Call & LRPC.
1 CS318 Project #3 Preemptive Kernel. 2 Continuing from Project 2 Project 2 involved: Context Switch Stack Manipulation Saving State Moving between threads,
5.6 Semaphores Semaphores –Software construct that can be used to enforce mutual exclusion –Contains a protected variable Can be accessed only via wait.
CS533 Concepts of Operating Systems Class 3 Monitors.
1 Concurrent and Distributed Systems Introduction 8 lectures on concurrency control in centralised systems - interaction of components in main memory -
CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.
Monitors CSCI 444/544 Operating Systems Fall 2008.
CS533 Concepts of Operating Systems Class 7 Integrated Task and Stack Management.
Concurrency, Threads, and Events Robbert van Renesse.
CS533 Concepts of Operating Systems Class 3 Monitors.
CS533 - Concepts of Operating Systems 1 CS533 Concepts of Operating Systems Class 8 Synchronization on Multiprocessors.
CS533 - Concepts of Operating Systems 1 Class Discussion.
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.
CS 3013 & CS 502 Summer 2006 Threads1 CS-3013 & CS-502 Summer 2006.
On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni.
CS533 Concepts of Operating Systems Class 14 Extensible Virtual Memory Management.
Synchronization CSCI 444/544 Operating Systems Fall 2008.
Monitors: An Operating System Structuring Concept
Monitor  Giving credit where it is due:  The lecture notes are borrowed from Dr. I-Ling Yen at University of Texas at Dallas  I have modified them and.
CS510 Concurrent Systems Introduction to Concurrency.
Experience with Processes and Monitors in Mesa
CS 153 Design of Operating Systems Spring 2015 Midterm Review.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
Midterm 1 – Wednesday, June 4  Chapters 1-3: understand material as it relates to concepts covered  Chapter 4 - Processes: 4.1 Process Concept 4.2 Process.
Chapter 1 Computer System Overview Sections 1.1 to 1.6 Instruction exe cution Interrupt Memory hierarchy Cache memory Locality: spatial and temporal Problem.
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
CS533 - Concepts of Operating Systems 1 On The Duality of Operating System Structures Hugh Lauer, Xerox Roger Needham, Cambridge University 1979 Presented.
CSC321 Concurrent Programming: §5 Monitors 1 Section 5 Monitors.
CSE 451: Operating Systems Section 5 Midterm review.
Monitors: An Operating System Structuring Concept Paper by: C. A. R. Hoare Presented by: Sabrina Brick.
CS399 New Beginnings Jonathan Walpole. 2 Concurrent Programming & Synchronization Primitives.
Problems with Semaphores Used for 2 independent purposes –Mutual exclusion –Condition synchronization Hard to get right –Small mistake easily leads to.
CS533 – Spring Jeanie M. Schwenk Experiences and Processes and Monitors with Mesa What is Mesa? “Mesa is a strongly typed, block structured programming.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles Synchronization Emery Berger and Mark Corner University.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
CS533 Concepts of Operating Systems Class 2a Monitors.
CS510 Concurrent Systems Jonathan Walpole. Introduction to Concurrency.
© 2004, D. J. Foreman 1 Monitors and Inter-Process Communication.
© 2004, D. J. Foreman 1 Monitors and Inter-Process Communication.
CS162 Section 2. True/False A thread needs to own a semaphore, meaning the thread has called semaphore.P(), before it can call semaphore.V() False: Any.
CS 6560: Operating Systems Design
CS703 – Advanced Operating Systems
CS533 Concepts of Operating Systems Class 3
Jonathan Walpole Computer Science Portland State University
CS510 Operating System Foundations
CS533 Concepts of Operating Systems Class 10
COMS Prelim 1 Review Session
Sarah Diesburg Operating Systems CS 3430
Mutual Exclusion.
Operating Systems Lecture 1.
CS533 Concepts of Operating Systems Class 3
February 5, 2004 Adrienne Noble
CSE 153 Design of Operating Systems Winter 19
CS333 Intro to Operating Systems
CS533 Concepts of Operating Systems Class 14
CS703 – Advanced Operating Systems
CSE 153 Design of Operating Systems Winter 2019
Monitors and Inter-Process Communication
EECE.4810/EECE.5730 Operating Systems
Threads CSE 2431: Introduction to Operating Systems
Sarah Diesburg Operating Systems CS 3430
Presentation transcript:

CS533 Concepts of Operating Systems Class 3 Monitors

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?

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)?

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?

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?

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?

CS533 - Concepts of Operating Systems 7 Questions  How is handling exceptions in root procedures of Mesa processes more complicated than in normal Mesa procedures?  What issues arise when an exception is generated within a monitor procedure? o What does UNWIND do in Mesa?

CS533 - Concepts of Operating Systems 8 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?

CS533 - Concepts of Operating Systems 9 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?

CS533 - Concepts of Operating Systems 10 Questions  How might you use monitors for I/O o Can interrupts be treated as signals? o What if no process was waiting?  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?

CS533 - Concepts of Operating Systems 11 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?

CS533 - Concepts of Operating Systems 12 Reminder  Please mail me your slides to put on the web page  The next paper is work in progress, presented by me