Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sort examples, improve doc
[simgrid.git] / examples / s4u / README.doc
index 62113f7..7b80891 100644 (file)
@@ -14,7 +14,7 @@ documentation, but it should remain readable directly.
  @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
@@ -43,7 +43,9 @@ TODO: document here the examples about plugins
     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
@@ -64,21 +66,23 @@ TODO: document here the examples about plugins
    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.
 
+@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
@@ -113,6 +117,11 @@ TODO: document here the examples about plugins
 
 @section s4u_ex_synchro Inter-Actor Synchronization 
 
+ - <b>Waiting for the termination of an actor</b> (joining on it)
+   @ref examples/s4u/actor-join/s4u-actor-join.cpp \n
+   The simgrid::s4u::Actor::join() method allows to block the current
+   actor until the end of the receiving actor.
+
  - <b>Mutex: </b> @ref examples/s4u/mutex/s4u-mutex.cpp \n
    Shows how to use simgrid::s4u::Mutex synchronization objects.
 
@@ -162,13 +171,25 @@ also the tesh files in the example directories for details.
 @section s4u_ex_io Simulating disks and files
 
 The examples of this section demonstrate how to interact with the
-simulated storages.
+simulated storages. 
 
-  - <b>Access to raw storage devices </b>.
+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>.
     @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, 
@@ -191,20 +212,22 @@ simulated storages.
 @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-lifetime/s4u-actor-lifetime_d.xml 
 @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
 @example examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp \n
 @example examples/s4u/mutex/s4u-mutex.cpp