Operating System (GATE)

The test contains the numerical questions of operating system.

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

An operating system has 11 tape drives. There are three processes P1, P2 and P3 with maximum tape drive requirements of 10, 4 and 7, respectively. Currently tape drives allocated to processes P1, P2 and P3 are 4, 2 and 2, respectively. Which of the following sequences represents a safe state?

  1. P2, P3, P1
  2. P1, P2, P3
  3. P2, P1, P3
  4. P1, P3, P2
  5. P3, P1, P2
Question 2 Multiple Choice (Single Answer)

An imaginary disk has 50 cylinders. If disk head on a cylinder is 15. Find the number of disk moves using shortest seek time first algorithm. The new requests are as follow: 5, 45, 10, 30, 21, 42, 35.

  1. 51
  2. 50
  3. 49
  4. 55
  5. 52
Question 3 Multiple Choice (Single Answer)

In a uniprocessor system a new process arrives at an average of four processes per minute and each such process requires an average of 5 seconds of service time. Calculate CPU utilisation?

  1. 33%
  2. 40%
  3. 80%
  4. 50%
  5. 60%
Question 4 Multiple Choice (Single Answer)

An imaginary disk has 55 cylinders. If disk head on a cylinder is 25, find the number of disk moves using first come first serve [FCFS] algorithm.
The new requests are as follows: 5, 45, 10, 30, 21, 42, 35

  1. 152
  2. 150
  3. 155
  4. 160
  5. 145
Question 5 Multiple Choice (Single Answer)

Find the total waiting time using SJF without pre-emption scheduling.

   
Process Arrival time CPU burst time
p1 0 5
p2 2 4
p3 1 6
p4 3 3
  1. 6.0
  2. 11.0
  3. 2.0
  4. 4.75
  5. 19.0
Question 6 Multiple Choice (Single Answer)

Hit ratio to a TLB is 75%. It takes 25 nanoseconds to search TLB and 200 nanoseconds to access the main memory. What is the effective memory access time?

  1. 275 ns
  2. 280 ns
  3. 300 ns
  4. 180 ns
  5. 350 ns
Question 7 Multiple Choice (Single Answer)

A job has 3 pages A, B, C and the main memory has two page frames only. The job needs to process its pages in following order : A B A B C B A C B A. The number of pages that interrupt in LRU page replacement algorithm are

  1. 8
  2. 5
  3. 9
  4. 7
  5. 6
Question 8 Multiple Choice (Single Answer)

An OS uses elevator algorithm to schedule the disk-arm. I/O requests are currently pending for blocks on tracks 1, 15, 20, 35, 40, and 45. The disk arm is currently at track 19 and moving upwards. In what order will these requests be handled?

  1. 20, 35, 40, 45,15,1
  2. 15, 1, 20, 35, 40, 45
  3. 15, 1, 40, 45, 35, 20
  4. 1,15, 20, 35, 40, 45
  5. 45, 40, 35, 20,15,1
Question 9 Multiple Choice (Single Answer)

WT = waiting time, AWT = average waiting time, AT = arrival time

Consider the following set of processes, the length of the CPU burst time and arrival time given in milliseconds are as follow:

   
Process Arrival time CPU time
P1 0 5
P2 2 4
P3 1 6
P4 3 3

Find out average waiting time using FCFS scheduling.

  1. 9 ms
  2. 4 ms
  3. 12 ms
  4. 6.25 ms
  5. 0 ms
Question 10 Multiple Choice (Single Answer)

How many context switches are required for SRJF scheduling for the given processes?

   
Process Arrival time CPu burst time
p1 0 5
p2 2 4
p3 1 6
p4 3 3
  1. 2
  2. 3
  3. 1
  4. 4
  5. 5
Question 11 Multiple Choice (Single Answer)

A job has 3 pages A, B, C and the main memory has 2 page frames only. The job needs to process its pages in following order : A B A B C B A C B A. The number of page faults using FIFO page replacement algorithm is

  1. 6
  2. 4
  3. 5
  4. 7
  5. 8
Question 12 Multiple Choice (Single Answer)

Turnaround time = completion time – arrival time.
Average turnaround time = Total turnaround time/total processes

   
Process Arrival Time CPU burst time
p1 0 4
p2 1 10
p3 2 15

What is the average turnaround time for these processes with the preemptive shortest remaining processing time first (SROT) algorithm?

  1. 4.0
  2. 27.0
  3. 14.66
  4. 44.0
  5. 13.0
Question 13 Multiple Choice (Single Answer)

In a system the fraction of time CPU is busy in a system with a single processor is 70%. Each process requires an average of 7 seconds of service time. Find out the processors that arrive per minute.

  1. 5
  2. 6
  3. 4
  4. 8
  5. 7
Question 14 Multiple Choice (Single Answer)

An operating system has 11 devices and has three processes P1, P2 and P3 with maximum resource requirements of 6, 4 and 9, respectively. There are two states of allocation of devices, as follows:
State 1 - Processes P1, P2, P3 have devices allocated 3, 3, 4, respectively.
State 2 - Processes P1, P2, P3 have devices allocated 2, 2, 6, respectively.

Which of the following is correct?

  1. State 1 is safe and state 2 is unsafe
  2. Both state 1 and state 2 are safe
  3. Both state 1 and state 2 are unsafe
  4. Only state 1 is unsafe
  5. Only state 2 is safe
Question 15 Multiple Choice (Single Answer)

Consider a situation in which the disk read/write head is currently located at track 15 (of tracks 0-50) and moving in the positive direction. Assume that the following track requests have been made in this order: 5, 45, 30, 10, 25, 35, 42, 21. What is the order in which optimised C-SCAN would service these requests and what is the total seek distance?

  1. 95
  2. 100
  3. 91
  4. 90
  5. 105