patbalbe@disca.upv.es
P.
Balbastre
2002-11-06
pthread_initcbs_np
3rtl
pthread_initcbs_np
Initializes a thread with SCHED_CBS_NP scheduling policy.
#include <rtl_sched.h>
int pthread_initcbs_np
pthread_t thread
hrtime_t period
DESCRIPTION
This function is a non-portable Real-Time Linux extension.
pthread_initcbs_np initializaes a thread with
SCHED_CBS_NP scheduling policy.
For those threads with SCHED_CBS_NP scheduling policy
the period of the thread must be defined calling this function. For periodic
threads with other scheduling policies it must be used the
pthread_make_periodic_np function.
SCHED_CBS_NP scheduling policy efficiently handle soft real-time
requests with a variable or unknown execution behaviour under 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 thread 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.
RETURN VALUE
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_attr_setinitbudget_np(3rtl).