Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
1 CS 320 Questions, Ch. 6: CPU Scheduling General 1. What is the fundamental goal of multiprogramming as given by the author? (In effect, this is just one of the several criteria for evaluating scheduling algorithms given later.) 2. When considering scheduling issues, processes can be put into one of two categories based on their use of resources. What are these two categories? 3. The author describes process execution as cyclical in nature. What are the two elements of the cycle? 4. For the average process, does the ratio of short duration to long duration CPU bursts tend to be high or low? 5. What is the difference between these two process states: ready, waiting. 6. What is the theoretical claim for SJF scheduling, and what’s the corresponding practical reality? 7. The scheduler implements algorithms for selecting a process to run. What specific term is given to these three actions, as a group, which are applied to the process: Switching context; switching to user mode; jumping to the execution point in the user code and starting to run. 8. The book gives 5 different criteria for evaluating the performance of a scheduling algorithm. Give any one of these besides waiting time. 9. What does the phrase “a user process running in the kernel” mean? 10. Conceptually it is possible to propose that every process on a system be interruptible. Give any one pitfall, which in practice would have to be guarded against if a system were implemented to immediately handle an interrupt received when the dispatcher is running. 11. In the context of protecting critical sections of system code from interruption, define the phrase “safe point”. Preemption 12. Define pre-emptive scheduling. 13. CPU scheduling can be done when a process switches from the running state to the waiting state. Is such scheduling preemptive or nonpreemptive? 2 14. CPU scheduling can be done when a process switches from the waiting state to the ready state. Is such scheduling preemptive or nonpreemptive? 15. A system may support preemption of user processes. A process may have requested an operating system service with a system call. Under what circumstances may such a user initiated system call not be interrupted? Priority 16. Give a major potential shortcoming of a priority based scheduling algorithm. 17. Suppose priority based scheduling is done and a low priority process holds a resource that a higher priority process needs. How is this handled? Round Robin 18. In round robin scheduling, if the time slice allocated for each process is longer than the longest cpu burst of any process in the system, in effect what scheduling algorithm has been implemented? 19. The previous question hinted at the effective upper bound on the length of time slices in round robin scheduling. What system parameter/time measure, while it may not be the lower bound, determines the lower bound on the practical length of time slices under round robin scheduling? Queuing Systems 20. In a simple multi-level queue scheduling system, how do the queues differ from each other? 21. How does a multi-level feedback queue scheduling system differ from a simple multi-level queue scheduling system? 22. In a multilevel queue scheduling system, is a process permanently assigned to a single ready queue, or can it move from one to another? Multiprocessing 23. In a multiprocessor system, which of these two design alternatives is more complex to implement, but supports greater concurrency? A. A common scheduling queue. B. A scheduling queue for each processor. 3 24. For homogeneous symmetric multiprocessing, from an O/S point of view, what must exist in order to support load sharing by means of cooperative scheduling? Real Time Systems 25. In a hard real time system a job can make a request for a system service and include a maximum completion time. Under this scenario, what are the possible, immediate system responses, and what do they signify? 26. From a scheduling algorithm point of view, the central characteristic of a soft real time operating system can be described in a phrase of two words, or also less specifically, by a single word. Give such a characterization. Java Specific 27. Do the Java specifications require that thread scheduling be pre-emptive on all implementation platforms? 28. Do the Java specifications require that thread scheduling be implemented using time slicing on all platforms? Performance Modeling and Analysis 29. Deterministic modeling can be used to calculate the performance numbers of a scheduling algorithm for a given set of jobs. What is it about this that inherently limits the validity of the results obtained? 30. Queueing models can be used to calculate the performance numbers of a scheduling algorithm. Among other things, what statistical assumption in such models inherently limits the validity of the results obtained? 31. Give one of the two possible sources of input to a simulation model of an operating system scheduling algorithm. 32. Implementation is the gold standard for testing new operating system scheduling algorithms. Suppose you had a perfect modeling tool which had been set to match the algorithm to be implemented, and that tool predicted certain performance results. What is a likely reason that observed performance would differ from the predicted results? Problems 4 33. Let this formula be given: Τn+1 = αtn + (1 - α)Τn. If the estimate for T3 is fully expanded and simplified, some power of the expression (1 - α) will be the coefficient of T0. What is this power? 34. For the following processes and burst lengths, calculate the average waiting time under FCFS scheduling, assuming that the process subscripts give arrival order and all of the processes are ready. Process P1 P2 P3 Burst length 18 3 5 35. Information about a set of processes is given below. Calculate the average waiting time for these processes under FCFS scheduling. Give your answer as a simple fraction. Process P1 P2 P3 P4 burst time 5 8 3 4 36. For the following processes, arrival times, and burst lengths, calculate the average waiting time under preemptive SJF (shortest remaining burst time first) scheduling, assuming that the processes are ready. Process P1 P2 P3 P4 Arrival time 0 2 6 7 Burst length 18 14 4 13 37. Information about a set of processes is given below. Calculate the average waiting time for these processes under SJF scheduling. Give your answer as a simple fraction. Process P1 P2 P3 P4 burst time 5 8 3 4 38. Information about a set of processes is given below. Calculate the average waiting time for these processes under SJF scheduling. Give your answer as a simple fraction. Process P1 arrival time 0 burst time 5 5 P2 P3 P4 4 6 8 8 3 4 39. Information about a set of processes is given below. Calculate the average waiting time for these processes under priority scheduling. (A low priority number represents a high priority.) Give your answer as a simple fraction. Process P1 P2 P3 P4 priority 4 1 3 2 burst time 5 8 3 4 40. Information about a set of processes is given below. Calculate the average waiting time for these processes under RR scheduling. Let the time slice or quantum be 3. Give your answer as a simple fraction. Process P1 P2 P3 P4 burst time 5 8 3 4 41. Refer to the previous problem. If context switching takes 1 time unit on that system, including the cost of switching in the initial process, give the ratio of overhead to useful work in bringing the whole sequence of processes to completion. Give your answer as a simple fraction. 42. Take the book’s example of a multilevel feedback queue for example: Queue 0, quantum = 8; queue 1, quantum = 16; queue 2, FCFS scheduling. Under what circumstances would a process be demoted from queue 1 to queue 2? 43. Take the book’s example of a multilevel feedback queue for example: Queue 0, quantum = 8; queue 1, quantum = 16; queue 2, FCFS scheduling. Under what circumstances would it be reasonable to promote a process from queue 1 to queue 0?