SlideShare a Scribd company logo
FLOW CONTROL
1
11.2
Data LINK LAYER
This layer provides reliable transmission of a packet by using the
services of the physical layer. This layer is also responsible for node
to node transmission.
Framing: This layer divides the stream of bits received from the network
layer in to small data units, called frames.
Physical addressing: when frame goes to different system this layer adds a
header to the frame which contain the sender and receiver address, called
physical address.
11.3
Flow control: The rate at which sender sends the data is high then the rate at
which receiver receives the data, then there will be a problem. So this layer
control of flow of data.
Error control: The frames may be damaged, lost or duplicated leading errors.
So this layer also control errors.
Acknowledgment: Sent by the receiving end to inform the source that the
frame was received successfully without any error.
Framing: As we know that data link layer creates the frame and it also
recognized the boundaries of frame. This can be accomplished by attaching
special bit patterns to the beginning and end of the frame.
4
FRAMING
The data link layer needs to pack bits into frames, so
that each frame is distinguishable from another. Our
postal system practices a type of framing. The simple
act of inserting a letter into an envelope separates one
piece of information from another; the envelope serves
as the delimiter.
Character Count
Character stuffing
Bit stuffing
Topics discussed in this section:
5
Figure 11.1 A frame in a character-oriented protocol
11.6
7
Figure 11.2 Byte stuffing and unstuffing
8
7
Bit stuffing is the process of adding one
extra 0 if 011111 is encountered in data,
so that the receiver does not mistake
the pattern 0111110 for a flag.
Note
8
Figure 11.4 Bit stuffing and unstuffing
9
11-2 FLOW AND ERROR CONTROL
The most important responsibilities of the data link
layer are flow control and error control. Collectively,
these functions are known as data link control.
Flow Control
Error Control
Topics discussed in this section:
10
Flow control refers to a set of procedures
used to restrict the amount of data
that the sender can send before
waiting for acknowledgment.
Note
Aka: Don’t overwhelm the receiver!
11
Error control in the data link layer is
based on automatic repeat request,
which is the retransmission of data.
Note
12
11-3 PROTOCOLS
Now let us see how the data link layer can combine
framing, flow control, and error control to achieve the
delivery of data from one node to another.
13
Figure 11.5 Taxonomy of protocols discussed in this chapter
14
11-4 NOISELESS CHANNELS
Let us first assume we have an ideal channel in which
no frames are lost, duplicated, or corrupted. We
introduce two protocols for this type of channel.
Simplest Protocol
Stop-and-Wait Protocol
Topics discussed in this section:
15
Figure 11.6 The design of the simplest protocol with no flow or error control
16
 In simplest protocol, there is no flow control and error control
mechanism.
 It is a unidirectional protocol in which data frames travel in
only one direction (from sender to receiver).
 The receiver can immediately handle any received frame with a
processing time that is small enough to be negligible.
 The protocol consists of two distinct procedures :a sender and
receiver.
The sender runs in the data link layer of the source machine
and the receiver runs in the data link layer of the destination
machine.
 No sequence number or acknowledgements are used here.
17
Figure 11.7 Flow diagram for Example 11.1
18
Figure 11.8 Design of Stop-and-Wait Protocol
19
Stop-and-Wait Protocol
The simplest retransmission protocol is stop-and-wait.
Transmitter (Station A) sends a frame over the communication
line and then waits for a positive or negative acknowledgement
from the receiver (station B).
If no error occurs in the transmission, station B sends a
positive acknowledgement (ACK) to station A. transmitter starts
to send the next frame.
If frame is received at station B with errors, then a negative
acknowledgement(NAK) is sent to station A.
Station 'A' must retransmit the old packet in a new frame.
20
Stop-and-Wait Protocol Conti..
There is also a possibility that the information frames or
ACKs may get lost.
 The sender is equipped with a timer. If no recognizable
