[Simgrid-user] understanding msg_test.c
Arnaud.Legrand at imag.fr
Sun Jul 3 18:18:40 CEST 2005
Sorry, for the previous mail. It appears as I sent it. There is something
really weird with the mailing-list manager.
Today Leland wrote:
> I'm just getting started up with simgrid and I've got questions about the
> basic organization. I've run msg_test and got some completed tasks and
> some blocked tasks (as I should).
> So, when the function MSG_task_execute runs, what causes MSG_task_execute to
> not complete a task? Is it decrementing the current task's duration by a
> kind of server capacity? If so, how is the capacity assigned to the server?
First of all, to make things clear, in the previous example no tasks
processed with MSG_task_execute has been uncompleted. All tasks have been
completed but some process are blocked.
When you create a task, you define the amount of work (in MFlop) if
represents. Then when a process calls MSG_task_execute(task), it starts
processing it using the CPU of the host on which it is running. In the
platform file (e.g. look at msg_platform.xml in the examples/msg/ directory)
the power of each CPU is defined with a statement like: <cpu
name="Jacquelin" power="137.333"/> This means that the cpu of Jacquelin has
a power 137.333 MFlop/s. If you add an availability_file (see previous mail
on the list) then the power will change over time according to this trace
file. So if there is only one process running on Jacquelin and that there is
no availability trace for Jacquelin, the time elapsed between the call to
MSG_task_execute and its return will be equal to task_duration/137.333.
Last, the only two reasons that would cause MSG_task_execute to not complete
a task would be that the process that called MSG_task_execute has been
suspended by somebody else (via the MSG_process_suspend call) or that the
CPU on which it was running had a failure (this can only happen if a
state_file has been defined for this CPU in the platform file). This kind of
things does not happen in the examples you have been running.
More information about the Simgrid-user