It uses a new simix context factory: state_machine. Each user process
is a state machine. There is no system mystery such as pthread or
It uses a new simix context factory: state_machine. Each user process
is a state machine. There is no system mystery such as pthread or
user process only have a user-provided structure describing its state,
and only compute its next state based on that. Your main() can be as
simple as:
user process only have a user-provided structure describing its state,
and only compute its next state based on that. Your main() can be as
simple as:
even more expensive) and greatly speeds things up (there is absolutely
no nothing to ask to the system, and everything can be done in user
space).
even more expensive) and greatly speeds things up (there is absolutely
no nothing to ask to the system, and everything can be done in user
space).
The incredible performance of this approach comes at a price: using
SimGrid this way is a *real* pain in the ass. You cannot use MSG nor
The incredible performance of this approach comes at a price: using
SimGrid this way is a *real* pain in the ass. You cannot use MSG nor
-can only rely on SIMIX. From SIMIX, you can only use requests (ie, the
-SIMIX_req_* functions). Moreover, you must know that each blocking
-request will result in an interruption of your execution flow.
+can only rely on SIMIX. From SIMIX, you can only use simcalls (ie, the
+simcall_* functions). Moreover, you must know that each blocking
+simcall will result in an interruption of your execution flow.
- smx_action_t act = SIMIX_req_comm_isend(......);
- SIMIX_req_comm_wait(act);
- SIMIX_req_comm_destroy(act);
+ smx_action_t act = simcall_comm_isend(......);
+ simcall_comm_wait(act);
+ simcall_comm_destroy(act);
process, but in state_machine there is only one system stack and the
whole state describing the process is in the structure describing it.
So, when we need to remove one process from the system, to pause it,
process, but in state_machine there is only one system stack and the
whole state describing the process is in the structure describing it.
So, when we need to remove one process from the system, to pause it,
In short, each time simix wants to interrupt a process, state_machine
does a longjmp(2) to the point just before calling the user code. As a
In short, each time simix wants to interrupt a process, state_machine
does a longjmp(2) to the point just before calling the user code. As a
stack is not a safe storing area for your data.
So, you have to write your code as a state machine, with a big ugly
stack is not a safe storing area for your data.
So, you have to write your code as a state machine, with a big ugly