

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


(NFQ: Level 8)
Answer THREE questions. Examiners: Prof. G. Hurley Dr. S. Foley Mr. F. O’Reilly
Q1. (a) Using examples, compare and contrast priority and round robin scheduling algorithms, giving their respective benefits. (6 Marks)
(b) The following tasks arrive at a scheduler for an Earliest Deadline First system. Draw a time diagram, showing the scheduling until all tasks have completed execution.
Task Arrival Time Execution Time Absolute Deadline 1 1 10 20 2 4 5 15 3 10 8 40 4 15 6 30 5 25 10 38 (10 marks)
(c) What are the fundamental assumptions of the Rate Monotonic scheduling system? Determine the schedulability of the following tasks using a Rate Monotonic algorithm.
Task Execution Time Period a 20 90 b 45 110 c 35 160 d 110 600 e 70 580 f 80 350 (18 marks) [Total: 34 marks]
Q2. (a) Provide code to implement both a spin-locking and blocking semaphore operation primitives. Explain the difference in operation between the two types of primitive and what are their respective benefits for synchronisation. (10 marks)
(b) You have a number of processes which must all start processing some job, at the same regular intervals. On completion of the processing (possibly at different times) they must wait until the restart interval for the next processing job. Describe a scheme to co-ordinate their processing. (8 marks)
(c) Explain how exceptions provide an alternate path for error propagation when using layered programs/libraries. What are the calls used to generate and handle exceptions placed? Provide simple sample code to show how through C++ or Java, different types of exceptions can be caught and handled. (8 marks)
(d) Timing of function calls and returns is of key importance in Client Server Messaging systems. Name and explain the two terms used to describe timing/co- ordination in request/response systems. Explain the communication sequence that might occur when requesting a web-page from the CIT web server. Explaining what processes might be involved and their communication. (8 marks) [Total: 34 marks]
Q3. (a) What is a Context Switch and when does it occur? Explain a technique which allows for parallel execution in programs but minimises process context switches. How does it achieve this and what information is tracked? (8 marks)
(b) Compare and contrast the implementation of parallel execution within processes, as done in MS C++ and Java Language. You should draw attention to the specific function calls used, any standard resources available to the programmer and restrictions or limitations imposed on the programmer. Provide samples of code to demonstrate. (16 marks)
(c) What are the key function calls used in Event based process synchronisation? In particular what options are available for the waiting process when waiting for events? How do these provide for synchronisation? (6 marks)
(d) What factors should you be aware of, when using if-then-else structures in time critical applications? How should you structure the code, providing a simple example? (4 marks) [Total: 34 marks]