Question
An example program using a future is shown below. Future f = new Future() { @Override public String execute() { // ...long running computation... return
An example program using a future is shown below. Future f = new Future() { @Override public String execute() { // ...long running computation... return data; }; // ... String result = f.get(); // blocks if execute() unfinished Use wait() and notifyAll() to provide an implementation of the Future class that would work with the example program above. [10 marks] (c) . What if any are the disadvantages of adopting a mathematical description of database structure? [5 marks] A sequence of natural numbers is a total function s : N N. The sequence is recursive if and only if s is computable. A finite sequence of natural numbers is specified by a pair (l, x), where l N is the number of elements, and x : [1, l] N is a function that defines those elements. The case l = 0 defines the null sequence. In each of the following cases, establish whether the set defined is recursively enumerable: (a) the set of all recursive subsets of N [5 marks] (b) the set of all recursive sequences of natural numbers [2 marks] (c) the set of all finite sequences of natural numbers [5 marks] Consider an operating system that uses hardware support for paging to provide virtual memory to applications. (a) (i) Explain how the hardware and operating system support for paging combine to prevent one process from accessing another's memory. [3 marks] (ii) Explain how space and time overheads arise from use of paging, and how the Translation Lookaside Buffer (TLB) mitigates the time overheads. [3 marks] (b) Consider a system with a five level page table where each level in the page table is indexed by 9 bits and pages are 4 kB in size. A TLB is provided that is indexed by the first 57 bits of the address provided by the process, and achieves a 90% hit rate. A main memory access takes 40 ns while an access to the TLB takes 10 ns. The maximum memory read bandwidth is 100 GB/s. (i) What is the effective memory access latency? [4 marks] (ii) A colleague suggests replacing the system above with one that provides 80 GB/s memory read bandwidth and main memory access latency of 30 ns. Explain whether you should accept the replacement or not, and why. [4 marks] (c) A creative engineer suggests structuring the TLB so that not all the bits of the presented address need match to result in a hit. Suggest how this might be achieved, and what might be the costs and benefits of doing so. [6 marks]
(a) Describe two quantitative and two qualitative techniques for analysing the usability of a software product. [4 marks] (b) Compare the costs and benefits of the quantitative techniques. [6 marks] (c) Compare the costs and benefits of the qualitative techniques. [6 marks] (d) If restricted to a single one of these techniques when designing a new online banking system, which would you choose and why?
(a) Suppose that women who live beyond the age of 80 outnumber men in the same age group by three to one. How much information, in bits, is gained by learning that a person who lives beyond 80 is male? [2 marks] (b) Consider n discrete random variables, named X1, X2, . . . , Xn, of which Xi has entropy H(Xi), the largest being H(XL). What is the upper bound on the joint entropy H(X1, X2, . . . , Xn) of all these random variables, and under what condition will this upper bound be reached? What is the lower bound on the joint entropy H(X1, X2, . . . , Xn)? [3 marks] (c) If discrete symbols from an alphabet S having entropy H(S) are encoded into blocks of length n symbols, we derive a new alphabet of symbol blocks S n . If the occurrence of symbols is independent, then what is the entropy H(S n ) of this new alphabet of symbol blocks? [2 marks] (d) Consider an asymmetric communication channel whose input source is the binary alphabet X = {0, 1} with probabilities {0.5, 0.5} and whose outputs Y are also this binary alphabet {0, 1}, but with asymmetric error probabilities. Thus an input 0 is flipped with probability , but an input 1 is flipped with probability , giving this channel matrix p (i) Give the probabilities of both outputs, p(Y = 0) and p(Y = 1). [2 marks] (ii) Give all the values of (, ) that would maximise the capacity of this channel, and state what that capacity then would be. [3 marks] (iii) Give all the values of (, ) that would minimise the capacity of this channel, and state what that capacity then would be. [3 marks] (e) In order for a variable length code having N codewords with bit lengths 1 mark] (f ) The information in continuous signals which are strictly bandlimited (lowpass or bandpass) is quantised, in that such continuous signals can be completely represented by a finite set of discrete samples. Describe two theorems about how discrete samples suffice for exact reconstruction of continuous bandlimited signals, even at all the points between the sampled values. [4 mark
(a) A two state Markov process emits the letters {A, B, C, D, E} with the probabilities shown for each state. Changes of state can occur when some of the symbols are generated, as indicated by the arrows. 4.2 Information sources with memory We will wish to consider sources with memory, so we also consider Markov processes. Our four event process (a symbol is generated on each edge) is shown graphically together with a two state Markov process for the alphabet fA, B, C, D, Eg in gure 17. We can then solve for the state occupancy using ow equations (this example is trivial).
ess with states fS 1; S2; : : :Sng, with transition probabilities pi(j) being the probability of moving from state Si to state Sj (with the emission of some symbol). First we can dene the entropy of each state in the normal manner: Hi = X jCodd's 1970 paper introduced the Relational Model of data to address the difficulties of building database applications using the technology that was available at the time.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started