Resetting The Network Bytes Read

If the network has finished copying data, then reset the network bytes read. More formally,

if the following are true:
  • byte at ID: x, cell #68 at time t = 1
  • byte at ID: x, cell #67 at time t = y_decimal
  • y in decimal = y_decimal
  • network bytes read from computer: x at time t = byte at ID: x, cell #66 at time t

then network bytes read from computer: x at time (t + 1) = 0

After the network device has finished copying data from computer x to computer y, we reset the network bytes read to 0 so that it is ready for use the next time bytes are copied over the network.

For example, suppose that the following are true:

  • byte at ID: "B", cell #66 at time 13 = 5
  • byte at ID: "B", cell #67 at time 13 = 65
  • byte at ID: "B", cell #68 at time 13 = 1
  • network bytes read from computer: "B" at time 13 = 5

The number of bytes read is equal to the value at cell #66 (5), so the network device is finished. And the destination is 65, or "A." Thus:

network bytes read from computer: "B" at time (13 + 1) = 0

Which simplifies to:

network bytes read from computer: "B" at time 14 = 0

Try running the simulator below to see the network device copy values from computer B to computer A and then reset NETWORK_A's "bytes read."

Time: 0
LW Computer IO Simulator

Comments

Please log in to add comments