When a bound thread blocks on a synchronization variable, its LWP must also stop running. The
LWP does so by making a system call that puts it to sleep. When the synchronization variable is
released, the thread must be awakened. This is done by making a system call to wake up the LWP.
The LWP then wakes up, and the thread resumes running. Much the same thing happens when a
locally scheduled thread blocks on a cross-process synchronization variable. In both cases the
LWP goes to sleep in the kernel until the synchronization variable is released. This description is
pretty much the same for Win32. Only the names are different.
System Contention Scope
An SCS thread is nothing more than a typical thread that is permanently bound to a specific LWP.
The LWP runs only that thread and that thread runs only on that LWP. This means that this thread
is never merely runnable, waiting for an LWP. It is always on an LWP, and that LWP is either
sleeping on a synchronization variable, suspended, or active (Figure 5-4).
Figure 5-4. Some System Contention Scope Threads in Various States
Win32 has only SCS scheduling, and it is handled completely by the normal kernel scheduler.
There are a number of different scheduling classes for the different operating systems (batch, time
Search WWH :
Custom Search
Previous Page
Multithreaded Programming with JAVA - Topic Index
Next Page
Multithreaded Programming with JAVA - Bookmarks