0% found this document useful (0 votes)
27 views22 pages

Comp2207 201617 01 Comp2207

Uploaded by

chunyi20198
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views22 pages

Comp2207 201617 01 Comp2207

Uploaded by

chunyi20198
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

UNIVERSITY OF SOUTHAMPTON COMP2207W1

SEMESTER 1 EXAMINATION 2016-2017

DISTRIBUTED SYSTEMS AND NETWORKS

DURATION 90 MINS (1.5 Hours)

Student ID:

You must write your Student ID on this


page.
Double Arith.
You must not write your name anywhere
Question Marks marked Check
on the paper.

All answers must be written within the


designated spaces in this booklet.
No credit will be given for answers pre-
sented elsewhere.

You are advised to write using a soft pen-


cil so that you may readily correct mis-
takes with an eraser.
You may use blue books for scratch—they
will be discarded without being looked at.

Total

Answer ONE question from section A (50 marks)


and ONE question from section B (50 marks).

This examination is worth 50%. The coursework was worth 50%.

An outline marking scheme is shown in brackets to the right of each question.

Only University approved calculators MAY be used.

A foreign language translation dictionary (paper version) is permitted provided it


contains no notes, additions, or annotations.

Copyright 2017 c University of Southampton Page 1 of 22


2 COMP2207W1

• This page is intentionally left blank—do not write in this space •

Copyright 2017 c University of Southampton Page 2 of 22


3 COMP2207W1

Section A
A1

(a) Use two examples to illustrate the different degrees of masking failures in
distributed systems. [5 marks]

(b) Describe the socket mechanism and its use in inter-process communica-
tion. Briefly describe the use of sockets for UDP and TCP communica-
tion, outlining similarities and differences. A high-level description without
reference to specific methods in the Java API for UDP/TCP is sufficient.
[15 marks]

TURN OVER
Copyright 2017 c University of Southampton Page 3 of 22
4 COMP2207W1

Copyright 2017 c University of Southampton Page 4 of 22


5 COMP2207W1

(c) (i) Describe the operation of a distributed Message Queue (MQ) system.
[5 marks]

(ii) Outline how a package supporting Message Queues might be imple-


mented using Java RMI. Your answer should identify the main classes
and functionality such a package would provide, and explain their use
by clients requiring access to either shared or private queues. [15 marks]

TURN OVER
Copyright 2017 c University of Southampton Page 5 of 22
6 COMP2207W1

(d) Explain the difference between using a MQ system and


(i) sending characters over a TCP connection,
(ii) using a remote method invocation,
(iii) sending email messages.
[10 marks]

Copyright 2017 c University of Southampton Page 6 of 22


7 COMP2207W1

TURN OVER
Copyright 2017 c University of Southampton Page 7 of 22
8 COMP2207W1

A2

(a) Define the distributed mutual exclusion problem and list the three correct-
ness properties a distributed mutual exclusion algorithm must satisfy. [5 marks]

(b) Show how logical clocks can be used in conjunction with multicast to ensure
the correctness properties identified in your answer to part (a). Your answer
should outline a distributed algorithm and explain why each of the three
correctness properties is satisfied. [20 marks]

Copyright 2017 c University of Southampton Page 8 of 22


9 COMP2207W1

TURN OVER
Copyright 2017 c University of Southampton Page 9 of 22
10 COMP2207W1

(c) A server manages objects a1 , a2 , . . . , an and provides two primitives:

• read(i) returns the value of ai ;


• write(i, value) assigns value to ai .

Two transactions T and U are defined as follows:

• T : x = read(j); y = read(i); write(j, 44); write(i, 33);


• U : x = read(k); write(i, 55); y = read(j); write(k, 66).

Define what is meant by a serially-equivalent interleaving, and provide (with


a detailed explanation) two non-trivial serially-equivalent interleavings of the
transactions T and U . [15 marks]

Copyright 2017 c University of Southampton Page 10 of 22


11 COMP2207W1

(d) Describe the two-phase commit protocol for distributed transactions. [10 marks]

TURN OVER
Copyright 2017 c University of Southampton Page 11 of 22
12 COMP2207W1

Copyright 2017 c University of Southampton Page 12 of 22


13 COMP2207W1

Section B

B 3 The output below shows a DNS record for ecs.soton.ac.uk retrieved with
dig -t any ecs.soton.ac.uk.

;; QUESTION SECTION:
;ecs.soton.ac.uk. IN ANY

