Operating System CPU Scheduling Basics

TopnotchSweetPea avatar
TopnotchSweetPea
·
·
Download

Start Quiz

Study Flashcards

16 Questions

What is the main responsibility of the CPU scheduler?

Selecting processes in memory ready to execute and allocating the CPU to one of them

When does a CPU scheduling decision take place?

All of the above

Which type of scheduling is non-preemptive?

Scheduling when a process terminates

What does the dispatcher module do?

Gives control of the CPU to the process selected by the short-term scheduler

What is dispatch latency?

The time it takes for the dispatcher to stop one process and start another running

When does process execution consist of a cycle of CPU execution and I/O wait?

When a process switches from running to waiting state

What is the main goal of CPU utilization in scheduling criteria?

To keep the CPU as busy as possible

What does the turnaround time measure in scheduling criteria?

The amount of time to execute a particular process

What is the implementation of the First-Come, First-Served (FCFS) scheduling algorithm based on?

A FIFO queue

What is the average waiting time under the FCFS policy dependent on?

The order in which processes arrive at the ready queue

What scenario may result when there is one CPU-bound process and many I/O-bound processes under FCFS scheduling?

The CPU will sit idle most of the time while waiting for I/O-bound processes to complete execution

What effect is observed due to one CPU-bound process holding the CPU for an extended period under FCFS scheduling?

A convoy effect where all other processes wait for the one big process to get off the CPU

What is the optimization criterion associated with FCFS scheduling?

Min waiting time

In which order do processes get allocated the CPU under FCFS scheduling?

Based on their arrival time at the ready queue

What type of scheduling algorithm is First-Come, First-Served (FCFS)?

Non-preemptive scheduling algorithm

What type of queue is used to manage the implementation of FCFS policy?

FIFO queue

Study Notes

CPU Scheduling

  • The main responsibility of the CPU scheduler is to allocate the CPU to a process among the available processes.
  • A CPU scheduling decision takes place when a process:
    • Switches from running to waiting state
    • Switches from waiting to ready state
    • Terminates

Non-Preemptive Scheduling

  • FCFS (First-Come, First-Served) scheduling is a non-preemptive type of scheduling.

Dispatcher Module

  • The dispatcher module gives control of the CPU to the process selected by the CPU scheduler.
  • It is responsible for context switching.

Dispatch Latency

  • Dispatch latency is the time taken by the dispatcher to stop one process and start another.

Process Execution Cycle

  • Process execution consists of a cycle of CPU execution and I/O wait when the process spends some time on the CPU and then waits for I/O operations.

CPU Utilization

  • The main goal of CPU utilization in scheduling criteria is to maximize the CPU usage.

Turnaround Time

  • The turnaround time measures the total time taken by a process to complete its execution.

FCFS Scheduling

  • The implementation of the First-Come, First-Served (FCFS) scheduling algorithm is based on a queue.
  • The average waiting time under the FCFS policy is dependent on the order of arrival of the processes.
  • A scenario may result in CPU-bound process holding the CPU for an extended period, causing other processes to wait, when there is one CPU-bound process and many I/O-bound processes under FCFS scheduling.
  • This can lead to a convoy effect, where a long process holds the CPU for an extended period.
  • The optimization criterion associated with FCFS scheduling is to minimize the average waiting time.
  • Processes get allocated the CPU under FCFS scheduling in the order of their arrival.
  • FCFS is a non-preemptive scheduling algorithm.
  • A first-in, first-out (FIFO) queue is used to manage the implementation of the FCFS policy.

Test your knowledge of CPU scheduling concepts such as scheduling criteria, algorithms, multiple-processor scheduling, real-time scheduling, and algorithm evaluation. This quiz covers basic concepts like maximum CPU utilization with multiprogramming and CPU-I/O burst cycle.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser