-/* 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"
-#define AMOUNT_OF_CLIENTS 5
+#define AMOUNT_OF_CLIENTS 4
#define CS_PER_PROCESS 2
XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages");
todo--;
}
}
- //MSG_task_destoy(task);
+ MSG_task_destroy(task);
}
INFO0("Received all releases, quit now");
return 0;
// wait the answer
m_task_t grant = NULL;
MSG_task_receive(&grant,my_mailbox);
- //MSG_task_destoy(grant);
+ MSG_task_destroy(grant);
INFO0("got the answer. Sleep a bit and release it");
MSG_process_sleep(1);
MSG_task_send(MSG_task_create("release",0,1000,NULL),"coordinator");
MSG_create_environment("../msg_platform.xml");
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
- MSG_launch_application("deploy.xml");
+ MSG_launch_application("deploy_mutex.xml");
MSG_main();
return 0;
}