Execution Model
The RT++ model of program execution can be sketched as follows:
- A number of processes executes threads from the ready queue. Thread
execution is preemptive i.e. after a certain time slice has elapsed, each
process puts the currently executed thread back into the ready queue and
selects a new thread for execution.
- A ready queue contains all active threads i.e. all threads
that are immediately ready for execution (and that may have been previously
under execution). Active threads are fairly scheduled for execution on a first
in/first out basis.
- A lazy stack contains all threads that are in principle
ready for execution but that still need to be activated before they can be
actually executed. Lazy threads are activated on a last in/first out basis
only if an idle process finds the ready queue empty.
- A heap contains all data structures on which the threads
operate. Each thread can access each entity in the heap regardless by which
process it is currently executed.
The representation of threads (which are heap objects themselves) is described
here.
An automatic garbage collector
reclaims heap objects (and threads) when they are not (directly or indirectly)
referenced by the main thread.
Author: Wolfgang Schreiner
Last Modification: April 12, 1997