"Selective Repeat Arq Protocol": Jnana Sangama, Belagavi

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

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belagavi

A Mini-Project Report on

“SELECTIVE REPEAT ARQ PROTOCOL”

Computer Graphics & Visualization Laboratory with Mini Project 15CSL68

Submitted by

Dhruv Nrupesh Patel 4VV16CS123

Under the Guidance of

Pavan Kumar S P Gururaj H L


Assistant Professor Assistant Professor

Department of Computer Science & Engineering

VIDYAVARDHAKA COLLEGE OF ENGINEERING MYSURU-570 002

2018-19
Vidyavardhaka College of Engineering

Department of Computer Science and Engineering


Mysuru, Karnataka 570 002
(Affiliated to Visvesvaraya Technological University, Belagavi)

Certificate
This is to certify that the Mini-project work entitled “Selective Repeat ARQ

Protocol”, is a bonafide work carried out by Dhruv Nrupesh Patel

(4VV16CS123) having completed the Computer Graphics &Visualization with

Mini-project (15CSL68) during the year 2018-2019.

Dr. Ravikumar V,
Guide
Professor & Head, Dept.
Assistant Professor,
Dept. CS & E, CS& E,

Dr. B Sadashive Gowda


Principal, VVCE

External Viva

Name of the Examiners Signature with date

1.

2.
ABSTRACT

Computer graphics are pictures and films created using computers. Usually,

the term refers to computer-generated image data created with the help of

specialized graphical hardware and software. It is a vast and recently developed

area of computer science. The phrase was coined in 1960, by computer graphics

researchers Verne Hudson and William Fetter of Boeing. It is often abbreviated as

CG, though sometimes erroneously referred to as computer-generated imagery

(CGI). This protocol (SRP) is mostly identical to GBN protocol, except that

buffers are used and the receiver, and the sender, each maintain a window of size.

SRP works better when the link is very unreliable. Because in this case,

retransmission tends to happen more frequently, selectively retransmitting frames

is more efficient than retransmitting all of them. SRP also requires full duplex

link. The backward acknowledgements are also in progress. As said, there is a

window with respect to which the frames are transmitted. Once the packet or the

frame is sent by the sender, the receiver in turns sends an acknowledgement or the

ACK message. In case the frame is lost in between, the receiver sends the NAK

message or the negative acknowledgement to the sender so that he resends the

frame.
TABLE OF CONTENTS

Sl. No. Chapter Name Page No.

1. INTRODUCTION 1

1.1 Computer Graphics 1

1.2 OpenGL Interface 2

1.3 Project Description 3

2. METHODOLOGY 4

2.1 Functions in OpenGL 4

3. RESULTS 6

3.1 Snapshots 6

4. CONCLUSION 12

REFERENCES 13

ii
LIST OF FIGURES

FIG NO. FIGURE NAME

Page No.
1.2.1 Graphics Pipeline …………………………………………………...2
3.1.1 Display of the first window …………………………………….......7
3.1.2 Frame 0,1 sent ..………………………………………….…….…....8
3.1.3 ACK to the sender ……...……………………………………….......8
3.1.4 Packet Crashing window…………………………………………….9
3.1.5 NAK2 sent …..…………………………………………...………….9
3.1.6 Frame 2 resent…………………………………………..…………..10

ii
CHAPTER 1 INTRODUCTION

Computer Graphics become a powerful tool for the rapid and economical
production of pictures. There is virtually no area in which Graphical displays
cannot be used to some advantage, so it is not surprising to find the use of CG
so widespread.

1.1 Computer Graphics


Although early application in engineering & science had to rely on
expensive & cumbersome equipment, advances in computer technology have
made interactive computer graphics a practical tool. Today Computer
Graphics is found in a diverse area such as science, engineering, medicine,
business, industry, government, art, entertainment, education and training.

Now you can answer about computer graphics as generalized tool for
drawing and creating pictures and simulate the real-world situations within a
small computer window.
William fetter was credited with coning the term Computer Graphics in
1960, to describe his work at Boeing. One of the first displays of computer
animation was future world (1976), which included an animation of a human
face and hand produced by Carmull and Fred Parkle at the University of Utah.
There are several international conferences and journals where the most
significant results in computer-graphics are published and are the results given
by the inventors of OpenGL. The results are noticed as shown in the report.

6
1.2 OpenGL Interface

