10 Questions
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.
FCFS
If you draw a Gantt chart, you can calculate the average waiting time for the ______ scheduling algorithm.
FCFS
______ Lecture 04: CPU Scheduling CS 206: Operating Systems
Mohamed
Average Waiting Time = (2 + 0 + 1) / 3 = 3 / 3 = ___ unit
1
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
3
Small processes such as P1 – P2 didn’t wait for large BT of ___
P1
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
P3
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
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.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free