Thread Scheduling


Scheduling Scope

int pthread_attr_getscope(pthread_attr_t * attr, int * scope);

int pthread_attr_setscope(pthread_attr_t * attr, int scope);


Policy and Priority

int pthread_attr_getschedpolicy(pthread_attr_t * attr, int * policy);

int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);

int pthread_attr_getschedparam(pthread_attr_t * attr, struct sched_param * param);

int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param * param);
int pthread_getschedparam(pthread_t, int * policy, struct sched_param * param);

int pthread_setschedparam(pthread_t, int * policy, struct sched_param * param);


Struct sched_param

struct sched_param {
	int sched_priority;
	...
};

int sched_get_priority_max(int);

int sched_get_priority_min(int);


Yield

int sched_yield(void);


Scheduling Inheritance

int pthread_attr_getinheritsched(pthread_attr_t *, int * inherit);

int pthread_attr_setinheritsched(pthread_attr_t *, int inherit);


[TOP] [BACK] [FORWARD]


Prepared by Chris Provenzano (proven@mit.edu)