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: Only global variables Compilers Page tables 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: Programs without an OS Unlimited CPU speed Programs larger than physical RAM to run 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? Page 4, offset 808 Page 5, offset 808 Page 4, offset 1240 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: Time-sharing OS Real-time OS Distributed OS 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: Deadline Burst estimate Priority 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: Thrashing Deadlock Spooling 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: Sort the ready queue alphabetically Remove processes Prevent starvation 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? 7 5 10 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: FIFO LRU All stack algorithms 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? 6.25 ms 5 ms 3 ms 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? 6.75 ms 9.5 ms 4.75 ms 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: Circular wait Mutual exclusion Starvation of the CPU 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? 9 6 10 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? 7.33 ms 13.33 ms 6 ms 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? 12 9 10 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: Thrashing A race condition A deadlock 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: Stack and registers Code, data and open files Nothing 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? 12.67 ms 8 ms 8.67 ms 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: malloc() open() fork() 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: One thread can serve a request while another waits for I/O It reduces the number of CPUs needed to zero Threads use separate memory spaces 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: Page frame Critical section Interrupt handler only 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: Detection only Recovery Ignorance 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? Unlimited 3 1 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? Page 4, offset 511 Page 1, offset 4 Page 5, offset 1 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: ALU MMU NIC 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