BLOGGER TEMPLATES AND TWITTER BACKGROUNDS

Thursday, August 13, 2009

Thread Scheduling

Threads can be scheduled, and the threads library provides several facilities to handle and control the scheduling of threads. It also provides facilities to control the scheduling of threads during synchronization operations such as locking a mutex. Each thread has its own set of scheduling parameters. These parameters can be set using the thread attributes object before the thread is created. The parameters can also be dynamically set during the thread's execution.
Controlling the scheduling of a thread can be a complicated task. Because the scheduler handles all threads systemwide, the scheduling parameters of a thread interact with those of all other threads in the process and in the other processes. The following facilities are the first to be used if you want to control the scheduling of a thread.

The threads library allows the programmer to control the execution scheduling of the threads in the following ways:
By setting scheduling attributes when creating a thread
By dynamically changing the scheduling attributes of a created thread
By defining the effect of a mutex on the thread's scheduling when creating a mutex (known as synchronization scheduling)
By dynamically changing the scheduling of a thread during synchronization operations (known as synchronization scheduling)

0 comments: