Operating System Concepts: CPU Scheduling

EasedFreesia avatar
EasedFreesia
·
·
Download

Start Quiz

Study Flashcards

10 Questions

What does t_n represent in the given formula?

actual length of nth CPU burst

What is the range of values for alpha (α)?

0 ≤ α ≤ 1

What is τ_(n+1) in the given formula?

predicted value for the next CPU burst

What is the purpose of the alpha (α) value?

to weigh the importance of the current CPU burst

What is the formula to calculate τ_(n+1)?

τ_(n+1) = α t_n + (1- α) τ_n

What is the relationship between τ_(n+1) and t_n?

τ_(n+1) is a weighted average of t_n and τ_n

What is the weighting factor in the formula?

α

What is the predicted value for the next CPU burst based on?

a weighted average of the current and previous CPU bursts

What does the value of α close to 0 imply?

the predicted value is heavily influenced by the previous CPU burst

What is the benefit of using a weighted average for prediction?

it allows for a more balanced prediction by considering both current and previous CPU bursts

Study Notes

CPU Scheduling

  • CPU Scheduling is the basis of multi-programmed operating systems, achieving efficiency and productivity by switching the CPU among processes.
  • The short-term scheduler assigns the CPU to the current process in the Ready Queue.

Process/CPU and I/O Burst Cycle

  • For scheduling purposes, both long-term and short-term schedulers are necessary.
  • The method used to determine which queue a process will enter when it needs service is crucial.

Multilevel Feedback Queue (MFQ)

  • An MFQ has three queues: Q0, Q1, and Q2.
  • Q0: Round Robin (RR) with a time quantum of 8 milliseconds.
  • Q1: RR with a time quantum of 16 milliseconds.
  • Q2: First-Come-First-Served (FCFS).

Scheduling Process

  • A new job enters queue Q0, which is served FCFS, and receives 8 milliseconds of CPU time.
  • If the job doesn't finish in 8 milliseconds, it is moved to queue Q1.
  • In Q1, the job is served FCFS and receives 16 additional milliseconds.
  • If the job still doesn't complete, it is preempted and moved to queue Q2.

CPU Burst Prediction

  • τn = actual length of the nth CPU burst.
  • τn+1 = predicted value for the next CPU burst.
  • α, 0 ≤ α ≤ 1, is a parameter used to define the prediction.
  • τn+1 = αtn + (1-α)τn is the formula used to predict the next CPU burst.

This quiz covers the basics of CPU scheduling, a fundamental concept in multi-programmed operating systems. It explores how CPU scheduling enhances system efficiency and productivity.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

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