next up previous
Next: Linx threads Up: Threads Previous: Threads

Solaris threads

The best digram to describe the Solaris thread architecture is so called ``Doctor Ruth'' diagram, in which user threads can be bound to LWP, and every LWP will be bound to a kernel thread, which is basic schedule unit by kernel. LWP basically is just a data structure to store the thread state, such as regiester set. Thus the proc structure has a linked list of LWP structures, each of which represents a thread within the process.
M user threads can be bound to N LWPs; The benifit of MxN model is the user thread context switch doesn't need to involve the kernel, thus be less costly. However the resutl shows for most application 1x1 model, which is much simple in implemenation (e.g. Signal handler) , has a better performance than the general MxN model. Therefore Solaris has changed its thread model from NxM to 1x1. Solaris 8 and 9 only support NxM now. See more detail
From Solaris 10, the OS is totally CMT awared, See more detail



Wei Lu 2007-11-06