C-Threads -- user-level threads for Mach
-
This user thread package contains 6 calls for the thread management (create, exit, join, detach, yield and self).
-
Similarly to the DCE package, C-Threads offer mutexes and conditional variables for synchronization. Their semantics and syntax is also very similar to the DCE threads.
-
C-Threads had many different implementations on Mach. It has been ported to other Operating Systems too. We briefly inspect two implementation based on the Mach kernel thread support:
-
In the first implementation, C-Threads were managed entirely in the user space. For each C-Thread process, there was one Mach kernel thread. This solution suffered from a known problem -- blocking the whole process on a blocking operation called by one thread.
-
A second approach, mapped 1-to-1 all C-Threads onto Mach kernel threads. The threads were then scheduled preemptively, taking advantage of the multiprocessor hardware.
|