acknowledgement is received when the timer expires at the end
of time out interval, the same frame is sent again.
The sender which sends one frame and then waits for an
acknowledgement before process is known as stop and wait.
21
Figure 11.9 Flow diagram for Example 11.2
22
11-5 NOISY CHANNELS
Although the Stop-and-Wait Protocol gives us an idea
of how to add flow control to its predecessor, noiseless
channels are nonexistent. We discuss three protocols
in this section that use error control.
Stop-and-Wait Automatic Repeat Request (ARQ)
Go-Back-N Automatic Repeat Request
Selective Repeat Automatic Repeat Request
Topics discussed in this section:
23
In Stop-and-Wait ARQ, the
acknowledgment number always
announces in modulo-2 arithmetic the
sequence number of the next frame
expected.
Note
24
Figure 11.10 Design of the Stop-and-Wait ARQ Protocol
Transport Layer
3-27
Stop-and-Wait ARQ Overview
 Sender waits “reasonable” amount of time for ACK
 Thus Sender needs a countdown timer
 Start the timer when a packet is sent
 retransmits if no ACK received within the timeout period
 if pkt (or ACK) just delayed (not lost):
 retransmission will create duplicate packet
 Thus it requires packet sequence number and ack
number to be used
 Only two numbers are used: 0, 1
 Receiver’s Ack number is what he is expected next
 After receiving Pkt 0, sends back ACK 1
 After receiving Pkt 1, sends back ACK 0
25
Figure 11.11 Flow diagram for Example 11.3
26
27
Stop-and-Wait ARQ is a special case of
Go-Back-N ARQ in which the size of the
send window is 1.
Note
28
Sliding Window
 Send multiple frames before waiting for ACK
 Several frames can be in transit at a time
 Sender window vs. receiver window
 Frames can be ACKed without waiting for the
receiver window to fill up
 Frames may be sent as long as there are unsent
packets in the sender window
 If header of the frame allow k bits ,the sequence
number ranges from 0 to 2^k -1
31
Sliding Window
 Sender window:
 Shrink from left as frames are sent
 Expand from right as you receive ACKs
 The size of sender window is at most 2^k -1
 Sender is also provided with buffer equal to the
window size
Receiver window:
 Shrink from left as frames are received
 Expand from right as ACKs are sent
 The Size of receiver window is 1
30
 Based on sliding window protocol
 All frames after damaged or lost frame are discarded
 Damaged Frames:
 Say, frames 0-5 are sent and all but frame # 3 is
correctly received Receiver sends NAK 3 and discards
subsequent frames
 This signals to sender that frames 0, 1, and 2 are
correctly received and frame 3 is damaged
 Sender retransmits frames 3, 4, and 5
 Same procedure for lost data frames
Go-Back-n ARQ
31
Go-Back-n ARQ
Host A Host B
Data 0
NAK 3
Data 1
Data 2
Data 3
Data 4
Data 5
Error, discard
Data 3
Data 4
Data 5
Discard
Discard
Window size 7
Error in data frame 3
 Lost ACK:
 When sender reaches window capacity, it
starts a timer
 If timer expires, it resends all outstanding
(unACKed) frames
 The receiver discards possible duplicate
frames and sends another ACK
32
Go-Back-n ARQ Conti..
Go-Back-n ARQ Conti..
Host A Host B
Data 0
ACK 3
Data 1
Data 2
Data 0
Data 1
Data 2
Lost
Window Size 3
Lost ACK case
Timer
expires
33
Selective Repeat ARQ
 Problem with Go-back-N:
 Sender: resend many packets with a single lose
 Receiver: discard many good received (out-of-order) packets
 Very inefficient when N becomes bigger (in high-speed network)
 Solution: Receiver individually acknowledges all correctly
received pkts
 buffers pkts, as needed, for eventual in-order delivery to upper
layer
 sender only resends pkts for which ACK not received
 sender keeps timer for each unACKed pkt
 sender window
 N consecutive seq #’s
 again limits seq #s of sent, unACKed pkts
34
Selective Repeat ARQ
Host A Host B
Data 0
NAK 3
Data 1
Data 2
Data 3
Data 4
Data 5
Error, discard
Data 3
Window size 7
Error in data frame 3
Data 6
35
Selective Repeat ARQ
 Lost Data Frames:
 Out-of-sequence delivery is permitted, but
