Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.

Similar presentations


Presentation on theme: "CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events."— Presentation transcript:

1 CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events

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

3 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? o Synchronous message passing o Asynchronous message passing  Are they the same underneath? o How would you implement message passing? o How would you implement procedure calling? o Fundamental tasks: execute new instruction stream exchange data

4 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? o How would you optimize context switch costs for local message passing? o How would you optimize data movement costs for local message passing? o What conventions would you need to follow to avoid needing synchronization? o How does this compare to local state management in procedure calling? o How might you optimize pointer passing? o What does this remind you of?

5 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? o Did it matter before, and does it today? o Is over-allocation of memory inevitable in thread-based systems? If not, how can you avoid it … and at what cost?

6 CS533 - Concepts of Operating Systems 6 Questions  Do both models present the same scheduling choices? o Do they have the same locality of reference behavior? o Does this matter? o 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? o Is it better to maintain good code locality or good data locality?

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


Download ppt "CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events."

Similar presentations


Ads by Google