Rate monotonic (RM) and earliest deadline first (EDF) are two…
QuestionAnswered step-by-stepRate monotonic (RM) and earliest deadline first (EDF) are two…Rate monotonic (RM) and earliest deadline first (EDF) are two popular scheduling algorithms for real-time systems. Describe these algorithms, illustrating your answer by showing how each of them would schedule the following task set. Task Requires Exactly Every A 2ms 10ms B 1ms 4ms C 1ms 5ms You may assume that context switches are instantaneous. Which of these is harder to implement using the standard Unix access control mechanisms, and why? [10 marks] Sketch an implementation of the easier policy using Unix mechanisms. [5 marks] Describe at least two alternative mechanisms that might be used to implement the other policy. [5 marks] 5 Data Structures and Algorithms Describe an efficient algorithm based on Quicksort that will find the element of a set that would be at position k if the elements were sorted. [6 marks] Describe another algorithm that will find the same element, but with a guaranteed worst case time of O(n).(a) What is microcode and how does it differ from assembler? [6 marks] (b) In assembler, branch instructions are used to change the flow of control. How can flow control be determined in a microcode environment? [4 marks] (c) With the aid of a diagram, explain what a feedback path (sometimes called a bypass) is and how it is used to improve the throughput of a pipeline. [6 marks] (d) What is a branch delay slot? [4 marks] 2 CST.2002.6.3 3 Digital Communication I Define a resource in a digital communication system as anything whose use by one instance of communication prevents simultaneous use by another. Channel capacity is one example. (a) Give two more examples of resource in digital communication systems. [4 marks] (b) For the three resources, indicate how the amount of total resource can be increased. [6 marks] (c) How are allocations of each of these resources to instances of communication performed? [10 marks] 4 Concurrent Systems and Applications A system is to support abortable transactions that operate on a data structure held only in mtrict two-phase locking (S-2PL) and how it enforces strict isolation. [4 marks] (c) What impact would changing from S-2PL to ordinary 2PL have (i) during a transaction’s execution, (ii) when a transaction attempts to commit and (iii) when a transaction aborts? [6 marks] (d) You discover that the system does not perform as well as intended using S-2PL (measured in terms of the mean number of transactions that commit each second). Suggest why this may be in the following situations and describe an enhancement or alternative mechanism for concurrency control for each: (i) The workload generates frequent contention for locks. The commit rate sometimes drops to (and then remains at) zero. [2 marks] (ii) Some transactions update several objects, then perform private computation for a long period of time before making one final update. [2 marks] (iii) Contention is extremely rare. [4 marks] 3 [TURN OVER CST.2002.6.4 SECTION B 5 Comparative Programming Languages (a) Briefly discuss the compromises that must be made when standardising a programming language. [8 marks] (b) Discuss the relative merits to (1) the application programmers and (2) compiler writer of the following ways of specifying a programming language. (i) A concise readable user manual for the language in English containing many useful programming examples. (ii) A very long and highly detailed description, in English, of every feature of the language. This manual contains no programming examples. (iii) A concise but rigorous description using a formal grammar to describe the language syntax and making extensive use of mathematical notations taken from set theory, ?-calculus, predicate calculus and logic to describe the semantics of the language. (iv) The source code for a clean and elegant machine-independent interpretive implementation of the language. public void add(){ ArrayList