out-of-sequence ACK is not
 When a lost frame is detected, NAK is sent
 If last frame is lost, then receiver does
nothing
 Lost ACK:
 Handled the same way as in go-back-n
36

More Related Content

Similar to Flow Control (1).ppt

chapter 11(Data link Control)in CN .ppt
chapter 11(Data link Control)in CN  .pptchapter 11(Data link Control)in CN  .ppt
chapter 11(Data link Control)in CN .ppt
anjubala996089
 
dl_frames.ppt
dl_frames.pptdl_frames.ppt
dl_frames.ppt
ThangamaniR3
 
stop and wait
stop and waitstop and wait
stop and wait
swati463221
 
Unit I Data Link Control.ppt
Unit I Data Link Control.pptUnit I Data Link Control.ppt
Unit I Data Link Control.ppt
MSANDHYARANI3
 
Unit 2_ Flow & Error Control in computer networks
Unit 2_ Flow & Error Control in computer networksUnit 2_ Flow & Error Control in computer networks
Unit 2_ Flow & Error Control in computer networks
Balasubramanian699229
 
SYBSC IT COMPUTER NETWORKS UNIT III Data Link Control
SYBSC IT COMPUTER NETWORKS UNIT III Data Link ControlSYBSC IT COMPUTER NETWORKS UNIT III Data Link Control
SYBSC IT COMPUTER NETWORKS UNIT III Data Link Control
Arti Parab Academics
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.ppt
MaddalaSeshu
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control ProtocolsTechiNerd
 
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.pptsession -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
nanisrikar276711
 
Ch3 transport layer Network
Ch3 transport layer NetworkCh3 transport layer Network
Ch3 transport layer Network
cairo university
 
3a data link layer continued
3a data link layer continued3a data link layer continued
3a data link layer continuedkavish dani
 
PCCN DATA LINK LAYER UNIT 4 NOTES
PCCN DATA LINK LAYER UNIT 4 NOTESPCCN DATA LINK LAYER UNIT 4 NOTES
PCCN DATA LINK LAYER UNIT 4 NOTES
sirishayerraboina
 
Data link layer (Unit 2).pdf
Data link layer (Unit 2).pdfData link layer (Unit 2).pdf
Data link layer (Unit 2).pdf
BharatiPatelPhDStude
 
Data_Link_Layer.ppt
Data_Link_Layer.pptData_Link_Layer.ppt
Data_Link_Layer.ppt
NicetomeetYou2
 
Data Link Layer of OSI Model responsibilities
Data Link Layer of OSI Model responsibilitiesData Link Layer of OSI Model responsibilities
Data Link Layer of OSI Model responsibilities
HemantPareek21
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
Nt Arvind
 

Similar to Flow Control (1).ppt (20)

chapter 11(Data link Control)in CN .ppt
chapter 11(Data link Control)in CN  .pptchapter 11(Data link Control)in CN  .ppt
chapter 11(Data link Control)in CN .ppt
 
dl_frames.ppt
dl_frames.pptdl_frames.ppt
dl_frames.ppt
 
stop and wait
stop and waitstop and wait
stop and wait
 
Unit I Data Link Control.ppt
Unit I Data Link Control.pptUnit I Data Link Control.ppt
Unit I Data Link Control.ppt
 
Unit 2_ Flow & Error Control in computer networks
Unit 2_ Flow & Error Control in computer networksUnit 2_ Flow & Error Control in computer networks
Unit 2_ Flow & Error Control in computer networks
 
SYBSC IT COMPUTER NETWORKS UNIT III Data Link Control
SYBSC IT COMPUTER NETWORKS UNIT III Data Link ControlSYBSC IT COMPUTER NETWORKS UNIT III Data Link Control
SYBSC IT COMPUTER NETWORKS UNIT III Data Link Control
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.ppt
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
 
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.pptsession -7 - Sliding Window Protocol 1- N oisy Channels.ppt
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
 
Ch3 transport layer Network
Ch3 transport layer NetworkCh3 transport layer Network
Ch3 transport layer Network
 
