Skip to main content

Stop and Wait Protocol Nitish Agarwal The Crazy Programmer

In this article, we will take a look at the Stop and Wait protocol of a computer networking system. In order to understand the mechanism of this protocol, we will first have a brief understanding of the error control mechanism.

The Stop and Wait Protocol is a sub-category of the error control mechanism. The error control mechanism ensures error-free receiving and sending of data from one place to another. It prevents the corruption of data by any external source.

As the name ‘Stop and Wait’ suggests, in this mechanism, the sender sends an instruction to the receiver and stops sending further instructions until it waits for the acknowledgment from the receiver.

The Stop and Wait protocol is a flow control protocol in which the data is transmitted over noiseless channels. The transmission is unidirectional in nature, i.e., either the data is sent or it is received at a time. The data sent by the sender is in the form of discrete packets and only one data packet is sent at a time. Similarly, the receiver receives only a single data packet at a time and sends the acknowledgment to the sender.

The following procedures take place at the sender and the receiver side:

At sender’s side:

  • The sender sends one data packet to the receiver at a time.
  • The sender then waits for the acknowledgment of the data packet from the receiver’s end.

At receiver’s side:

  • The receiver waits for the data packet to be received.
  • The receiver receives the data packet, uses it, and sends the acknowledgment to the sender.
  • The receiver waits for the next data packet to be received.

Diagramatic representation of stop and wait protocol

Image Source

The figure shows the working of the stop and wait protocol. The communication between sender and receiver takes place in this manner. The major advantage of this protocol is that it ensures the transmission of data in a simple manner.

Disadvantages of Stop and Wait Protocol

1. Data Loss: If the sender sends the data and in case the data is lost due to some external source, the receiver doesn’t receive it and keeps on waiting for it for a long amount of time. It does not send the acknowledgment and consequently, the sender doesn’t send further data packets.

2. Acknowledgement Loss: After receiving the data from the sender, if the acknowledgment is lost due to some external source, the sender doesn’t receive the acknowledgment and consequently doesn’t send further data packets to the receiver.

3. Time Loss: Since only one data packet is sent and received at a time, if there are a large number of data packets, it will take a lot of time to send all these data packets from sender to receiver side which results in time loss. To prevent time wastage, another protocol, namely, a sliding window is used to transmit data as we can send and receive large amounts of data at once using this mechanism.

4. Delayed Acknowledgement: There is a particular time frame under which the acknowledgment of data should be received by the sender. If the receiver fails to do so, the sender may consider this acknowledgment of some other data packet.

This is all about the Stop and Wait Protocol which exists in our computer networks.

The post Stop and Wait Protocol appeared first on The Crazy Programmer.



from The Crazy Programmer https://ift.tt/3bRNXkf

Comments

Popular posts from this blog

Difference between Web Designer and Web Developer Neeraj Mishra The Crazy Programmer

Have you ever wondered about the distinctions between web developers’ and web designers’ duties and obligations? You’re not alone! Many people have trouble distinguishing between these two. Although they collaborate to publish new websites on the internet, web developers and web designers play very different roles. To put these job possibilities into perspective, consider the construction of a house. To create a vision for the house, including the visual components, the space planning and layout, the materials, and the overall appearance and sense of the space, you need an architect. That said, to translate an idea into a building, you need construction professionals to take those architectural drawings and put them into practice. Image Source In a similar vein, web development and design work together to create websites. Let’s examine the major responsibilities and distinctions between web developers and web designers. Let’s get going, shall we? What Does a Web Designer Do?

A guide to data integration tools

CData Software is a leader in data access and connectivity solutions. It specializes in the development of data drivers and data access technologies for real-time access to online or on-premise applications, databases and web APIs. The company is focused on bringing data connectivity capabilities natively into tools organizations already use. It also features ETL/ELT solutions, enterprise connectors, and data visualization. Matillion ’s data transformation software empowers customers to extract data from a wide number of sources, load it into their chosen cloud data warehouse (CDW) and transform that data from its siloed source state, into analytics-ready insights – prepared for advanced analytics, machine learning, and artificial intelligence use cases. Only Matillion is purpose-built for Snowflake, Amazon Redshift, Google BigQuery, and Microsoft Azure, enabling businesses to achieve new levels of simplicity, speed, scale, and savings. Trusted by companies of all sizes to meet

2022: The year of hybrid work

Remote work was once considered a luxury to many, but in 2020, it became a necessity for a large portion of the workforce, as the scary and unknown COVID-19 virus sickened and even took the lives of so many people around the world.  Some workers were able to thrive in a remote setting, while others felt isolated and struggled to keep up a balance between their work and home lives. Last year saw the availability of life-saving vaccines, so companies were able to start having the conversation about what to do next. Should they keep everyone remote? Should they go back to working in the office full time? Or should they do something in between? Enter hybrid work, which offers a mix of the two. A Fall 2021 study conducted by Google revealed that over 75% of survey respondents expect hybrid work to become a standard practice within their organization within the next three years.  Thus, two years after the world abruptly shifted to widespread adoption of remote work, we are declaring 20