CPU vs I/O Bound Processes and Scheduling Algorithms

DedicatedYtterbium avatar
DedicatedYtterbium
·
·
Download

Start Quiz

Study Flashcards

10 Questions

CPU-bound processes spend most of their time computing b) _______ processes spend most of their time waiting for I/O

I/O bound

To increase CPU utilization and job throughput, previously covered the mechanisms of _______ switching

Context

Choosing which process to run next, when two or more of them are simultaneously in the ready state. Deciding which process should occupy the resource (CPU, disk, etc.). Done by scheduler using the scheduling _______

algorithm

Many of the same issues that apply to process scheduling also apply to thread scheduling, although some are _______

different

When a job exits, when a job blocks on I/O, when time slice expired, a hardware clock provides periodic interrupts, when a new job is created, whether to run the parent or the child, when an I/O interrupt occurs from an I/O device that has now completed its work for a waiting job. These are examples of when to _______

schedule

Interactive environments with users require that no process should be hogging the CPU and denying service to others. This is achieved through __________ scheduling.

Round-Robin

Real-time systems prioritize processes based on deadlines, using the __________ scheduling algorithm.

Earliest Deadline First

In Batch Systems, a scheduling algorithm where jobs are executed based on their arrival time is known as __________.

First-Come, First-Served (FCFS)

Non-preemptive scheduling allows the running process to keep the CPU until it voluntarily gives up the CPU, while preemptive scheduling allows for the running process to be interrupted and must release the CPU. This differentiation is based on __________.

Tanenbaum, Modern Operating Systems 3 e 9

In Real-time Systems, a scheduling algorithm where jobs are treated equally and processed in order of arrival is the __________ scheduling.

First-Come, First-Served (FCFS)

Study Notes

Process Scheduling

  • CPU-bound processes spend most of their time computing
  • I/O-bound processes spend most of their time waiting for I/O

Scheduling Decisions

  • Choosing which process to run next, when two or more are simultaneously in the ready state
  • Deciding which process should occupy the resource (CPU, disk, etc.)

Performance Criteria

  • Throughput: number of jobs completed in unit time
  • Turnaround time: amount of time to execute a particular process from the time it entered
  • Waiting time: amount of time process has been waiting in ready queue
  • Meeting deadlines: avoid bad consequences

Scheduling Objectives

  • Fairness: everyone is happy
  • Priority: some are more important
  • Efficiency: make best use of equipment
  • Encourage good behavior
  • Support heavy load
  • Degrade gracefully: adapt to different environments

Categories of Scheduling Algorithms

  • Batch: periodic tasks, no users impatiently waiting, possible to run for long time periods
  • Interactive: for environments with interactive users, cannot be hogging the CPU
  • Real-time: only programs that are intended to further the application, processes may not run for long and usually do their work and block quickly

Preemptive vs. Non-Preemptive Scheduling

  • Non-Preemptive: running process keeps the CPU until it voluntarily gives up the CPU
  • Preemptive: running process can be interrupted and must release the CPU

Scheduling Algorithm Goals

  • Maximize throughput
  • Minimize turnaround time
  • Minimize waiting time
  • Minimize response time
  • Maximize CPU utilization
  • Minimize context switching

Scheduling Algorithms

  • First-Come, First-Served (FCFS): jobs are scheduled in order of arrival to ready queue, typically non-preemptive
  • Short Job First (SJF): prioritize shorter jobs
  • Round-Robin Scheduling: time slicing, each job gets a fixed time slice
  • Priority Scheduling: prioritize jobs based on priority
  • Multi-Queue & Multi-Level Feedback: multiple queues with different priorities and time slices
  • Earliest Deadline First Scheduling: prioritize jobs based on deadline

Explore the differences between CPU-bound and I/O-bound processes, as well as the mechanisms of context switching, process queues, and scheduling algorithms. Learn how CPU utilization and job throughput can be increased through efficient scheduling decisions.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser