Operating System Practice Questions With Answers: MCQs, Short & Long Questions
This unit-wise Operating System practice set is designed for semester exams, university theory papers, class tests, viva revision and last-minute practice.
The practice set covers the complete Operating System syllabus from basic OS concepts to processes, synchronization, CPU scheduling, deadlocks, memory management, virtual memory, I/O, RAID, disk scheduling, file systems and protection.
How to Use This Operating System Practice Set
Short Questions: Try to write the answer in about 3–7 important points.
Long Questions: Practise the answer using definition, working, diagram, examples, advantages, limitations and comparison where required.
Unit-Wise Complete Operating System Coverage
Operating System Practice Question Finder
Operating System Fundamentals
Covers Chapters 1–4: OS basics, types of Operating Systems, multiuser/multiprocessor/multithreaded systems, and OS structure.
View Answer
An Operating System manages computer resources and provides an interface and services for applications and users.
View Answer
A Real-Time Operating System is designed to provide responses within defined timing constraints.
View Answer
Threads inside the same process normally share code, data and several process resources.
View Answer
Microkernel designs keep a small kernel and move many services to user-space processes.
- Process management
- Memory management
- File-system management
- I/O device management
- Protection and security
A Batch OS collects jobs and executes them in groups with little direct interaction.
A Time-Sharing OS divides CPU time into small slices so multiple users or processes can receive quick responses.
A multiprocessor system contains multiple processing units that can execute tasks in parallel.
Multithreading divides a process into multiple execution threads that normally share the same process resources.
A Monolithic Kernel places many OS services inside kernel space.
A Microkernel keeps only essential functions in the kernel and runs many additional services outside it.
An Operating System is system software that manages hardware and provides services to applications and users.
Major functions include:
- Process Management
- CPU Scheduling
- Memory Management
- File Management
- I/O Management
- Secondary Storage Management
- Protection and Security
- Error Detection
- Resource Allocation
- User Interface
Batch OS: Jobs are grouped and processed without continuous user interaction.
Multiprogramming: Multiple jobs remain in memory, allowing the CPU to switch when one job waits for I/O.
Time-Sharing: CPU time is divided among users or processes using small time slices.
Real-Time OS: Designed for predictable and time-bounded responses.
- Multiuser: Supports multiple users sharing system resources.
- Multiprocessor: Uses more than one processor or processing unit.
- Multiprocess: Multiple processes exist and may execute concurrently.
- Multithreaded: A process contains multiple threads of execution.
Monolithic: Many OS services operate inside one large kernel. It can provide fast communication between components but may be harder to maintain.
Layered: The OS is divided into layers. Each layer uses services of lower layers.
Microkernel: Keeps only essential mechanisms in kernel space and moves many services to user space.
A complete answer can also discuss modularity, maintenance, communication overhead and reliability.
Processes, Synchronization & IPC
Covers Chapters 5–13: processes, concurrency, critical section, semaphores, classical synchronization problems, IPC, process states, PCB, address space and process identification.
View Answer
A process is a program currently under execution.
View Answer
Mutual exclusion prevents simultaneous execution of the protected critical section.
View Answer
Semaphores are controlled through atomic synchronization operations commonly called wait and signal.
View Answer
Producer and Consumer processes coordinate access to a shared bounded buffer.
View Answer
Peterson's classical algorithm is a software mutual-exclusion solution for two processes.
View Answer
The problem demonstrates synchronization, limited resources and possible deadlock/starvation concerns.
View Answer
Shared memory is a major IPC model; message passing is another.
View Answer
A ready process can execute but is waiting for CPU scheduling.
View Answer
PID means Process Identifier.
- Mutual Exclusion
- Progress
- Bounded Waiting
A process is an executing instance of a program. It contains code, data, stack, current CPU state and operating-system management information.
Concurrency means multiple processes make progress during overlapping time periods.
Processes may be generated by:
- System initialization
- User requests
- Batch jobs
- System services
- Parent processes creating child processes
A critical section is code that accesses shared resources.
Concurrent execution without proper control may produce a race condition.
A correct synchronization solution should provide:
- Mutual Exclusion
- Progress
- Bounded Waiting
A semaphore is a synchronization variable accessed through atomic operations.
Wait: Attempts to acquire a resource or permission.
Signal: Releases a resource or announces availability.
Binary semaphores can provide mutual exclusion, while counting semaphores represent multiple resource instances.
Atomic hardware instructions such as Test-and-Set can also support synchronization primitives.The Producer generates items and inserts them into a shared buffer.
The Consumer removes and processes items.
Synchronization must ensure:
- Producer waits when the buffer is full.
- Consumer waits when the buffer is empty.
- Only safe access to shared buffer data occurs.
- An intent flag for each process
- A shared turn variable
- Busy waiting before entering the critical section
In Dining Philosophers, philosophers alternate between thinking and eating while sharing limited forks.
Poor resource acquisition rules can cause deadlock or starvation.
In Sleeping Barber, one barber serves customers, with a limited number of waiting chairs.
Synchronization is needed to coordinate sleeping, arriving, waiting and service operations.- Shared Memory: processes access a common memory area.
- Message Passing: processes exchange messages through OS-supported communication.
- New
- Ready
- Running
- Waiting / Blocked
- Terminated
- Text / Code
- Initialized Data
- Uninitialized Data
- Heap
- Stack
CPU Scheduling, Threads & Multiprocessor Scheduling
Covers Chapters 14–17: scheduling criteria, schedulers, FCFS, SJF, SRTF, Priority, Round Robin, threads and multiprocessor scheduling.
View Answer
The short-term or CPU scheduler selects ready processes for execution.
View Answer
Round Robin gives each ready process a limited CPU time quantum.
View Answer
Threads can improve responsiveness and share resources efficiently.
View Answer
Processor affinity tries to keep execution on the same CPU to benefit from cache locality and reduce migration overhead.
Long-Term Scheduler: controls which jobs are admitted to the system.
Short-Term Scheduler: selects a ready process for CPU execution.
Medium-Term Scheduler: may temporarily suspend and later resume processes.
- CPU Utilization
- Throughput
- Turnaround Time
- Waiting Time
- Response Time
- Fairness
- Long-Term Scheduler
- Short-Term Scheduler
- Medium-Term Scheduler
FCFS: Executes in arrival order.
SJF: Chooses shortest CPU burst.
SRTF: Chooses shortest remaining time and may preempt.
Priority: Chooses according to scheduling priority. Starvation can occur.
Round Robin: Gives each process a time quantum and cycles through the ready queue.
- Responsiveness
- Resource sharing
- Lower creation overhead than separate processes
- Scalability on multicore processors
- Asymmetric Multiprocessing
- Symmetric Multiprocessing
- Global or per-CPU run queues
- Load Balancing
- Processor Affinity
- Cache locality
Deadlock Management
Covers Chapters 18–19: deadlock system model, conditions, resource-allocation graph, prevention, avoidance, detection and recovery.
View Answer
Round Robin is a CPU scheduling algorithm, not a deadlock condition.
View Answer
Banker's Algorithm grants resources only when the resulting state remains safe.
- Mutual Exclusion
- Hold and Wait
- No Preemption
- Circular Wait
- Mutual Exclusion
- Hold and Wait
- No Preemption
- Circular Wait
Prevention: Break one necessary deadlock condition.
Avoidance: Grant resources only when system remains safe. Banker's Algorithm is a classic example.
Detection: Allow deadlock and periodically check for it.
Recovery: Abort processes, preempt resources, or restore from a safe point where supported.
Memory Management & Virtual Memory
Covers Chapters 20–26: basic memory management, partitioning, paging, segmentation, virtual memory, page replacement, locality, cache and thrashing.
View Answer
Keeping multiple jobs available allows the CPU to execute another job while one is waiting.
View Answer
Variable-size allocations can leave scattered free holes, producing external fragmentation.
View Answer
The page table translates logical page numbers into physical frame numbers.
View Answer
Base identifies the starting physical location and limit represents the segment size or valid range.
View Answer
Demand paging brings a page into memory when it is referenced and not currently resident.
View Answer
FIFO can exhibit Belady's Anomaly, where adding frames can unexpectedly increase page faults for some reference strings.
View Answer
Temporal locality means recently accessed data is likely to be accessed again soon.
- Bare machine execution
- Need for system control software
- Resident Monitor
- Memory protection
- Multiple jobs in memory
- CPU utilization through multiprogramming
- Need for allocation and relocation mechanisms
- First Fit
- Best Fit
- Worst Fit
- Logical memory into Pages
- Physical memory into Frames
Page Number = Logical Address ÷ P
Offset = Logical Address mod P
The page number is translated into a frame, while the offset remains unchanged. Paging removes external fragmentation but can produce internal fragmentation.- Trap to OS
- Validate reference
- Find free frame or victim
- Read required page
- Update page table
- Restart instruction
FIFO: Removes the page loaded earliest. It can show Belady's Anomaly.
LRU: Removes the page least recently referenced. It approximates future behaviour using recent history.
Optimal: Replaces the page needed farthest in the future. It provides a theoretical benchmark but exact future references are not normally known.
- Temporal Locality
- Spatial Locality
- Sequential Locality
I/O Management, Disk, RAID & File Systems
Covers Chapters 27–31: I/O management, disk scheduling, RAID, file systems, file sharing, implementation, protection and security.
View Answer
Direct Memory Access allows a controller to transfer data between memory and a device with limited CPU handling per transferred item.
View Answer
SSTF means Shortest Seek Time First.
View Answer
RAID 5 combines block striping with parity distributed across the member disks.
View Answer
Indexed access maintains an index that helps locate the required data.
View Answer
An ACL identifies users or groups and the operations they may perform on an object.
- RAID 0 = Striping
- RAID 1 = Mirroring
- RAID 5 = Distributed Single Parity
- RAID 6 = Distributed Dual Parity
- RAID 10 = Mirroring + Striping
- Device drivers
- Device controllers
- Interrupt handlers
- I/O scheduling
- FCFS: Serves requests in arrival order.
- SSTF: Chooses the request nearest the current head.
- SCAN: Head moves toward one end and then reverses.
- C-SCAN: Services requests in one direction and returns circularly.
- LOOK: Reverses at the final pending request in a direction.
- C-LOOK: Circular version of LOOK.
- Striping
- Mirroring
- Parity
- RAID 0 – Striping only
- RAID 1 – Mirroring
- RAID 5 – Distributed single parity
- RAID 6 – Distributed dual parity
- RAID 10 – Mirroring + striping
- Sequential Access
- Direct Access
- Indexed Access
- Single-Level
- Two-Level
- Tree-Structured
- Acyclic Graph
- General Graph
- Contiguous Allocation
- Linked Allocation
- Indexed Allocation
- Directory entries
- FCB / inode
- Open-file tables
- Free-space maps
- Data-block mappings
- Caches
- Virtual File System abstraction
- Read / Write / Execute permissions
- Access Matrix
- ACL
- Capability Lists
- Authentication
- Authorization
- Encryption
- Integrity
- Auditing
- Least Privilege
- Backup and recovery
Extra Mixed Operating System MCQs for Final Practice
View Answer
Aging gradually improves the priority of a process that has been waiting for a long time.
View Answer
A Translation Lookaside Buffer caches recent page-table translations.
View Answer
A safe state has at least one sequence in which processes can complete without entering deadlock.
View Answer
An inode contains metadata and information required to locate file data.
Final Operating System Practice Checklist
Before your semester exam, make sure you can answer at least one MCQ, one short question and one long question from every major chapter.
Fundamentals → Process → Synchronization → CPU Scheduling → Deadlock → Memory → Virtual Memory → I/O → Disk → RAID → File System → Security
Frequently Asked Questions
What topics are included in these Operating System practice questions?
Are these Operating System questions unit-wise?
Does this practice set contain MCQs with answers?
Are short questions included for semester exams?
Are long Operating System questions included?
How should I use these questions before my exam?
Are all 31 Operating System chapters covered?
Conclusion
Reading theory alone is not enough for a strong semester-exam preparation. Students should also practise identifying the correct concept, writing short answers quickly and developing complete long answers.
This Operating System practice set combines MCQs, short questions and long questions across the complete unit-wise syllabus.
Understand the chapter → Attempt MCQ → Write short answer → Write long answer → Check mistakes → Revise weak topic.
