You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Utilized multi-threading and concurrent primitives (threads, mutexes & condition variables in C++11 Thread Support Library) to develop a simple simulator which simulates an asynchronous distributed system composed of one master thread and n slave threads.
Implemented coordinated behaviors between the master thread and n slave threads by using monitors consisting of mutexes and condition variables
Implemented Asynch Bellman–Ford for shortest paths from a single source node i0 to all of the other nodes in a weighted undirected graph under the framework of this simulator.
You will develop a simple simulator that simulates an asynchronous distributed system using multithreading.
There are n + 1 processes in this asynchronous distributed system: one master process and n slave processes. Each process will be simulated by one thread.
The master thread will "inform" all slave threads as when one round starts.
You should view duration of one round as one "time unit" ticks in this asynchronous distributed system.
Each slave threads must wait for the master thread for a "go ahead" signal before it can begin round r.
The master thread can give the signal to start round r only if it is sure that all the n slave threads have completed their previous round r - 1.
The message transimission time for each link for each message is to be randomly chosen using a uniform distribution in the range 1 to 15 "time units".
All links are bidirectional and FIFO. (FIFO: If I send two messages m1 and then m2 to you, then you receive m1 first and then m2.)