Hey,
http://en.wikipedia.org/wiki/Vector_clock
I need to implement vector clocks and was wondering if someone can give me some ideas on how to solve the following issues in C.
According to the algorithm, each process has a local integer clock, thats cool and ive done that.
Now say I have N processes running, how does process 3 know which vector element belongs to Process 6?
What happens if a new process starts say 5 minutes after all the others?
Basically, I'm not quite sure I can work out how it can be implemented with a) a variable number of processes and b) processes which don't know about other processes or where they maybe in the vector list.
Any ideas?
http://en.wikipedia.org/wiki/Vector_clock
I need to implement vector clocks and was wondering if someone can give me some ideas on how to solve the following issues in C.
According to the algorithm, each process has a local integer clock, thats cool and ive done that.
Each time a process receives a message, it increments its own logical clock in the vector by one and updates each element in its vector by taking the maximum of the value in its own vector clock and the value in the vector in the received message (for every element).
Now say I have N processes running, how does process 3 know which vector element belongs to Process 6?
What happens if a new process starts say 5 minutes after all the others?
Basically, I'm not quite sure I can work out how it can be implemented with a) a variable number of processes and b) processes which don't know about other processes or where they maybe in the vector list.
Any ideas?