patbalbe@disca.upv.es
P.
Balbastre
2002-11-06
pthread_attr_setinitbudget_np
3rtl
pthread_attr_setinitbudget_np
pthread_attr_getinitbudget_np
examine and change the initbudget thread attribute
#include <rtl_sched.h>
int pthread_attr_setinitbudget_np
pthread_attr_t *thread
hrtime_t initbudget
int pthread_attr_getinitbudget_np
pthread_attr_t *thread
hrtime_t *initbudget
DESCRIPTION
This function is a non-portable Real-Time Linux extension.
pthread_attr_setinitbudget_np() and
pthread_attr_getinitbudget_np() function set and
get the initbudget parameter of attr structure.
Before calling these functions, structure pointed by attr must be
initialized by calling pthread_attr_init().
The initbudget parameter is defined for those threads
whose scheduling policy is SCHED_CBS_NP.
SCHED_CBS_NP scheduling policy efficiently handle soft real-time
requests with a variable or unknown execution behaviour under EDF (SCHED_EDF_NP)
scheduling policy. To avoid unpredictable delays on hard real-time tasks, soft tasks are isolated
through a bandwidth reservation mechanism, according to wich each soft task is assigned a deadline,
computed as a function of the reserved bandwidth and its actual requests. If a task requires to
execute more than its expected computation time, its deadline is postponed so that
its reserved bandwidth is not exceeded.
SCHED_EDF_NP is a scheduling policy that
combines both static and dynamic priority scheduling. Threads
are ordered by priority, and among the same static priority
threads with closer deadline first. Each thread has two
scheduling attributes: priority and deadline. It is a Rate
Monotonic policy and an EDF policy at each priority level.
On initializing attr, the attribute initbudget takes the value 0.
RETURN VALUE
Both functions returns zero.
ERRORS
Parameter checking is not performed. Incorrect parameters may result in random errors.
AUTHOR
Patricia Balbastre <patricia@disca.upv.es>
Pau Mendoza <pabmench@disca.upv.es>
SEE ALSO
pthread_setinitbudget_np(3rtl).
pthread_initcbs_np(3rtl).