Introduction

Operating Systems is one of the most frequently tested topics in Computer Science papers for PPSC, NTS, FPSC and university entry tests. Questions on processes, CPU scheduling, memory management and deadlocks appear year after year, and they are easy marks if your concepts are clear. Unlike lengthy programming questions, OS MCQs test definitions, comparisons and short calculations that you can solve in seconds with proper practice.

This guide from mcqsdesk.com gives you 50 carefully selected Operating System MCQs with answers and short explanations. Try each question first, then check the answer below it. The explanation is there to help you learn the concept, not just the option.


Section 1: Operating System Basics

Q1. Which software acts as an interface between the computer user and the hardware?
A) Compiler
B) Operating System
C) Assembler
D) Text Editor

Answer: B) Operating System
Explanation: The OS manages hardware resources and provides services to application programs and users.

Q2. Which part of the operating system always stays in main memory?
A) Shell
B) Compiler
C) Kernel
D) Loader

Answer: C) Kernel
Explanation: The kernel is the core component that manages the CPU, memory and devices, so it remains resident in memory.

Q3. Which of the following is NOT an operating system?
A) Linux
B) Android
C) Oracle
D) Windows

Answer: C) Oracle
Explanation: Oracle is a database management system, not an operating system.

Q4. A program requests a service from the operating system through a:
A) System call
B) Compiler
C) Macro
D) Interrupt vector table only

Answer: A) System call
Explanation: System calls are the interface through which user programs ask the kernel to perform privileged tasks such as file access.

Q5. In which mode can code access all hardware and memory directly?
A) User mode
B) Kernel mode
C) Guest mode
D) Safe mode

Answer: B) Kernel mode
Explanation: Kernel mode (supervisor mode) has full privileges, while user mode is restricted for protection.

Q6. Which type of operating system guarantees a response within strict time limits?
A) Batch OS
B) Time-sharing OS
C) Real-time OS
D) Distributed OS

Answer: C) Real-time OS
Explanation: Real-time systems, used in medical devices and industrial control, must meet fixed deadlines.


Section 2: Process Management

Q7. A process is best described as:
A) A program stored on disk
B) A program in execution
C) A file on disk
D) A compiler output

Answer: B) A program in execution
Explanation: A program is passive code. It becomes a process when loaded into memory and executed.

Q8. Which of the following is NOT a standard process state?
A) Ready
B) Running
C) Waiting
D) Compiled

Answer: D) Compiled
Explanation: The standard states are new, ready, running, waiting (blocked) and terminated.

Q9. Which data structure stores information about a process, such as its state and program counter?
A) Page Table
B) Process Control Block
C) File Allocation Table
D) Stack Pointer

Answer: B) Process Control Block
Explanation: The PCB holds the process ID, state, registers, scheduling data and memory information.

Q10. A transition from the running state to the ready state usually occurs due to:
A) I/O completion
B) A timer interrupt (preemption)
C) Process creation
D) Process termination

Answer: B) A timer interrupt (preemption)
Explanation: When the time slice expires, the scheduler moves the running process back to the ready queue.

Q11. What is a context switch?
A) Changing the user password
B) Saving the state of one process and loading the state of another
C) Switching off the CPU
D) Moving data from RAM to disk

Answer: B) Saving the state of one process and loading the state of another
Explanation: Context switching is pure overhead because no useful user work is done during it.

Q12. Which resource is shared among the threads of the same process?
A) Stack
B) Program counter
C) Registers
D) Code and data section

Answer: D) Code and data section
Explanation: Threads share code, data and open files, but each thread has its own stack, registers and program counter.

Q13. A process that has finished execution but still has an entry in the process table is called a:
A) Orphan process
B) Zombie process
C) Daemon process
D) Child thread

Answer: B) Zombie process
Explanation: The entry remains until the parent process reads its exit status.

Q14. In Unix/Linux, what does the fork() system call return to the child process?
A) 1
B) -1
C) The parent’s process ID
D) 0

Answer: D) 0
Explanation: fork() returns 0 to the child, the child’s PID to the parent, and -1 on failure.


Section 3: CPU Scheduling

Q15. Which scheduling algorithm serves processes in the order of their arrival?
A) SJF
B) Round Robin
C) FCFS
D) Priority

Answer: C) FCFS
Explanation: First Come First Served is the simplest non-preemptive algorithm.

Q16. Which algorithm gives the minimum average waiting time when burst times are known?
A) FCFS
B) Shortest Job First
C) Round Robin
D) Multilevel Queue

Answer: B) Shortest Job First
Explanation: SJF is provably optimal for average waiting time, but it needs advance knowledge of burst times.

Q17. The convoy effect is associated with which algorithm?
A) Round Robin
B) SRTF
C) FCFS
D) Priority scheduling

Answer: C) FCFS
Explanation: Short processes get stuck waiting behind one long CPU-bound process.

