Question
Explain why Vector Clocks might be more suitable than Lamport Clocks for this problem. [2 marks] (v) Explain what a Vector-Clock-based make should do if
Explain why Vector Clocks might be more suitable than Lamport Clocks for this problem. [2 marks] (v) Explain what a Vector-Clock-based make should do if there is no defined happens-before relationship between source vector s and object vector o.(a) Monitors are a programming primitive linking data with two synchronization types: mutual exclusion and condition synchronisation. Which is provided implicitly; which is provided explicitly? [1 mark] (b) Describe two ways in which Monitors and Conditional Critical Regions differ. [2 marks] (c) The object-oriented programming style enco. (i) Placing all data in a single Monitor may improve program correctness. Explain why this might have undesirable performance effects. [1 mark] (ii) One problem that can arise when using multiple locks is deadlock, which can be prevented by imposing a partial order on locks. Describe the implications this has for code structure when using Monitors. [2 marks] (iii) Explain why Java's Monitor feature does not necessarily impose this code structure. [2 marks] (d) Condition variables allow condition satisfaction to be signalled between threads. Explain the difference between Hoare's signal-and-wait and Mesa's signal-andcontinue in terms of mutual exclusion and scheduling. [4 marks] (e) Consider the (incorrect) pseudocode on the next page: (i) Describe and justify minimal modifications to this code, referencing line numbers, in order to make it correct in the presence of Hoare signal-and-wait semantics.
(b) Show how, given a program, we can generate a set of constraint-style equations (analogously to control-flow analysis for -expressions) whose solution gives a superset of the values which might be returned from each (sub-)expression of the program. [Hint: suppose that each function definition has flow variables representing the value ranges of each of its arguments and of its result.] [8 marks] (c) Explain what happens in, and give modifications to part (b) for, the generalisation whereby variables can also reference functions and be called by the syntax e ::= e0(e1, . . . , ek) [4 marks] (d) Explain how you would respond to the criticism that your analysis may fail to terminate if your language is extended with arithmetic expressions because a single expression may give rise to an infinite set of values. [2 marks] (e) Briefly describe any optimisation whereby knowing that x and y cannot alias is necessary for the optimisation to be safe. [2 marks] 4 CST.2004.9.5 4 Distributed Systems A network-based service manages persistent objects. The service must enforce an access control policy to protect the objects. (a) Discuss how this access control might best be implemented for the following example of objects and policy components: Objects: Files in a University Department's file service, operating behind a firewall. Policy: The owner may specify read, write and execute rights in terms of principals and groups. [4 marks] (b) Discuss how this access control might best be implemented for two of the following examples: (i) Objects: Files in a commercial, distributed, Internet-based file service. Policy: The owner may authorise other principals to download the file. (ii) Objects: Sales data relating to a company. Policy: Those employed in the Sales Departments of all branches of the company worldwide may read the data. (iii) Objects: Electronic health records (EHRs) in a nationwide service. Policy: The owner (patient) may read from its own EHR. A qualified and employed doctor may read and write the EHR of a patient registered with him/her. (iv) Object: The solution to online coursework. Policy: The coursework setter has read and write access. A candidate has no access until after the marks have been published.
Code in Java Help please
import java.util.Arrays; import java.util.Random;
public class ArrayWarmup {
public static void main(String[] args) { Random ranGen = new Random();
// declare array int[] mysteryNums = new int[10];
// initialize array for (int i=0; i Write program to download password protected webpages. Write program to multiply three float numbers. Write program that reads all the words from a file and, using a Stream write program that displays a random uppercase letter using the time.time() function (a) Describe the DHT algorithms that are used in each of CAN and Pastry to route a request for content to the node that holds that content. [5 marks each] (b) CAN and Pastry include mechanisms to reduce the latency of search. Describe how each of these works, and discuss their relative complexity and performance. Graphics (a) Describe an algorithm to find the intersection point between an arbitrary ray and an arbitrary plane. [5 marks] (b) Explain how a plane can be used as a Computational Solid Geometry (CSG) primitive. [2 marks] (c) List the three binary operations used in CSG. Explain how a CSG object can be represented as a binary tree. Describe an algorithm to find the first intersection point between a ray and an arbitrary CSG object. Assume that there are already algorithms which you can use to find the intersection points between the ray and each type of CSG primitive. Ensure that you state any assumptions you make about the information provided to you by these rayprimitive intersection algorithms. [8 marks] (d) Derive the NURBS basis function N4,4 for the knot vector [1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9, 10]. [5 marks] 7 Digital Communication II (a) Multicast Addressing and Routing provides a set of mechanisms for senders to transmit packets that are replicated by the routers so that they can be received by multiple systems. Explain how the basic mechanisms of IGMP, reverse path forwarding based on the underlying unicast routes, pruning and grafting, fit together to create this network service. [8 marks] (b) How might IP multicast be a risk for a network provider?
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