Presentation on dll
Presentation on dllPresentation on dll
Presentation on dll
 
3a data link layer continued
3a data link layer continued3a data link layer continued
3a data link layer continued
 
PCCN DATA LINK LAYER UNIT 4 NOTES
PCCN DATA LINK LAYER UNIT 4 NOTESPCCN DATA LINK LAYER UNIT 4 NOTES
PCCN DATA LINK LAYER UNIT 4 NOTES
 
Data link layer (Unit 2).pdf
Data link layer (Unit 2).pdfData link layer (Unit 2).pdf
Data link layer (Unit 2).pdf
 
Data_Link_Layer.ppt
Data_Link_Layer.pptData_Link_Layer.ppt
Data_Link_Layer.ppt
 
Data Link Layer of OSI Model responsibilities
Data Link Layer of OSI Model responsibilitiesData Link Layer of OSI Model responsibilities
Data Link Layer of OSI Model responsibilities
 
Lect21 09-11
Lect21 09-11Lect21 09-11
Lect21 09-11
 
application layers
application layersapplication layers
application layers
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
 
Ch 11
Ch 11Ch 11
Ch 11
 

More from sarthakgithub

Access Modifiers in Java.pptx
 Access Modifiers in Java.pptx Access Modifiers in Java.pptx
Access Modifiers in Java.pptx
sarthakgithub
 
ppt-2.pptx
ppt-2.pptxppt-2.pptx
ppt-2.pptx
sarthakgithub
 
soumay.pptx
soumay.pptxsoumay.pptx
soumay.pptx
sarthakgithub
 
Data Path Design and Bus Organization.pptx
Data Path Design and Bus Organization.pptxData Path Design and Bus Organization.pptx
Data Path Design and Bus Organization.pptx
sarthakgithub
 
Python Unit II.pptx
Python Unit II.pptxPython Unit II.pptx
Python Unit II.pptx
sarthakgithub
 
OOP-Module-1-Section-4-LectureNo1-5.pptx
OOP-Module-1-Section-4-LectureNo1-5.pptxOOP-Module-1-Section-4-LectureNo1-5.pptx
OOP-Module-1-Section-4-LectureNo1-5.pptx
sarthakgithub
 
BCA MultiThreading.ppt
BCA MultiThreading.pptBCA MultiThreading.ppt
BCA MultiThreading.ppt
sarthakgithub
 
BCA Abstraction.pptx
BCA Abstraction.pptxBCA Abstraction.pptx
BCA Abstraction.pptx
sarthakgithub
 
BCA Final Keyword.pptx
BCA Final Keyword.pptxBCA Final Keyword.pptx
BCA Final Keyword.pptx
sarthakgithub
 
BCA Super Keyword.pptx
BCA Super Keyword.pptxBCA Super Keyword.pptx
BCA Super Keyword.pptx
sarthakgithub
 

More from sarthakgithub (10)

Access Modifiers in Java.pptx
 Access Modifiers in Java.pptx Access Modifiers in Java.pptx
Access Modifiers in Java.pptx
 
ppt-2.pptx
ppt-2.pptxppt-2.pptx
ppt-2.pptx
 
soumay.pptx
soumay.pptxsoumay.pptx
soumay.pptx
 
Data Path Design and Bus Organization.pptx
Data Path Design and Bus Organization.pptxData Path Design and Bus Organization.pptx
Data Path Design and Bus Organization.pptx
 
Python Unit II.pptx
Python Unit II.pptxPython Unit II.pptx
Python Unit II.pptx
 
OOP-Module-1-Section-4-LectureNo1-5.pptx
OOP-Module-1-Section-4-LectureNo1-5.pptxOOP-Module-1-Section-4-LectureNo1-5.pptx
OOP-Module-1-Section-4-LectureNo1-5.pptx
 
BCA MultiThreading.ppt
BCA MultiThreading.pptBCA MultiThreading.ppt
BCA MultiThreading.ppt
 
BCA Abstraction.pptx
BCA Abstraction.pptxBCA Abstraction.pptx
BCA Abstraction.pptx
 
