Okay I am trying to understand why asynchronous systems are better that synchronous systems in terms of throughput.
Relating to the calculation done in this answer. Can someone tell if my reasoning is correct ?
Lets say I have a system that has 1000 live connections and each connection takes 5 packets to complete and a packet is received every millisecond. Processing time is 0.001 ms(1 micro second). The system can only process 1 packet at a given time, if there are multiple packets then remaining packets must wait until the processing is complete for the present packet.
My reasoning and calculation-:
So in the 1st millisecond the system receives 1000 packets, all 1st packets of the 5 packets from each of the 1000 connections. Am I right ?
If I am correct then the process time should be calculated in the following fashion-:
1st packet of 1st connection
Waiting Time for first packet-: 0ms
Process Time-: 0.001ms
Time taken to completion of this packet-: 0.001 (wait time + process time)
1st packet of 2nd connection
Waiting Time : time taken for completion of previous packet = 0.001ms
Process time = constant = 0.001ms
Time taken to completion of this packet = (wait time + process time) = 0.001+0.001 ms = 2*0.001 = 0.002ms
So in the same way processing all 1st packets of the 1000 connections would take = 1000*0.001 = 1ms
So in a total I will be receiving 5*1000 packets = 5000 packets, so processing them will take 5000*0.001 = 5ms
Am I correct in my above reasoning and calculation ? If not please correct me where I am going wrong.