Research Paper
Research Paper
Research Paper
Protocols Course
Author:
Drago Hercog, University of Ljubljana / Faculty of Electrical Engineering, Ljubljana, Slovenia,
Drago.Hercog@fe.uni-lj.si
Abstract All modern communication systems rely on the correct operation of communication protocols that are
running in different layers of protocol stacks. Hence, a deep knowledge and understanding of them must be possessed by
all communications engineers. Therefore, a basic communication protocols course must be an essential constituent of
any higher education communications engineering programme. Automatic repeat request (or ARQ for short) protocols
that provide for reliable data transfer over noisy and lossy channels and are usually used in data-link and transport
layers of a protocol stack often form the core of such courses. One of the reasons for their high pedagogic importance
within the frame of a protocols course is that they are typical but not trivial distributed algorithms and therefore not very
easy to grasp; the other reason is that they must be both logically correct and efficient. Pedagogically, the general
notions of correctness and efficiency can easily be introduced and emphasised through the correctness and efficiency of
ARQ protocols. Automatic repeat request protocols are usually implemented in the form of sliding window protocols.
Traditionally, three basic types of sliding window protocols are distinguished, namely, stop-and-wait, go-back-N, and
selective-repeat protocols. Although all the three types were often claimed to be members of a common sliding window
protocols family, this was not quite clear and evident until recently, which was quite confusing for both students and
teachers. However, several years ago, the generalised sliding window protocol was defined and formally specified so
that the three above mentioned basic types can easily be shown as its special cases. The protocol behaviour depends on
two essential parameters, namely transmit window width and receive window width which are directly related to the
amount of memory used by transmitter and receiver, respectively. In the generalised protocol, these parameters can have
arbitrary values, while in the three special cases their values are differently restricted. When the three basic types of
sliding window protocols are explained as special cases of the generalised protocol, the relation of their behaviours to
memory usage at both transmitting and receiving sides is much easier to be seen. A simulator of the generalised sliding
window protocol was implemented and is used for both pedagogic and research purposes, where any of the three basic
protocol types can be chosen to be simulated simply by choosing appropriate values of transmit and receive window
widths. The generalised protocol was shown to be potentially equally efficient as the basic types while using less
resources. From the pedagogic viewpoint, it is extremely important to be aware that a systematic approach to this
complex topic can be both much easier and more understandable for students.
Index Terms Communication Protocol, Communication Protocol Course, Generalisation, .Sliding Window
Protocols.
INTRODUCTION
All modern digital communication systems are built according to the layered architecture referred to as the protocol
stack, with a layer-specific protocol running in each individual protocol stack layer [1]. A layer protocol thus implements
the functionality of the layer. Many different protocols exist, implementing different functionalities. A communication
protocol actually is a distributed algorithm; it is typically quite complex and hence difficult to be understood and even
more to be correctly and efficiently designed, especially by a student.
A communication protocols course is therefore an essential constituent of a modern telecommunications engineering
higher-education programme. Within such a programme, several aspects of communication protocols must be
emphasised:
distributed algorithmic nature of protocols,
systematics of protocol presentation,
specification of protocols,
logical correctness of protocols,
protocol efficiency,
verification of protocol correctness, and
verification of protocol efficiency.
An extremely important functionality of some communication protocols is to detect and correct data errors and
losses that normally occur in noisy communication channels. A class of protocols that can do this job is represented by
so-called Automatic Repeat reQuest (or ARQ for short) protocols that are able to detect transmission errors and losses
and retransmit corrupted or lost packets. ARQ protocols are normally implemented as sliding window protocols. Sliding
window protocols are real-life protocols with their complexities spanning from simple to quite complex. All the aspects
mentioned in the previous paragraph are very relevant for this family of protocols. For all these reasons sliding window
protocols usually form the core of a communication protocols course.
Traditionally, only three special types of sliding window protocols have been presented to telecommunications
students. However, a generalised protocol was recently defined, which allows sliding window protocols to be presented
more systematically. In this paper, the role of the generalised protocol as well as its special cases within a communication
protocols course will be discussed.
TABLE 1
WINDOW WIDTHS OF SLIDING WINDOW PROTOCOLS
Due to the above mentioned difference between go-back-N and selective-repeat protocols it is not possible to specify
both of them with a single specification. Hence it is not easy to systematically present the above three protocols as the
members of a single protocol family to the students. This pedagogic problem stimulated the author to search for a
possibility to present the sliding window protocols more systematically. The result of this research led to the definition of
the generalised sliding window protocol [3].
International Conference on Engineering Education ICEE-2010
2
EFFICIENCY ISSUES
Efficiency is a very important property of communication protocols. It is a measure of the quantity of the service
provided by the communication system per quantity of resources used. Most frequently it is defined as the maximum
information throughput through the system normalized with the nominal transfer rate of the system; however, other
definitions also are possible, heavily depending on which network resources are considered to be more important for a
communication system designer (with the above definition, this is the channel capacity). Efficiency depends on the
properties of the communication channel, on communication traffic and on the communication protocol as well as its
parameters. The communication channel property that most dramatically impacts the efficiency is the channel loss rate.
Losses are mainly due to two reasons: errors provoked by the presence of noise and losses that are provoked by the lack
of resources in network elements. Although the quality of wireline communication channels has been growing steadily in
the past, losses have become again a critical issue with the advent of mobile communication systems where the error rate
of radio-based channels may be many orders of magnitude higher than in wireline networks.
It was told already that the efficiency of the selective-repeat protocol is higher than the efficiency of the go-back-N
protocol. However, this is evidently true only in case of the efficiency definition mentioned in the previous paragraph
where the communication channel capacity is considered as the only communication resource. On the other hand, one
must be aware that the selective-repeat protocol requires more buffer memory due to the larger receive window width
(almost twice as much as the go-back-N protocol), and, due to the more complex memory management at the receiving
side, also more receivers processing power [2].
The receive window width of the generalised sliding window protocol is larger than that of the go-back-N protocol
and smaller than that of the selective-repeat protocol, while the transmit window width is normally the same in both cases
(so that the transmit window never becomes full in the lossless case). Along with the increase of the receive window
width, the amount of the necessary buffer memory also increases. The protocol efficiency, as defined at the beginning of
this section, is also expected to rise with the receive window width. However, both theoretical consideration and
experimental results [4] reveal that the efficiency increases at first with the receive window width, but can saturate at
some intermediate receive window widths, or even slightly drop towards the selective-repeat case. A typical efficiency
versus receive window width dependence is shown in Figure 1.
The dependence of the protocol efficiency on the receive window width that we have just discussed is very important
from both engineering and pedagogic viewpoints as it
gives a protocol designer more freedom in choosing the compromise between the utilisation of channel and memory
capacities, and
can yield equal or even better protocol efficiency while using less memory.
efficiency
secondly because one can either reason first about the special cases and then generalise them, or first reason about the
general case and then consider also the special cases.
Sliding window protocols can be formally specified at very different levels of complexity. Either special cases (with
the stop-and-wait protocol being the simplest) can be separately specified, or the generalised protocol can be first
specified, with such specification being later simplified into special cases. Furthermore, even more granularity in
specification complexity is offered by the possibility to specify the connection setup phase, connection release phase, or
data transfer phase, or all of them.
Efficiency of the sliding window protocols can be analysed either analytically, or using simulation. While the
analysis of the lossless case is very simple, the mathematical analysis of the data transfer across a lossy channel requires
more probability theory based mathematical tools. In case of simulation-based analysis, only the generalised protocol
simulator can be used, as the other protocols are only its special cases. The analysis of the generalised protocol is the
most interesting, as its dependence on the receive window width can be studied, with the go-back-N and selective-repeat
protocols being its special and extreme cases.
We have already indicated that the choice between the go-back-N, selective-repeat and generalised protocols
depends on the compromise between the use of communication channel capacity, buffer memory and computation
complexity. Actually, the essential engineering problems are related to solving different compromises. So the sliding
window case can provide future engineers with an excellent experience.
efficiency
logical correctness
reasoning, typical errors
protocol specification
informal and formal
correctness verification
reasoning, search for deadlocks & livelocks
protocol efficiency
analysis & simulation, presentation of results
FIGURE 3
SLIDING WINDOW PROTOCOL PEDAGOGIC PRESENTATION
CONCLUSION
Sliding window protocols constitute one of the most important communication protocol families both in theory and
practice. Hence, they have gained a firm place in virtually all programmes of higher education communication protocols
courses. However, three special cases, namely stop-and-wait protocol, go-back-N protocol and selective-repeat protocol
are taught, while claiming that they are members of a common protocol family. Indeed, this common family, called
generalised sliding window protocols, has been described and formally specified only recently.
In this paper, we argue that the generalised sliding window protocol should be taught in higher education
communication protocol courses which would make much easier to explain to students how the protocol operation relates
to the transmit and receive window widths. Furthermore, the generalised protocol offers more flexibility in choosing an
appropriate compromise between the use of different resources. Then, stop-and-wait, go-back-N and selective-repeat
protocols should be explained as the special cases of the generalised protocol.
In the paper, the most important issues relating both the sliding window protocols theory to be taught to students as
well as the practical work to be done by students are exposed. The topics described include the protocol operation,
informal and formal specification, correctness verification, and efficiency. The knowledge and experience thus gained by
students will not be limited to mastering sliding window protocols only, but communication protocols on general.
ACKNOWLEDGEMENT
This work was supported in part by the research programme Algorithms and optimisation methods in
telecommunications of the Ministry of Higher Education, Science and Technology of the Republic of Slovenia.
REFERENCES
[1]
Stallings, W., Data and Computer Communications, 8th Ed. , Pearson Education International, Upper Saddle River: 2009
[2]
Tanenbaum, A., S., Computer Networks, 3rd Ed., Prentice-Hall International, Upper Saddle River: 1996
[3]
Hercog, D., " Generalised sliding window protocol", Electron. Lett., Vol 38., No 18., 2002, pp. 1067-1068
[4]
Hercog, D., " Generalization of the basic sliding window protocol", Int. j. commun. syst., Vol 18., No 1., 2005, pp. 57-75
[5]
International Telecommunication Union, " Specification and Description Language (SDL)", ITU-T Z.100, International Telecommunication
Union, Geneva: 2007
[6]
Babich, F., Deotto, L., "Formal Methods for Specification and Analysis of Communication Protocols", IEEE Communications Surveys &
Tutorials, Vol, 4, No 1., 2002, pp. 2-20
[7]
Lai, R., Jirachiefpattana, A., Communication Protocol Specification and Verification, Kluwer Academic Publishers, Boston/Dordrecht/London:
1998
[8]
Hercog, D., " The role of formal languages in engineering education", ICEE-2004, Gainsville, Florida, October 17-21, 2004
[9]
Doldi, L., UML 2 Illustrated, Developing Real-Time & Communications Systems, TMSO, 2003