;; ANSWER SECTION:
ecs.soton.ac.uk. 84600 IN SOA raven.ecs.soton.ac.uk.
hostmaster.ecs.soton.ac.uk. 2016102522 7200 3600 604800 3600
ecs.soton.ac.uk. 3600 IN MX 5 mx.ecs.soton.ac.uk.
ecs.soton.ac.uk. 3600 IN MX 5 mx2.ecs.soton.ac.uk.
ecs.soton.ac.uk. 84600 IN NS dns1.brad.ac.uk.
ecs.soton.ac.uk. 84600 IN NS ns0.ecs.soton.ac.uk.
ecs.soton.ac.uk. 84600 IN NS ns2.ecs.soton.ac.uk.
ecs.soton.ac.uk. 84600 IN NS ns1.ecs.soton.ac.uk.
ecs.soton.ac.uk. 84600 IN NS dns0.brad.ac.uk.
ecs.soton.ac.uk. 1800 IN TXT "v=spf1 mx ?all"
ecs.soton.ac.uk. 1800 IN AAAA 2001:630:d0:f104::80a
ecs.soton.ac.uk. 1800 IN A 152.78.189.67
;; ADDITIONAL SECTION:
mx.ecs.soton.ac.uk. 3600 IN A 152.78.68.137
mx.ecs.soton.ac.uk. 3600 IN A 152.78.71.14
mx.ecs.soton.ac.uk. 3600 IN A 152.78.71.210
mx.ecs.soton.ac.uk. 3600 IN A 152.78.68.132
mx.ecs.soton.ac.uk. 3600 IN AAAA 2001:630:d0:f110::25b
mx.ecs.soton.ac.uk. 3600 IN AAAA 2001:630:d0:f102::25b
mx2.ecs.soton.ac.uk. 3600 IN A 152.78.71.210
mx2.ecs.soton.ac.uk. 3600 IN A 152.78.68.132
mx2.ecs.soton.ac.uk. 3600 IN A 152.78.68.137
mx2.ecs.soton.ac.uk. 3600 IN A 152.78.71.14

(a) Identify the name and briefly describe the function of each type of resource
record in the Answer Section. [16 marks]

TURN OVER
Copyright 2017 c University of Southampton Page 13 of 22
14 COMP2207W1

Copyright 2017 c University of Southampton Page 14 of 22


15 COMP2207W1

(b) What do the numbers in the second column of each resource record indi-
cate? Name one situation where a very small number (e.g. 60) would be
beneficial. [6 marks]

(c) The Additional Section contains A/AAAA record details for the two MX
records. Why might mx.ecs.soton.ac.uk have multiple A and AAAA records?
[4 marks]

(d) Another type of resource record is a CNAME. What is a CNAME record and
what is its function? [4 marks]

TURN OVER
Copyright 2017 c University of Southampton Page 15 of 22
16 COMP2207W1

(e) In October 2016, Dyn suffered a sustained DDoS attack that prevented ac-
cess to several well-known websites including Twitter, Amazon, Imgur, Pay-
pal and Spotify. Describe how this attack worked. In your answer you should
include details of the service that was affected, the type of device that made
the attack notable and any actions that were taken as a response to the
attack. [20 marks]

Copyright 2017 c University of Southampton Page 16 of 22


17 COMP2207W1

TURN OVER
Copyright 2017 c University of Southampton Page 17 of 22
18 COMP2207W1

B 4 Ethernet switches and hubs are two different devices that can be used to
add additional ports to a network.

(a) What is the difference between a switch and a hub? [4 marks]

(b) Why is a switch generally better than a hub? [4 marks]

(c) Give one case where a hub is preferable to a switch. [2 marks]

Copyright 2017 c University of Southampton Page 18 of 22


19 COMP2207W1

(d) You have been tasked with assigning IPv4 address ranges to six subnets in
a new building and specifying the routing tables. You have been allocated
152.78.64.0/22 to carry out this task. How would you allocate this block of
addresses to best use the available address space to cater for:
(i) A computing lab subnet with 260 computers,
(ii) An electronics lab subnet with 200 computers,
(iii) An office subnet with 110 computers,
(iv) A Server subnet with 60 servers,
(v) A DMZ subnet with 25 servers,
(vi) An infrastructure subnet with 17 devices.
In your answer you should include the network address and prefix length of
each subnet. [10 marks]

TURN OVER
Copyright 2017 c University of Southampton Page 19 of 22
20 COMP2207W1

Copyright 2017 c University of Southampton Page 20 of 22


21 COMP2207W1

(e) The network topology is implemented as shown below with static routing
using routers R1 to R4. Interfaces are numbered here as I1,I2 and I3. R1-I1
has an IP address of 152.78.70.220 and the upstream router is 152.78.70.228.
For each router in the network, allocate each interface an appropriate IPv4
address using your answer in part (d) and determine the routing table of
each router. Part of your answer can include an annotation to the figure
below.

[30 marks]

TURN OVER
Copyright 2017 c University of Southampton Page 21 of 22
22 COMP2207W1

Copyright 2017 c University of Southampton Page 22 of 22

You might also like