0% found this document useful (0 votes)
109 views

Asignment 1

This document contains 8 questions regarding CPU scheduling algorithms including FCFS, SJF, priority scheduling, and round robin. The questions involve calculating average waiting times and turnaround times for different processes under each scheduling algorithm. They also involve drawing Gantt charts to illustrate the scheduling of processes. The final question asks for short notes on short term vs long term schedulers, context switching, and CPU scheduling parameters.

Uploaded by

Ashish Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

Asignment 1

This document contains 8 questions regarding CPU scheduling algorithms including FCFS, SJF, priority scheduling, and round robin. The questions involve calculating average waiting times and turnaround times for different processes under each scheduling algorithm. They also involve drawing Gantt charts to illustrate the scheduling of processes. The final question asks for short notes on short term vs long term schedulers, context switching, and CPU scheduling parameters.

Uploaded by

Ashish Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Hindustan Institute of Management & Computer Studies, Mathura

Operating System
Assignment –1

1. Consider a system with a set of processes P1 , P2 and P3 and CPU burst time, Priorities and
arrival time being as below :

Process CPU Burst Time Arrival Time Priority


P1 5 0 2
P2 15 1 3
P3 10 2 1
Assuming 1 be the highest priority Calculate the following :

a) Average waiting time using FCFS, SJF and Priority Scheduling Mechanism.
b) Average Turnaround time using FCFS, SJF and Priority Scheduling Mechanism.
c) Assume time quantum is 2 unit of time calculate average waiting and turn around time in
Round Robin Scheduling Algorithm.

2. Consider the following set of processes with the length of the CPU-burst time given in
milliseconds:
Process Burst Time Priority
P1 10 3
P2 5 1
P3 3 3
P4 7 4
P5 2 2
The process are assume to arrived in the order <P1,P2,P3,P4,P5> at time 0

a) Draw the Gantt Chart for FCFS,SJF a non preemptive priority ,and RR scheduling(Time
quantum=1).
b) What is the turnaround time of each process for each of the scheduling algorithm?
c) What is the waiting time for the each of the algorithm?
3. Difference between a multilevel feedback scheduling algorithm and multi-queue CPU scheduling
algorithm which uses Round Robin for foreground and preemptive priority algorithm for the
background.
4. Consider the following table:
Process Burst time Priority Arrival time
P1 10 ms 4 1 ms
P2 12 ms 3 0 ms
P3 5 ms 2 2 ms
P4 8 ms 1 4 ms
Provide the schedule using preemptive shortest job first and pre-emptive priority scheduling
and calculate the average waiting time for each of the above.
5. For the following table :
Process Burst time Priority Arrival time
P1 5 ms 2 0 ms
P2 15 ms 3 1 ms
P3 10 ms 1 2 ms
a) Average waiting time using FCFS,SJF and priority scheduling meachanisms.
b) Average turn around time for the above algorithm.
c) Time quantum=2 ms .Draw Gantt chart for RR mechanisms.
6. Consider the following table:

Process Burst time Arrival time


P1 8 0
P2 4 1
P3 9 2
P4 5 3
Provide the schedule using preemptive shortest job first scheduling and calculate the average
waiting time for each of the above.

7. Attempt all of the following:


Assume that you have the following jobs to execute with one processor

Job Burst Time Arrival Time


P0 45 0
P1 18 10
P2 20 10
P3 12 80
P4 21 85
(Time Quantum=10)

a. Find the Average waiting and turnaround time for Round Robin, SJF, and
FCFS Algorithm. Also Draw Gantt chart.
8. Write Short Notes on :
i. Short term Scheduler Vs Long Term Scheduler
ii. Context Switch
iii. CPU Scheduling Parameters

You might also like