(5 Marks) Question 1. Multi-level feedback queues (MLFQs) are implemented in many modern time-sharing operating systems, including those derived from 4.4 BSD Unix. Briefly describe the operation of MLFQs in 4.4 BSD Unix and the motivation behind using them.
(4 Marks) Question 2. A system has two processes and three identical resources. Each process needs a maximum of two resources. Is deadlock possible? Explain your answer.
(3 marks) Question 3. Explain how quantum value and the time taken to perform a context switch affect each other in a round robin process-scheduling algorithm.
(8 marks) Question 4. Five threads, A through E, arrive in alphabetic order at a scheduling queue one second apart from each other. Estimated running times are 10, 6, 2, 4, and 8 seconds, respectively. Their externally determined priorities are 3, 5, 2, 1, and 4, respectively, 5 being the highest priority. For each of the following scheduling algorithms, determine the mean turnaround time and mean waiting time. Assume thread switching is effectively instantaneous.
First Come First Served
Preemptive Priority Scheduling
Preemptive Shortest Job First
For (b), assume the system is multi-programmed with a quantum of 4 seconds. In all cases, show your work and include diagrams/charts/tables as appropriate.
(5 Marks) Question 5. If a hard real-time system has four tasks with periods of 50, 100, 200, and 250 ms (milliseconds) respectively, and the four tasks require 35, 20, 10, and X ms of CPU time respectively, calculate the largest value of X for which the system is schedulable during the period of the fourth task, and state the scheduling algorithm used. Show all your work and include charts as appropriate.
UCSC BSOE CMPS111 Spring 2018 Copyright © 2017-2018 David C. Harrison. All Rights reserved.