Upload
kieran-shaffer
View
23
Download
0
Embed Size (px)
DESCRIPTION
CS533 Concepts of Operating Systems Class 7. Integrated Task and Stack Management. Questions. What do these terms mean? process, thread, kernel-level thread, user-level thread, fiber? user-level thread stack, user stack, kernel stack? Address space?. Questions. - PowerPoint PPT Presentation
Citation preview
CS533 Concepts of Operating Systems
Class 7
Integrated Task and Stack Management
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?
CS533 - Concepts of Operating Systems 3
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 How does this approach behave during page-faults?o Does this matter?o Can it deal with preemptions?
Do user-level thread libraries do “stack ripping”?
CS533 - Concepts of Operating Systems 4
Questions
In what way are user-level threads “faster” than kernel-level threads?
o Aren’t we just layering abstractions on abstractions?
Why can’t you do preemptive user-level thread scheduling without special kernel support?
o Does this mean you can only do sequential task management?
o Can you do cooperative task management?o How?
CS533 - Concepts of Operating Systems 5
Questions
Is synchronization needed for cooperative user-level scheduling on uniprocessors?
o What precautions must you take?o Is synchronization needed on multiprocessors?
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?
CS533 - Concepts of Operating Systems 6
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?o How is time managed?
What similarities do kernel-provided scheduler activations have to hardware-provided interrupts?
CS533 - Concepts of Operating Systems 7
Questions
What synchronization-related issues do you have to worry about when writing an interrupt handler?
o What about a scheduler activation handler?
Why must the user-level thread library be reentrant?
o How is its pattern of entry points and synchronization concerns similar to OS kernel code?
CS533 - Concepts of Operating Systems 8
Questions
How might a scheduler activation handler deadlock?
o What would a prevention-based solution look like?o What problems would it have?o What would a recovery-based solution look like?o What problems would it have?
Why does the kernel delay delivery of a second page-fault SA until the first page-fault SA on the same address has completed?
CS533 - Concepts of Operating Systems 9
Questions
What happens immediately following I/O completion if the calling thread still has more kernel code to execute?
In what ways do scheduler activations mix manual and automatic stack management models?
o Are they a translation point / boundary between the two models?
CS533 - Concepts of Operating Systems 10
Reminder
Class 8 presenterso Discuss your presentation plans with me ahead of timeo Mail me the final version of your slides BEFORE the
class