Effective Kernel Support for the User-Effective Kernel Support for the User-
Level Management of ParallelismLevel Management of Parallelism
Ashay Thool, Tushar PatilAshay Thool, Tushar Patil
Kernel Level Threads
Advantages :Advantages :
– No System Integration Issues
– High functionality
Disadvantages :Disadvantages :
– Poor performance
– Less flexible
– Not Application specific
– ULT > KLT >Process
Approach To Solution
Application controls running of threads
Kernel controls processor allocations.
Communicating Upward all the kernel
Communicating Downward selective events
Goal – mimic functionality of kernel threadsGoal – mimic functionality of kernel threads
– gain performance of user space threads
Avoids unnecessary user/kernel transitionsAvoids unnecessary user/kernel transitions
Kernel assigns virtual processors to each processKernel assigns virtual processors to each process
– let runtime system allocate threads to processors
– Fundamental reliance on kernel (lower layer)
– calling procedures in user space (higher layer)
Policy for Processor Allocation
No processor idles if there is runnable thread.No processor idles if there is runnable thread.
Processors are divided evenly among address spaces.Processors are divided evenly among address spaces.
At user level, Kernel get notified under 2 circumstances:At user level, Kernel get notified under 2 circumstances:
– When number of runnable threads are more than processor
– When number of processor available are more than threads.
Kernel use above hints to manage processor allocation toKernel use above hints to manage processor allocation to
Added to Topaz kernel thread managementAdded to Topaz kernel thread management
– Manage and execute upcalls instead of own scheduling.
– Straighforward processor allocation in the address
Modified Fast Thread package for user levelModified Fast Thread package for user level
– Process Upcalls
– Resume interrupted critical section
– Manage process information and pass it to Topaz
Handling Critical Section
There are two approaches to deal inopportuneThere are two approaches to deal inopportune
- It requires the kernel to yield control over processor
allocation (at least temporarily) to the user-level,
violating the semantics of address space priorities.
- Checks for thread preempted or unblocked and
temporarily continues at user level context switch.
We ensure that once a lock is acquired, it is always
eventually released, even in the presence of
processor preemption or page faults.
Thread performance without Topaz kernel isThread performance without Topaz kernel is
similar to the Fast thread pacakage beforsimilar to the Fast thread pacakage befor
Upcall PerformanceUpcall Performance
– Worst than Topaz kernel thread.
– Not in sync.
Application performanceApplication performance
– Negligible I/O: Fast as original FastThreads.
– With I/O: Manages and Performs better than either
FastThreads or Topaz threads.
Our prototype implements threads as theOur prototype implements threads as the
concurrency abstraction supported at the userconcurrency abstraction supported at the user
level, scheduler activations are not linked tolevel, scheduler activations are not linked to
any particular model; scheduler activations canany particular model; scheduler activations can
support any user-level concurrency modelsupport any user-level concurrency model
because the kernel has no knowledge of user-because the kernel has no knowledge of user-
level data structures.level data structures.