CSYS 2051

NETWORKS & COMMUNICATIONS

PROGRAMMING ASSIGNMENT OPTION

Sliding Window Graphical Simulation

revision 1

 

1 Introduction

Sliding Windows are link level protocols used to transfer data between two terminals on a point to point link. The data items are called Frames. A key essential for any sliding window protocol is that the frames are given a unique Sequence Number. Copies of all unacknowledged frames are stored in a Re-Transmission Buffer. These copies can then be used to re-transmit lost or corrupted frames. As soon as a frame has been acknowledged it is deleted from the re-transmission buffer, and its’ sequence number can then be assigned to a new frame.

One error correcting technique is known as GO-BACK-TO-N. This means that if any frame is corrupted, or lost, then the receiver discards all subsequent frames. The transmitter is requested to ‘go back’ to the corrupted frame and restart transmission from that point.

The receiver must be able to detect two different types of error. Receipt of a corrupted frame, and receipt of an ‘out-of-order’ frame.

The transmitter must implement a Time-Out. This means that if a frame is not acknowledged after a predetermined length of time, then the transmitter assumes that it has been lost and re-transmits the copy that it held in its’ re-transmission buffer.

Flow control occurs in two ways. If the transmitters’ re-transmission buffer is full then it must wait for an acknowledgement before sending any more data. The receiver can also explicitly instruct the transmitter to stop sending data using a pair of Flow Control commands (RR and RNR).

Sliding window protocols are usually Full Duplex, with frames travelling in both directions. This allows the implementation of Piggy Back Acknowledgements, which reduces the protocol overhead.

2 Your Task

You are required to specify, design and develop a graphical programme that will simulate the operation of a Go-Back-To-N protocol on a PC or UNIX workstation screen.

The user must be able to set up and adjust the following parameters

Your programme should then step through each time slot in turn, and show frames travelling across the screen. Each frame must be correctly labelled, and also show the piggyback acknowledgement.

These frames are

I(S,R) Information frames with a Send and receive number

RR(R) Receiver Ready Frame with a Receive Number

RNR(R) Receiver Not Ready Frame with a Receive Number

REJ(R) Reject Frame with a Receive Number

3 Specification

Before you implement your design you are required to produce a SPECIFICATION. A specification is a statement of all the requirement for the a particular system, it is not the implementation. For example it should look something like --

A layer 2 protocol links two points together in a network.

(i.e. clearly state the problem)

The user must be able to enter the size of the sliding window

The programme will be written using C++, and be implemented as a Console Programme

etc.

I hope that you now have the idea. A specification is a tool that helps you to think through a problem clearly. By listing all of the requirements first, you can then analyses the problem clearly, and offer solutions.

A SPECIFICATION IS A STATEMENT OF ‘WHAT WE WANT’ not ‘HOW TO DO IT’

Please do not include ANY technical solutions in your SPECIFICATION

 

4 Analysis And Options

Once you have written up the specification you can analyse the problem, and develop a solution. Wherever possible you should propose ALTERNATIVE solutions for each line of the specification, and analyse the advantages/disadvantages of selecting a one or the other option.

When you are developing any programme the last thing that you do is rush to a keyboard and start typing in code. You must go through the following sequence of events -

CLEARLY STATE WHAT WE ANT TO DO - THE SPECIFICATION

ANALYSE HOW TO DO IT

PRODUCE A DESIGN

Only once you have completed all of these three stages can you start coding.

Look at the attached marking scheme. More marks will be awarded for those of you who have performed ALL OF the following tasks -

1) PREPARED A CLEAR SPECIFICATION

2) FOR EACH LINE OF THE SPECIFICATION HAVE PROPOSED ALTERNATIVE SOLUTIONS

3) HAVE ANALYSED THESE ALTERNATIVES AND SELECTED A PREFERRED SOLUTION

4) HAVE THEN IMPLEMENTED THAT SOLUTION

 

5 Implementation

Your solution should be developed using any programming language of your choice.

You are strongly advised to also include a DESIGN as well as the code. Your design should be a graphical representation of your proposed programme structure. You are however free to use any formal design method of your choice.

6 Presentation

The final report should be written in a professional format, with the assumption the first reader is non-technical. A suggested structure is as follows -

CONTENTS

SUMMARY

RECOMMENDATIONS

SPECIFICATION

ANALYSIS

SUPPORTING TECHNICAL DATA

BIBLIOGRAPHY

7 Marking Schedule

Marks will be awarded as follows -

SPECIFICATION 10%

A full and detailed specification, clearly itemising all the system requirements, constraints and assumptions will be worthy of an A grade. A minimal specification, simply stating a few items will be down to a D grade

ANALYSIS 20%

A full analysis of a range of alternative solutions with supporting technical justifications will gain A grades. Minimal or no analysis, with no alternatives considered will be down to D grades. Your design will also be assessed at this stage.

IMPLEMENTATION 50%

A comprehensive implementation that achieves all of the required specification, in a credible manner, will achieve A grades. Minimal or no code, that misses out key functionality, or is not credible, will be down to D grades.

PRESENTATION 20%

This covers report layout, legibility, spelling etc. A well written and presented report with a professional layout will get an A. A poorly written report, with no structure and poor grammar will get a D

 

Criteria

Grade F

Grades D,D+

Grades C-C,C+

Grades B-,B,B+

Grades A-

A,A+

SPECIFICATION

.

No analysis of the system requirements

No Specification

Some brief attention to system requirements Preparation of a minimal specification

Most of the system requirements considered in some detail, with a minimal specification prepared.

A well though out and clearly presented list of system requirement. A detailed specification for most/all system needs. Suitable for immediate use as part of a Design and Engineering programme

Preparation of clear and concise set of Requirements and Specifications for the complete system. Demonstrating a high professional content, suitable for immediate use by a design company.

Analysis

No Technical solutions offered. No technical analysis of their suitability.

Some technical solutions offered. But no alternatives put forward, and no technical analysis of the advantages or disadvantages of the selected solutions

Some alternatives put forward. A brief discussion of these alternatives with preferred solutions stated

Alternative solutions offered for most of the system, together with a brief analysis of the advantages & disadvantages of each. Preferred solutions selected

A number of solutions offered for all of the system that could achieve the whole of the requirements and specification. With a detailed technical analysis of the advantages and disadvantages of each. The selection of a preferred option with supporting technical analysis

Implementation

All the offered solutions are impractical, or incorrect.

The programme does not work or run

A minimal award, for offering at least something that is practical, but fails to implement the whole system.

The programme does something, and implements a few of the requirements.

Most of the solutions offered are feasible.

The programme runs, and implements most of the requirements.

The selected options may not be the best, but the their selection is supported by the arguments put forward in the report.

The programme implements all of the requirements.

The selected options offer the most cost effective, and practical solution to all the problems.

The programme implements all of the requirements, and presents the results to the user in a meaningful and professional manner.

Presentation

Poorly presented, including poor spelling, grammar and layout.

A barely acceptable report that is at least legible, with no clear structure or layout

A reasonable report with a clear structure. Needs attention to the layout (e.g. the layout is not suitable for the intended audience). Varies in attention to detail

A good presentation

An excellent report, well structured report, with clear headings, sub-headings and layout. Representing a professional piece of work

8 Hand In Date

Friday 7th April at 2 p.m.

You are required to hand in your programme code on a disc, together with a written report.

To be handed in to the CSE support office James Went Building room 0.15