I have ubuntu 14.04 LTS ,and opening connection information window from the top title bar->network connection icon, I see the following:
General: interface: ... h/w address: ... speed: 65Mbps security: ... etc...
Similarly, on my android htc explorer phone, tapping on the current wifi connection, it displays bandwidth: 39 Mbps etc... among other things.
I know that calculations of bandwidth are done by taking the amount of packets received in the interface and the time taken for the same and dividing one by the other.
But how is the time of end of packet transmission determined. For example, I may open a http page in browser, for 1 minute and then sit idle for the next minute. But Operating system wouldnt know that using the first minute only, the bandwidth should be calculated and second minute shouldnt be included in the calculation.
Not only that, there may be a situation where bandwidth is underused for some time, and how does this affect the bandwidth calculation of operating system on an interface.
Iam actually confused.. I want to know both the OS perspective and the HOW of general passive method of bandwidth calculation in a system. pls help.