Operating Systems: CPU Scheduling - FIFO Algorithm Quiz
10 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Draw Gantt chart and calculate the average waiting time if the ______ scheduling algorithm is followed.

FCFS

Soha A. asked to calculate the average waiting time if the ______ scheduling algorithm is followed.

FCFS

The average waiting time can be calculated when the ______ scheduling algorithm is followed.

FCFS

In CPU scheduling, one can calculate the average waiting time of the ______ algorithm.

<p>FCFS</p> Signup and view all the answers

If you draw a Gantt chart, you can calculate the average waiting time for the ______ scheduling algorithm.

<p>FCFS</p> Signup and view all the answers

______ Lecture 04: CPU Scheduling CS 206: Operating Systems

<p>Mohamed</p> Signup and view all the answers

Average Waiting Time = (2 + 0 + 1) / 3 = 3 / 3 = ___ unit

<p>1</p> Signup and view all the answers

Processes ID Arrival Time (AT) Burst Time (BT) P1 1 50 P2 P3 0 0 1 2 CT P2 Waiting Time WT = TAT - BT 52 2 1 3 0 1 53 1 2 1 0 Turn Around Time TAT = CT - AT ___ P3 53 P1

<p>3</p> Signup and view all the answers

Small processes such as P1 – P2 didn’t wait for large BT of ___

<p>P1</p> Signup and view all the answers

Consider the set of 3 processes whose arrival time and burst time are given below: Process ID Arrival Time (AT) Burst Time (BT) P1 1 50 P2 P3 0 0 1 2 CT P2 Waiting Time WT = TAT - BT 52 2 1 3 0 1 53 1 2 1 0 Turn Around Time TAT = CT - AT 3 ___ 53 P1

<p>P3</p> Signup and view all the answers

Study Notes

CPU Scheduling

  • CPU scheduling algorithms:
    • First Come First Served (FCFS)
    • Shortest Job First (SJF)
    • Shortest Remaining Time First (SRTF)
    • Highest Response Ratio Next (HRRN)
    • Round Robin (RR)
    • Virtual Round Robin (VRR)
    • Priority Scheduling (PR)
    • Multilevel Queue
    • Multilevel Feedback Queue (MLFQ)

Processes and Scheduling

  • Processes in main memory, ready and waiting to execute, are listed in a queue
  • Scheduling: allocating the CPU to a process in the ready queue

Example of CPU Scheduling

  • Given 3 processes with arrival times and burst times:
    • Process ID: P1, Arrival Time: 1, Burst Time: 50
    • Process ID: P2, Arrival Time: 0, Burst Time: 2
    • Process ID: P3, Arrival Time: 2, Burst Time: 1
  • Calculating waiting time and turn-around time:
    • Waiting Time (WT) = Turn-around Time (TAT) - Burst Time (BT)
    • Turn-around Time (TAT) = Completion Time (CT) - Arrival Time (AT)
  • Average Waiting Time = (Σ(WT)) / Number of Processes

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

Test your knowledge of CPU scheduling in Operating Systems with a focus on the First-In-First-Out (FIFO) algorithm. Learn about the basics of FIFO and its implications on system performance.

More Like This

Use Quizgecko on...
Browser
Browser