Operating Systems questions and answers

Processes, scheduling, memory and deadlocks. Practise operating systems questions from the technical & programming section of placement tests, with a worked explanation after every answer. Practice is free and needs no sign-up.

Sample operating systems questions with worked answers

Question 1

Which CPU scheduling algorithm is most prone to the convoy effect, where short processes wait behind one long process?

  1. Round Robin
  2. First-Come, First-Served (FCFS)
  3. Shortest Remaining Time First
  4. Priority scheduling with aging

Answer: B. First-Come, First-Served (FCFS)

Explanation: In FCFS, one long CPU-bound process at the head of the queue makes every short process behind it wait. This is the convoy effect.

Question 2

Three processes arrive at time 0 in the order P1, P2, P3 with CPU burst times 6, 3 and 1 ms. With Round Robin scheduling and a time quantum of 2 ms, what is the average waiting time?

  1. 1.67 ms
  2. 5.00 ms
  3. 4.33 ms
  4. 3.67 ms

Answer: C. 4.33 ms

Explanation: The Gantt chart is P1 0-2, P2 2-4, P3 4-5, P1 5-7, P2 7-8, P1 8-10. Completion times are 10, 8 and 5, so the waiting times are 10-6 = 4, 8-3 = 5 and 5-1 = 4. The average is 13/3 ≈ 4.33 ms.

Question 3

A paged system has a page size of 4 KB, a logical address space of 64 pages and a physical memory of 32 frames. How many bits are in the logical and physical addresses, respectively?

  1. 16 and 17
  2. 18 and 17
  3. 18 and 15
  4. 17 and 18

Answer: B. 18 and 17

Explanation: The offset needs 12 bits (4 KB = 2^12). The logical address is 6 page bits (64 = 2^6) + 12 = 18 bits, and the physical address is 5 frame bits (32 = 2^5) + 12 = 17 bits.

All 30 operating systems questions with answers

Operating Systems: common questions

What are operating systems questions?

Processes, scheduling, memory and deadlocks. They appear in the technical & programming section of many placement tests.

Where can I practise operating systems questions with answers for free?

Right here on LogicWiz Exams. Every operating systems question has a worked explanation after you answer. Practice is free and needs no sign-up.

How should I practise operating systems?

Start with easy questions, then move to medium and hard. Read the explanation after each answer, and come back to the ones you missed.

Start practising

On this page you can start a fresh set of operating systems questions, choose easy, medium or hard, and time yourself if you want to. Or practise the whole subject: Technical & Programming practice.

More technical & programming topics

Other subjects

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge · Test from a job description · LogicWiz Open: free team quiz · Free interview prep