Download presentation
Presentation is loading. Please wait.
1
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management
2
CS533 - Concepts of Operating Systems 2 Questions What do these terms mean? o process, thread, kernel-level thread, user-level thread, fiber? o user-level thread stack, user stack, kernel stack? o Address space? In what way are user-level threads “faster” than kernel-level threads? o Aren’t we just layering abstractions on abstractions?
3
CS533 - Concepts of Operating Systems 3 Questions How are synchronization operations such as spin- locks and semaphores implemented, i.e., how do you spin and how do you block? o For user level threads? o For kernel level threads? Why can’t you do preemptive user-level thread scheduling without special kernel (or language runtime) support?
4
CS533 - Concepts of Operating Systems 4 Questions How might a user-level thread library support synchronous I/O calls for its threads without losing control of the CPU due to blocking? o Does this constitute stack ripping? Why can’t you handle page-faults this way? Why are preemptions of kernel threads a problem for user level thread libraries?
5
CS533 - Concepts of Operating Systems 5 Questions What stack management model do most OS kernels export? o How are I/O and page faults events handled? What differences are there between virtual CPUs (threads) and real CPUs (hardware)? o How are I/O and page fault events handled by code on a real CPU vs on a virtual CPU? What similarities do kernel-provided scheduler activations have to hardware-provided interrupts?
6
CS533 - Concepts of Operating Systems 6 Questions What synchronization-related issues do you have to worry about when writing an interrupt handler? o Do these occur with scheduler activation handlers? Why must the user-level thread library be reentrant? o How is its pattern of entry points and synchronization concerns similar to or different from kernel-level scheduler code? With scheduler activations and without scheduler activations
7
CS533 - Concepts of Operating Systems 7 Questions Why does the kernel delay delivery of a second page-fault SA until the first page-fault SA on the same address has completed? Why might a user level thread scheduler choose to delay context switching a user level thread that is holding a spin lock? o How can it do this in the presence of kernel preemption and notification via scheduler activations?
8
CS533 - Concepts of Operating Systems 8 Questions In what ways do scheduler activations mix manual and automatic stack management models?
9
CS533 - Concepts of Operating Systems 9 Duality What really happens underneath the abstraction? o For synchronous procedure calling and message passing o For asynchronous procedure calling and message passing Fundamental tasks: execute new instruction stream exchange data What is the cost of pushing state onto the stack and popping it off, vs the cost of allocating copying then freeing message memory?
10
CS533 - Concepts of Operating Systems 10 Optimizations Discussed in Future Classes How could you optimize context switch costs for local message passing? How could 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 approach compare to local state management in procedure calling? How might you further optimize pointer passing? o … and what does this remind you of? Hint: SP.
11
CS533 - Concepts of Operating Systems 11 Duality 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 Is over-allocation of memory inevitable in thread-based systems? If not, how can you avoid it … and at what cost?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.