Physics, asked by rajeevshreyas2101, 10 months ago

Discuss necessity of synchronization of computer clock. Explain vector clock.

Answers

Answered by taibak32
0

Answer

A vector clock is an algorithm for generating a partial ordering of events in a distributed system and detecting causality violations. Just as in Lamport timestamps, interprocess messages contain the state of the sending process's logical clock. A vector clock of a system of N processes is an array/vector of N logical clocks, one clock per process; a local "smallest possible values" copy of the global clock-array is kept in each process, with the following rules for clock updates:

Example of a system of vector clocks. Events in the blue region are the causes leading to event B4, whereas those in the red region are the effects of event B5

Initially all clocks are zero.

Each time a process experiences an internal event, it increments its own logical clock in the vector by one.

Each time a process sends a message, it increments its own logical clock in the vector by one (as in the bullet above, but not twice for the same event) and then sends a copy of its own vector

.

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).

The vector clocks algorithm was independently developed by Colin Fidge and Friedemann Mattern in 1988.


vy254185: hello taibak tum message kyo nhi kar rhi ho
Similar questions
Math, 5 months ago