Operating System Important Questions With Answers for Semester Exams: 2, 5 & 10 Marks
Preparing Operating System for a semester exam becomes much easier when you know what type of answer should be written for 2 marks, 5 marks and 10 marks.
This guide contains important Operating System questions with simple, exam-ready answers covering processes, CPU scheduling, synchronization, deadlocks, memory management, virtual memory, disk scheduling, RAID, I/O management, file systems, protection and security.
Complete Operating System Chapter Guide: Read Full Topic Before the Answer
This semester question bank is for quick exam preparation. If any answer feels difficult or too short, open the related full chapter below. Every chapter explains the topic with deeper theory, diagrams, examples, comparisons and exam-focused revision.
First read the question here → open the matching chapter → understand the full concept → come back and practise the 2, 5 or 10 marks answer.
How Should You Prepare Operating System for Semester Exams?
For 5 marks, prepare working, steps, advantages, disadvantages and short comparison tables.
For 10 marks, prepare complete concepts with definition, working, algorithms, diagrams, examples, comparison and conclusion.
Best Answer-Writing Strategy for 2, 5 and 10 Marks
Add one important feature, formula, example or difference.
Do not write an unnecessary full-page answer.
A small diagram can improve presentation.
Semester Exam Question Pattern Understanding
High-Value Operating System Topics for Semester Exams
Search and Filter Important OS Questions
Operating System Important 2 Marks Questions With Answers
These answers are intentionally short and direct so that students can write them quickly in semester exams.
An Operating System is system software that acts as an interface between the user or application programs and computer hardware.
It manages resources such as CPU, memory, files, storage and I/O devices.
The Kernel is the core part of an operating system.
It manages CPU, memory, devices, interrupts and other low-level system resources.
A System Call is a mechanism through which a user program requests a service from the operating-system kernel.
Examples include file open, read, write, process creation and memory-related services.
A Process is a program that is currently under execution.
It includes program code, current CPU state, stack, data, memory and operating-system management information.
PCB stands for Process Control Block.
It is an operating-system data structure that stores information such as process ID, state, program counter, CPU registers, scheduling data and memory information.
Context switching is the process of saving the CPU state of one process or thread and restoring the state of another.
It allows the CPU to switch execution between tasks.
A Thread is the smallest unit of CPU execution inside a process.
Threads of the same process normally share code, data and other process resources.
A Critical Section is a part of a program where shared data or shared resources are accessed.
Proper synchronization is required to prevent race conditions.
A Semaphore is a synchronization variable used to control access to shared resources.
Its basic operations are commonly called wait and signal.
A Deadlock is a condition in which a group of processes is permanently blocked because every process is waiting for a resource held by another process in the group.
The four necessary conditions are: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.
Starvation, or indefinite blocking, occurs when a process waits for a very long time because other processes repeatedly receive the required CPU or resource first.
Paging is a memory-management technique in which logical memory is divided into fixed-size pages and physical memory into fixed-size frames.
Segmentation is a memory-management technique that divides a program into variable-size logical units called segments, such as code, data and stack.
Internal fragmentation is unused space inside an allocated block.
External fragmentation occurs when free memory exists but is scattered into small non-contiguous holes.
Virtual Memory is a memory-management technique that allows a process to execute even when the complete process is not currently loaded in RAM.
A Page Fault occurs when a process references a valid page that is not currently present in main memory.
The operating system must bring the page from secondary storage into RAM.
Thrashing is a condition in which the system spends a very large amount of time handling page faults and moving pages, instead of executing useful process instructions.
Disk Scheduling is the technique used by the operating system to decide the order in which pending disk I/O requests should be served.
RAID stands for Redundant Array of Independent Disks.
It combines multiple storage disks to improve performance, redundancy, availability or a combination of these goals.
DMA stands for Direct Memory Access.
It allows an I/O device or controller to transfer blocks of data directly between the device and main memory with limited CPU involvement.
Spooling means Simultaneous Peripheral Operations On-Line.
It stores jobs temporarily in a queue so that a slow peripheral, such as a printer, can process them one by one.
A file is a named collection of related information stored on secondary storage.
A File System is the operating-system mechanism used to organize, store, locate, access, protect and manage files and directories on storage devices.
A directory is a file-system structure used to organize file names and references to files and subdirectories.
Protection controls which authorized users or processes can access system resources.
Security protects the complete system and data from unauthorized access, attacks and misuse.
Operating System Important 5 Marks Questions With Answers
Operating Systems can be classified according to how they manage users, processes and resources.
1. Batch OS: Jobs are collected and executed in batches with little or no direct user interaction.
2. Multiprogramming OS: Several programs remain in memory so the CPU can switch to another job when one is waiting for I/O.
3. Time-Sharing OS: CPU time is divided into small time slices so multiple users or processes receive quick responses.
4. Real-Time OS: Designed to respond within strict timing requirements.
5. Distributed OS: Coordinates multiple computers or resources to provide integrated services.
A process moves through different states during execution.
New: Process is being created.
Ready: Process is waiting for CPU time.
Running: Process is currently executing on the CPU.
Waiting / Blocked: Process is waiting for an event or I/O.
Terminated: Process has completed execution.
The Process Control Block stores process-related information such as process ID, current state, program counter, CPU registers, scheduling information and memory-management information.
| Process | Thread |
|---|---|
| Independent executing program. | Execution unit inside a process. |
| Has its own address space. | Threads generally share process address space. |
| Creation is relatively heavier. | Thread creation is usually lighter. |
| Context switching can be more expensive. | Switching between threads of the same process can be cheaper. |
| Communication may require IPC mechanisms. | Threads can communicate through shared process data. |
FCFS: Processes are served in arrival order.
SJF: Process with the shortest CPU burst is selected first.
SRTF: Preemptive version of SJF. The process with the shortest remaining time is selected.
Priority Scheduling: Process with the highest scheduling priority is selected.
Round Robin: Each process receives a fixed time quantum in cyclic order.
A semaphore is a synchronization variable used to coordinate processes or threads that share resources.
Its two important operations are:
wait: Attempts to acquire permission to enter or use a resource.
signal: Releases the resource or increases availability.
Binary Semaphore: Usually has two logical states and can be used for mutual exclusion.
Counting Semaphore: Can represent multiple instances of a resource.
Operating systems can handle deadlock using four main approaches.
1. Prevention: Break at least one necessary deadlock condition.
2. Avoidance: Allocate resources only when the system remains in a safe state. Banker's Algorithm is the classic example.
3. Detection: Allow deadlocks to occur and periodically check whether they exist.
4. Recovery: Terminate processes, preempt resources or roll back work after deadlock detection.
Paging divides logical memory into fixed-size pages and physical memory into frames of the same size.
The logical address is divided into:
The page number is used to access the page table. The page-table entry provides the corresponding frame number.
Paging removes external fragmentation but can produce internal fragmentation.
FIFO: Replaces the page that entered memory earliest.
LRU: Replaces the page that has not been used for the longest time in the past.
Optimal: Replaces the page whose next use is farthest in the future.
Optimal gives a theoretical minimum number of page faults for a known reference string, but exact future references are not normally available during real execution.
Demand Paging loads a page into main memory only when it is actually required.
If the required page is not present, a page fault occurs.
Basic handling steps are:
- Trap to the operating system.
- Check whether the reference is valid.
- Find a free frame or select a victim page.
- Read the required page from storage.
- Update page-table information.
- Restart the interrupted instruction.
FCFS: Serves disk requests in arrival order.
SSTF: Selects the request nearest to the current disk head.
SCAN: Moves like an elevator toward one disk end and then reverses.
C-SCAN: Serves requests in one direction and returns circularly to the opposite end.
LOOK: Similar to SCAN, but reverses at the last pending request.
C-LOOK: Circular version of LOOK.
RAID 0: Uses striping. It improves performance but provides no redundancy.
RAID 1: Uses mirroring. The same data is stored on multiple disks.
RAID 5: Uses block striping with distributed single parity and can tolerate one disk failure.
RAID 6: Uses distributed dual parity and can tolerate two disk failures.
Contiguous Allocation: File blocks are stored in consecutive locations. It supports fast access but may suffer from external fragmentation and file-growth problems.
Linked Allocation: File blocks can be located anywhere and each block points to the next. Growth is easy, but direct access is poor.
Indexed Allocation: An index structure stores addresses of the file's data blocks. It supports direct access without requiring contiguous blocks.
Single-Level: All files are kept in one directory.
Two-Level: Each user can have a separate directory.
Tree-Structured: A root directory contains files and subdirectories.
Acyclic-Graph: Allows sharing without creating cycles.
General-Graph: Links may create cycles, so traversal and deletion become more complex.
Programmed I/O: CPU repeatedly checks the device status and directly controls the transfer.
Interrupt-Driven I/O: CPU starts the operation and performs other work until the device generates an interrupt.
DMA: A DMA controller transfers blocks directly between an I/O device and memory, reducing CPU involvement.
An Access Matrix is a conceptual table containing subjects, objects and the rights each subject has over each object.
An Access Control List stores permissions from the object's point of view.
A Capability List stores accessible objects and rights from the subject's point of view.
Capability: User → Objects.
Operating System Important 10 Marks Questions With Answers
For long answers, write headings, subheadings, diagrams and comparisons clearly.
An Operating System is system software that manages computer hardware and provides services to application programs.
Its important functions are:
1. Process Management: Creates, schedules, suspends and terminates processes.
2. Memory Management: Tracks memory usage, allocates memory and supports techniques such as paging and virtual memory.
3. File Management: Creates, deletes, stores, organizes and protects files and directories.
4. I/O Management: Coordinates devices through drivers, interrupts, buffering, caching, spooling and DMA.
5. Secondary Storage Management: Handles storage allocation, free space and disk scheduling.
6. Protection and Security: Controls permissions, authentication and safe resource access.
7. User Interface: Provides command-line, graphical or programmatic interfaces.
8. Resource Allocation: Distributes CPU, memory, storage and devices among competing programs.
9. Error Detection: Detects and handles hardware, software and I/O errors.
10. Accounting and Monitoring: Tracks system-resource usage and performance information.
CPU scheduling selects one process from the ready queue for CPU execution.
Important Scheduling Criteria
CPU Utilization: Keep CPU busy.
Throughput: Number of processes completed per unit time.
Turnaround Time: Completion Time − Arrival Time.
Waiting Time: Time spent waiting in the ready queue.
Response Time: Time from arrival until the first response.
Main Algorithms
FCFS: Non-preemptive scheduling based on arrival order. It is simple but can suffer from the convoy effect.
SJF: Selects the process with the shortest CPU burst. It can reduce average waiting time when burst lengths are known or predicted.
SRTF: Preemptive SJF. A newly arrived process may preempt the current process if it has a shorter remaining time.
Priority Scheduling: CPU is allocated according to process priority. Low-priority processes may suffer starvation. Aging can reduce this problem.
Round Robin: Each process receives a fixed time quantum. It is widely used to explain time-sharing systems.
Process synchronization is required when concurrent processes or threads share data or resources.
Race Condition
A race condition occurs when the final result depends on the timing or order of concurrent operations.
Critical Section
The critical section is the part of code that accesses shared data.
A correct solution should consider:
Mutual Exclusion: Only one process should execute the critical section at a time when required.
Progress: Selection of the next process should not be postponed indefinitely.
Bounded Waiting: A process should not wait forever after requesting entry.
Semaphore
A semaphore is a synchronization variable manipulated using atomic operations such as wait and signal.
Binary Semaphore: Useful for mutual exclusion.
Counting Semaphore: Useful when multiple identical resources exist.
Classical Synchronization Problems
Producer-Consumer, Dining Philosophers and Sleeping Barber are commonly used to explain synchronization principles.
Deadlock occurs when a set of processes is permanently blocked because each process is waiting for a resource held by another process.
Four Necessary Conditions
1. Mutual Exclusion: At least one resource cannot be shared simultaneously.
2. Hold and Wait: A process holds one resource while waiting for another.
3. No Preemption: Resources cannot simply be taken away.
4. Circular Wait: A circular chain of processes waits for resources.
Handling Techniques
Prevention: Break one necessary condition.
Avoidance: Check whether allocation keeps the system in a safe state. Banker's Algorithm is a classic method.
Detection: Let deadlock occur and detect it using resource-allocation information.
Recovery: Terminate selected processes, preempt resources or roll back operations.
Paging
Paging divides a process into fixed-size pages and physical memory into frames.
A page table maps logical page numbers to physical frame numbers.
Paging removes external fragmentation, but internal fragmentation may occur.
Segmentation
Segmentation divides a process according to logical program units, such as code, stack and data.
Each segment can have a base and limit.
| Paging | Segmentation |
|---|---|
| Fixed-size blocks. | Variable-size logical units. |
| Physical-memory oriented technique. | Reflects logical program structure. |
| Can have internal fragmentation. | Can have external fragmentation. |
| Uses page table. | Uses segment table. |
Virtual Memory allows execution of a process without keeping the complete process in main memory.
Demand Paging
Pages are loaded only when referenced. If a required page is absent, a page fault occurs.
Page-Fault Handling
- Trap to OS.
- Check validity.
- Find free frame or choose victim.
- Read page from storage.
- Update page table.
- Restart instruction.
Page Replacement
FIFO: Oldest loaded page is replaced.
LRU: Least recently used page is replaced.
Optimal: Page required farthest in the future is replaced.
Thrashing
Thrashing occurs when the page-fault rate becomes so high that most system time is spent moving pages rather than executing instructions.
Locality, working set and Page Fault Frequency are important concepts for understanding thrashing.
I/O Management controls communication between the operating system and external devices.
Important Components
Device Driver: Software that communicates with a specific hardware device.
Device Controller: Hardware interface between device and system.
Interrupt Handler: Handles interrupt signals generated by devices.
Data Transfer Methods
Programmed I/O, Interrupt-Driven I/O and DMA.
Important OS Techniques
Buffering: Temporary storage smooths speed differences.
Caching: Frequently used data is kept in faster storage.
Spooling: Jobs are queued for slow shared devices.
I/O Scheduling: OS decides the order in which requests are processed.
Good I/O management improves throughput, device utilization and response time.
Disk Scheduling
Disk Scheduling determines the order in which pending storage requests are serviced.
FCFS: Arrival order.
SSTF: Nearest request first.
SCAN: Head moves to one disk end and reverses.
C-SCAN: Serves in one direction and circularly returns.
LOOK: Reverses at last pending request.
C-LOOK: Circular version of LOOK.
RAID
RAID combines multiple disks for performance, availability and redundancy.
RAID 0: Striping without redundancy.
RAID 1: Mirroring.
RAID 5: Distributed single parity.
RAID 6: Distributed dual parity.
RAID 10: Mirroring plus striping.
A File System organizes and manages files and directories on storage devices.
File Attributes
Name, identifier, type, size, owner, permissions, timestamps and location information.
Access Methods
Sequential Access: Data is processed in order.
Direct Access: Program can jump to a required position.
Indexed Access: An index helps locate data.
Directory Structures
Single-Level, Two-Level, Tree-Structured, Acyclic-Graph and General-Graph.
Allocation Methods
Contiguous: Consecutive blocks.
Linked: Blocks linked together.
Indexed: Index contains block references.
File Sharing
File sharing allows multiple users, processes or computers to access common files under controlled rules.
File System Implementation
Important structures include:
Directory entries, File Control Blocks or inodes, data blocks, free-space maps, open-file tables, caches and mount information.
A Virtual File System can provide a common interface over different underlying file systems.
Protection
Protection determines which users or processes may perform read, write, execute or other operations.
Important protection models include Access Matrix, ACL and Capability Lists.
Security
File security includes authentication, authorization, encryption, integrity protection, auditing, least privilege and reliable backups.
Common threats include unauthorized access, malware, ransomware, data leakage, path traversal and race conditions.
How to Score Better in Operating System Theory Answers
Use headings such as Working, Advantages, Disadvantages, Steps and Example.
Draw simple diagrams for Process States, Paging, Deadlock, File System, Disk Scheduling and I/O architecture.
For numerical questions, write every calculation step instead of only the final answer.
One-Day Operating System Revision Sheet
Frequently Asked Questions
Which Operating System topics are most important for semester exams?
Students should strongly prepare processes, CPU scheduling, process synchronization, deadlocks, paging, segmentation, virtual memory, page replacement, I/O management, disk scheduling, RAID, file systems and protection concepts.
How much should I write for a 2-mark OS question?
Usually a direct definition followed by one important point, feature, example or formula is enough, although exact expectations depend on the university and examiner.
How should I write a 5-mark Operating System answer?
Begin with a definition, explain the working or concept, write important points and add a small example, comparison or diagram when useful.
How should I write a 10-mark Operating System answer?
Use a structured answer containing definition, detailed explanation, working, algorithm or steps, diagram, advantages, limitations, comparison and example where relevant.
Are CPU Scheduling numericals important?
CPU Scheduling is a major Operating System topic. Students should know Gantt charts, completion time, turnaround time, waiting time and the working of major scheduling algorithms.
What should I remember in Deadlock?
Remember the four necessary conditions: Mutual Exclusion, Hold and Wait, No Preemption and Circular Wait. Also prepare prevention, avoidance, detection and recovery.
What should I prepare from Virtual Memory?
Prepare Demand Paging, Page Fault, page-fault handling, FIFO, LRU, Optimal Page Replacement, locality, working set and thrashing.
Is File System important for long questions?
Yes. File concept, access methods, directories, allocation methods, file-system implementation, file sharing, protection and security can all form descriptive semester-exam questions.
Final Exam Preparation Advice
Operating System becomes much easier when you prepare answers according to marks.
Use 2-mark questions for definitions, 5-mark questions for short explanations and 10-mark questions for complete conceptual preparation.
Do not memorize only one-line definitions. Understand how processes, memory, files, disks and I/O systems work together.
Process → CPU Scheduling → Synchronization → Deadlock → Memory Management → Virtual Memory → I/O → Disk Scheduling → RAID → File System → Protection & Security
