0% found this document useful (0 votes)
14 views5 pages

Operating Systems Credit Activity

The document contains a series of questions related to operating systems and scheduling algorithms, requiring the drawing of Gantt charts and calculating average waiting and turnaround times for various processes. It includes scenarios for Preemptive SJF, Round Robin, FCFS, and Priority scheduling, among others. Additionally, it addresses resource allocation and safety in a system with multiple processes and resource types.

Uploaded by

Gayatri Joshi
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)
14 views5 pages

Operating Systems Credit Activity

The document contains a series of questions related to operating systems and scheduling algorithms, requiring the drawing of Gantt charts and calculating average waiting and turnaround times for various processes. It includes scenarios for Preemptive SJF, Round Robin, FCFS, and Priority scheduling, among others. Additionally, it addresses resource allocation and safety in a system with multiple processes and resource types.

Uploaded by

Gayatri Joshi
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/ 5

Operating Systems Credit Activity

 Solve any 10 questions from below


Q.1 Solve the Following
1) Consider the following snapshot of a system :
Process CPU Burst time Arrival time
P1 5 3
P2 2 0
P3 2 4
P4 3 5
Draw the Gantt chart and find average waiting time and average
turnaround time for the following scheduling algorithms :
i) Preemptive SJF
ii) Round Robin (Time Quantum = 2) .
2) Five jobs arrive at time 0, in the order given.
Jobs Burst Time
1 10
2 29
3 3
4 7
5 12
Considering FCFS, SJF(Non-preemptive) scheduling algorithms for this set of
jobs, which algorithms would give the minimum average waiting time and
turnaround time.
3. Consider the table
Process CPU Burst time Arrival time
P1 4 3
P2 6 0
P3 2 4
P4 3 5
Draw the Gantt chart and find average waiting time and average turnaround
time for the following scheduling algorithms :
i)FCFS
4. Consider the table
Process CPU Burst time
P1 8
P2 2
P3 1
P4 10
P5 3

Draw the Gantt chart and find average waiting time and average turnaround
time using FCFS, Shortest Job First.
5. Consider the table
Process CPU Burst time Arrival time
P1 8 0
P2 4 1
P3 9 2
P4 5 3
Draw the Gantt chart and find average waiting time and average turnaround
time using Shortest Job First premptive and Non premptive.

6. Consider the table:


Process CPU Burst time Arrival time Priority
P1 8 0 4
P2 6 1 6
P3 7 2 3
P4 9 3 1(High)
Draw the Gantt chart and find average waiting time and average turnaround
time using Shortest Job First premptive and Non premptive.
7. Consider the table
Process CPU Burst time Arrival time
P1 4 3
P2 6 0
P3 2 4
P4 3 5
Draw the Gantt chart and find average waiting time and average turnaround
time for the following scheduling algorithms :
i)Premptive SJF
ii) Round Robin(Time quantum=2)
8. Consider the table

Process CPU Burst time


P1 8
P2 2
P3 1
P4 10
P5 3

Draw the Gantt chart and find average waiting time and average turnaround
time using Non premptive SJF and Round robin scheduling(Time quantum =4).
9. Consider the following table
Process CPU Burst time Arrival time
P1 5 3
P2 2 0
P3 2 4
P4 3 5
Draw the Gantt chart and find average waiting time and average turnaround
time using Non premptive SJF and FCFS.
10. Consider the following table
Process CPU Burst time Arrival time
P1 5 3
P2 2 0
P3 2 4
P4 3 5
Draw the Gantt chart and find average waiting time and average turnaround
time using FCFS and Round Robin(Time quantum=2).
11. Consider the following table
Process CPU Burst time Arrival time Priority
P1 4 0 3
P2 3 2 1(Low)
P3 7 1 4(High)
P4 15 3 2
Draw the Gantt chart and find average waiting time and average turnaround
time using Premptive Priority Algorithm.
12. Consider the table
Process CPU Burst time Arrival Time
P1 5 1
P2 3 0
P3 2 2
P4 4 3
P5 8 2

Draw the Gantt chart and find average waiting time and average turnaround
time using Non premptive SJF and Round robin scheduling(Time quantum =4).
13. Consider the table
Process CPU Burst time Arrival time
P1 8 0
P2 4 1
P3 9 2
P4 5 3
Draw the Gantt chart and find average waiting time and average turnaround
time using Round robin(Time quantum=2)
14. Consider the table
Process CPU Burst time Arrival time
P1 4 3
P2 6 0
P3 2 4
P4 3 5
Draw the Gantt chart and find average waiting time and average turnaround
Allocation
time for the following scheduling
A B algorithms
C :
i) P 0quantum=2)
Round robin(Time 1 0
0
15. Consider given snapshot of system. A has 5 processes and 3 types of
resources A, B, C P 2 0 0
1
P 3 0 2
2
P 2 1 1
3
P 0 0 2
4
AVAILABLE
MAX
AA BB CC
73 53 32
3 2 2
9 0 2
2 2 2
4 3 3
Answer the following
1. What are the contents of matrix need.
2. Is the system in safe state?
3. If request from process p1 arrives as (1, 0, 2) can the request be granted
immediately?

16 . Consider given snapshot of system. A has 5 processes and 3 types of


resources A, B, C

Allocation
A B C
P 2 3 2
0
P 4 0 0
1. What are the contents
1 of matrix need.
3 3 2 If yes then give the safe sequence
2. Is the system in safe
P state?
5 0 4
2
P 4 3 3
3
P 2 2 4
4
AVAILABLE
MAX
AA BB CC
9 7 5
5 2 2
Answer the following 1 1 0
4 4 4
6 5 5

You might also like