★ User-Level Implementation ¥ 斗 ★★ o How do we solve the problem of blocking thread blocks the whole process? o Modifying system calls to be unblocking o Write a wrap around blocking calls i. e. call only when it is safe to do so
31 User-Level Implementation How do we solve the problem of blocking thread blocks the whole process? Modifying system calls to be unblocking Write a wrap around blocking calls – i.e. call only when it is safe to do so
★ Scheduler activations ¥ 斗 ★★ o A technique that solves the problem of blocking calls in user-evel threads o Method: use up-call o Goal -mimic functionality of kernel threads gain performance of user space threads
32 Scheduler Activations A technique that solves the problem of blocking calls in user-level threads Method: use up-call Goal – mimic functionality of kernel threads – gain performance of user space threads
★ Scheduler activations ¥ 斗 ★★ o Kernel assigns virtual processors to process o Runtime sys. allocate threads to processors o Blocking threads are handled by os upcall i.e. OS notify runtime system about blocking calls
33 Scheduler Activations Kernel assigns virtual processors to process Runtime sys. allocate threads to processors Blocking threads are handled by OS upcall – i.e. OS notify runtime system about blocking calls
★ Scheduler activations ¥ 斗 ★★ s Problem. o Reliance on kernel (lower layer) calling procedures in user space(higher layer) o Violates layered structure of os design
34 Scheduler Activations Problem: Reliance on kernel (lower layer) calling procedures in user space (higher layer) Violates layered structure of OS design
★ Hybrid Implementation ¥ 斗 ★★ o Can we have the best of both worlds i.e. kernel-level and user-level implementations o While avoiding the problems of either? o Hybrid implementation
35 Hybrid Implementation Can we have the best of both worlds – i.e. kernel-level and user-level implementations While avoiding the problems of either? Hybrid implementation