Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve comments on examples
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 17 May 2010 12:25:51 +0000 (12:25 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 17 May 2010 12:25:51 +0000 (12:25 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7751 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/mc/bugged1.c
examples/msg/mc/bugged2.c
examples/msg/mc/centralized_mutex.c
examples/msg/mc/deploy_mutex.xml
src/mc/mc_global.c

index 23b783e..43e4cb4 100644 (file)
@@ -1,3 +1,8 @@
+/******************** Non-deterministic message ordering  *********************/
+/* Server assumes a fixed order in the reception of messages from its clients */
+/* which is incorrect because the message ordering is non-deterministic       */
+/******************************************************************************/
+
 #include <msg/msg.h>
 #include <mc/modelchecker.h>
 #define N 3
 #include <msg/msg.h>
 #include <mc/modelchecker.h>
 #define N 3
index b7d2b65..180db60 100644 (file)
@@ -1,3 +1,8 @@
+/******************** Non-deterministic message ordering  *********************/
+/* Server assumes a fixed order in the reception of messages from its clients */
+/* which is incorrect because the message ordering is non-deterministic       */
+/******************************************************************************/
+
 #include <msg/msg.h>
 #include <mc/modelchecker.h>
 #define N 3
 #include <msg/msg.h>
 #include <mc/modelchecker.h>
 #define N 3
index ecb747f..73b27eb 100644 (file)
@@ -1,14 +1,12 @@
-/* Centralized Mutual Exclusion Algorithm 
- *
- * This constitutes the answer to the exercice 2 of the practical 
- * lab on implementing mutual exclusion algorithms with SimGrid.
- * 
- * YOU SHOULD TRY IMPLEMENTING IT YOURSELF BEFORE READING THE SOLUTION.
- */
+/***************** Centralized Mutual Exclusion Algorithm *********************/
+/* This example implements a centralized mutual exclusion algorithm.          */
+/* There is no bug on it, it is just provided to test the state space         */
+/* reduction of DPOR.                                                         */
+/******************************************************************************/
 
 #include "msg/msg.h"
 
 
 #include "msg/msg.h"
 
-#define AMOUNT_OF_CLIENTS 5
+#define AMOUNT_OF_CLIENTS 4
 #define CS_PER_PROCESS 2
 XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages");
 
 #define CS_PER_PROCESS 2
 XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages");
 
index 0ff13e2..53165b8 100644 (file)
@@ -14,9 +14,9 @@
 
   <process host="Geoff" function="client" />
   
 
   <process host="Geoff" function="client" />
   
-  <process host="Disney" function="client" />
+<!--  <process host="Disney" function="client" />
     
     
-<!--  <process host="iRMX" function="client" />
+  <process host="iRMX" function="client" />
       
   <process host="McGee" function="client" />
 
       
   <process host="McGee" function="client" />
 
index 62a5d29..acbaabf 100644 (file)
@@ -275,7 +275,7 @@ void MC_execute_surf_actions(void)
         DEBUG5("Resource [%s] (%d): Executing RUNNING action \"%s\" (%p) MaxDuration %lf", 
           model->name, xbt_swag_size(model->states.running_action_set),
           smx_action->name, smx_action, action->max_duration);
         DEBUG5("Resource [%s] (%d): Executing RUNNING action \"%s\" (%p) MaxDuration %lf", 
           model->name, xbt_swag_size(model->states.running_action_set),
           smx_action->name, smx_action, action->max_duration);
-
+        
         if(smx_action)
           SIMIX_action_signal_all(smx_action);
       }
         if(smx_action)
           SIMIX_action_signal_all(smx_action);
       }