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

3 CS533 - Concepts of Operating Systems 3 Questions  Should the choice depend on the underlying architecture? o What does this mean anyway?  Is the cost of synchronization for sharing in-place in thread models the same as the cost of copying for message passing models? o Does hardware provide better support for one than the other?

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 local message passing? o What conventions would you need to follow to avoid needing synchronization? o How does this compare to local state 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 memory management 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?

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?  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 Questions  What are the relative levels of abstraction for o Threads/procedures o Events/messages o Monitors  What is the relationship between design patterns and programming language support for a model?

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