Worker
From XtremWebCH Wiki
Contents |
Description
The worker module includes three components: the activity monitor, the execution thread and the communication manager.
Activity monitor
The activity monitor controls whether some computations are taking place in the hosting machine regarding parameters such as CPU idle time and mouse/keyboard activity. According to this monitoring, it processes the effective performance that can be provided by the worker and sends it to the coordinator via the Work Request.
Execution Thread
The execution thread extracts the assigned task, recreates its environment as provided by the coordinator (binary code, input data, directories structure, etc.), starts computation and waits for the task to complete.
Communication Manager
The communication manager of the worker is similar to the communication manager of the coordinator. It “spies” the workload of the network and splits output files into fixed size packets. A sleep time separates the transmission of two successive packets. This time depends on the load of the network load: the higher the load the bigger the sleep time.
Worker states
Each worker could be in one of the four states: ready to execute a task, receiving input data of the allocated task, running a task or sending output data to the warehouse.
When it is in a ready state, a worker sends periodically Work Requests to the coordinator to inform it about its availability. The worker passes to a receiving state if a task is assigned to it: the input data needed by the task is downloaded by the communication manager.
The third state (running) indicates that the worker is executing its allocated task.
A worker passes from running to sending state when the task finishes its execution; the result file is then uploaded to the warehouse.