Crypto Answers
Crypto Answers
Paper 7
1 Distributed Systems
(a) Explain how timers may be used in the RPC protocol to achieve client-server
synchronisation. [10 marks]
(b) Discuss how the RPC system may support the location of remote procedures.
[7 marks]
(c) Discuss the requirements on the RPC system that follow from the use of multi-
threaded processes. [3 marks]
2 Distributed Systems
(a) Explain why the concept of transaction is suitable for modelling such a
computation. [6 marks]
1 [TURN OVER
CST.93.7.2
3 Comparative Architectures
A revisionist view might be that a processor design is RISC if every transistor pays
its way in terms of global system performance, i.e. the design is in some sense a
local optimum. Explain how this view relates to the original definition of RISC.
Can a CISC instruction set be RISC under such a definition? [4 marks]
Given a certain silicon budget (e.g. 106 transistors) compare and contrast, under the
above criterion, alternative ways of spending the excess over the (say) 104 transistor
cost of a simple load-store one-accumulator machine. You might find it helpful to
consider the various features and instructions of common processors. [12 marks]
This budget is sufficient to build most, but not all, of a VAX. Which parts would
you omit and how could you arrange to execute full VAX code? [4 marks]
4 Comparative Architectures
2
CST.93.7.3
You are given components MUX, REG and COMP whose behaviour is defined by
MAX(in,out) ⇒ (∀ t. out t = M ax in t)
(M ax in 0 = in 0) ∧
(M ax in (n+1) = (M ax in n < in(n+1) → in(n+1) | M ax in n))
[10 marks]
Draw a circuit diagram of a CMOS inverter and give a proof that it is correct in
the simple switch model. [2 + 3 marks]
Draw a circuit diagram of an NMOS inverter and give a proof that it is correct in
the unidirectional model. [2 + 3 marks]
3 [TURN OVER
CST.93.7.4
7 Numerical Analysis II
for a suitable function f (x). Suggest a choice of the interpolation points {xj } which
tends to minimise this error over the interval [−1, 1]. [3 marks]
Suppose Pn (x) is a polynomial formed by truncating a power series after the term
in xn . Perform an economisation of the truncated power series
x2 x4
cosh x ' P4 (x) = 1 + 2! + 4! [5 marks]
Given that the maximum error in P4 (x) over [−1, 1] is approximately 0.0014,
compare the error in your economised polynomial with the error in P2 (x).
[3 marks]
4
CST.93.7.5
8 Numerical Analysis II
If B is a real symmetric n × n matrix such that z̄T Bz > 0 for any complex vector
z, prove that any eigenvalue λ of B is such that λ > 0. Hence prove that the
eigenvalues of AT A, where A is any real square matrix, are real and non-negative.
[3 marks]
Let P, Q be real n × n matrices and let kPk22 denote the maximum eigenvalue of
PT P. State Schwarz’s inequality for kPQk2 . Explain how this is modified if Q is
replaced by a vector of n elements. [3 marks]
Derive the condition number K for solution of the equations Ax = b. Hint: start
by setting e = x − x̂ where x̂ is an approximate solution. [5 marks]
A = UWVT
and explain how you would use it to solve the n equations Ax = b when W has
rank n. [5 marks]
How may the singular value decomposition help in solving the equations Ax = b
when A has rank < n? Use the case n = 4, W = diag{1, 10−3 , 10−20 , 0} to
illustrate your answer. (You may assume that machine epsilon ' 10−16 .)
[4 marks]
9 Graphics II
When scan-converting items for display, a Z-buffer is sometimes used to avoid some
sorting. Outline its operation and limitations. [12 marks]
5 [TURN OVER
CST.93.7.6
10 Semantics
An imperative language has boolean expressions be, integer expressions ie, and
commands C, whose abstract syntax is specified by:
ie ::= n | X | ie + ie | ie − ie
be ::= b | ie = ie
C ::= skip | X := ie | C ; C | if be then C else C | while be do C
where b is true or false, n is any integer, and X ranges over a fixed set of variables.
Describe the operational semantics of the language in terms of inductively defined
evaluation relations
In what sense are these evaluation relations deterministic? What is meant by the
assertion that two commands are semantically equivalent? [3 marks]
For any choice of be, C and C 0 , which of the following pairs of commands are
semantically equivalent and which are not? Justify your answer in each case.
[12 marks]
6
CST.93.7.7
11 Additional Topics
a b c d e f g
192 58 105 71 315 131 0 [4 marks]
Give an error-correcting code and explain how it works, excluding the simple
repetition code. [3+3 marks]
12 Additional Topics
Discuss the advantages and disadvantages of One Time Pads as compared with
alternative systems. When might One Time Pads be used and when should they
be avoided? [13 marks]