Monitor

This section is supposed to provide insight on the monitor component and how it is intended to be used. The monitor has to be provided alongside the taskset component to the add_jobs() function of the distributor. The monitors functions are called in run() of the machine.py.

A monitor has to implement the AbstractMonitor in the distributor_service module which defines the following abstract methods:

__taskset_event__(taskset, event)

This function is called when the session.run() as soon as new information about the taskset is returned from Genode.

__taskset_start__(taskset)

This function is called when a new taskset has benn started by calling the session.start() function.

__taskset_stop__(taskset)

This function is not used from within the distributor component as of now.

__taskset_finish__(self, taskset)

This function is called when a taskset has been finished and session.stop() has been called. If this function is called the monitor regards the taskset as completed and all information, which could be gained is available.

In general the monitor functions always hold a reference to the taskset the function was called with, so it has access to all information saved in the obect defined by the task.py.