Examination Paper: May/June 201 9 COMP2211-WE01

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Page 1 COMP2211-WE01

EXAMINATION PAPER
Examination Session: Year: Exam Code:

May/June 2019 COMP2211-WE01

Title: Networks and Systems

Time Allowed: 2 hours

Additional Material provided: None

Materials Permitted: None

Calculators Permitted: Yes Models Permitted: CASIO FX-83 GTPLUS and


Casio FX-85 GTPLUS
Visiting Students may use dictionaries: Yes

Instructions to Candidates: Answer ALL questions.

Please answer each section in a separate answer booklet.

Revision:
Page 2 of 6 COMP2211-WE01

Section A Networks
(Dr Sardar Jaf)

Question 1

(a) Define the terms “multiplexing” and “demultiplexing” that are used in the
transport layer of the layered protocol stack. [4 Marks]

(b) Suppose that a message 1001 1100 1010 0011 is transmitted using Internet
Checksum (4-bit word). What is the value of the checksum? Explain how
you arrived at your solution. [5 Marks]

(c) Identify and briefly describe two different types of Carrier Sense Access
Control Protocols. [6 Marks]

(d) Suppose that each station A, B, C is simultaneously transmitting a single bit


and that bit is 0, using a Code Division Multiple Access (CDMA) system
with the chip sequence in the following figure. What is the resulting chip
sequence? Briefly explain how you arrived at your solution.

A = (-1 -1 -1 +1 +1 -1 +1 +1)
B = (-1 -1 +1 -1 +1 +1 +1 -1)
C = (-1 +1 -1 +1 +1 +1 -1 -1)

[5 Marks]

(e) In the binary countdown protocol, briefly explain how a lower-numbered


station may be starved from sending a packet. [5 Marks]

End of Section A continued


Page 3 of 6 COMP2211-WE01

Section B Distributed Systems


(Dr Frederick Li)

Question 2

(a) Compare RMI and message-oriented middleware in terms of system scala-


bility and availability. [4 Marks]

(b) Analyse the suitability of implementing a sequential consistency control on


a large-scale distributed system to preserve information integrity.
[4 Marks]

(c) Suppose an active replication system comprises a number of servers to


provide the same remote services, and occasionally has half of the servers
failing at the same time.
Analyse the suitability of applying backward recovery to repair the fail-
ing servers. Show any system characteristic assumption if applicable.
[4 Marks]

(d) Explain how an adaptive load distribution algorithm restricts the scope of
a target server search, regardless of whether the workload of a distributed
system is high or low.
Suppose the distributed system is prone to server failure. Modify the algo-
rithm to improve the effectiveness of load distribution. [5 Marks]

(e) Describe three forward error recovery methods. Analyse which method is
the best option to support error recovery for an eBay-like online auction
system. [8 Marks]

End of Section B continued


Page 4 of 6 COMP2211-WE01

Section C Cyber Security


(Dr Chris Willcocks)

Question 3

(a) In cryptography, what is salt and why is it used? [4 Marks]

(b) Typing ‘ls -l’ in a UNIX shell reveals the following:

- rwxr - xr - - 1 jess games 215 Dec 4 21:41 game . sh

i. ‘Who’ has ‘what’ permissions for game.sh? [3 Marks]


ii. What would typing ‘chmod g+w game.sh’ achieve? [2 Marks]

(c) In network security:

i. What is a SMURF attack and how might an organisation protect


against it? [4 Marks]
ii. What is a DDoS attack and how might an organisation protect against
it? [4 Marks]

(d) In the context of database security:

i. Give an example of privilege abuse. [3 Marks]


ii. Explain and give an example of how an organisation may end up with
excessive or unused privileges. [5 Marks]

End of Section C continued


Page 5 of 6 COMP2211-WE01

Section D Compiler Design


(Dr George Mertzios)

Question 4

(a) i. Describe when a non-terminal in a grammar is called left-recursive,


when it is called nullable and when it is called useless. Provide a short
example for each of them. [6 Marks]
ii. In the following grammar, eliminate all left recursions:

X1 → X2 a | X3 c | c
X2 → X2 ca | b
X3 → X1 b | ε

[5 Marks]

(b) i. When do we call a Syntax Directed Definition (SDD) S-attributed


and when do we call it L-attributed? [3 Marks]
ii. Explain why there always exists an evaluation order of the attributes
in an S-attributed SDD and in an L-attributed SDD. [4 Marks]

this question is continued on the next page


Page 6 of 6 COMP2211-WE01

(c) Lex is a software tool that automatically generates a lexical analyzer, given
a set of patterns (regular expressions) with some specific order. In par-
ticular, Lex simulates an NFA from the given patterns. It scans the input
string until it finds the longest prefix of the input that matches one of the
given patterns. If this longest prefix matches more than one pattern, then
Lex chooses among them the pattern that is first in the order.
Let the three patterns in the picture below be given to Lex (in this order).
Assuming that the input string is aabac, find the matching pattern of
Lex and the longest returned prefix. Show all intermediate steps of your
computation.

c b a

start a b,a c
1 2 3 4

a c

start a b a
5 6 7 8

a c,a

start b b
9 10 11 c 12

[7 Marks]

END OF PAPER

You might also like