MCQs / Computer Science / NSCT: Operating Systems

NSCT: Operating Systems MCQs — Computer Science (page 2)

111 multiple-choice questions on NSCT: Operating Systems from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

26. Processes communicate with each other using:

  1. Only global variables
  2. Compilers
  3. Page tables
  4. Inter-process communication (pipes, shared memory, message passing)

Answer: D) Inter-process communication (pipes, shared memory, message passing)

Explanation: IPC mechanisms. Lesson 9.1 · Operating Systems

Discuss this question

27. Virtual memory allows:

  1. Programs without an OS
  2. Unlimited CPU speed
  3. Programs larger than physical RAM to run
  4. No need for disks

Answer: C) Programs larger than physical RAM to run

Explanation: Only needed pages are kept in RAM. Lesson 9.4 · Operating Systems

Discuss this question

28. With a page size of 2048 bytes, what are the page number and offset of logical address 9000?

  1. Page 4, offset 808
  2. Page 5, offset 808
  3. Page 4, offset 1240
  4. Page 808, offset 4

Answer: A) Page 4, offset 808

Explanation: 9000 ÷ 2048 = 4 remainder 808. Lesson 9.4 · Operating Systems

Discuss this question

29. An operating system that must respond within strict time limits (e.g. airbag controller) is a:

  1. Time-sharing OS
  2. Real-time OS
  3. Distributed OS
  4. Batch OS

Answer: B) Real-time OS

Explanation: Hard real-time systems cannot miss deadlines. Lesson 9.1 · Operating Systems

Discuss this question

30. Round Robin scheduling uses a fixed:

  1. Deadline
  2. Burst estimate
  3. Priority
  4. Time quantum

Answer: D) Time quantum

Explanation: Each process runs for at most one quantum in turn. Lesson 9.2 · Operating Systems

Discuss this question

31. A system spending most of its time swapping pages instead of executing is:

  1. Thrashing
  2. Deadlock
  3. Spooling
  4. Caching

Answer: A) Thrashing

Explanation: Caused by too little memory for active processes. Lesson 9.4 · Operating Systems

Discuss this question

32. Aging in CPU scheduling is used to:

  1. Sort the ready queue alphabetically
  2. Remove processes
  3. Prevent starvation
  4. Increase context switches

Answer: C) Prevent starvation

Explanation: Waiting processes gain priority over time. Lesson 9.2 · Operating Systems

Discuss this question

33. With 3 frames (initially empty), how many page faults occur for the reference string 1, 2, 3, 2, 1, 4, 5, 2, 1, 2 using Optimal replacement?

  1. 7
  2. 5
  3. 10
  4. 6

Answer: B) 5

Explanation: Simulating Optimal gives 5 faults (FIFO 7, LRU 7, Optimal 5). Lesson 9.4 · Operating Systems

Discuss this question

34. Belady's anomaly (more frames causing more page faults) can occur with:

  1. FIFO
  2. LRU
  3. All stack algorithms
  4. Optimal

Answer: A) FIFO

Explanation: LRU and Optimal never show it. Lesson 9.4 · Operating Systems

Discuss this question

35. Processes arrive at time 0 with burst times P1 = 3, P2 = 3, P3 = 6, P4 = 1 ms. What is the average waiting time under non-pre-emptive SJF?

  1. 6.25 ms
  2. 5 ms
  3. 3 ms
  4. 5.25 ms

Answer: C) 3 ms

Explanation: Order by burst; waiting times [1, 4, 7, 0] → average 3 ms. Lesson 9.2 · Operating Systems

Discuss this question

36. Processes arrive at time 0 with burst times P1 = 5, P2 = 8, P3 = 2, P4 = 4 ms. What is the average waiting time under non-pre-emptive SJF?

  1. 6.75 ms
  2. 9.5 ms
  3. 4.75 ms
  4. 8.25 ms

Answer: C) 4.75 ms

Explanation: Order by burst; waiting times [6, 11, 0, 2] → average 4.75 ms. Lesson 9.2 · Operating Systems

Discuss this question

37. Requiring all processes to request resources in a fixed numerical order prevents:

  1. Circular wait
  2. Mutual exclusion
  3. Starvation of the CPU
  4. Page faults

Answer: A) Circular wait

Explanation: No cycle of waiting can form. Lesson 9.3 · Operating Systems

Discuss this question