Most of our application will be designed to access OpenGL directly


through functions in three libraries. Functions in the main GL (or OpenGL in
windows) library have names that begin with the letters gl and are stored in a
library usually referred to as GL (or OpenGL in windows). The second is the
OpenGL Utility Library (GLU). This library uses only GL functions but
contains code for creating common objects and simplifying viewing. All
functions in GLU can be created from the core GL library but application
programmers prefer not to write the code repeatedly. The GLU library is
available in all OpenGL implementations; functions in the GLU library begin
with letters glu.

To interface with the window system and to get input from external
devices into our programs, there is a need of at least one more system-specific
library that provides the “glue” between the window system and OpenGL. For
the X window system, this library is functionality that should be expected in
any modern windowing system.

Fig. 1.2.1 Graphic Pipeline

7
1.3 Project description
Selective Repeat Selective Repeat is part of the automatic repeat-request
(ARQ). An ARQ is an efficient scheme to obtain a reliable data transmission
when the channel does not satisfy &e required quality of service [6]. Several
different schemes modified by the basic ARQ strategies have been proposed
in order to improve the throughput efficiency [7-11]. The key idea of this
protocol is that the sender transmits new frames continuously as long as no
error occurs. When the frame error occurs, the sender stops transmitting new
frames [1]. The transmitter numbers the packets to be transmitted sequentially
(using numbers from a finite set) and maintains a timer for each packet it
transmits. The receiver accepts each error-free block and positively
acknowledges it by sending an ACK message. On receipt of an erroneous
block, the receiver negatively acknowledges the block by sending a NAK
[3,4]. The acknowledgments follow a Selective Repeat style of approach such
that they include a bitmap denoting the reception status of all the packets
transmitted since the last ACK. The base station therefore only retransmits the
incorrectly received packets [2]. Among ARQ schemes, the selective repeat
(SR) is preferable than go-back-N since radio resource is very scarce and SR
gives higher channel efficiency [5]. The different functions performed in this
project are -

Packet Sending: Demo the sending of packet from source to destination.


ACK Receival: Send the ACK message, once the packets are received.
Packet Crashing: The loss and crashing of packets is demoed.
NAK Receival: Send the NAK message, once the packets are not received.
Frame Resending: Sending the frame again due to NAK receival.

8
CHAPTER 2 METHODOLOGY
The methodology used here has two sides, sender side and receiver side.
ACK and NAK messages are sent appropriately.

2.1 Functions in OpenGL

• glClearColor: This function call sets the present RGBA clear color used
when clearing the color buffer. The RGB stands for Red, Green and Blue.

• glFlush: This function call forces any buffered OpenGL command to execute.
• glutCreateWindow: This function call creates a window on the display the
string title can be used to label the window.

• glutInitDisplayMode: This function call request a display with the properties


that are specified in m mode. The value of mode is determined by the logical
OR operation of options including the color model.
• glutDisplayFunc: This function call registers the display function *funci.e
executed when the window needs to be redrawn.
• glutPostRedisplay: This function call request the display call back be
executed after the current call back returns.
• glutMainLoop: This function call causes the program to enter an event
processing loop.It should be the last statement in main.

• glLoadIdentity: This function call sets current transformation matrix to an


identity matrix.
• glPushMatrix and glPopMatrix: These function call pushes to and pop from
the matrix stack corresponding to the current matrix mode..
• glRotate: This function call alter the current matrix by a rotation of angle
degrees about the axis (dx,dy,dz).
• glScale: This function call alter the current matrix by specified scaling factor
along the axis (x,y,d).

9
• glTranslate: This function call alters the current matrix by a displacement
of(x,y,z).

• glClear: This function is used to clear the window. As the algorithm stores
information depth buffer, so it necessary to clear the buffer whenever we wish
to redraw the display.

• Setfont(): It is used to tell the renderer which font is current


• Drawstring(): It contains four arguments-x,y,z coordinates and a string,while
the coordinate assumed to be the space where string to be placed and the
string is the value to be display.
• glutBitmapCharacter: Automatically sets the OpenGL unpack pixel storage
modes it needs appropriately and saves and restores the previous modes
before returning. The generated call to glBitmap will adjust the current raster
position based on the width of the character.
• glRasterPos: Specify the raster position for pixel operations
• glutKeyboardFunc: Sets the keyboard callback for the current window.
• glutMouseFunc:Sets the mouse callback for current window.
• glBegin: Delimit the vertices of a primitive or a group of like primitives.
• glVertex: Specify a vertex.
• glColor: Set the current color.

