pop T3 is taken. Give definitions for offset and delay, and compute both for each set of
Question:
pop T3 is taken. Give definitions for offset and delay, and compute both for each set of timestamps. Which of the two offsets you have computed would you prefer to use to adjust the time at C, and why? [5 marks] (iii) What happens to your estimates of offset and delay if network delays are no longer symmetricndicates event x happens-before event y. Define happens-before. Explain why it provides only a partial order on events. [2 marks] (ii) Vector clocks can be used to implement happens-before. Give the vector clock values at each event, a . . . g, and explain whether each of the following relations is true or false: b c, c e, c f, d g. If false, give the relation that does hold between the given pair of events. P1 P3 P2 d b f c g a physical time processes e [8 marks] (iii) An earlier approach used Lamport Clocks, defining L(x) such that, for two events x and y, x y L(x) < L(y) but L(x) < L(y) 6 x y. Explain how vector clocks resolve this issue and ensure L(x) < L(y) x y. [1 mark] 8 CST1.2019.5.9 8 Concurrent and Distributed Systems (a) Programs with concurrency are vulnerable to classes of problems that are not exhibited in single-threaded programs. (i) Explain the concepts of deadlock and livelock in a multithreaded program. [2 marks] (ii) Explain the four conditions required for deadlock. A sentence explaining each condition is sufficient. [4 marks] (b) Modern instruction set architectures provide instructions for performing atomic oo as Compare And Swap (CAS). Describe how the CAS instruction on the x86 architectures is used to perform an atomic operation. Briefly explain how the instruction uses the instruction operands when executed. [3 marks] (ii) Databases often utilise a technique known as write-ahead logging to provide durability guarantees. Describe how a disk-based transaction log might be implemented, and what the atomic operation used in this technique is. [3 marks] (c) The below snippet of C code uses pthreads for concurrent execution. It uses a mutex M and a condition variable C to ensure that the run critical code function only executes when the condition boolean is true. L1: pthread_mutex_lock(&M); L2: run_critical_code (); L3: if (!condition) L4: pthread_cond_wait(&C, &M); L5: if (!condition) L6: pthread_cond_broadcast(&C); L7: pthread_mutex_lock(&M); Unfortunately, there are four bugs in the code that prevent it from working correctly. List each of the four bugs and describe how each bug affects programme execution. Write down a new version of the code snippet with the four bugs corrected.
You are worried about decompilation from the objective directions of this machine back into a significant level programming language. (a) (I) What issues are raised by the condition codes, and what impact would they have on a nave decompilation? [5 marks] (ii) What enhancement methods would you be able to use to further develop matters, and consider the possibility that (any) are the impediments of your methodology. [5 marks] (b) Direct decompilation would have to prefix each memory access with a test to see whether the location being utilized was appropriately adjusted. This would prompt massive code that was difficult to peruse and had terrible showing. It is normal that, in the program that is being decompiled, unaligned memory gets to are exceptionally interesting. You are supposed to decompile into compact code in the undeniable level language that may not depend on any treatment of unaligned addresses on the new PC you arrange for. Once more, what streamlining strategies could you apply? [10 marks] 9 (TURN OVER) CST.2010.9.10 11 Quantum Computing (a) Which of coming up next are potential conditions of a qubit? (I) 1 2 (|1i + |0i) (ii) 0.6|0i + 0.4|1i (iii) 0.8|0i 0.6e 3i/4 |1i (iv) 3 2 i|0i 1 2 |1i [1 imprint each] For each legitimate state among the abovementioned, give the probabilities of noticing |0i what's more, |1i when the framework is estimated in the standard computational premise. [4 marks] (b) Suppose a two-qubit framework is in the state 0.8|00i + 0.6|11i. A Pauli X entryway (for example a NOT entryway) is applied to the second qubit, and a Hadamard door is applied to the first qubit. (I) What is the new condition of the framework? [2 marks] (ii) What are the probabilities of the potential results if both qubits are presently estimated? [2 marks] (c) Suppose we have a calculation which, given a blackbox registering an occasional work f with range {0, . . . , N 1}, decides the time of f. In addition, the calculation runs on schedule (log N) 2 . Make sense of how this would empower us to have a proficient (for example polynomial-time) calculation for considering numbers. [8 m
: Compose Java program that peruses a 1D exhibit of whole numbers from standard information and brings it back. a program that understands digits and creates them into numbers.
Talk about why the utilization of divided seeds in grouping information base pursuit is better compared to the utilization of successive seeds. [5 marks] (b) Discuss the intricacy of Sankoff's stinginess strategy. [5 marks] (c) Describe the four focuses conditions in phylogeny. [5 marks] (d) Discuss the suppositions of the Gillespie calculations. [5 marks] 3 (TURN OVER) CST.2010.9.4 4 Computer Vision (a) Consider an item's surface reflectance map (i, e, g) determining the sum of episode light reflected towards a camera from each point on a superficial level, where the point of the illuminant (a point source) comparative with the neighborhood surface ordinary N is I, the point comparative with N of a beam of light re-transmitted from the surface is e, and the point between the produced beam and the illuminant is g. (I) For what sort of surface is the reflectance map just (i, e, g) = cos(i)? Name this sort of surface and depict its key properties. [3 marks] (ii) For what sort of surface does the reflectance map rearrange to (i, e, g) = 1 on the off chance that I = e and both I and e are co-planar with the surface ordinary N, and (I, e, g) = 0 in any case? Name this sort of surface and depict its critical propertie
(a) The ACID properties are frequently used to characterize value-based semantics. (I) Define "atomicity" as utilized in the ACID setting. [1 mark] (ii) Define "toughness" as utilized in the ACID setting. [1 mark] (b) Write-ahead logging is a usually utilized plan to achieve value-based semantics while putting away an information base on a square stockpiling gadget, for example, a hard plate. (I) Under what conditions, during compose ahead log recuperation, can a exchange in the UNDO list be moved to the REDO list? [2 marks] (ii) Synchronously flushing submit records to circle is costly. How might we securely lessen coordinated I/O procedure on a high-throughput framework without forfeiting ACID properties? [2 marks] (iii) Describe two execution changes that could emerge from utilizing your answer to part (b)(ii). [2 marks] (c) (I) Transaction records in a compose ahead logging plan contain five fields: hTransactionID, ObjID, Operation, OldValue, NewValuei, however putting away the complete old and new qualities can consume huge measures of room. One methodology that may be utilized, for reversible activities being applied to certain information like XOR by a steady, is to store just the consistent contentions, instead of the full when information. What issues could happen because of this plan decision? (ii) Write-ahead logging frameworks should know the real on-plate area size for the compose ahead log to accurately act. A deviant plate merchant chooses to rebrand its 512-byte area circles as 2K-area plates, and changes the worth announced back to the information base framework. How should this influence data set uprightness? [4 marks] (iii) Explain how an information base seller who knows about the issue portrayed in part (c)(ii) moderate this issue in programming, and what impediments may there be to this methodology. [4 marks] 9 (TURN OVER) CST.2013.5.10 9 Concurrent and Distributed Systems Sun's Network File System (NFS) is the standard conveyed document framework utilized with UNIX, and has gone through a movement of variants (2, 3, 4) that have slowly further developed execution and semantics. (a) Remote technique call (RPC) (I) Explain how Sun RPC handle byte request (endianness). [2 marks] (ii) This approach might bring about pointless work. State when this happens and how should this be stayed away from. [2 marks] (b) Network File System variant 2 (NFSv2) and rendition 3 (NFSv3) (I) A key plan premise for NFS was that the server be "stateless" with deference to the client. State how this affects dispersed document securing in NFSv2 also, NFSv3. [2 marks] (ii) Another key plan premise for NFSv2 was the "idempotence" of RPCs; what's the significance here? [2 marks] (iii) One vital improvement in NFSv3 was the expansion of the READDIRPLUS RPC. Make sense of for what reason did this helps execution. [4 marks] (iv) NFSv3 carries out what is named "near open consistency" for document information reserving: assuming that client C1 keeps in touch with a record, shuts the document, and client C2 now opens the record for read, then, at that point, it should see the consequences of all composes gave by C1 preceding close. Notwithstanding, assuming C2 opens the document before C1 has shut it, then C2 might see some, all, or none of the composes gave by C1 (and in inconsistent request). Near open consistency is accomplished through cautious use of coordinated RPC semantics, joined with document timestamp data piggybacked onto server answers on all RPCs that work on records. Make sense of how near open consistency permits execution to be gotten to the next level. [4 marks] (v) NFSv3 adds another RPC, ACCESS, permitting the client to assign access control checks at document open opportunity to the server, as opposed to performing them on the client. This permits client and server security models to vary. Make sense of how this expansion additionally assists execute with shutting to-open consistency within the sight of perused storing.
.Computer Design (a) In SystemVerilog, what is the difference between: (i) The ternary operator ? and if...then...else statements? [2 marks] (ii) always_ff and always_comb? [2 marks] (iii) Blocking, non-blocking and continuous assignment? [3 marks] (iv) Logic values 0, 1, x and z and how these values propagate through Boolean logic gates? [3 marks] (v) The way that synchronous and asynchronous reset are declared in an always_ff statement? [2 marks] (b) The following module attempts to implement a reset control circuit that should have the following behaviour: when the user-controlled reset button (which needs to be debounced) is pressed the asyncButton signal is high and should result in the rst going high and remaining high for a minimum of 106 clock cycles. rst should be generated immediately after the rising clock edge to allow time for it to propagate. module timeResetBad(input logic clk, input logic asyncButton, output logic rst); logic ctr [18:0]; logic ctrAtMax; always_comb begin ctrAtMax = &ctr; rst = !ctrAtMax; end always_ff @(posedge clk) ctr <= asyncButton ? 0 : !ctrAtMax ? ctr+1 : ctr; endmodule (i) What is wrong with the timeResetBad module? [4 marks] (ii) Write a corrected version timeResetBad that makes minimal changes and adds no new modules. [4 marks] 2 CST1.2019.5.3 2 Computer Design (a) What is the difference between memory latency and bandwidth? [2 marks] (b) What is the difference between an interrupt and an exception? [3 marks] (c) Why is a computer's memory implemented as a hierarchy of memories and yet the programming model represents physical memory as a flat linear address space? [5 marks] (d) What is the difference between a direct-mapped and a set-associate cache, and how do their cache-line replacement policies differ? [5 marks] (e) Contemporary commercial processors use a register file to store intermediate results. Historically accumulators or operand stacks were used instead of a register file. What are the advantages of a register file over an accumulator and an operand stack? [5 marks] 3 (TURN OVER) CST1.2019.5.4 3 Computer Design (a) Describe each of the four models defined by OpenCL's specification. [4 marks] (b) Describe the different types of memory available to OpenCL kernels. [4 marks] (c) Contrast how calls to a kernel, e.g. DAXPY, are invoked and grouped for execution in OpenCL compared with CUDA. [4 marks] (d) Describe, with the aid of a diagram, how a GPU executes data-parallel kernels efficiently, including the two main pieces of hardware support. [4 marks] (e) Describe the trade-offs between using a GPU or a specialised accelerator for tasks containing data-level parallelism. [4 marks] 4 CST1.2019.5.5 4 Computer Networking The TCP transport protocol is an example of an ARQ. (a) Provide a definition of an ARQ. [1 mark] (b) Describe the design and operation of a simple ARQ for a lossy communication channel. [3 marks] (c) When and why does a simple ARQ at the transport layer have a significant negative impact upon application performance? [3 marks] (d) Describe what additions are required to a simple ARQ to support windowing. When and why will an ARQ which supports windowing provide better application performance than a simple ARQ? [5 marks] (e) Describe two situations when the performance of a windowed ARQ is no better than a simple ARQ. [4 marks] (f ) Would the QUIC protocol, when based upon UDP rather than TCP, overcome the two situations you outlined when answering Part (e)? [4 marks] 5 (TURN OVER) CST1.2019.5.6 5 Computer Networking (a) You need to urgently deliver 500 TByte of data from Zurich to London. (i) NoWayNet is offering a 10 Gbit/s reliable delivery service between Zurich and London (about 776km). Should you use either NoWayNet, or an overnight package delivery? Why? [2 marks] (ii) A new company, UnlikelyComms, is offering a 400 Gbit/s reliable delivery service between Zurich and London, but it takes a very indirect 2600 km path. Should you use UnlikelyComms? [2 marks] (iii) Following your successful urgent delivery of 500 TBytes of data, this has become an hourly task. Alongside the need to regularly deliver 500 TByte data between Zurich and London, you have an interactive virtual reality system; it requires six displays each needing 50 Gbit/s and an end-to-end latency of less than 5ms. Fortunately, a startup, FlyByNight, boasts an offering with an effective bandwidth of over 16 Tbit/s, using a special transport with no end-to-end latency at all. The downside is it can only transfer data in 500 TByte units, once every 4 minutes. Explain whether FlyByNight is, or is not, suited to your two workloads. [4 marks] (b) Ethernet standards enable 1Gbit/s over 4 pairs of twisted cabling, yet the physical media has a bandwidth much less than 1GHz, e.g., 250MHz is common. (i) Explain how such high data rates are achieved, and [4 marks] (ii) explain how physical media errors are reduced or eliminated. [2 marks] (c) Explain, with the aid of diagrams, how Code-Division Multiple Access permits two or more pairs of nodes to communicate over a common medium (e.g., wireless) simultaneously. [6 marks] 6 CST1.2019.5.7 6 Computer Networking (a) Provide five examples of resource-multiplexing in computer networks. In each case state the layer of the network stack where this takes place, which resource is multiplexed and the multiplexing mechanism. [2 marks each] (b) A relative has contacted you for help; they believe the Internet is broken. The fault turns out to be that a piece of network-protection software had installed a specific IP address entry for an (alternative) default DNS server. (i) What should have provided the correct DNS entry? [1 mark] (ii) By concentrating on how DNS is intended to work, describe why network applications may not work correctly. [3 marks] (iii) How would you diagnose this problem? [2 marks] (c) DNS substitution may also be used maliciously. (i) Outline how spyware might use an (alternative) DNS entry. [2 marks] (ii) Describe a network-centric method for overcoming such treachery. [2 marks] 7 (TURN OVER) CST1.2019.5.8 7 Concurrent and Distributed Systems (a) In the Network Time Protocol (NTP), a client (C) and a server (S) exchange (request, reply) messages to compute corrections to the time at C. Assume the time at S is always correct, and that C is synchronised to S at 13:30:00. (i) Thirty days later the time at S is again 13:30:00 but C now believes the time to be 13:28:30. Define and compute skew and drift for C. [2 marks] (ii) NTP estimates the offset and delay using four timestamps (T0, T1, T2, T3) from a request-reply message exchange. Two such exchanges occur between C and S, producing timestamps (310.000, 400.100, 400.102, 310.202) and (311.000, 401.150, 401.160, 311.410) respectively, denoting all timestamps as seconds since a common fixed point. Show on a diagram the point in the message exchange at which each timestamp T0 . . . T3 is taken. Give definitions for offset and delay, and compute both for each set of timestamps. Which of the two offsets you have computed would you prefer to use to adjust the time at C, and why? [5 marks] (iii) What happens to your estimates of offset and delay if network delays are no longer symmetric? [2 marks] (b) It is often necessary to agree only on the ordering of events, not their times. (i) x y indicates event x happens-before event y. Define happens-before. Explain why it provides only a partial order on events. [2 marks] (ii) Vector clocks can be used to implement happens-before. Give the vector clock values at each event, a . . . g, and explain whether each of the following relations is true or false: b c, c e, c f, d g. If false, give the relation that does hold between the given pair of events. P1 P3 P2 d b f c g a physical time processes e [8 marks] (iii) An earlier approach used Lamport Clocks, defining L(x) such that, for two events x and y, x y L(x) < L(y) but L(x) < L(y) 6 x y. Explain how vector clocks resolve this issue and ensure L(x) < L(y) x y. [1 mark] 8 CST1.2019.5.9 8 Concurrent and Distributed Systems (a) Programs with concurrency are vulnerable to classes of problems that are not exhibited in single-threaded programs. (i) Explain the concepts of deadlock and livelock in a multithreaded program. [2 marks] (ii) Explain the four conditions required for deadlock. A sentence explaining each condition is sufficient. [4 marks] (b) Modern instruction set architectures provide instructions for performing atomic oo as Compare And Swap (CAS). Describe how the CAS instruction on the x86 architectures is used to perform an atomic operation. Briefly explain how the instruction uses the instruction operands when executed. [3 marks] (ii) Databases often utilise a technique known as write-ahead logging to provide durability guarantees. Describe how a disk-based transaction log might be implemented, and what the atomic operation used in this technique is. [3 marks] (c) The below snippet of C code uses pthreads for concurrent execution. It uses a mutex M and a condition variable C to ensure that the run critical code function only executes when the condition boolean is true. L1: pthread_mutex_lock(&M); L2: run_critical_code (); L3: if (!condition) L4: pthread_cond_wait(&C, &M); L5: if (!condition) L6: pthread_cond_broadcast(&C); L7: pthread_mutex_lock(&M); Unfortunately, there are four bugs in the code that prevent it from working correctly. List each of the four bugs and describe how each bug affects programme execution. Write down a new version of the code snippet with the four bugs corrected.
You are worried about decompilation from the objective directions of this machine back into a significant level programming language.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill