TL;DR : How to synchronize two remote processes when communication channel between them is not reliable? Two processes are server & client. And then they change roles (server becomes client and vice-versa) to send data in other direction.
DETAILED: I have two wireless devices (USRP), lets say d1 & d2, for communication, each of them are controlled by linux machines.
Bidirectional data exchange can be done as follows:
- From d1 to d2 : d1(tx) is transmitter & d2(rx) is receiver
- From d2 to d1 : d2(tx) is tranmistter & d1(rx) is receiver
Now to do this guaranteed bidirectional comminication I need to synchronize both the processes: after d1 is done sending data to d2 , both can revese their role and d2 can send data to d1. The problem is how to synchronize in presense of data transmission loss? Following would be the problems:
- When d2(rx) didn't receive data, how does d1(tx) know to re-transmit?
- How does d1(tx) knows for sure that d2(rx) has received the data, so that d1 can now become a receiver and d2 a transmitter ( to transfer data in reverse direction) ?
I would appreciate any literature/algorithm/protocol in Operating System which solves this synchronization problem.