Q18. In Round Robin scheduling, if the time quantum is extremely large, the algorithm behaves like:
A) SJF
B) FCFS
C) Priority scheduling
D) Multilevel feedback queue

Answer: B) FCFS
Explanation: Each process finishes within its first quantum, so the order is simply first come, first served.

Q19. Which technique prevents starvation of low-priority processes?
A) Aging
B) Paging
C) Spooling
D) Swapping

Answer: A) Aging
Explanation: Aging gradually increases the priority of processes that have waited for a long time.

Q20. Turnaround time is calculated as:
A) Completion time − Burst time
B) Completion time − Arrival time
C) Waiting time − Arrival time
D) Burst time − Arrival time

Answer: B) Completion time − Arrival time
Explanation: It is the total time from submission of a process to its completion.

Q21. The preemptive version of Shortest Job First is called:
A) LRU
B) SCAN
C) SRTF
D) FIFO

Answer: C) SRTF
Explanation: Shortest Remaining Time First preempts the running process if a new process has a shorter remaining burst.

Q22. Three processes P1, P2 and P3 arrive at time 0 with burst times 5, 3 and 2 ms. Under FCFS, what is the average waiting time?
A) 3.33 ms
B) 4.33 ms
C) 5.33 ms
D) 6.00 ms

Answer: B) 4.33 ms
Explanation: Waiting times are 0, 5 and 8, so the average is 13 ÷ 3 ≈ 4.33 ms.


Section 4: Memory Management

Q23. Which memory management technique eliminates external fragmentation?
A) Contiguous allocation
B) Paging
C) Dynamic partitioning
D) Segmentation

Answer: B) Paging
Explanation: Fixed-size pages can be placed in any free frame, so no scattered free holes remain. Some internal fragmentation can still occur.

Q24. Virtual memory allows:
A) A process to run even if it is not completely in main memory
B) Faster CPU clock speed
C) Larger cache size
D) Direct disk access by users

Answer: A) A process to run even if it is not completely in main memory
Explanation: The OS keeps only the needed parts in RAM and the rest on disk.

Q25. A page fault occurs when:
A) The page table is full
B) A referenced page is not in main memory
C) The disk crashes
D) The CPU overheats

Answer: B) A referenced page is not in main memory
Explanation: The OS must then load the required page from secondary storage.

Q26. Thrashing refers to:
A) Deleting temporary files
B) Excessive paging that lowers CPU utilization
C) Overclocking the CPU
D) Memory leakage in a program

Answer: B) Excessive paging that lowers CPU utilization
Explanation: The system spends more time swapping pages than executing instructions.

Q27. Belady’s anomaly can occur in which page replacement algorithm?
A) LRU
B) Optimal
C) FIFO
D) Clock

Answer: C) FIFO
Explanation: In FIFO, increasing the number of frames can sometimes increase the number of page faults.

Q28. What is the purpose of the Translation Lookaside Buffer (TLB)?
A) To store recently used page table entries for faster address translation
B) To store files
C) To manage network packets
D) To schedule processes

Answer: A) To store recently used page table entries for faster address translation
Explanation: The TLB is a small, fast cache that reduces the cost of accessing the page table in memory.

Q29. Unused space inside an allocated memory block is called:
A) External fragmentation
B) Internal fragmentation
C) Thrashing
D) Swapping

Answer: B) Internal fragmentation
Explanation: It happens when a process is given a larger block than it needs.

Q30. Which page replacement algorithm replaces the page that will not be used for the longest time in the future?
A) FIFO
B) LRU
C) Optimal
D) MRU

Answer: C) Optimal
Explanation: It gives the lowest page fault rate but cannot be implemented in practice because it needs future knowledge. It is used as a benchmark.

Q31. The address generated by the CPU is called a:
A) Physical address
B) Logical (virtual) address
C) MAC address
D) Port address

Answer: B) Logical (virtual) address
Explanation: The memory management unit converts it into a physical address.


Section 5: Deadlocks

Q32. Which of the following is NOT a necessary condition for deadlock?
A) Mutual exclusion
B) Hold and wait
C) Preemption
D) Circular wait

Answer: C) Preemption
Explanation: The actual condition is “no preemption”. If resources can be preempted, deadlock cannot persist.

Q33. Which algorithm is used for deadlock avoidance?
A) Dijkstra’s shortest path
B) Banker’s algorithm
C) Round Robin
D) Peterson’s algorithm

Answer: B) Banker’s algorithm
Explanation: It grants a request only if the system stays in a safe state.

Q34. In a resource allocation graph where every resource has a single instance, a cycle indicates:
A) A safe state
B) Starvation only
C) Deadlock
D) Thrashing

Answer: C) Deadlock
Explanation: With single-instance resources, a cycle is both necessary and sufficient for deadlock.

Q35. A system is in a safe state if:
A) No process is running
B) There is a sequence in which all processes can finish
C) All memory is free
D) The CPU is idle

Answer: B) There is a sequence in which all processes can finish
Explanation: A safe state guarantees that deadlock can be avoided.

