Professional Documents
Culture Documents
Question 1.1
a) Define latency as a metric of network performance, and explain what its component parts
are.
[4 marks]
Ans: Latency is the amount of time a message takes to traverse a system. In a computer
network, it is an expression of how much time it takes for a packet of data to get from one
designated point to another. It is sometimes measured as the time required for a packet to be
returned to its sender. Latency has following several parts like.
Processing delay time routers take to process the packet header
Queuing delay time the packet spends in routing queues
Transmission delay time it takes to push the packet's bits onto the link
Propagation delay time for a signal to reach its destination
b) Besides latency, what is the other key metric of network performance?
[1 mark]
Ans: Besides latency, there are the following other key metric of network
performance.
Bandwidth and throughput
Uptime or responsiveness
Jitter
Hardware and software
c) Give an example of an application for which latency is the more critical of the two key
network performance metrics.
[1 mark]
Ans: Voice over IP (VoIP) or any other application that relies on live, real-time transmission of
video or audio, you need to ask your service provider about their latency.
Question 1.2
Give one example of an application for which bandwidth is more critical than latency.
[1 mark]
Question 1.3
a) List two advantages of using a layered approach to network architecture.
[2 marks]
Ans: 1. Layered architecture enables teams to work on different parts of the application parallely with
minimal dependencies on other teams.
b) Suppose the designers of this link wanted to run TCP over it. Identify two distinct challenges
that they would have to deal with - one as a result of the large distance between Earth and
Mars, and the other as a result of the large delay * bandwidth product of the link.
[2 marks]
Ans:
Designers will have following problems like.
1. Transmission delay
2. Elephants: the term elephant refers to a network that is deemed to be "long" and "fat."
"Elephant" is derived from the acronym for long fat network, LFN. An LFN is a network that is
composed of a long distance connection ("long") and high bandwidth capacity ("fat").
So they will need to provide high bandwidth capacity for long distance.
Suppose you have been asked to design an optimal ARQ strategy for this link. Identify two distinct
challenges your design will need to consider as a result of the large variance in distance between
Earth and Mars?
[2 marks]
Ans:
1. Packet Loss on a Link due to large variance in distance
2. Delay Across a Link
3. Defining ARQ Protocols persistency for large distance variance
a) List three advantages and/or disadvantages of using a layered approach to network architecture.
[3 marks]
Advantages:
1. Layered architecture increases flexibility, maintainability, and scalability.
2. Multiple applications can reuse the components.
3. Different components of the application can be independently deployed, maintained, and
updated, on different time schedules.
Disadvantages
1.
There might be a negative impact on the performance as we have the extra overhead of passing through layers
instead of calling a component directly.
2. Development of user-intensive applications can sometime take longer if the layering prevents the use of user
interface components that directly interact with the database.
3. The use of layers helps to control and encapsulate the complexity of large applications, but adds complexity to
simple applications.
List the names of the two layers in the OSI model that do not appear explicitly in our 5-layer model.
[1 mark]
Ans: Session and presentation layers does not come in 5 layer model
Q:
Suppose a 100 Mbps point-to-point link is being set up between the earth and a new lunar colony. The
distance from the moon to the earth is approximately 384,000 km, and data signals travel at the speed
of light 300,000 km/second.
a) Calculate the minimum RTT (Round trip time) for the link. Show your working.
Ans:
Minimum RTT = 2 x Propagation
Propagation = Distance / Speed of Light
= 2 x 385000 km / 3 x 108 m/s
= 2 x 385000000 m / 3 x 108 m/s
= 2 x 385 / 300 sec
= 2.57 sec
b) What is the significance of the minimum RTT value when implementing reliability on this link?
Ans: The important part of calculating RTO is to determine how long it takes for a
segment to go to the receiver and for ACK to come back from receiver to sender. This is a
Round Trip Time, or RTT. In some ideal world (and very static for that matter) this value
would be constant and would never change. And RTO would be easy to determine, it is
equal to RTT, maybe slightly slightly larger, but nevertheless the two would be almost
equal.
c) Using RTT as a delay, calculate the delay * bandwidth product for the link. Show your working.
Ans:
Delay x Bandwidth = 2.57 sec x 100 Mbits/sec
= 257 Mbits
= 257/8 MB
= 32MB
d) What is the significance of the delay * bandwidth product value when implementing reliability on
this link?
Ans: This represents the amount of data the sender can send before it would be possible to receive a
response.
This is the minimum amount of sent-but-unacknowledged data the sender must be able
to handle if it wants to keep transmitting at the full bandwidth of the link.
In other words, if the sender has less send-buffer space than this, it cannot utilise the full
capacity of the link.
Question 3.2
What is framing, and how does it help the link layer to improve upon the services provided by the
physical layer?
[3 marks]
Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are
meaningful to the receiver. Ethernet, token ring, frame relay, and other data link layer technologies have
their own frame structures. Frames have headers that contain information such as error-checking codes.
Improve upon the services:
In physical layer framing improves services provided by physical layer by following functions.
1. Error Control
The bit stream transmitted by the physical layer is not guaranteed to be error free. The data link layer is
responsible for error detection and correction.
2. Flow Control
If the sender keeps pumping out frames at high rate, at some point the receiver will be completely swamped
and will start losing some frames. This problem may be solved by introducing flow control. Most flow control
protocols contain a feedback mechanism to inform the sender when it should transmit the next frame.
3. Stream resynchronisation.
If a sender gets confused about the interpretation of a stream of incoming bits, framing enables the receiver to
recognise the start of a subsequent frame and correctly interpret subsequent data. Some frames may still be
lost, but at least that doesn't doom us to losing all subsequent incoming data. Without framing, this would be
extremely difficult (likely impossible).
4. In addition, framing facilitates addressing (useful on a shared medium or a switched
network), and multiplexing (frames from separate data flows can be interleaved).
Question 3.3
A stream of 4 bytes of data is to be transmitted with 2-D parity data added. The output stream is to
consist of (in this order):
1. the four data bytes (32 bits)
2. four row-parity bits (one for each byte)
3. eight column-parity bits
4. one corner parity bit
Odd parity is used throughout.
Here is the stream of bits received at the destination:
01010010110100101011111001110101 0110 10110100 1
Is the received data free of bit-errors? Justify your answer.
[4 marks]
a) Convert this 48-bit binary Ethernet address into its hexadecimal equivalent:
0001 0000 00100100 00101111 11110100 10011001 11000011.
[2 marks]
Ans:
10242FF499C3
a) Ethernet addresses are supposed to be globally unique. Briefly explain the standard strategy for
ensuring this.
[1 mark]
The MAC address is a 48 bit address that is considered unique so that each component can be
positively identified across as many networks as it is used on. The IEEE standard posits a 100 year
life span for all MAC-48 addresses; in other words, no other device will have a particular device's
MAC address for 100 years.
b) Explain why a sliding window ARQ is preferable to a stop-and-wait ARQ.
[2 marks]
Sliding window ARQ preferable to stop and wait ARQ because Sliding window ARQ provides unique consecutive
sequence number and the receiver uses the numbers to place received packets in the correct order, discarding duplicate
packets and identifying missing ones
b) What is framing, and how does it help the link layer to improve upon the services provided by the
physical layer?
[3 marks]
Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are
meaningful to the receiver. Ethernet, token ring, frame relay, and other data link layer technologies have their
own frame structures. Frames have headers that contain information such as error-checking codes.
Improve upon the services:
In physical layer framing improves services provided by physical layer by following functions.
1. Error Control
The bit stream transmitted by the physical layer is not guaranteed to be error free. The data link layer is
responsible for error detection and correction.
2. Flow Control
If the sender keeps pumping out frames at high rate, at some point the receiver will be completely swamped and
will start losing some frames. This problem may be solved by introducing flow control. Most flow control
protocols contain a feedback mechanism to inform the sender when it should transmit the next frame.
3. Stream resynchronisation.
If a sender gets confused about the interpretation of a stream of incoming bits, framing enables the receiver to
recognise the start of a subsequent frame and correctly interpret subsequent data. Some frames may still be lost,
but at least that doesn't doom us to losing all subsequent incoming data. Without framing, this would be
extremely difficult (likely impossible).
4. In addition, framing facilitates addressing (useful on a shared medium or a switched
network), and multiplexing (frames from separate data flows can be interleaved).
Explain in specific detail why the Ethernet frame format includes an optional pad field.
[4 marks]
Question 3.5
What does the acronym ARP stand for? State it's role in the network, and briefly outline its principal
request/reply mechanism.
[3 marks]
Assume that a switch will assign virtual-circuit identifiers sequentially, starting at zero, and that all virtual
circuit tables are initially empty. Give the complete virtual circuit table for each individual switch after all
of the following connections are established in sequence:
1. Host A connects to Host B
2. E connects to J
3. F connects to B
4. E connects to B
[6 marks]
1) Host A to B
At Switch 1
Incoming Interface
Incoming VCI
Outgoing Interface
Outgoing VCI
Page 7 of 30
Question 4.2
Explain why IPv4 does reassembly only at the destination host, and not at intermediate routers?
[2 marks]
Question 4.3
Link-state and distance-vector are two major classes of routing algorithms. Briefly explain the key
conceptual difference between these two approaches. Specifically, in each algorithm what information
do network nodes send out, and which nodes do they send it to?
[2 marks]
Question 4.4
Consider a 1300-byte IP datagram with an identification number of 426 travelling through a network. It
arrives at a router which decides to forward it over a link with an MTU of 512 bytes. How many
fragments are generated, and what are their characteristics (size, offset, flag bits, and identification)?
Assume that only standard IP headers are used.
[4 marks]
Question 5.2
State the full terms represented by the following acronyms:
[2 marks]
TCP
UDP
IP
ICMP
Question 5.3
Suppose that host A sends two consecutive TCP segments to host B over a TCP connection:
the first, segment X, has sequence number 807, and is lost in transit.
the second, segment Y, has sequence number 828, and arrives successfully at B.
b) How much payload data is in segment X?
[1 mark]
c) Suppose that all data prior to segment X has already arrived at host B and has been
acknowledged. When segment Y arrives at host B, what acknowledgement number will host B
send back to host A?
[2 marks]
d) Suppose that host A sends two consecutive TCP segments to host B over a TCP connection. The
first segment has sequence number 90; the second has sequence number 112.
1) How much data is in the first segment?
[1 mark]
2) Suppose that the first segment is lost but the second segment arrives at B. In the
acknowledgement that host B sends to host A, what will be the acknowledgement number?
[2 marks]
Question 5.4
It is sometimes claimed that UDP is faster than TCP. Explain some arguments for and/or against this
assertion.
[4 marks]
e) What is the three-way handshake used to establish a TCP connection? What information is
passed between the two hosts at each stage?
[3 marks]
Question 6.2
Why does DNS usually run on top of UDP rather than
on TCP?
[2 marks]
Question 6.3
Explain how HTTP/1.1 can reduce latency compared
to HTTP/1.0.
[2 marks]
Question 6.4
An HTTP proxy cache can be usefully deployed in a
client network or in a server network. What benefits
can be achieved in each scenario?
[3 marks]
Question 7.5
Why is the Telnet protocol regarded as a security risk?
[2 marks]
Question 7.2
The following cipher text has been encoded with the
Caesar Cipher (ROT-3):
jrrg ghfubswlrq
Recover the original plaintext.
[2 marks]
Question 7.3
What is a frequency analysis attack, and why are
substitution ciphers particularly vulnerable to such
attacks?
[2 marks]
Question 7: Reliability
Question 8.1
Consider transmitting data over a series of unreliable links with the following characteristics:
end-to-end path traverses 3 separate links
a link-layer frame transmitted over any one link has a 95% chance of being delivered intact to the
other end of that link
the Transport-Layer packets being transmitted are too large for the Link-Layer MTUs, and must
each be broken down into 8 separate Network-Layer packets, each of which fits in one LinkLayer frame.
What is the probability of a Transport-Layer packet being successfully delivered without triggering
Transport-Layer retransmission if the Link Layer provides..
b) an unacknowledged connectionless service (no retransmission of lost frames)? Show your
calculations.
[2 marks]
attempt plus up to three retries) for a lost/damaged frame? Show your calculations.
[4 marks]
Question 8.2
Discuss the pros and cons of implementing reliability at the Link Layer versus implementing it at the
Transport Layer.
[5 mark]
b) Describe what is meant by reliability in the context of computer networks, and discuss the
pros and cons of implementing reliability at the Network Layer versus implementing it at the
Transport Layer.
[6 marks]
Question 9.2
What is starvation? Propose a strategy for avoiding starvation in a priority scheduling algorithm.
[2 marks]
Question 9.3
In a mono-programming batch environment, what scheduling algorithm will optimise average turnaround
time? What is the main difficulty with implementing this algorithm?
[2 marks]
Question 9.4
Multiprogramming allows multiple processes to be resident in memory at the same time and leads
to more efficient utilisation of the CPU.
a) What is the formula for calculating the CPU utilisation based on a simplified analysis of
multiprogramming?
[0.5 marks]
U = .......................................
b) State the meaning of each term in your formula.
[1.5 marks]
Question 9:
Question 10.1
a) Consider the following sequence of resource allocation requests. Assume that there is only one
instance of each resource, a resource can only be allocated to one process at a time, and
resource requests are immediately granted if the resource is available.
Process P1 requests Resource R1.
Process P2 requests Resource R2.
Process P3 requests Resource R3.
Process P2 requests Resource R4.
Process P1 requests Resource R2.
Process P1 requests Resource R3.
Draw a resource allocation graph to depict the current state. Is the system currently deadlocked?
Give a reason for your answer.
[4 marks]
b) Following on from the above scenario, Process P3 requests Resource R4. Is the system
deadlocked now? State your reason/s.
[1 mark]
Question 10.3
The following diagram illustrates the synchronisation we would like to achieve between a set
of cooperating processes:
We want process A's critical region to complete before either B's or C's critical regions commence, and D
should not commence its critical region until both B's and C's critical regions have completed.
Eight binary semaphores have been set up called sem1, sem2, , sem8. Each has been initialised to
zero. You may use any of them that you need.
For each process (A, B, C, & D), write signal() and wait() calls to be called before/after the critical region
that would enforce the desired synchronisation. Use only as many separate semaphore objects in your
solution as you actually require for a simple, straightforward solution.
Where no signal()s or wait()s are required, write none.
[4 marks]
Process
A
Question 10.4
c) List and briefly describe the four conditions that must apply for deadlock to occur.
[6 marks]
Q2.4 [4 marks]
Binary semaphores, general semaphores, and monitor condition variables all
provide signal() and wait() operations that seem quite similar. However, if
there is no thread/process currently wait()ing, a signal() is handled quite
differently by the three different types of synchronisation objects. State
concisely and precisely what that difference is.
c) One possible solution to the Dining Philosophers problem is to get some of the philosophers to
pick up their left chopstick first and then their right chopstick, whilst others pick up their right
chopstick first followed by their left chopstick.
This strategy negates one of the above four conditions of deadlock. State exactly which one.
[2 marks]
Question 11.2
A process is running on a machine with 8-bit memory addresses, and it's page table is as follows:
Page
Number
Frame
Number
Valid?
00
00
01
11
10
01
11
01
[1 mark]
b) What 8-bit physical address corresponds to the virtual address 10010111? Show your working.
[2 marks]
c) Give one example of a non-zero 8-bit virtual address that will generate a page fault.
[1 mark]
Question 11.3
A process has 8 virtual pages, and a resident set size (RSS) limit of 4 physical frames. The process
needs to access data on the following pages (in this order): 0,1,7,2,3,2,7,1,0,3,2. Assume the 4 frames
are initially empty. How many page faults occur if the system uses a LRU page replacement strategy?
Show your working.
[3 marks]
Question 11.4
The following two code fragments each calculate the sum of all elements in a two-dimensional array.
/* code fragment #1 */ for(int
c = 0; c < cols; c++){
for(int r = 0; r < rows; r++){
sum += array[r][c];
}
}
/* code fragment #2 */ for(int
r = 0; r < rows; r++){
for(int c = 0; c < cols; c++){
sum += array[r][c];
}
}
Assuming the compiler will lay out a 2-D array in row-wise fashion, which piece of code conforms more
closely to the principle of locality? Explain.
[3 marks]
Question 11.5
Define internal fragmentation and external fragmentation. Which type of fragmentation is often
associated with static memory partitioning schemes?
[3 marks]
Question 11.6
Describe what each of the following is, and what problem it is intended to solve:
page table
inverted page table
translation look-aside buffer
[6 marks]
Q3.4
Q3.9
Question 13.2
Imagine your manager has asked you to collect system performance statistics on a large server to
determine how best to improve system performance. Outline and justify your strategy for collecting the
necessary evidence.
[5 marks]
Q7.1 [6 marks]
Q7.2 [3 marks]