#### Scheduling Priority Attribute

The scheduling priority attribute specifies the execution of a thread. This attribute is expressed relative to other threads on a continuum of minimum to maximum for each scheduling policy. A thread's priority falls within one of the following ranges, which are implementation defined:

· PRI_FIFO_MIN to PRI_FIFO_MAX

· PRI_RR_MIN to PRI_RR_MAX

· PRI_OTHER_MIN to PRI_OTHER_MAX

· PRI_FG_MIN_NP to PRI_FG_MAX_NP

· PRI_BG_MIN_NP to PRI_BG_MAX_NP

The following two methods are used to set the scheduling priority attribute:

· Set the scheduling priority attribute in the attributes object, which establishes the execution priority of a new thread when it is created. To do this, call the pthread_attr_setprio( ) routine.

· Change the scheduling priority attribute of an existing thread by calling the pthread_setprio( ) routine. (Call the pthread_setscheduler( ) routine to change both the scheduling priority and scheduling policy of an existing thread.)

####