0% found this document useful (0 votes)
4 views12 pages

os cpu scheduling questions jjj

The document presents a series of CPU scheduling problems, each requiring the calculation of average waiting time and turnaround time for various scheduling policies including Shortest Job First, Shortest Remaining Time First, FCFS, non-preemptive priority scheduling, priority preemptive scheduling, and Round Robin. Each problem is accompanied by a table of jobs with their respective burst times and arrival times. Solutions are provided for the average turnaround and waiting times for each scheduling scenario.

Uploaded by

Akash Bartwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views12 pages

os cpu scheduling questions jjj

The document presents a series of CPU scheduling problems, each requiring the calculation of average waiting time and turnaround time for various scheduling policies including Shortest Job First, Shortest Remaining Time First, FCFS, non-preemptive priority scheduling, priority preemptive scheduling, and Round Robin. Each problem is accompanied by a table of jobs with their respective burst times and arrival times. Solutions are provided for the average turnaround and waiting times for each scheduling scenario.

Uploaded by

Akash Bartwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

CPU Scheduling Questions

1. What is the average waiting time and turnaround time for the process given in table
using Shortest Job first policy?

Jobs Burst time (ms) Arrival time


P1 8 0
P2 4 0.4
P3 1 1

Solution:
2. What is the average waiting time and turnaround time for the process given in table
using Shortest Remaining Time First?

Jobs Burst time (ms) Arrival time


P1 9 0
P2 5 2
P3 6 3
P4 4 5
P5 8 6
3. What is the average waiting time and turnaround time for the process given in table
using FCFS?

Jobs Burst time (ms) Arrival time


P1 8 0
P2 4 1
P3 9 2
P4 5 3
4. What is the average waiting time and turnaround time for the process given in table
using non preemptive priority scheduling?

Jobs Burst time (ms) Arrival time Priority


P1 10 0 3
P2 2 0 1
P3 3 1 3
P4 1 2 5
P5 4 2 2
5. Consider the set of 5 processes whose arrival time and burst time are given below-If
the CPU scheduling policy is priority preemptive, calculate the average waiting time
and average turn around time. (Higher number represents higher priority).

Process Id Arrival time Burst time Priority

P1 0 4 2

P2 1 3 3

P3 2 1 4

P4 3 5 5

P5 4 2 5

Soln
Here, Exit time is same as completion time
Now,
 Average Turn Around time = (4 + 14 + 10 + 6 + 7) / 5 = 41 / 5 = 8.2 unit
 Average waiting time = (0 + 11 + 9 + 1 + 5) / 5 = 26 / 5 = 5.2 unit

6. Consider the set of 5 processes whose arrival time and burst time are given below-If
the CPU scheduling policy is Round Robin with time quantum = 2 unit, calculate the
average waiting time and average turn around time.

Process Id Arrival time Burst time

P1 0 5

P2 1 3
P3 2 1

P4 3 2

P5 4 3

Soln

Now,
 Average Turn Around time = (13 + 11 + 3 + 6 + 10) / 5 = 43 / 5 = 8.6 unit
 Average waiting time = (8 + 8 + 2 + 4 + 7) / 5 = 29 / 5 = 5.8 unit
Here exit time means completion time.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy