Logo/

Chapter 5 - CPU Scheduling

Log in

Made with ScholarlyMake flashcards like these from your own notes

Chapter 5 - CPU Scheduling

Questions and answers

63 cards
  1. Question:What is the primary resource that the Operating System schedules?

    Answer:The CPU is the primary resource that the Operating System schedules.

  2. Question:What is central to Operating System design regarding CPU utilization?

    Answer:Scheduling processes to execute on the CPU is central to Operating System design.

  3. Question:Why is maximizing CPU utilization feasible?

    Answer:Maximizing CPU utilization is feasible as processes alternate using the CPU and waiting for I/O.

  4. Question:What are the two types of bursts in process execution?

    Answer:The two types of bursts in process execution are CPU burst and I/O burst.

  5. Question:What characterizes an I/O bound program?

    Answer:An I/O bound program typically has many short CPU bursts.

  6. Question:What characterizes a CPU bound program?

    Answer:A CPU bound program might have a few long CPU bursts.

  7. Question:Why is the distribution of I/O bound and CPU bound programs important?

    Answer:The distribution of I/O bound and CPU bound programs is important in the selection of an appropriate CPU scheduling algorithm.

  8. Question:What does the Operating System maintain for process scheduling?

    Answer:The Operating System maintains scheduling queues of processes.

  9. Question:What is a job queue?

    Answer:A job queue is a set of all processes in the system.

  10. Question:What is a ready queue?

    Answer:A ready queue is a set of all processes residing in main memory that are ready and waiting to execute.

  11. Question:What are device queues?

    Answer:Device queues are sets of processes waiting for an I/O device, usually with a separate device queue for each device.

  12. Question:What does the process scheduler do?

    Answer:The process scheduler selects a process from a queue by implementing an appropriate scheduling algorithm.

  13. Question:What does the queueing diagram represent in process scheduling?

    Answer:The queueing diagram represents queues, resources, and flows in the representation of process scheduling.

  14. Question:What is a CPU scheduler?

    Answer:The CPU scheduler, also known as the short term scheduler, selects from among the processes in the ready queue and allocates the CPU to one of them.

  15. Question:When is the short term scheduler invoked?

    Answer:The short term scheduler is invoked frequently, typically every few milliseconds, and must be fast.

  16. Question:What are the two types of scheduling?

    Answer:Non-preemptive scheduling and Preemptive scheduling.

  17. Question:What is non-preemptive scheduling?

    Answer:In non-preemptive scheduling, a running process is executed till completion without interruption.

  18. Question:What is preemptive scheduling?

    Answer:In preemptive scheduling, a running process may be interrupted and moved to the ready queue by the operating system.

  19. Question:What is the role of the dispatcher?

    Answer:The dispatcher module gives control of the CPU to the process selected by the short term scheduler, which involves context switching to user mode and jumping to the proper location in the user program to restart that program.

  20. Question:What is dispatch latency?

    Answer:Dispatch latency is the time taken by the dispatcher to stop one process and start another process onto the CPU.

  21. Question:What is the scheduling criterion: CPU utilization?

    Answer:CPU utilization aims to keep the CPU as busy as possible.

  22. Question:What is throughput in the context of CPU scheduling?

    Answer:Throughput refers to the number of processes that complete their execution per time unit.

  23. Question:What is waiting time?

    Answer:Waiting time is the amount of time a process has been waiting in the ready queue.

  24. Question:How is average waiting time calculated?

    Answer:Average waiting time is calculated as the total waiting time of all processes divided by the total number of processes.

  25. Question:What is turnaround time?

    Answer:Turnaround time is the amount of time to execute a particular process.

  26. Question:What components make up turnaround time for a process?

    Answer:Turnaround time for a process is the sum of waiting time and CPU burst time.

  27. Question:What are the scheduling criteria for operating systems?

    Answer:Maximize CPU utilization and throughput; Minimize turnaround time and waiting time.

  28. Question:What is a Gantt Chart?

    Answer:Bar chart that illustrates a particular process schedule including the start and finish times of each of the participating processes.

  29. Question:What is the First Come First Serve (FCFS) Scheduling?

    Answer:FCFS Scheduling is a scheduling algorithm where the process requesting the CPU first is allocated the CPU first. It is implemented with a FIFO queue and is non-preemptive.

  30. Question:What is the disadvantage of FCFS scheduling?

    Answer:The disadvantage of FCFS scheduling is that the average CPU waiting time for a process to use the CPU is long.

  31. Question:What is the turnaround time for a process in FCFS scheduling?

    Answer:Turnaround time for a process is calculated as: Waiting time + CPU burst time.

  32. Question:List the scheduling algorithms mentioned in the text.

    Answer:First Come First Serve (FCFS), Shortest Job First (SJF), Shortest Remaining Time First, Priority Scheduling, Round Robin Scheduling.

  33. Question:What does FCFS stand for in scheduling?

    Answer:First-Come, First-Served.

  34. Question:What is the convoy effect in scheduling?

    Answer:It refers to a situation where short processes are delayed behind long processes, resulting in lower resource utilization.

  35. Question:What does SJF stand for in scheduling?

    Answer:Shortest Job First.

  36. Question:What does SJF use to schedule processes?

    Answer:SJF uses the lengths of the next CPU bursts to schedule the process with the shortest CPU burst.

  37. Question:How does SJF handle ties when two processes have the same next CPU burst?

    Answer:FCFS scheduling is used to break the tie.

  38. Question:Why is SJF considered optimal?

    Answer:SJF is optimal because it gives the minimum average waiting time for a given set of processes.

  39. Question:What is the preemptive version of SJF called?

    Answer:Shortest Remaining Time First.

  40. Question:What does the Shortest Remaining Time First algorithm do?

    Answer:At a given time, the process with the shortest remaining time is scheduled first.

  41. Question:What factors are introduced in the analysis of Shortest Remaining Time First?

    Answer:Varying arrival times and preemption.

  42. Question:What is Multilevel Queue Scheduling?

    Answer:Multilevel Queue Scheduling is a type of scheduling where the ready queue is partitioned into various separate queues. Each process resides permanently in a given queue, and each queue has its own scheduling algorithm.

  43. Question:What is the scheduling methodology used in Multilevel Queue Scheduling?

    Answer:In Multilevel Queue Scheduling, scheduling is done between the queues using fixed priority preemptive scheduling, where processes of the highest priority are served first.

  44. Question:What is a disadvantage of Multilevel Queue Scheduling?

    Answer:A disadvantage of Multilevel Queue Scheduling is that it is inflexible, as processes are permanently assigned to a given queue.

  45. Question:What is the difference between Multilevel Queue Scheduling and Multilevel Feedback Queue Scheduling?

    Answer:In Multilevel Queue Scheduling, a process resides permanently in a specified queue, whereas in Multilevel Feedback Queue Scheduling, a process can move between various queues.

  46. Question:How can aging be implemented in Multilevel Feedback Queue Scheduling?

    Answer:Aging can be implemented in Multilevel Feedback Queue Scheduling by moving a process from a low priority queue to a high priority queue.

  47. Question:What is the significance of thread scheduling in relation to kernel threads?

    Answer:When threads are supported by the kernel, threads are scheduled instead of processes. User-level threads must be mapped to an associated kernel-level thread to run on the CPU.

  48. Question:What do POSIX Pthreads allow during thread creation?

    Answer:POSIX Pthreads allows setting scheduling parameters during thread creation.

  49. Question:What is a potential issue that can occur in fixed priority preemptive scheduling?

    Answer:A potential issue that can occur in fixed priority preemptive scheduling is starvation, where lower priority processes may not get executed.

  50. Question:What is associated with each process in Priority Scheduling?

    Answer:A priority number integer.

  51. Question:How are processes with equal priority scheduled in Priority Scheduling?

    Answer:In FCFS (First-Come, First-Served) order.

  52. Question:How is the CPU allocated in Priority Scheduling?

    Answer:The CPU is allocated to the process with the highest priority, which is the smallest integer.

  53. Question:What are the two types of Priority Scheduling?

    Answer:Preemptive and non-preemptive.

  54. Question:What problem may occur with low priority processes in Priority Scheduling?

    Answer:Starvation; low priority processes may never execute.

  55. Question:What is the solution to starvation in Priority Scheduling?

    Answer:Aging; as time progresses, increase the priority of the process.

  56. Question:How does Round Robin (RR) scheduling differ from FCFS scheduling?

    Answer:RR scheduling includes preemption to enable the system to switch between processes.

  57. Question:How are processes scheduled in Round Robin scheduling?

    Answer:Processes are scheduled on a FCFS basis from the ready queue, where each process gets a small unit of CPU time, known as time quantum (q).

  58. Question:What happens when the time quantum has elapsed in Round Robin scheduling?

    Answer:The process is preempted and added to the end of the ready queue.

  59. Question:What triggers the scheduling of the next process in Round Robin scheduling?

    Answer:Timer interrupts every quantum.

  60. Question:What is the typical average turnaround time comparison of Round Robin and SJF?

    Answer:Typically higher average turnaround time than SJF (Shortest Job First).

  61. Question:What should the value of q be in Round Robin scheduling?

    Answer:q must be large with respect to context switching time; otherwise, overhead is too high.

  62. Question:What is the usual range for the time quantum (q) in Round Robin scheduling?

    Answer:10 to 100 milliseconds.

  63. Question:What is the context switch time in Round Robin scheduling?

    Answer:10 microseconds.