Tech Off Post

Single Post Permalink

View Thread: UMS: How does the scheduler shuffle the tasks on threads?
  • User profile image


    After watching the Dave Probert's video about UMS I've kept wondering: how can the task be so easily switched on and off the underlying thread?

    The standard way that everything worked (afaik) is that registers values, stack and TLS (context) were tightly connected to the user thread. The kernel thread had analogous context on its side, so I assume this is the reason it's impossible to switch the context in the thread.

    So how does the UMS switch the tasks on one thread? How does it handle the task context switch? How do the synchronization primitives (mutex, semaphore) work in this case, when the unit of execution is not a thread (to which they are implicitly bound, I guess) but the task?

    I would be grateful to anyone who could shed light on this.