1. Home
  2. Explore
  3. Computer Science
  4. CPU Scheduling Concepts

Study methods

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

CPU Scheduling Concepts

  • 42Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: CPU Bursts
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is a CPU burst?

Tap to flipClick to flipspace

A period during which a process performs operations that do not require I/O or an operating-system service.

Or swipe the card

42 cards

  1. What is a CPU burst?

    A period during which a process performs operations that do not require I/O or an operating-system service.

  2. Which kinds of operations count as CPU work during a CPU burst?

    Arithmetic operations, such as addition and multiplication, and memory operations, such as loads and stores.

  3. What typically ends a CPU burst and begins an I/O burst?

    A request for I/O or another operating-system service, such as reading a file or keyboard input.

  4. What is an I/O burst?

    A period when a process waits for an I/O operation or service to complete.

  5. What state is a process in while it performs CPU operations?

    The running state.

  6. Why do loads and stores count as CPU time even if the CPU stalls while memory is accessed?

    The operating system considers the process to have the CPU throughout the operation, even if the CPU is stalled or idle during part of it.

  7. Does time spent waiting for I/O count as CPU time?

    No. A process waiting for I/O is not using CPU time.

  8. What happens to a process after its I/O completes?

    It moves from waiting to ready; the scheduler later chooses when it gets the CPU.

  9. In a CPU-burst histogram, what do the horizontal and vertical axes represent?

    The horizontal axis shows CPU-burst duration; the vertical axis shows how frequently bursts of that duration occur.

  10. What CPU-burst length is described as most common?

    About 2 milliseconds.

  11. Why are CPU bursts longer than 8 milliseconds rare?

    It is unusual for a process to go that long without requesting I/O.

  12. At a 1-gigahertz clock rate, how many cycles occur in one second?

    One billion cycles.

  13. How can the cycle cost of different operations vary?

    An addition may take about one cycle, a multiplication a few cycles, and a load or store that misses cache and accesses main memory may take hundreds of cycles.

  14. Using an average of 10 cycles per operation on a 1-gigahertz processor, approximately how many operations occur in 1 millisecond?

    About 100,000 operations.

  15. What is the scheduler’s basic role when deciding CPU use?

    It decides which process gets a CPU and, in multiprocessor systems, which CPU it gets and for how long.

  16. Why does an introductory discussion of scheduling often begin with a single CPU?

    It makes key scheduling concepts easier to understand before considering multiprocessor scheduling.

  17. What is the short-term CPU scheduler responsible for?

    It examines the ready queue, selects a process, and gives that process the CPU.

  18. Does a ready queue have to be implemented as a literal first-in, first-out queue?

    No. It can be implemented with different data structures, such as a FIFO queue, priority queue, or tree.

  19. Why do priority-based scheduling systems need a suitable ready-queue data structure?

    They need a structure that can maintain or access processes according to priority, such as a priority queue or tree.

  20. What is multiprocessor scheduling concerned with?

    The issues involved in assigning processes to multiple CPUs.

  21. What is preemptive scheduling?

    Scheduling in which the operating system can interrupt a running process and take the CPU away from it.

  22. What hardware support is required to implement preemptive scheduling?

    A timer.

  23. How does non-preemptive scheduling differ from preemptive scheduling?

    In non-preemptive scheduling, the system does not interrupt a running process; the process keeps the CPU until it releases it.

  24. When can scheduling decisions be needed during process-state changes?

    When a process moves from running to waiting, running to ready, waiting to ready, or terminates.

  25. What is the difference between the scheduler and the dispatcher?

    The scheduler chooses which process should get the CPU; the dispatcher carries out that decision.

  26. What does the dispatcher do during a context switch?

    It saves the state of the process losing the CPU and restores the state of the process gaining it.

  27. Why must the dispatcher switch to user mode before a user process runs?

    To prevent the user process from executing with kernel privileges.

  28. Besides switching modes and saving state, what must the dispatcher do to resume a process?

    Jump to the appropriate location in the process so its execution can continue.

  29. What is dispatch latency?

    The time required for the dispatcher to perform the work needed to switch to a selected process.

  30. What does CPU utilization measure, and how should it generally be optimized?

    It measures how much the CPU is being used; it should generally be maximized.

  31. What does throughput measure in scheduling?

    The amount of work, such as tasks completed, within a given period of time.

  32. What is turnaround time?

    The time from a task’s submission to the system until that task is completed.

  33. What is waiting time for a process?

    The time it spends in the ready queue.

  34. What is response time?

    The time from a task’s submission until its first response.

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

    Waiting time, turnaround time, and response time are generally minimized; CPU utilization and throughput are generally maximized.

  36. Why might a scheduler optimize an average measure rather than the best or worst individual case?

    Average performance often represents overall system behavior, though some goals may instead focus on minimizing a maximum, such as maximum response time.

  37. How does using a shorter time quantum affect response time?

    It generally improves response time because processes get opportunities to make progress sooner.

  38. Why can a shorter time quantum increase turnaround time?

    It can cause more context switches, spending more time on kernel overhead instead of completing process work.

  39. How can a shorter time quantum affect throughput?

    It can reduce throughput because more CPU time is spent switching between processes and less work gets completed.

  40. Why can a shorter time quantum make a system feel more responsive even if it completes less work?

    More processes get chances to run sooner, reducing perceived delays, but frequent context switching consumes resources.

  41. How should a scheduler handle conflicts among performance goals?

    It should balance user needs, system requirements, responsiveness, and efficient resource use.

  42. Which measure is emphasized as the main basis for comparing scheduling algorithms in this discussion?

    Average waiting time.

Card 1 of 42
Card 1 of 42

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent