You are on page 1of 2

OS CT-1, Page 1 of 2 June 07, 2021

MORADABAD INSTITUTE OF TECHNOLOGY, MORADABAD


Computer Science & Engineering Department
4th Sem, Section- A, B, C
Class Test -1, 2020 - 21, Even Sem

Subject Name: Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .M.M: 15


Subject Code: KCS-401 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Duration: 60 Min

Q.No. 1 2 3 4 5 6
CO 3 1 2 3 3 1
Bloom’s Level K4 K2 K4 K5 K4 K4

Section-A
Attempt all questions. Each question carries 2 marks. (3*2=6)

1. Consider three CPU intensive Processes (P1, P2, P3), which require 10, 20 and 30 time units and ar- [2 marks]
rives at 0, 2, 6 respectively. How many context switches are needed if operating system implements a
SRTF scheduling algorithm?
2. Enumerate various Operating System components with their functions in brief. [2 marks]
3. Differentiate between Concurrency and Parallelism. [2 marks]

Section-B
Attempt all questions. Each question carries 3 marks. (3*3=9)
4. An operating system uses the Bankers algorithm for deadlock avoidance when managing the allocation [3 marks]
of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below presents
the current system state. Here, the Allocation matrix shows the current number of resources of each
type allocated to each process and the Max matrix shows the maximum number of resources of each
type required by each process during its execution.

Allocation Max
X Y Z X Y Z
P0 0 0 1 8 4 3
P1 3 2 0 6 2 0
P2 2 1 1 3 3 3

There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is cur-
rently in a safe state. Consider the following independent requests for additional resources in the cur-
rent state:
REQ1: P0 requests 0 units of X, 0 units of Y and 2 units of Z
REQ2: P1 requests 2 units of X, 0 units of Y and 0 units of Z
Show that which request will be permitted ?
5. Compute the average turnaround time and average waiting time for the preemptive priority scheduling [3 marks]
having 5 processes P1, P2, P3, P4 and P5
OS CT-1, Page 2 of 2 June 07, 2021

AT BT
P.No. Priority
(Arrival Time) (Burst Time)
P1 0 11 2
P2 5 28 0 (highest)
P3 12 2 3
P4 2 10 1
P5 9 16 4

6. Differentiate between (with one suitable example): [3 marks]


(i) Interactive and Batch processing System.
(ii) Multiprogramming and Time Sharing System.

You might also like