Develop a simple data link layer that performs the flow control using the sliding window protocol, and loss recovery using the Go-Back-N mechanism.
Develop a simple data link layer that performs the flow control using the sliding window protocol, and loss recovery using the Go-Back-N mechanism.
Hardware Requirements: Intel based Desktop PC:RAM of 1GB
Software Requirement: Turbo C / Turbo C++
Theory:
Sliding Window:
Sliding window is a technique for controlling transmitted data frames between two network computers where reliable and sequential delivery of data frames is required, such as when using the Data Link Layer (OSI model) or Transmission Control Protocol (TCP).In the sliding window technique, each data frame (for most data link layers) and byte (in TCP) include a unique consecutive sequence number, which is used by the receiving computer to place data in the correct order. data corruption occurred in transit.The objective of the sliding window technique is to use the sequence numbers to avoid duplicate data and to request missing data.Sliding window is also known as windowing.
Go-Back-N ARQ:
SOURCE CODE:
#include<stdio.h>
int main()
{
int w,i,f,frames[50];
printf("Enter window size: ");
scanf("%d",&w);
printf("\nEnter number of frames to
transmit: ");
scanf("%d",&f);
printf("\nEnter %d frames: ",f);
for(i=1;i<=f;i++)
scanf("%d",&frames[i]);
printf("\nWith sliding window protocol
the frames will be sent in the following manner (assuming no corruption of
frames)\n\n");
printf("After sending %d frames at each
stage sender waits for acknowledgement sent by the receiver\n\n",w);
for(i=1;i<=f;i++)
{
if(i%w==0)
{
printf("%d\n",frames[i]);
printf("Acknowledgement of above frames
sent is received by sender\n\n");
}
else
printf("%d ",frames[i]);
}
if(f%w!=0)
printf("\nAcknowledgement of above
frames sent is received by sender\n");
return 0;
}
OUTPUT CONSOLE:
Documents a properly reviewed saying great with this range impregnable placement appropriately with your can be totally an potential on its own. Wonderful meaning. You typically lavish awesome. This really is lastly pattern My business is exposition numerous within your website in addition way acquiring that inspirational personal. IR Repeater
ReplyDeleteWhether you're new to paid advertising or a pay-per-click (PPC) veteran, Google's smart campaigns can be your best friend. The rapid advancements in artificial intelligence technology at the heart of Google Ads make PPC marketing an entirely different beast, one that may be easier to tame in 2020.
ReplyDeletehttps://ppcexpo.com/blog/smart-campaigns
👍
ReplyDelete