1. Home
  2. Explore
  3. Computer Science
  4. Process Scheduling

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Process Scheduling

  • 57Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Scheduling Basics
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What does scheduling mean in an operating system?

Tap to flipClick to flipspace

Assigning a resource to a task at a particular time.

Or swipe the card

57 cards

  1. What does scheduling mean in an operating system?

    Assigning a resource to a task at a particular time.

  2. What is process scheduling, also called CPU scheduling?

    Choosing a process and assigning it to the CPU for execution.

  3. Why is process scheduling necessary when a system has many processes but few CPUs?

    The operating system must choose which waiting process gets access to the limited CPU resources and when.

  4. What is a central challenge for a process scheduler from the user's perspective?

    Providing timely service so users do not experience excessive or unpredictable delays.

  5. What is the degree of multiprogramming?

    The number of processes admitted into the system and present simultaneously, including processes in running, ready, waiting, or suspended states.

  6. How does the number of CPUs constrain the number of running processes?

    At most one process can run on each CPU at a time; for example, four CPUs can run at most four processes simultaneously.

  7. Does the scheduling concept apply only to processes?

    No. The same scheduling ideas can also apply to threads.

  8. What pattern of activity does a typical program alternate between?

    CPU bursts and I/O bursts.

  9. What is a CPU burst?

    A period during which a process performs computation on the CPU.

  10. What is an I/O burst?

    A period during which a process performs or waits for input/output activity.

  11. How do CPU burst and I/O burst durations typically compare?

    I/O bursts generally take much longer than CPU bursts.

  12. Why can a CPU be idle while a process is performing I/O?

    The process is waiting for the I/O operation, which can proceed between the device and memory without requiring that process to use the CPU.

  13. How can scheduling another process during one process's I/O improve utilization?

    The CPU can run another process while the first waits for I/O, overlapping computation with I/O.

  14. What characterizes a CPU-bound job?

    It spends a relatively large amount of time doing computation and has substantial CPU activity.

  15. What characterizes an I/O-bound job?

    It performs relatively more I/O compared with its amount of computation.

  16. Why is matrix addition presented as an example of an I/O-bound job?

    It performs on the order of n2n^2n2 additions and involves on the order of n2n^2n2 data items, so its I/O is substantial relative to its computation.

  17. What are the two main components involved in scheduling a process onto the CPU?

    The scheduler and the dispatcher.

  18. What does the scheduler do?

    It examines the queue of processes and selects which process should run next.

  19. What does the dispatcher do?

    It carries out the handoff of the CPU to the process selected by the scheduler.

  20. What is a long-term scheduler generally used for?

    Scheduling batch jobs that are submitted for later execution rather than requiring immediate interactive responses.

  21. What is a short-term scheduler generally used for?

    Scheduling processes in interactive or real-time systems that need frequent decisions.

  22. What is the medium-term scheduler?

    A type of scheduler whose role falls between long-term and short-term scheduling.

  23. How do the invocation frequencies of long-term and short-term schedulers compare?

    A long-term scheduler may be invoked every seconds or minutes, while a short-term scheduler may be invoked every millisecond or tens of milliseconds.

  24. What is dispatch latency?

    The time the dispatcher takes to stop one process and begin executing another.

  25. What does a context switch involve?

    Saving information about the current process and loading the information needed for the next process.

  26. What process-state change occurs when a running process requests an I/O service?

    It can move from running to waiting.

  27. What process-state change can occur when an external interrupt arrives while a process is running?

    The process can move from running to ready.

  28. What process-state change can occur when a requested system call or service completes?

    The process can move from waiting to ready.

  29. What can happen to a process that finishes or encounters an unrecoverable exception?

    It can be terminated.

  30. What kinds of decisions may the scheduler make about a process?

    It may move a process between running, ready, and waiting states, or terminate it.

  31. What is non-preemptive scheduling?

    Scheduling in which the operating system does not forcibly take the CPU from a running process.

  32. In non-preemptive scheduling, how can a running process lose the CPU?

    It can relinquish the CPU voluntarily by terminating, requesting I/O, or completing its CPU burst.

  33. What is preemptive scheduling?

    Scheduling in which the operating system can forcibly stop a running process and take back the CPU.

  34. What hardware mechanism enables preemptive scheduling?

    A hardware interrupt, commonly generated by a timer.

  35. How does a timer interrupt let the operating system regain control of the CPU?

    The timer generates a hardware interrupt, which transfers control to an interrupt service routine that is part of the operating system.

  36. What is a trap in the context of process execution?

    An exception or fault that interrupts a process and transfers control to an operating-system interrupt service routine.

  37. What are examples of errors that can cause a trap?

    Division by zero, accessing a nonexistent page, writing to a read-only segment, executing from a data segment, or a stack overflow.

  38. Why can non-preemptive execution raise security concerns?

    A process that cannot be forcibly interrupted may continue executing without the operating system regaining control, potentially hiding or carrying out unwanted actions.

  39. How can preemptive scheduling help prevent starvation?

    It can stop a process from monopolizing the CPU and allow other processes to receive CPU time within a reasonable period.

  40. What additional issues can arise with preemptive scheduling?

    The system must coordinate access to shared data and handle questions such as whether an interrupt can interrupt another interrupt.

  41. What is CPU utilization as a scheduling criterion?

    The extent to which the CPU is kept busy doing useful work.

  42. What is throughput in scheduling?

    The number of processes that complete execution per unit of time.

  43. What is turnaround time?

    The elapsed time from a process's arrival or submission until it finishes.

  44. What is waiting time in scheduling?

    The total time a process spends waiting in the ready queue to get CPU time.

  45. How is waiting time calculated for a non-preemptive process that runs only once?

    Subtract its arrival time from its start time: W=Tstart−TarrivalW = T_{start} - T_{arrival}W=Tstart​−Tarrival​.

  46. How is total waiting time calculated for a preemptive process?

    Subtract its CPU time from its turnaround time: W=Tfinish−Tarrival−TCPUW = T_{finish} - T_{arrival} - T_{CPU}W=Tfinish​−Tarrival​−TCPU​.

  47. What is response time?

    The time from submitting a request until the first response is produced.

  48. Why is response time especially important in interactive and real-time systems?

    Users or dependent tasks need an initial response quickly, even if the complete work takes longer.

  49. Why can maximizing CPU utilization alone be a poor scheduling objective?

    A long-running process could keep the CPU busy while other processes starve and throughput remains low.

  50. Which scheduling measures are generally maximized, and which are generally minimized?

    Maximize CPU utilization and throughput; minimize turnaround time, waiting time, and response time.

  51. Why should a scheduling algorithm consider variation in its performance measures?

    Reducing variation makes performance more predictable and helps users trust the system.

  52. How might a scheduling algorithm balance average-case and worst-case performance?

    It can be designed to provide excellent average performance, to limit worst-case behavior, or to make a trade-off between them.

  53. Why does the purpose of a system affect which scheduling criterion matters most?

    Different systems and users value different outcomes, such as throughput, response time, or turnaround time.

  54. Which scheduling measure is especially important for real-time systems?

    Response time.

  55. Which scheduling measures may matter most for batch jobs?

    Throughput and turnaround time.

  56. Why is determinism or predictable scheduling performance valuable?

    It lets users anticipate how long processes will wait or run, rather than facing highly inconsistent delays.

  57. What determines the choice of a scheduling algorithm?

    The system's goals and the performance criteria it prioritizes.

Card 1 of 57
Card 1 of 57

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent