views:

52

answers:

1

Can someone give me an easy to understand definition of kernel thread dispatching or just thread dispatching if there's no difference between the two?

From what I understand it's just doing a context switch while the currently active thread waits on a lock from another thread, so the CPU goes and does something else while this thread is in blocking mode.

I might however have misunderstood.

+4  A: 

It's basically the process by which the operating system determines which of the many active threads is sent (dispatched) to the CPU for processing at any given point.

Each operating system has its own implementation, but the basic concept is to keep a sorted list of threads by priority, and dispatch them as needed to the CPU. Time slicing is added to allow multiple programs to run concurrently, etc.

Berkeley's CS dept. has a nice lecture on the subject available to watch online - it covers all of these concepts, and is just over 1 hour long.

Reed Copsey