Lamport's Algorithm is a process timestamp ordering algo that is used in distributed systems. It is used to order requests or processes of different nodes in a distributed network as each node may have a different clock pulse. Synchronizing these clocks can physically is not easy. So a concept of a happens-before relation is used along with logical clocks. Refer to attached paper for details
The basic idea is that instead of using physical clocks Lamport suggested the use of logical clock in distributed systems. It accompanies data send between the processes or tasks. Once the task has processed the data it may modify the logical clock. Therefore, the tasks can be synchronized even if they run at different frequencies.