Category Archives: rts
Revision Notes
Interrupts vs. Polling Pretty obvious stuff. Polling wastes resources. Polling is simple, requires no special hardware or CPU design. Interrupts are synchronous; CPU can go off and do something else. Interrupts are more complicated, more difficult to implement. Ada Interrupts … Continue reading
Worst Case Execution Time (and more)
Worst-case execution time is C values in all the equations we use. Known as ‘Timing Analysis’. You either use static analysis or measurement. Static analysis is pessimistic whereas measurement is potentially optimistic (makes sense intuitively). Without semantic meaning you might … Continue reading
More Scheduling
Extensions on Task Model Release Jitter: Arbitrary Deadlines: Where the deadline is greater than the period. Cooperative Scheduling: True preemptive behaviour is not always acceptable for safety-critical systems. But pure non-preemptive reduces schedulability. Cooperative scheduling is a compromise. Blocks of … Continue reading
Scheduling Real-Time Systems
Scheduling In general, a scheduling scheme provides 2 features: An algorithm for ordering the use of system resources A means for predicting worst-case behaviour when the algorithm is applied. Cyclic Executives Most hard real-time systems use a cyclic executive, though … Continue reading
Programming Real-Time Abstractions in Ada
Periodic tasks in Ada We did this in the previous lecture (under ‘Previous Activity’) Aperiodic and Sporadic Activities in Ada Again, covered these definitions in the previous lecture. To clarify; sporadic has a minimum inter-arrival time, otherwise it’s aperiodic. For … Continue reading
Delays and Timeouts
Delaying a process You could use some hideous delaying loop – a ‘busy-wait’, but that’s not very good. Instead you have delay x.xx or sleep. There’s a lot going on when you delay; granularity afterwards, interrupts being disabled, and other … Continue reading
Time and Clocks
We want to be able to interface with time. To do this we need to gain access to time (using clocks), and then be able to co-ordinate execution with the environment, specifying rates of execution and specifying deadlines. We also … Continue reading
Low-Level Programming in Ada
In Ada you have device drivers, which manipulate device registers and respond to interrupts. Ada assumes that the device registers are shared memory, and an interrupt is essentially a hardware protected procedure call (devices are kinda like hardware tasks). Ada … Continue reading
Resource Control and Requeue in Ada
Resources can be encapsulated and accessed only through a high-level interface (a package in Ada). In Ada – If the resource manager is a server then the package body will contain a task (or an access object to a task … Continue reading
Asynchronous Notification in the RTSJ
Asynchronous Event Handling RTSJ uses event handling to communicate asynchronously. Asynchronous events (AE) are data-less ‘happenings’ are fired by the program or associate with interrupts in the environment. One or more handlers (AEH) can be associated with a single event, … Continue reading