Q36. Deadlock prevention works by:
A) Ignoring the problem
B) Making sure at least one necessary condition can never hold
C) Restarting the computer
D) Increasing RAM

Answer: B) Making sure at least one necessary condition can never hold
Explanation: For example, requiring a process to request all resources at once removes “hold and wait”.

Q37. The “Ostrich algorithm” in deadlock handling means:
A) Killing all processes
B) Ignoring the problem
C) Using a timer
D) Rolling back transactions

Answer: B) Ignoring the problem
Explanation: Many general-purpose operating systems ignore deadlocks because they are rare and prevention is costly.


Section 6: Process Synchronization

Q38. The critical section is the part of a program that:
A) Contains syntax errors
B) Accesses shared resources and must not be executed by more than one process at a time
C) Runs only in kernel mode
D) Is stored on disk

Answer: B) Accesses shared resources and must not be executed by more than one process at a time
Explanation: Mutual exclusion in the critical section prevents inconsistent data.

Q39. A race condition occurs when:
A) Two processes finish at the same time
B) The outcome depends on the order in which concurrent processes access shared data
C) The CPU runs too fast
D) A process has the highest priority

Answer: B) The outcome depends on the order in which concurrent processes access shared data
Explanation: Proper synchronization tools such as locks and semaphores remove race conditions.

Q40. A semaphore is:
A) A type of memory chip
B) An integer variable used for process synchronization
C) A disk scheduling method
D) A network protocol

Answer: B) An integer variable used for process synchronization
Explanation: It is accessed only through the atomic operations wait() and signal().

Q41. A binary semaphore can take which values?
A) 0 and 1
B) −1 and 1
C) 0 to 255
D) Any positive integer

Answer: A) 0 and 1
Explanation: It works like a lock. It is similar to a mutex, though a mutex has the added idea of an owner.

Q42. A mutex lock is mainly used to:
A) Increase CPU speed
B) Provide mutual exclusion
C) Allocate memory
D) Compress files

Answer: B) Provide mutual exclusion
Explanation: Only the thread that locks a mutex should unlock it.

Q43. Peterson’s solution is a software solution to the critical section problem for how many processes?
A) One
B) Two
C) Four
D) Any number

Answer: B) Two
Explanation: It uses two shared variables, flag and turn, to achieve mutual exclusion between two processes.


Section 7: File Systems & Disk Scheduling

Q44. In Unix-like file systems, which structure stores a file’s metadata such as size, owner and permissions?
A) Inode
B) Superblock only
C) Bootstrap
D) Shell

Answer: A) Inode
Explanation: An inode holds the file attributes and pointers to its data blocks. The file name is stored in the directory entry.

Q45. Which file allocation method gives fast direct access but suffers from external fragmentation?
A) Linked allocation
B) Indexed allocation
C) Contiguous allocation
D) Hashed allocation

Answer: C) Contiguous allocation
Explanation: A file occupies consecutive blocks, so access is quick, but finding large free spaces becomes harder over time.

Q46. Which file system is the default for modern Windows installations?
A) EXT4
B) NTFS
C) HFS+
D) ISO 9660

Answer: B) NTFS
Explanation: NTFS supports large files, permissions, journaling and encryption.

Q47. In which disk scheduling algorithm does the head move in one direction to the end and then reverse?
A) FCFS
B) SSTF
C) SCAN
D) Random

Answer: C) SCAN
Explanation: SCAN is also called the elevator algorithm.

Q48. Which disk scheduling algorithm selects the request closest to the current head position?
A) SSTF
B) SCAN
C) C-SCAN
D) FCFS

Answer: A) SSTF
Explanation: Shortest Seek Time First reduces head movement but can cause starvation of far-away requests.

Q49. Seek time is the time taken to:
A) Transfer data from disk to RAM
B) Move the disk head to the required track
C) Rotate the platter to the required sector
D) Boot the system

Answer: B) Move the disk head to the required track
Explanation: Disk access time = seek time + rotational latency + transfer time.

Q50. In Linux, what permissions does the command chmod 755 file give?
A) Owner: read only; others: full access
B) Owner: read, write, execute; group and others: read and execute
C) Everyone: read, write, execute
D) Owner: no access; others: read and execute

Answer: B) Owner: read, write, execute; group and others: read and execute
Explanation: Each digit is a sum of read (4), write (2) and execute (1), so 7 = rwx and 5 = r-x.


Conclusion

Operating Systems is a scoring subject for anyone preparing for PPSC, NTS, FPSC or a university entry test, because the questions are concept-based and repeat in similar forms. Go through these 50 MCQs more than once, try the numerical ones on paper, and revise the explanations rather than only memorising the answers.

Keep practising on mcqsdesk.com for more Computer Science MCQs with explanations, and share this article with your classmates and fellow aspirants so they can prepare better too.

Best of luck with your exam!

Related Subject-wise MCQs:

16 Comments

Leave a Comment

Your email address will not be published.

Scroll to Top