38. With 3 frames (initially empty), how many page faults occur for the reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3 using Optimal replacement?

  1. 9
  2. 6
  3. 10
  4. 8

Answer: B) 6

Explanation: Simulating Optimal gives 6 faults (FIFO 9, LRU 8, Optimal 6). Lesson 9.4 · Operating Systems

Discuss this question

39. Processes arrive at time 0 in the order P1, P2, …, with burst times P1 = 10, P2 = 2, P3 = 6 ms. What is the average waiting time under FCFS?

  1. 7.33 ms
  2. 13.33 ms
  3. 6 ms
  4. 3.33 ms

Answer: A) 7.33 ms

Explanation: Waiting times [0, 10, 12] → average 7.33 ms. Lesson 9.2 · Operating Systems

Discuss this question

40. With 3 frames (initially empty), how many page faults occur for the reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 using FIFO replacement?

  1. 12
  2. 9
  3. 10
  4. 7

Answer: B) 9

Explanation: Simulating FIFO gives 9 faults (FIFO 9, LRU 10, Optimal 7). Lesson 9.4 · Operating Systems

Discuss this question

41. Process P1 holds the printer and requests the scanner; P2 holds the scanner and requests the printer. Neither will release. This is:

  1. Thrashing
  2. A race condition
  3. A deadlock
  4. Starvation

Answer: C) A deadlock

Explanation: All four Coffman conditions hold. Lesson 9.3 · Operating Systems

Discuss this question

42. Threads of the same process share:

  1. Stack and registers
  2. Code, data and open files
  3. Nothing
  4. Program counter

Answer: B) Code, data and open files

Explanation: Each thread has its own stack and registers. Lesson 9.1 · Operating Systems

Discuss this question

43. Processes arrive at time 0 in order with burst times P1 = 10, P2 = 4, P3 = 6 ms. Using Round Robin with a quantum of 4 ms, what is the average waiting time?

  1. 12.67 ms
  2. 8 ms
  3. 8.67 ms
  4. 4.67 ms

Answer: C) 8.67 ms

Explanation: Waiting times [10, 4, 12] → average 8.67 ms. Lesson 9.2 · Operating Systems

Discuss this question

44. In Unix, a new process is created with:

  1. malloc()
  2. open()
  3. fork()
  4. exec() only

Answer: C) fork()

Explanation: fork() duplicates the calling process. Lesson 9.1 · Operating Systems

Discuss this question

45. Multithreading a web server improves performance mainly because:

  1. One thread can serve a request while another waits for I/O
  2. It reduces the number of CPUs needed to zero
  3. Threads use separate memory spaces
  4. It removes the need for synchronisation

Answer: A) One thread can serve a request while another waits for I/O

Explanation: Overlap of computation and I/O. Lesson 9.1 · Operating Systems

Discuss this question

46. A section of code that accesses shared resources and must not be executed by more than one thread at a time is a:

  1. Page frame
  2. Critical section
  3. Interrupt handler only
  4. Kernel module

Answer: B) Critical section

Explanation: Mutual exclusion protects it. Lesson 9.3 · Operating Systems

Discuss this question

47. The Banker's algorithm is used for deadlock:

  1. Detection only
  2. Recovery
  3. Ignorance
  4. Avoidance

Answer: D) Avoidance

Explanation: It grants a request only if the system remains in a safe state. Lesson 9.3 · Operating Systems

Discuss this question

48. A counting semaphore initialised to 3 can allow how many processes into the resource pool at once?

  1. Unlimited
  2. 3
  3. 1
  4. 0

Answer: B) 3

Explanation: It counts available resources. Lesson 9.3 · Operating Systems

Discuss this question

49. With a page size of 512 bytes, what are the page number and offset of logical address 2049?

  1. Page 4, offset 511
  2. Page 1, offset 4
  3. Page 5, offset 1
  4. Page 4, offset 1

Answer: D) Page 4, offset 1

Explanation: 2049 ÷ 512 = 4 remainder 1. Lesson 9.4 · Operating Systems

Discuss this question

50. The hardware unit that translates logical addresses to physical addresses is the:

  1. ALU
  2. MMU
  3. NIC
  4. DMA controller

Answer: B) MMU

Explanation: Memory Management Unit. Lesson 9.4 · Operating Systems

Discuss this question

Previous Page 2 of 5 Next

Practise NSCT: Operating Systems MCQs

More Computer Science chapters