6 Computation Control Layers

This layer from the typical process class hierarchy consists of two classes :

6.1 Parent Warden Layer

Parent warden layer (class TParentWarden) is the point, where the control interface is implemented. Application processes send control interface messages (see section Control Interface) to this layer of the parent process, when they need to control the kernel. The parent warden layer receives these messages during the call of the method Interrupt(). The messages are received on the priority level PRIORITY_WARDEN (see Message Format ).

Whenever is a control interface message received by the parent warden layer, the state of the kernel is checked. If the command (represented by the message) is invalid with respect to the actual state, it is ignored. Otherwise requested actions are performed. In most cases the layer sends a corresponding special message to all child processes. The messages are sent on priority PRIORITY_WARDEN and all of them have a tag MT_GACONTROL. Fig. 6-1 shows the special tags of these messages and associated commands.

6.2 Child Warden Layer

Computation control layer is in child represented by class TChildWarden. This object works in child process as the opposite site of parent warden layer. The most substantial functionality of this layer is in receiving and producing computation control messages from parent. Whenever the child warden layer receives a message with tag MT_GACONTROL, it performs requested actions to satisfy command encoded in this message (e.g. it starts, pauses or stops the local computation). Because the genetic algorithm computation is performed by higher layers, the class TChildWarden declares abstract methods which have to be implemented in the higher levels of process class hierarchy (e.g method TGACover:Stop() overrides the abstract method TChildWarden:Stop().

Figure 6-1: The messages sent from parent warden layer to child warden layers with associated commands.
Special Tag Command

In addition the warden layers of the kernel processes are responsible for the results collection procedure. This procedure is performed whenever the computation was terminated i.e. the kernel state has changed either to state KS_STOPPED or the state KS_ERROR. Results are collected by a special message with tag MT_RESULT. The results are then stored by the parent warden layer to the result parameter file (see section Result and Initialization Interface).

Programmer's Guide Project Antares