Practical 10 & 11

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Experiment-10

Case study submission for: Sliding-Window Flow Control & Stop-


And-Wait Flow Control
Aim: Case study on Sliding-Window Flow Control & Stop-And-Wait Flow Control
Introduction:
Both Stop and Wait protocol and Sliding Window protocol are the techniques to the
solution of flow control handling. The main difference between Stop-and-wait
protocol and Sliding window protocol is that in Stop-and-Wait Protocol, the sender
sends one frame and wait for acknowledgement from the receiver whereas in sliding
window protocol, the sender sends more than one frame to the receiver and re-
transmits the frame(s) which is/are damaged or suspected.

Stop-and-Wait Protocol
Stop-and-Wait is a simple protocol used for transmitting data between two devices
over a communication channel. In this protocol, the sender sends a packet of data to
the receiver and then waits for the receiver to acknowledge the packet before sending
the next packet. The receiver sends an acknowledgement to the sender indicating
that the packet has been received and is error-free.

Features:
• The sender transmits one packet at a time and waits for an acknowledgement
before sending the next packet.
• The receiver sends an acknowledgement for each packet received, indicating
whether it is a duplicate or a new packet.
• It is a simple and easy-to-implement protocol.
• It has low efficiency compared to sliding window protocols as it requires a lot of
time to wait for an acknowledgement for each packet.
• It is ideal for situations where the transmission rate is low or the network is
reliable.

26
Sliding Window Protocol
The Sliding Window protocol is a more efficient protocol for data transmission than
the Stop-and-Wait protocol. It uses a window size to control the number of packets
that can be transmitted without acknowledgement. The sender can transmit multiple
packets within the window size before waiting for an acknowledgement from the
receiver.

Features:
• The sender can transmit multiple packets without waiting for an
acknowledgement for each packet.
• The receiver sends a cumulative acknowledgement for a sequence of packets,
indicating the last correctly received packet.
• It uses a sliding window mechanism to allow the sender to transmit a group of
packets at once before receiving an acknowledgement for the first packet.
• It has a higher efficiency compared to stop and wait protocol as it allows for
simultaneous transmission and acknowledgement of multiple packets.
• It requires more processing power and memory to implement than stop and wait
protocol.
• There are two types of sliding window protocols – Go-Back-N and Selective
Repeat – each with their own set of features and advantages.

Similarities:

• Both protocols are used for reliable data transmission over an unreliable network.
• Both protocols use a timeout mechanism to handle lost or corrupted packets.
• Both protocols use sequence numbers to ensure the correct order of packets.
• Both protocols can handle retransmission of lost or corrupted packets.
• Both protocols can use selective retransmission to retransmit only lost or
corrupted packets instead of retransmitting the entire window.
• Both protocols can provide flow control to prevent the sender from overwhelming
the receiver with too many packets.

27
Difference between Stop and Wait protocol and Sliding Window protocol:

S.NO Stop-and-Wait Protocol Sliding Window Protocol

In sliding window protocol, sender sends


In Stop-and-Wait Protocol, sender
more than one frame to the receiver side
1. sends one frame and wait for
and re-transmits the frame(s) which is/are
acknowledgment from receiver side.
damaged or suspected.

Efficiency of Stop-and-Wait Efficiency of sliding window protocol is


2.
Protocol is worse. better.

Sender window size of Stop-andWait Sender window size of sliding window


3.
Protocol is 1. protocol is N.

Receiver window size of Stop- Receiver window size of sliding window


4.
andWait Protocol is 1. protocol may be 1 or N.

In Stop-and-Wait Protocol, sorting In sliding window protocol, sorting may


5.
is not necessary. be or may not be necessary.

Efficiency of Stop-and-Wait
Efficiency of sliding window protocol is
6. Protocol is
N/(1+2*a)
1/(1+2*a)

Stop-and-Wait Protocol is half


7. Sliding window protocol is full duplex.
duplex.

Conclusion:
Stop and Wait protocol and Sliding Window protocol are two different protocols
used in data communications to ensure reliable transmission of data over a network.
Stop and Wait protocol is a simple protocol that transmits data one packet at a time
and waits for an ACK before transmitting the next packet. Sliding Window protocol
is a more complex protocol that allows multiple packets to be transmitted
simultaneously without waiting for an ACK for each packet. Sliding Window

28
protocol is more efficient and faster compared to Stop and Wait protocol and is
preferred for high-speed data transmission over a network.
Experiment-11 Web programming using HTML
Aim: Implement web programming using HTML
Introduction

• HTML stands for Hyper Text Markup Language


• HTML is the standard markup language for creating Web pages
• HTML describes the structure of a Web page
• HTML consists of a series of elements
• HTML elements tell the browser how to display the content
• HTML elements label pieces of content such as "this is a heading", "this is a
paragraph", "this is a link", etc.

CODE
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body> </html>

Explanation

• The <!DOCTYPE html> declaration defines that this document is an HTML5


document
• The <html> element is the root element of an HTML page
• The <head> element contains meta information about the HTML page
• The <title> element specifies a title for the HTML page (which is shown in
the browser's title bar or in the page's tab)

29







The <body> element defines the document's body, and is a container for all
the visible contents, such as headings, paragraphs, images, hyperlinks,
tables, lists, etc.
The <h1> element defines a large heading The
<p> element defines a paragraph
What is an HTML Element?
An HTML element is defined by a start tag, some content, and an end tag:
<tagname> Content goes here... </tagname>
The HTML element is everything from the start tag to the end tag:
<h1>My First Heading</h1>
<p> My first paragraph.</p>

30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy