@brief Find the S4U example fitting your needs in the archive.
- @ref s4u_ex_basics
- - @ref s4u_ex_async
+ - @ref s4u_ex_activities
- @ref s4u_ex_actors
- @ref s4u_ex_synchro
- @ref s4u_ex_actions
Another good old example, where one Master process has a bunch of task to dispatch to a set of several Worker
processes.
-@section s4u_ex_async Asynchronous communications
+@section s4u_ex_activities Activities on Resources (communications and executions)
+
+@subsection s4u_ex_activity_comm Communications (using the network)
- <b>Basic asynchronous communications</b>.
@ref examples/s4u/async-wait/s4u-async-wait.cpp \n
until one activity of the set completes, no matter which terminates
first.
-@section s4u_ex_actors Acting on Actors
-
- - <b>Creating actors</b>.
- @ref examples/s4u/actor-create/s4u-actor-create.cpp \n
- Most actors are started from the deployment XML file, but there is other methods.
- This example show them all.
+@subsection s4u_ex_activity_exec Executions (using the CPU)
- - <b>Actors using CPU time</b>.
- @ref examples/s4u/actor-execute/s4u-actor-execute.cpp \n
+ - <b>Basic execution</b>.
+ @ref examples/s4u/exec-basic/s4u-exec-basic.cpp \n
The computations done in your program are not reported to the
simulated world, unless you explicitely request the simulator to pause
the actor until a given amount of flops gets computed on its simulated
host. Some executions can be given an higher priority so that they
get more resources.
+ - <b>Asynchronous execution</b>.
+ @ref examples/s4u/exec-async/s4u-exec-async.cpp \n
+ You can start asynchronous executions, in a way that is very
+ similar to asynchronous communications.
+
+ TODO: add an example about parallel executions.
+
+@section s4u_ex_actors Acting on Actors
+
+ - <b>Creating actors</b>.
+ @ref examples/s4u/actor-create/s4u-actor-create.cpp \n
+ Most actors are started from the deployment XML file, but there is other methods.
+ This example show them all.
+
- <b>Daemonize actors</b>
@ref examples/s4u/actor-daemon/s4u-actor-daemon.cpp \n
Some actors may be intended to simulate daemons that run in background. This example show how to transform a regular
@section s4u_ex_io Simulating disks and files
The examples of this section demonstrate how to interact with the
-simulated storages.
+simulated storages.
- - <b>File Management</b>. @ref examples/s4u/io-file-system/s4u-io-file-system.cpp \n
- This example illustrates the use of operations on files
- (read, write, seek, tell, unlink, ...).
+SimGrid provides two levels of abstraction. You can either use the
+FileSystem plugin, or interact directly with the disks. At the file
+system level, you can open files and interact with them. A write
+operation may fail if the disk is already full. Using the direct (low
+level) interface, you just specify the amount of data that is written
+or read, and this is done unconditionnally. Both levels have
+respective advantages, depending on what you want to model.
- - <b>Access to raw storage devices </b>.
+ - <b>Access to raw storage devices</b>.
@ref examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp \n
This example illustrates how to simply read and write data on a
simulated storage resource.
+ - <b>File Management</b>. @ref examples/s4u/io-file-system/s4u-io-file-system.cpp \n
+ This example illustrates the use of operations on files
+ (read, write, seek, tell, unlink, ...).
+
- <b>Remote I/O</b>.
@ref examples/s4u/io-file-remote/s4u-io-file-remote.cpp \n
I/O operations on files can also be done in a remote fashion,
@example examples/s4u/actor-create/s4u-actor-create.cpp
@example examples/s4u/actor-create/s4u-actor-create_d.xml
@example examples/s4u/actor-daemon/s4u-actor-daemon.cpp
-@example examples/s4u/actor-execute/s4u-actor-execute.cpp
@example examples/s4u/actor-join/s4u-actor-join.cpp
@example examples/s4u/actor-kill/s4u-actor-kill.cpp
@example examples/s4u/actor-lifetime/s4u-actor-lifetime.cpp
@example examples/s4u/actor-migration/s4u-actor-migration.cpp
@example examples/s4u/actor-suspend/s4u-actor-suspend.cpp
@example examples/s4u/actor-yield/s4u-actor-yield.cpp
-@example examples/s4u/app-token-ring/s4u-app-token-ring.cpp
-@example examples/s4u/app-masterworker/s4u-app-masterworker.cpp
-@example examples/s4u/app-pingpong/s4u-app-pingpong.cpp
@example examples/s4u/async-wait/s4u-async-wait.cpp
@example examples/s4u/async-waitall/s4u-async-waitall.cpp
@example examples/s4u/async-waitany/s4u-async-waitany.cpp
+@example examples/s4u/exec-basic/s4u-exec-basic.cpp
+@example examples/s4u/app-token-ring/s4u-app-token-ring.cpp
+@example examples/s4u/app-masterworker/s4u-app-masterworker.cpp
+@example examples/s4u/app-pingpong/s4u-app-pingpong.cpp
@example examples/s4u/energy-pstate/s4u-energy-pstate.cpp
@example examples/s4u/io-file-system/s4u-io-file-system.cpp
@example examples/s4u/io-file-remote/s4u-io-file-remote.cpp