Vous êtes sur la page 1sur 13

Flow

Control

Refers

to a set of procedures used to restrict the amount of data that the


sender can send before waiting for acknowledgement
In coming data need to be checked & processes before they can be
used
Such tasks are slower than transmission
Each receiving device has block of memory : buffer
Error

Control

Error detection and error correction


Error control error detection and retransmission
ARQ: automatic repeat request

Ref: Data Communication and


Networking, Behrouz A forouzan, 4th
Edition,

Protocols

For noiseless channel


(error free)

For noisy channel


(error creating)

Simplest
Does not use flow control
Stop and wait

Stop and wait ARQ


Go Back-N ARQ
Selective Repeat ARQ

Ref: Data Communication and


Networking, Behrouz A forouzan, 4th
Edition,

Ref: Data Communication and


Networking, Behrouz A forouzan, 4th
Edition,

Receiver

Sender
Deliver data
Network

Get data

Data Link

Data link
Physical

Receive Frame
Send Frame
Data Frames ------->

Event:

Request from
network layer

Repeat forever

Algorithm for
receiver site

Repeat forever

Algorithm for
sender site
Event:

Network

Unidirectional protocol
Assumption: receiver can immediately handle any frame
Ref: Data Communication and
Networking, Behrouz A forouzan, 4th
Edition,

Notification from
physical layer

Physical

1 While ( true)
2{
3 Waitforevent();
4 If(Event(requesttosend))
5{
6
Getdata();
7
Makeframe();
8
Sendframe();
9}
10 }
Ref: Data Communication and
Networking, Behrouz A forouzan, 4th
Edition,

Sender Site Algorithm

1 While(true)
2{
3 Waitforevent();
4 If(Event(Arrivalnotification))
5{
6
Receiveframe();
7
extractdata();
8
deliverdata();
9}
10 }

Receiver Site Algorithm


Ref: Data Communication and
Networking, Behrouz A forouzan, 4th
Edition,

Receiver

Sender

Request

Request

Request

Frames

Arrival

Frames

Arrival

Frames

Flow Diagram
Ref: Data Communication and
Networking, Behrouz A forouzan, 4th
Edition,

Arrival

Ref: Data Communication and


Networking, Behrouz A forouzan, 4th
Edition,

Receiver

Sender
Deliver data
Network

Data link

Receive
Frame

Physical

Network

Get data
Receive
Frame

Send
Frame

Send
Frame

Data Link
Physical

Data Frames
Ack Frame

Request from
network layer

Event:

Repeat forever

Algorithm for
receiver site

Repeat forever

Algorithm for
sender site
Event:
Event:

Notification from
physical layer

Ref: Data Communication and


Networking, Behrouz A forouzan, 4th
Edition,

Notification from
physical layer

1 While(true)
2 cansend=true;
3{
4 Waitforevent();
5 If(Event(requesttosend)and cansend)
6{
7
Getdata();
8
Makeframe();
9
Sendframe();
10 cansend=false;
11 }
Ref: Data Communication and
Networking, Behrouz A forouzan, 4th
Edition,

Sender Site Algorithm

12 Waitforevent();
13 If(Event(Arrivalnotification))
14 {
15 Receiveframe();
16 cansend=true;
17 }
18 }
Sender Site Algorithm

Ref: Data Communication and


Networking, Behrouz A forouzan, 4th
Edition,

1 While(true)
2{
3 Waitforevent();
4 If(Event(Arrivalnotification))
5{
6
Receiveframe();
7
extractdata();
8
deliverdata();
9
Sendframe();
10 }
11}

Receiver Site Algorithm


Ref: Data Communication and
Networking, Behrouz A forouzan, 4th
Edition,

Receiver

Sender

Request

Frames
Ack

Arrival
Request

Arrival

Frames

Arrival
Ack

Arrival

Flow Diagram
Ref: Data Communication and
Networking, Behrouz A forouzan, 4th
Edition,

Vous aimerez peut-être aussi