Hardware Reference
In-Depth Information
Each application scheduler is responsible for scheduling a set of tasks that have previ-
ously been attached to it. The scheduler is typically a task that executes a loop where it
waits for scheduling events, and then determines the application task(s) to be activated
or suspended. A scheduling event is generated every time a task requests attachment
to the scheduler or terminates, gets ready or blocks, invokes a yield operation, changes
its scheduling parameters, inherits or uninherits a priority, or executes any operation
on an application-scheduled mutex.
The application scheduler can make use of the regular operating system services, in-
cluding the high-resolution timers to program future events, and the execution time
clock and timers to impose execution-time budgets on the different threads and to
simplify the implementation of scheduling algorithms such as the Sporadic Server or
the Constant Bandwidth Server.
Because mutexes may cause priority inversion, it is necessary that the scheduler task
knows about the use of mutexes to establish its own protocols. Two types of mutexes
are considered:
System-scheduled mutexes, created with the current POSIX protocols and sched-
uled by the system.
Application-scheduled mutexes, whose protocol will be defined by the applica-
tion scheduler.
INTERRUPT MANAGEMENT AT APPLICATION LEVEL
MARTE offers to Ada and C programmers an application program interface (API) that
deals with hardware interrupts in an easy way. Basically, this API offers operations to
enable and disable hardware interrupts;
install interrupts procedures (several can be installed for the same interrupt num-
ber); and
synchronize threads with the hardware interrupts.
Semaphores can be used as an alternative synchronization mechanism between inter-
rupt handlers and tasks.
Search WWH ::




Custom Search