I found an interesting question about retransmission queue on TCP, I’ve been reading this
, I can see from this article that there are so many timers on TCP, but what I don’t get is how they all sync with each other, for example when when the messages is sent, it’s placed on a retransmission queue, and a retransmission timer will check this queue when the time reached 0 on the queue to be retransmitted.
Is this queue a Queue data structure? and it seems to be that two TCP function will check this queue, the first one is the retransmission queue retransmit the message, and the synak timer that delete the packet that has been been delivered successfully, in this case there must be some sync mechanism between those timers as they access the same queue, right?
Can you any one help understand how this works?
I think you have the wrong conception of timers. It’s not an application. These are operating system timers: there is no issue about keeping them in synchronization. I think you have the wrong conception of queues too: I don’t know exactly what you mean by ‘is this queue a Queue data structure’? The question doesn’t really make sense. A queue is a queue. In this case again it is a kernel queue. How it is implemented isn’t any concern of anybody except the kernel authors.