10
CHAPTER 3
RESULTS
The animation of Selective Repeat ARQ Protocol was done and the results
are as follows, shown in the screenshots attached.

3.1 Snapshots

First display window: Display of the first output screen after debugging
as shown in Fig. 3.1.1.

Fig:3.1.1 Display of the first output window

11
Frame 0,1 sent : Sending frame 0 and 1 to the receiver as shown in Fig. 3.1.2.

Fig:3.1.2 Frame 0,1 sent

12
ACK message: To receive ACK from the receiver side as shown in Fig. 3.1.3.

Fig: 3.1.3 ACK to the sender

13
Packet crashing: Lost of packets in between the process as shown in Fig.
3.1.4.

Fig:3.1.4 Packet crashing window

14
NAK2 sent : To send NAK2 from the receiver side as shown in Fig. 3.1.5.

Fig: 3.1.5 NAK2 sender

15
Frame 2 resent: Frame 2 resent due to NAK2 received as shown in Fig. 3.1.6.

Fig:3.1.6 Frame 2 resent

16
CHAPTER 4
CONCLUSION

Selective repeat is combination of advantages of GO back-N and stop N


wait protocol, Selective repeat is somewhat superior to other protocols. The
use of packet fragmentation and selective repeat ARQ was considered for
random access underwater networks are Throughput efficiency, reducing end
to end latency and Energy per bit consumption. Finally, the transmission of
frames between sender and receiver takes place simultaneously without the
intervention at some stages and later the retransmission of frames occurs at
later stages. Using graphical representation for stimulation of Selective Repeat
protocol is done which depicts the transmission of frames from one point to
another point with the required ACK and NAK.

17
REFERENCES
[1]Yukuo Hayashida, Chikako Baba, amdl Masaharu Komatsu, “Stop and-
Selective Repeat ARQ Scheme for A High-speed Transport Protocol”, IEEE
Catalogue No.95TH8061.
[2]Imrich Chlamtac, Chiara Petriolib, Jason Redic,”Energy-conserving Selective
Repeat ARQ Protocols for Wireless Data Networks”, Ninth IEEE
International Symposium on Personal, Indoor and Mobile Radio
Communications (Cat. No.98TH8361)
[3]Chen Jin and Wang Jinlong, “A Novel Selective Repeat Stop-Wait ARQ for
Half-Duplex Channels”, 2002 IEEE Region 10 Conference on Computers,
Communications, Control and Power Engineering.TENCOM '02. Proceedings.
[4]M. Aghadavoodi Jolfaei, K. Aghadavoodi Jolfaei, S. Baucke, J. Kaltwasser,
“Improved Selective Repeat ARQ Schemes for Data Communication”,
Proceedings of IEEE Vehicular Technology Conference (VTC)
[5]Wha Sook Jeon, Dong Geon Jeong,”Improved Selective Repeat ARQ Scheme
for Mobile Multimedia Communications”, IEEE Communications Letters (
Volume: 4 , Issue: 2 , Feb. 2000 )
[6]S.Lin, D.J.Costello,Jr. and M.J.Miller; "Automatic- repeat-request error-
control schemes", IEEE Commun. Mag., V01.22, No.12, pp.5-16, Dec. 1984.
[7]F.Argenti, G.Benelli and A.Garzelli; "Generalized Stop- And-Wait protocol",
Elec. Letters, Vo1.28, No.9, pp.861-863, Apr. 1992.
[8]A.R.K.Sastry; "Improving Automatic-repeat-request ( A R Q ) performance
on satellite channels under high error rate conditions", IEEE Trans. on
Commun., Vol. 23, pp.436- 439, Apr. 1975.
[9]D.Towsley; "The stutter Go-Back N protocol", IEEE Trans. on Commun.,
Vol. 27, pp.869-875, June 1979.
[10] J.M.Morris; *'Onanother Go-Back N ARQ technique for high error rate
conditions", IEEE Trans. On Commun., Vo1.26, Jan. 1978.
[11] M.J.Miller and S.Lin; "The analysis of some Selective- Repeat ARQ schemes
with finite receiver buffer", IEEE Trans. on Commun., Vo1.29, No.9, 1981.

18

You might also like