cs533 concepts of operating systems
play

CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based - PowerPoint PPT Presentation

CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming Questions Why are threads lightweight? Why block instead of spin waiting for a mutex? If a mutex is a resource scheduling mechanism o What is the


  1. CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming

  2. Questions  Why are threads “lightweight”?  Why block instead of spin waiting for a mutex?  If a mutex is a resource scheduling mechanism o What is the resource being scheduled? o What is the scheduling policy and where is it defined?  What is coarse-grain locking? o What effect does it have on program complexity? o What effect does it have on performance? 2 2 CS533 - Concepts of Operating Systems CS533 - Concepts of Operating Systems

  3. Questions  What is “lock contention”? o Why is it worse on multiprocessors than uniprocessors? o What is the solution? … and its cost?  What else might cause performance to degrade when you use multiple threads?  Why is multithreaded programming hard? 3 3 CS533 - Concepts of Operating Systems CS533 - Concepts of Operating Systems

  4. Which style is used in modern OSs?  Are modern operating systems (such as Linux) written in an event-based or multi-threaded style?  How does event-based programming relate to interrupt handling?  Where is the boundary between interrupt handling and thread execution? o How does this affect the approaches used for synchronization? 4 CS533 - Concepts of Operating Systems

  5. Concurrent Computation vs Concurrent Blocking  How is the CPU scheduled: o In an event-based system? o In a thread-based system?  How is live state managed across blocking I/O calls: o In an event-based system? o In a thread-based system? 5 CS533 - Concepts of Operating Systems

  6. Managing Highly Concurrent I/O  What is the problem with making thread allocation decisions statically? o What is the Slashdot effect?  Why is multi-threading not a good match for massive concurrency? o Is web service embarrassingly parallel? o What is the problem with the thread-per request model? o Why does the event handling model help? 6 CS533 - Concepts of Operating Systems

  7. Questions  What is a thread pool?  Why do the following techniques help during heavy load? o Thread pool resizing o Event batching o Adaptive load shedding  Why does pipeline parallelism scale well? o Thread per stage vs thread per request  What does it mean for a service to be “well conditioned”? 7 CS533 - Concepts of Operating Systems

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend