Professional Documents
Culture Documents
EXAMINATION PAPER
Examination Session: Year: Exam Code:
Title:
Materials Permitted:
Revision:
Networks and Systems (COMP2211WE01)
Page 2 COMP2211WE01
Section A Networks
(Dr F. Li)
Question 1
(c) Name the address type of each of the following IPv6 addresses:
i. F E80 :: /10
ii. F C00 :: /7
iii. 2001 :: /16
iv. F F 00 :: /8
(d) Suppose the sample rate of Skype voice communication is 8 Kbps (Kilobit
per second). Such communication will be converted into network data
packets for transmission, where each packet size is 1000 bytes. Given
that a Skype voice communication session lasts for 10 minutes, assuming
the application end-to-end delay requirement is 150 ms. Translate the
application level QoS requirement of this communication session into the
network level QoS requirement by calculating the following:
i. Packet rate
ii. End-to-end network delay
continued
Page 4 COMP2211WE01
Question 2
(a) State the meaning of the IPv6 address 2001 : 529 : 0 : 1 :: /64. [3 Marks]
(c) TCP supports reliable communication. Explain why TCP is not a suitable
choice for handling real-time video streaming. [3 Marks]
(d) The following is a diagram showing a network of connected routers for sup-
porting IP multicast. Each labelled circle represents a router. The number
showing on each line represents the cost of data transmission between two
routers.
5
3 C G
A 2 2
3 5 2 H
D
B
3 2
5 F
E 2
Question 3
(a) Compare RPC and Java RMI with respect to how they support location
and migration transparency. [3 Marks]
(b) Draw a diagram of a fault-tolerant system that supports both active and
passive replication at the same time. The diagram should depict the organ-
isation of servers and how the clients can communicate with the servers.
Explain how data are replicated in the system and the data recovery pro-
cedure to handle server failure situations. [11 Marks]
(c) Define the term Byzantine fault. Analyse how your suggested system in
(b) can cope with the Byzantine fault. If not, explain why and describe
the modification should be done to enable this. [5 Marks]
continued
Page 7 COMP2211WE01
Question 4
(a) Compare how Java RMI and message-oriented middleware handle com-
munication data loss. Explain which of these technologies is more suit-
able for supporting media streaming with a guaranteed quality of service.
[5 Marks]
(c) Describe the difference between time redundancy and component redun-
dancy in supporting fault tolerance. Explain how they can be incorporated
in active replication and passive replication systems. [5 Marks]
(d) Consider three distributed systems, containing 70%, 50%, 30% of over-
loaded servers, respectively. For each of these distributed systems, suggest
a suitable load distributing algorithm to optimise the system performance.
Justify your answer.
Suppose each of these distributed systems has a further 30% of increase
in overloaded servers. Based on your answer above, analyse the stability
of these modified systems. [9 Marks]
Question 5
(b) Demonstrate with a simple example and using diagrams that the following
grammar is ambiguous:
A → A+A | A∗A | x | y
[6 Marks]
(c) i. Predictive parsers can be constructed for the LL(k) grammars. What
does the name LL(k) stand for? [3 Marks]
ii. Can an ambiguous grammar be an LL(k) grammar for some positive
integer k? Briefly justify your answer. [4 Marks]
(d) Construct the leftmost derivation and the rightmost derivation of the string
(a + b) × c in the following grammar:
E → E+T
E → T
T → T ×F
T → F
F → (E)
F → a
F → b
F → c
[8 Marks]
continued
Page 9 COMP2211WE01
Question 6
(a) Provide the names of the three main phases of the analysis part of a com-
piler (or front end) and give a brief description of what each of these parts
is responsible for. [12 Marks]
S → Sx | Sy | zw | wy
[3 Marks]
ii. In the following grammar, eliminate the left recursion that appears in
more than one steps:
S1 → S2 ba | c
S2 → S3 a | b
S3 → S2 c | ab
[4 Marks]
(c) Using the following simple Syntax Directed Definition (SDD), construct
the annotated parse tree for the computation 2 ∗ 8. [6 Marks]
Section D Databases
(Dr G. Mertzios)
Question 7
(a) In the Relational Data Model, what is the full functional dependency, what
is the partial functional dependency and what is the transitive functional
dependency? [6 Marks]
(b) Consider the relation “Engineer”, which has the following relation schema:
In the schema of this relation the attributes of the primary key are under-
lined, according to the standard notation.
i. Normalize the relation to the 2nd normal form (2NF) and specify
which are the primary keys and the foreign keys. [4 Marks]
ii. Normalize the relation to the 3nd normal form (3NF) and specify
which are the primary keys and the foreign keys. [6 Marks]
(c) Based on the following relation schemas of the relations “Employee” and
“Branch”, write an SQL statement for each of the given queries:
(i) List the names, the positions and the departments of all staff mem-
bers who were hired on or after year 2010. [2 Marks]
(ii) List the names, the departments and the annual salaries of all em-
ployees who work in a branch in London. [3 Marks]
(iii) Compute the average monthly salary of all staff members who work
in a Sales department of a branch that has budget at least 350000.
[4 Marks]
continued
Page 11 COMP2211WE01
Question 8
(a) In the Relational Data Model, define the terms candidate key, primary key,
entity integrity and referential integrity. [6 Marks]
(b) For the following scenario draw the Entity-Relationship (ER) diagram using
the Crows Foot notation, clearly showing the entities, their named relation-
ships and the cardinalities of these relationships. In your diagram, resolve
the many-to-many relationships.
[10 Marks]
(c) Based on the following relation schemas of the relations “Client” and
“Viewing”, write an SQL statement for each of the given queries:
(i) List the name and the profession of all female clients (i.e. of clients
with sex “F”) who are single. [2 Marks]
(ii) List the client number, the name and the salary of each client who
viewed a property in Durham. [3 Marks]
(iii) For each city list the number of male clients (i.e. of clients with
sex “M”) who viewed a property in this city. [4 Marks]
END OF PAPER