Flow Control Protocols-Data Communication and Computer Networks-Quiz Solution, Exercises of Data Communication Systems and Computer Networks

This assignment was given by Dr. Mubark Abbas at COMSATS Institute of Information Technology, Attock for Data Communication and Computer Networks course. It includes: Data, Communication, Stop, wait, Sliding, Window, Flow, Control, HDLC, Flag, Synchronize, Frame

Typology: Exercises

2011/2012

Uploaded on 07/05/2012

hamad
hamad 🇵🇰

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COMSATS INSTITUTE OF INFORMATION TECHNOLOGY
Islamabad campus
Dept of Electrical Engineering
BTE Program, 6th Semester, Spring 2012
Course Title: Data Communication and Computer Networks
Task: Quiz #4
Instructor: Dr. Zeeshan Ali Khan
Designation: Assistant Professor, Dept. of Electrical Engineering
Contact Info: [email protected], Room # 217
Date: 17th Apr, 2012 @0830 hrs, Duration: 30 minutes
Marks: 50
Student Name: …………………………………….
Student #: …………………………………….
Instructions:
All examination rules as per COMSATS policies apply.
Do not write in this area
Q1
Q2
Q3
Q4
Total
Q1-Q4
Date
Marks in words
Total
Q1: What are the differences between stop and wait and sliding window flow control protocols? (10
marks)
The simplest form of flow control, known as stop-and-wait flow control, works as follows. A source entity
transmits a frame. After the destination entity receives the frame, it indicates its willingness to accept
another frame by sending back an acknowledgement to the frame just received. The source must wait
until it receives the acknowledgement before sending the next frame. The destination can thus stop the
flow of data simply by withholding acknowledgement. This procedure works fine and, indeed, can hardly
be improved upon when a message is sent in a few large frames. However, it is often the case that a
source will break up a large block of data into smaller blocks and transmit the data in many frames
The essence of the problem described so far is that only one frame at a time can be in transit. In
situations where the bit length of the link is greater than the frame length serious inefficiencies result.
Efficiency can be greatly improved by allowing multiple frames to be in transit at the same time which is
the principle of sliding window flow control protocols. In this technique, sender A maintains a list of
sequence numbers that it is allowed to send, and receiver B maintains a list of sequence numbers that it
is prepared to receive. Each of these lists can be thought of as a window of frames. The operation is
referred to as the sliding-window flow control.
pf3

Partial preview of the text

Download Flow Control Protocols-Data Communication and Computer Networks-Quiz Solution and more Exercises Data Communication Systems and Computer Networks in PDF only on Docsity!

Islamabad campus Dept of Electrical Engineering

BTE Program, 6 th^ Semester, Spring 2012

Course Title: Data Communication and Computer Networks Task: Quiz # Instructor: Dr. Zeeshan Ali Khan Designation: Assistant Professor, Dept. of Electrical Engineering Contact Info: [email protected], Room # 217 Date: 17 th^ Apr, 2012 @ 0830 hrs, Duration: 30 minutes Marks: 50

Student Name: …………………………………….

Student #: …………………………………….

Instructions:

All examination rules as per COMSATS policies apply.

Do not write in this area

Q1 Q2 Q3 Q4 Total Q1-Q

Date Marks in words Total

Q 1 : What are the differences between stop and wait and sliding window flow control protocols? ( marks)

The simplest form of flow control, known as stop-and-wait flow control, works as follows. A source entity transmits a frame. After the destination entity receives the frame, it indicates its willingness to accept another frame by sending back an acknowledgement to the frame just received. The source must wait until it receives the acknowledgement before sending the next frame. The destination can thus stop the flow of data simply by withholding acknowledgement. This procedure works fine and, indeed, can hardly be improved upon when a message is sent in a few large frames. However, it is often the case that a source will break up a large block of data into smaller blocks and transmit the data in many frames

The essence of the problem described so far is that only one frame at a time can be in transit. In situations where the bit length of the link is greater than the frame length serious inefficiencies result. Efficiency can be greatly improved by allowing multiple frames to be in transit at the same time which is the principle of sliding window flow control protocols. In this technique, sender A maintains a list of sequence numbers that it is allowed to send, and receiver B maintains a list of sequence numbers that it is prepared to receive. Each of these lists can be thought of as a window of frames. The operation is referred to as the sliding-window flow control.

Islamabad campus Dept of Electrical Engineering

BTE Program, 6 th^ Semester, Spring 2012

Q 2 : What is the purpose of using bit stuffing in flag field of HDLC? ( 10 marks)

Flag fields delimit the frame at both ends with the unique pattern 01111110.A single flag may be used as the closing flag for one frame and the opening flag for the next. On both sides of the user-network interface, receivers are continuously hunting for the flag sequence to synchronize on the start of a frame. While receiving a frame, a station continues to hunt for that sequence to determine the end of the frame. Because the protocol allows the presence of arbitrary bit patterns (i.e., there are no restrictions on the content of the various fields imposed by the link protocol), there is no assurance that the pattern 01111110 will not appear somewhere inside the frame, thus destroying synchronization. To avoid this problem, a procedure known as bit stuffing is used. For all bits between the starting and ending flags, the transmitter inserts an extra 0 bit after each occurrence of five 1s in the frame. After detecting a starting flag, the receiver monitors the bit stream. When a pattern of five 1s appears, the sixth bit is examined. If this bit is 0, it is deleted. If the sixth bit is a 1 and the seventh bit is a 0, the combination is accepted as a flag. If the sixth and seventh bits are both 1, the sender is indicating an abort condition. With the use of bit stuffing, arbitrary bit patterns can be inserted into the data field of the frame. This property is known as data transparency.

Q 3. The following figure shows that the data is transferred through datagram packet switching network between nodes X and Y. Explain why the delay starts decreasing in figures (b) and (c) as compared to figure (a). And why it starts increasing in figure (d) as compared to figure (c). (15 marks)