1 / 7

CS533 Concepts of Operating Systems Class 6

CS533 Concepts of Operating Systems Class 6. The Duality of Threads and Events. Questions. How does Knot address context switch overhead? What implications does this have for preemption? Are synchronization primitives needed in Knot? Are they needed in event-based systems?

liam
Download Presentation

CS533 Concepts of Operating Systems Class 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS533 Concepts of Operating SystemsClass 6 The Duality of Threads and Events

  2. Questions • How does Knot address context switch overhead? • What implications does this have for preemption? • Are synchronization primitives needed in Knot? • Are they needed in event-based systems? • How much do they cost? • Why does Knot need asynchronous I/O calls? • How are they used? • How is I/O return handled? … and what does this remind you off? CS533 - Concepts of Operating Systems

  3. Questions • Are event-based and multi-threaded programming really duals of each other? • How does message communication map to procedure call/return? • Synchronous message passing • Asynchronous message passing • Are they the same underneath? • How would you implement message passing? • How would you implement procedure calling? • Fundamental tasks: • execute new instruction stream • exchange data CS533 - Concepts of Operating Systems

  4. Questions • What is the costs of pushing state onto the stack and popping it off, vs the cost of allocating copying then freeing message memory? • How would you optimize context switch costs for local message passing? • How would you optimize data movement costs for local message passing? • What conventions would you need to follow to avoid needing synchronization? • How does this compare to local state management in procedure calling? • How might you optimize pointer passing? • What does this remind you of? CS533 - Concepts of Operating Systems

  5. Questions • Is threading just an automated “pattern” of context switch and data exchange that is done manually in event models? • Do the two models have equal memory consumption? • Did it matter before, and does it today? • Is over-allocation of memory inevitable in thread-based systems? • If not, how can you avoid it … and at what cost? CS533 - Concepts of Operating Systems

  6. Questions • Do both models present the same scheduling choices? • Do they have the same locality of reference behavior? • Does this matter? • Can you do “batching” in both models? • Are both models equivalent with respect to dynamic allocation of hardware resources (CPUs)? • Are both models equivalent with respect to maintaining processor affinity? • Is it better to maintain good code locality or good data locality? CS533 - Concepts of Operating Systems

  7. Reminder • Class 7 presenters • Discuss your presentation plans with me ahead of time • Mail me the final version of your slides BEFORE the class CS533 - Concepts of Operating Systems

More Related