Scheduler Activations : Effective Kernel Support for the User-Level Management of Parallelism 陳建村 [email protected] Reference z Anderson,T.,Bershad,B.,Lazowska,E.,and Levy,H.,"Scheduler Activations:Effective Kernel Support for the User-Level Management of Parallelism", ACM Transactions on Computer Systems,Vol.10,.No.1,February 1992,pp.53-79. Outline z z z z z z Motivation Solution Example Performance Conclusion Q&A Motivation z User-level threads – – z good performance and flexibility Thread behavior can be distorted by OS activity (scheduling, I/O, etc) Kernel threads – Worse performance and poor flexibility but not as restricted Motivation (cont.) z Kernel thread used by programmer – Poor performance and poor flexibility z z z Cost of accessing thread management operation The cost of generality User-level thread on top of kernel thread – Poor behavior, because I/O, multiprogramming => SOLVE THIS PROGRMAS Motivation (cont.) z Source of poor integration user thread & kernel thread – – z Kernel threads block, resume, and are preempted without notification to the user level Kernel threads are scheduled obliviously with respect to the user-level thread Solve – New kernel interface between kernel and user-level thread Scheduler Activation Solution Design goal z Combine the functionality of the kernel threads with performance and flexibility of user-level thread The difficulty in achieving the goals z The necessary control and scheduling information is distributed between the kernel and each application’s address space The Approach z Scheduler activations – – – It serves as a execution context, for running userlevel threads, in exactly the same way that a kernel thread does It notifies the user-level thread system of a kernel event It provides space in the kernel for saving the processor context of the activation’s current userlevel thread, when the thread is stopped by the kernel Key Characteristics of Scheduler Activations z z z z Processors are allocated to job’s by the kernel A user-level thread scheduler controls which threads run on a job’s allocated processors The user-level notifies the kernel of changing demand for processors The kernel notifies the user-level scheduler of system events that affect the job Key Characteristics of Scheduler Activations z z The kernel never time-slices scheduler activations Application programs can remain unmodified Scheduler Activation z z z Vectored events cause user-level scheduler to reconsider its scheduling Execution context for running user threads Notify the user-level thread of a kernel events – upcall – – – – Add this processor Processor has been preempted Scheduler activation has blocked Scheduler activation has unblocked Scheduler Activation (cont.) Create new scheduler activation Upcall by using new scheduler activation Kernel Event (above list) User-level scheduler decide Scheduler Activation (cont.) z Notifying the kernel of user-level events – Small subsets of user-level operation affects Processor Allocation z z Add more processors This processors is idle Scheduler Activation (cont.) Critical SectionRecovery method used 2-2 Put thread back on the ready list no Check is thread in critical section ? yes 1 4 upcall 0 2-1 Temporarily continue via user-level context switch If complete,relinquish control back 3 Example : I/O request/completion Performance Thread Operation Latencies (μsec) Speedup of N-Body application versus number of processors, 100% of memory available Execution time of N-Body application versus amount of available memory, 6 processor Speedup of N-Body application, Multiprogramming Level = 2, 6 Processors, 100% of memory available Conclusion z It solve user-level thread and kernel thread integration problems by new kernel interface – scheduler activation – – – – Processor allocation is done by kernel Thread scheduling is done by each address space The kernel notifies the address space thread scheduler of every event affecting the address space The address space notifies the kernel of the sub set of userlevel events that can affect processor allocation decisions Q&A Note User-Level Threads On Top of Scheduler Activations user-level threads user-level scheduling blocked active user kernel scheduler activation kernel-level scheduling physical processor blocked active
© Copyright 2026 Paperzz