BCA Final Keyword.pptx
BCA Final Keyword.pptxBCA Final Keyword.pptx
BCA Final Keyword.pptx
 
BCA Super Keyword.pptx
BCA Super Keyword.pptxBCA Super Keyword.pptx
BCA Super Keyword.pptx
 

Recently uploaded

Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
alex933524
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
StarCompliance.io
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
James Polillo
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
correoyaya
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 

Recently uploaded (20)

Tabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflowsTabula.io Cheatsheet: automate your data workflows
Tabula.io Cheatsheet: automate your data workflows
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 

Flow Control (1).ppt

  • 2. 11.2 Data LINK LAYER This layer provides reliable transmission of a packet by using the services of the physical layer. This layer is also responsible for node to node transmission. Framing: This layer divides the stream of bits received from the network layer in to small data units, called frames. Physical addressing: when frame goes to different system this layer adds a header to the frame which contain the sender and receiver address, called physical address.
  • 3. 11.3 Flow control: The rate at which sender sends the data is high then the rate at which receiver receives the data, then there will be a problem. So this layer control of flow of data. Error control: The frames may be damaged, lost or duplicated leading errors. So this layer also control errors. Acknowledgment: Sent by the receiving end to inform the source that the frame was received successfully without any error. Framing: As we know that data link layer creates the frame and it also recognized the boundaries of frame. This can be accomplished by attaching special bit patterns to the beginning and end of the frame.
  • 4. 4 FRAMING The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one piece of information from another; the envelope serves as the delimiter. Character Count Character stuffing Bit stuffing Topics discussed in this section:
  • 5. 5 Figure 11.1 A frame in a character-oriented protocol
  • 7. 7 Figure 11.2 Byte stuffing and unstuffing
  • 8. 8
  • 9. 7 Bit stuffing is the process of adding one extra 0 if 011111 is encountered in data, so that the receiver does not mistake the pattern 0111110 for a flag. Note
  • 10. 8 Figure 11.4 Bit stuffing and unstuffing
  • 11. 9 11-2 FLOW AND ERROR CONTROL The most important responsibilities of the data link layer are flow control and error control. Collectively, these functions are known as data link control. Flow Control Error Control Topics discussed in this section:
  • 12. 10 Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Note Aka: Don’t overwhelm the receiver!
  • 13. 11 Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. Note
  • 14. 12 11-3 PROTOCOLS Now let us see how the data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another.
  • 15. 13 Figure 11.5 Taxonomy of protocols discussed in this chapter
  • 16. 14 11-4 NOISELESS CHANNELS Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. Simplest Protocol Stop-and-Wait Protocol Topics discussed in this section:
  • 17. 15 Figure 11.6 The design of the simplest protocol with no flow or error control
  • 18. 16  In simplest protocol, there is no flow control and error control mechanism.  It is a unidirectional protocol in which data frames travel in only one direction (from sender to receiver).  The receiver can immediately handle any received frame with a processing time that is small enough to be negligible.  The protocol consists of two distinct procedures :a sender and receiver. The sender runs in the data link layer of the source machine and the receiver runs in the data link layer of the destination machine.  No sequence number or acknowledgements are used here.
  • 19. 17 Figure 11.7 Flow diagram for Example 11.1
  • 20. 18 Figure 11.8 Design of Stop-and-Wait Protocol
  • 21. 19 Stop-and-Wait Protocol The simplest retransmission protocol is stop-and-wait. Transmitter (Station A) sends a frame over the communication line and then waits for a positive or negative acknowledgement from the receiver (station B). If no error occurs in the transmission, station B sends a positive acknowledgement (ACK) to station A. transmitter starts to send the next frame. If frame is received at station B with errors, then a negative acknowledgement(NAK) is sent to station A. Station 'A' must retransmit the old packet in a new frame.
  • 22. 20 Stop-and-Wait Protocol Conti.. There is also a possibility that the information frames or ACKs may get lost.  The sender is equipped with a timer. If no recognizable acknowledgement is received when the timer expires at the end of time out interval, the same frame is sent again. The sender which sends one frame and then waits for an acknowledgement before process is known as stop and wait.
  • 23. 21 Figure 11.9 Flow diagram for Example 11.2
  • 24. 22 11-5 NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent. We discuss three protocols in this section that use error control. Stop-and-Wait Automatic Repeat Request (ARQ) Go-Back-N Automatic Repeat Request Selective Repeat Automatic Repeat Request Topics discussed in this section:
  • 25. 23 In Stop-and-Wait ARQ, the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected. Note
  • 26. 24 Figure 11.10 Design of the Stop-and-Wait ARQ Protocol
  • 27. Transport Layer 3-27 Stop-and-Wait ARQ Overview  Sender waits “reasonable” amount of time for ACK  Thus Sender needs a countdown timer  Start the timer when a packet is sent  retransmits if no ACK received within the timeout period  if pkt (or ACK) just delayed (not lost):  retransmission will create duplicate packet  Thus it requires packet sequence number and ack number to be used  Only two numbers are used: 0, 1  Receiver’s Ack number is what he is expected next  After receiving Pkt 0, sends back ACK 1  After receiving Pkt 1, sends back ACK 0 25
  • 28. Figure 11.11 Flow diagram for Example 11.3 26
  • 29. 27 Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send window is 1. Note
  • 30. 28 Sliding Window  Send multiple frames before waiting for ACK  Several frames can be in transit at a time  Sender window vs. receiver window  Frames can be ACKed without waiting for the receiver window to fill up  Frames may be sent as long as there are unsent packets in the sender window  If header of the frame allow k bits ,the sequence number ranges from 0 to 2^k -1
  • 31. 31 Sliding Window  Sender window:  Shrink from left as frames are sent  Expand from right as you receive ACKs  The size of sender window is at most 2^k -1  Sender is also provided with buffer equal to the window size Receiver window:  Shrink from left as frames are received  Expand from right as ACKs are sent  The Size of receiver window is 1
  • 32. 30  Based on sliding window protocol  All frames after damaged or lost frame are discarded  Damaged Frames:  Say, frames 0-5 are sent and all but frame # 3 is correctly received Receiver sends NAK 3 and discards subsequent frames  This signals to sender that frames 0, 1, and 2 are correctly received and frame 3 is damaged  Sender retransmits frames 3, 4, and 5  Same procedure for lost data frames Go-Back-n ARQ
  • 33. 31 Go-Back-n ARQ Host A Host B Data 0 NAK 3 Data 1 Data 2 Data 3 Data 4 Data 5 Error, discard Data 3 Data 4 Data 5 Discard Discard Window size 7 Error in data frame 3
  • 34.  Lost ACK:  When sender reaches window capacity, it starts a timer  If timer expires, it resends all outstanding (unACKed) frames  The receiver discards possible duplicate frames and sends another ACK 32 Go-Back-n ARQ Conti..
  • 35. Go-Back-n ARQ Conti.. Host A Host B Data 0 ACK 3 Data 1 Data 2 Data 0 Data 1 Data 2 Lost Window Size 3 Lost ACK case Timer expires 33
  • 36. Selective Repeat ARQ  Problem with Go-back-N:  Sender: resend many packets with a single lose  Receiver: discard many good received (out-of-order) packets  Very inefficient when N becomes bigger (in high-speed network)  Solution: Receiver individually acknowledges all correctly received pkts  buffers pkts, as needed, for eventual in-order delivery to upper layer  sender only resends pkts for which ACK not received  sender keeps timer for each unACKed pkt  sender window  N consecutive seq #’s  again limits seq #s of sent, unACKed pkts 34
  • 37. Selective Repeat ARQ Host A Host B Data 0 NAK 3 Data 1 Data 2 Data 3 Data 4 Data 5 Error, discard Data 3 Window size 7 Error in data frame 3 Data 6 35
  • 38. Selective Repeat ARQ  Lost Data Frames:  Out-of-sequence delivery is permitted, but out-of-sequence ACK is not  When a lost frame is detected, NAK is sent  If last frame is lost, then receiver does nothing  Lost ACK:  Handled the same way as in go-back-n 36