## Computer system and concurrency

Part 1
Goal: Design packet based networking solutions for a video streaming application.
A user in Tokyo wants to stream a live video over 100 minutes from a server in London.The
communication happens with a fiber optic cable through a public ISP. Assume the Seven
Layer Open Systems Interconnection (OSI) model is used in communication between the
two devices.
Consider the following specifications:
Channel bandwidth : 120 Msymbols/s
RGB 16K video signal spatial resolution : 15,360 x 8,640
Frame rate : 150 fps
Bits/pixel : 12
Video compression rate : 300
Modulator : 1,024 QAM
Interleaver : 150×300 block interleaver
Convolutional encoder : Rate 4/5 encoder
Header/Tail Lengths
• Application Layer : 5 bytes
• Presentation Layer : 7 bytes
• Session Layer : 10 bytes
• Transport Layer : 20 bytes
• Network Layer : 19 bytes
• Data Link Layer : 15 bytes (Header), 10 byes (Tail)
Data packet size : 10,000 bits
The cable length between London and Tokyo : 13,000km
Speed of the light : 3 x108 m/s
Refractive index in the fiber optic cable : 1.5
2
Calculate the followings:
1. The data rate at the physical layer after the channel coding.
2. Calculate the QAM symbol rate required.
[5%]
[5%]
3. Assuming the UDP is used in streaming the video, can the user stream the
video in real-time? Support your answer with calculations.
[5%]
4. How long it will take the user to download it?
[5%]
5. If the streaming switched to TCP and packets are dropped at a rate of 5%,
calculate the maximum TCP throughput.
[5%]
6. Comment on the packet size in streaming the above video in an error-prone
environment like in a mobile application?
[5%]
7. Comment on the channel coding, QAM and video compression rate used in this
scenario. How do you adjust them to obtain real-time performance in the proposed
network communications? What modifications you need to do when the
communication channel is switched to a wireless channel such as a satellitechannel?
[5%]
8. Now assume that the frame rate has been increased to 300 frames per second and
all other specifications are remained same, calculate the optimum packet size which
will allow the user to stream the content in real time. Comment on the observations.
Show your calculations clearly.
[5%]
9. Instead of channel coding, it was proposed to investigate the suitability of CRC and
checksum as a mechanism to handle the channel errors. If the following
specifications are provided, calculate the new required channel symbol rates when
CRC and Checksum are used for real-time streaming. Comment on the results.
■ Consider the CRC generator is x7 + x6 + x4 + x3 + x + 1.
■ CRC block size : 16 bits
■ Checksum block size : 16 bits
■ Checksum length : 8 bits
■ Frame rate : 150 frames/second
[5%]
3
10.Due to the significant distance between two cities, it is needed to use repeaters
throughout the optical cable. If following specifications are given, calculate the
number of repeaters need in meeting the requirements. Clearly show the
calculations.
■ Transmitter power: 100W
■ Attenuation : 0.2dB/km
■ Repeater sensitivity: 0.01 mW
■ Repeater amplification: 100
■ Receiver sensitivity: 100mW
[5%]
Deliverable 1: A Report with all calculations and answers to above questions.
Part 2
Goal: Implement a unidirectional Reliable Data Transfer (RDT) transfer layer
protocol.
See Section 3.4 of the class textbook for more information.
Stage 1: Implement a stop and wait RDT transport layer protocol
You need to write the sending and receiving transport level code for a stop and wait
RDT protocol. Your protocol must be able to handle all situations that can occur when
sending packets over the network layer.
Since you don’t have standalone machines (with an OS that you can modify), your
code will have to execute in a simulated hardware/software environment you will be
provided with. However, the programming interface provided to your routines, i.e., the
code that would call your entities from above and from below is very close to what is
done in an actual UNIX environment. Stopping/starting of timers are also simulated,
and timer interrupts will cause your timer handling routine(s) to be activated.
You will be provided with the following code:
• Main.java – the main method for executing the simulation. You will need to set the
sender and receiver.
• NetworkSimulator.java – this simulates the network and allows us to insert controlled
errors into our data. DO NOT CHANGE ANY CODE IN THIS FILE.
• TransportLayer.java – an abstract transport layer class. This defines the minimum
required functionality for a transport layer.
• TransportLayerPacket.java – defines the transport layer packet. You may need to
add extra fields and methods to this class.
4
You can download the code from here:
https://gitlab.cis.strath.ac.uk/gcb17199/rdtassessmentstarter
You can use the following methods in the NetworkSimulator class to help with your
implementation:
• sendToApplicationLayer(TransportLayer source, byte[ ] data)
• sendToNetworkLayer(TransportLayer source, TransportLayerPacket pkt)
• startTimer(TransportLayer t, double increment) – start timer for t. Timeout will occur
at current simulation time + increment
• stopTimer(TransportLayer t) – stop timer event for t (if one exists)
You can change the parameters of sim (the NetworkSimulator instance) in main to
test your protocol implementation.
NOTE:
• You shouldn’t use sockets in this implementation as we are simulating the transport
layer
• You can’t block application layer messages as you can’t assume that your program
will be ready to read the next packet of data when it arrives
• Code should not make use of external libraries or frameworks
[25%]
Stage 2: Implement a pipelined RDT transport layer protocol
Copy your code from stage 1 and extend it to use pipelining.
[10%]
Deliverable 2: A Report with following information must be submitted. All Java
code from Stage 1 and 2 must also be submitted (See below for instructions).
Stop and Wait RDT:
1. Your packet format and an explanation of all the fields.
2. Explain all situations that can occur when sending packets and how you handle
them.
3. Post screenshots of each situation being handled and include the code fragments
that handle them.
4. How you tested your code? (Note: I’m not looking for extensive JUnit tests but tests.
to show your protocol works for all situations).
Pipelining:
1. Explain how you handled pipelining.
2. Explain steps 1-4 from above for pipelining. If there is no change to a specific part
just state it is the same.
5
Workload report:
1. State of functionality your program achieved.
2. Details of the tasks involved in completing the project.
3. What team members completed what tasks?
4. Summary of how worked together as a team.
5. Lessons learned and what you would do differently next time.
GitLab
All java files should be committed to a repository on Gitlab. Code should be pushed to
the team GitLab repository at a minimum once a week. One member of the team
should create the GitLab repository called ‘CS313 Networking Team? 2022’ where?
should be replaced with the team number and share it with the other team members,
as well as the lecturer and the demonstrators.
Note that the lecturer and the demonstrators must be assigned the role of reporters or
above to allow them access to the code. This can be achieved through the web
interface by accessing specific repository settings, then selecting ‘members’ and
searching for the person you wish to add and identifying their role. It is expected that
each team member will be contributing to the implementation, and hence be pushing
code to the GitLab repository.
Peer Assessment
The mark for this project may be adjusted proportionately to represent individual
contributions to the work. Adjustments based on individual contribution will be
established using a peer evaluation form, review of commits to GitLab, and a workload
report submitted by each team. Team members are required to agree a workload
record and include it in the final written report as detailed above.
Team members are required to complete their own personal assessment of their team
mates. This will be established using a peer assessment activity on MyPlace. Each
member of the team must complete the peer assessment activity on MyPlace by the
final submission deadline for the project. This involves allocating a score of 1-5 to each
team member, including yourself, to reflect the individual’s contribution to the project.
A score of 1 means there was little or no contribution, a score of 5 means they made
a significant contribution to the project. If you do not to submit a peer assessment,
then it will be assumed all team members made a significant contribution to the project.
The peer assessment of contributions is due for the final submission deadline for the
project.
[15%]

Powered by WordPress