Figure 10-1 illustrates the relationship between LWPs and the user and kernel levels.
The user-level threads library, with help from the programmer and the operating environment, ensures that the number of LWPs available is adequate for the currently active user-level threads. However, there is no one-to-one mapping between user threads and LWPs, and user-level threads can freely migrate from one LWP to another.
With Solaris threads, a programmer can tell the threads library how many threads should be "running" at the same time.
For example, if the programmer says that up to three threads should run at the same time, then at least three LWPs should be available. If there are three available processors, the threads run in parallel. If there is only one processor, then the operating environment multiplexes the three LWPs on that one processor. If all the LWPs block, the threads library adds another LWP to the pool.
The operating environment decides which LWP should run on which processor and when. It has no knowledge about what user threads are or how many are active in each process.