Docsity

Sharing Data between DOS Machines: Solutions and Error Control, Slides of Computer Networks

Partial preview of the text

Download Sharing Data between DOS Machines: Solutions and Error Control and more Slides Computer Networks in PDF only on Docsity!

Sharing of Data on DOS machines

  • Transfer data from machine A to machine

B:

  • DOS machines connected by a serial line. โ€“ machine A: copy file to the com1 port โ€“ machine B: copy com1 to file.

Sharing of Data on DOS machines

  • Issues:
    • Synchronisation
      • if sender is faster than receiver
        • Error on the line
          • require error checking

Another Solution

Use RTS (Request To Send) from B

ร†
A

At A:

clear RTS

open (file)

while not eof(file) do

read a byte

wait until RTS is high

send a byte

endwhile

send eof

close(file)

Another Solution (contd)

At B:

open(file)

repeat

set RTS

get a byte

clear RTS

write byte to file

until eof

close(file)

Issues

If read at A is faster than get at B

read at A is completed before RTS is reset by B.

A will transmit another byte.

B will be swamped by A.

One more signal is required:

RTS alone is not sufficient.

CTS (Clear To Send) A

รŽ
B

RTS (Request To Send) B

รŽ
A
RTS^ CTS
T

x^

T

+read x

R

cv

R

+write x

Data Flow Diagram using RTSand CTS

The Algorithm

โ€ข At B:

  • open(file) โ€“ set RTS โ€“ while not eof(file) โ€“

read byte

write to file

toggle RTS

  • endwhile

Error Control

At A:

Read file

  • compute Checksum โ€“

repeat

send file

send Checksum

check wires

wait for ack

get ack

until ack

send finish