LearnPracticeExamsMocks

Clear practice, useful explanations and steady progress for exam preparation.

Study

AptitudeLogical reasoningVerbal abilityTechnical aptitudeAI & modern dev

Explore

Practice libraryLocal progressExam patternsFor collegesSearchAbout AISEAFAQ

Trust & support

ContactReport a problemContent correctionsAccessibility
© 2026 AISEA. Built for focused learning.Privacy · Terms · Editorial policy
Home
›Technical Aptitude
›Operating Systems
Technical
Programming Concepts
Data Structures
Algorithms
DBMS
Operating SystemsPractice
Computer Networks
C Programming
Java
Python

Operating systems MCQs with answers and explanations

Revise processes, scheduling, deadlocks, synchronisation and memory management. Use operating-system concept notes and explained questions for technical placements, interviews and GATE CS preparation.

235 practice questionsPage updated 24 Sept 2026Review metadata pendingPractice questions
Practise this concept

Operating Systems (OS) are system software that manages computer hardware and software resources, providing common services for computer programs. Core topics include process management, memory management, file systems, I/O management, and CPU scheduling. Understanding these concepts is essential for system programming, performance optimisation, and technical interviews.

Key formulas and rules

10 rules
1

CPU Utilization: Utilization=Total TimeBusy Time​×100%

2

Turnaround Time (TAT): TAT=Completion Time−Arrival Time

3

Waiting Time (WT): WT=Turnaround Time−Burst Time

4

Response Time (RT): RT=First Response Time−Arrival Time

5

Throughput: Throughput=Total Time UnitNumber of Processes Completed​

6

Page Fault Rate: p=Total Memory ReferencesPage Faults​

7

Effective Memory Access Time (EMAT): EMAT=(1−p)×tmem​+p×tfault​

8

Disk Access Time: Total Time=Seek Time+Rotational Latency+Transfer Time

9

Rotational Latency: Average Latency=2×RPM1​×60 seconds

10

Banker's Algorithm Safety: A state is safe if there exists a sequence ⟨P1​,P2​,…,Pn​⟩ such that for each process Pi​, Needi​≤Worki​, where Work1​=Available and Worki+1​=Worki​+Allocationi​ (accumulating released allocations as earlier processes finish)

Key concepts

Process vs Thread

A process is an independent program in execution with its own address space, resources, and PCB (Process Control Block). A thread is a lightweight unit of execution within a process, sharing the same address space and resources but having its own stack, registers, and program counter. Processes are isolated; threads within the same process communicate easily but can cause race conditions. Context switching between threads is faster than between processes.

CPU Scheduling Algorithms

First-Come-First-Served (FCFS): Non-preemptive, simple, may cause convoy effect. Shortest Job First (SJF): Optimal for minimum waiting time, requires prediction of burst times. Priority Scheduling: Can be preemptive or non-preemptive, may suffer from starvation. Round Robin (RR): Time quantum-based, fair, good for time-sharing systems. Multilevel Queue: Processes permanently assigned to queues. Multilevel Feedback Queue: Allows processes to move between queues based on behaviour.

Memory Management

Contiguous Allocation: Memory divided into partitions (fixed or variable size). External fragmentation occurs in variable partitioning. Paging: Divides logical memory into fixed-size pages and physical memory into frames. Eliminates external fragmentation, may have internal fragmentation. Segmentation: Divides memory into variable-sized segments based on program structure (code, data, stack). Virtual Memory: Allows execution of processes not entirely in memory using demand paging. Page replacement algorithms: FIFO, Optimal, LRU, LRU Approximation (Clock), Second Chance.

Deadlock

Deadlock occurs when processes wait indefinitely for resources held by each other. Four necessary conditions: Mutual Exclusion (resources cannot be shared), Hold and Wait (process holds resources while waiting for more), No Preemption (resources cannot be forcibly taken), Circular Wait (circular chain of processes waiting). Deadlock Handling: Prevention (break one condition), Avoidance (Banker's Algorithm), Detection and Recovery, Ignorance (Ostrich Algorithm). Banker's Algorithm checks if system is in safe state before granting resource requests.

Synchronisation Mechanisms

Race Condition: Multiple processes access shared data concurrently with outcome dependent on execution order. Critical Section: Code segment accessing shared resources; requires mutual exclusion. Solutions: Peterson's Solution (software), Mutex Locks (binary semaphore), Semaphores (counting and binary), Monitors (high-level abstraction). Classical Problems: Producer-Consumer (Bounded Buffer), Readers-Writers, Dining Philosophers. Deadlock can occur in Dining Philosophers if all pick up left fork simultaneously.

File System & I/O

File Allocation Methods: Contiguous (fast access, external fragmentation), Linked (no fragmentation, slow random access), Indexed (direct access, pointer overhead). Directory Structure: Single-level, Two-level, Tree-structured, Acyclic Graph (shared files), General Graph (allows cycles, requires garbage collection). Disk Scheduling: FCFS, SSTF (shortest seek time first), SCAN (elevator), C-SCAN, LOOK, C-LOOK. I/O Techniques: Programmed I/O, Interrupt-Driven I/O, DMA (Direct Memory Access) for large transfers without CPU intervention.

Check the idea while it is fresh.Open a focused exercise without losing this article.Practise this concept

Worked examples

Example 1

Three processes arrive at time 0 with burst times: P1​=24 ms, P2​=3 ms, P3​=3 ms. Compare the average waiting times under FCFS and SJF scheduling.

Solution

Step 1: FCFS (order P1​,P2​,P3​).
- Waiting times: P1​=0, P2​=24, P3​=24+3=27 ms

Avg Waiting TimeFCFS​=30+24+27​=351​=17 ms

Step 2: SJF (order P2​,P3​,P1​).
- Waiting times: P2​=0, P3​=3, P1​=3+3=6 ms

Avg Waiting TimeSJF​=30+3+6​=39​=3 ms

Answer: FCFS average waiting time is 17 ms; SJF reduces it to 3 ms.

Example 2

A demand paging virtual memory system has memory access time tmem​=200 ns and page fault service time tfault​=8 ms=8,000,000 ns. If the page fault rate is p=0.001, calculate the Effective Access Time (EAT).

Solution

Step 1: Apply the EAT formula.

EAT=(1−p)×tmem​+p×tfault​

Step 2: Substitute values.

EAT=(1−0.001)×200+0.001×8,000,000
EAT=199.8+8,000=8,199.8 ns≈8.2μs

Answer: 8,199.8 ns (or ≈8.2μs).

Example 3

In a paging system with TLB, TLB lookup time is 20 ns and main memory access time is 100 ns. If the TLB hit ratio is 90%, what is the effective memory access time?

Solution

Step 1: Formulate TLB EAT equation.

EAT=h×(tTLB​+tmem​)+(1−h)×(tTLB​+2tmem​)

Step 2: Substitute parameters.
- On TLB hit: 20+100=120 ns
- On TLB miss: 20+100+100=220 ns

EAT=0.90×120+0.10×220=108+22=130 ns

Answer: 130 ns.

Example 4

Explain the four necessary Coffman conditions for deadlock in operating systems.

Solution

Step 1: Mutual Exclusion.
At least one resource must be held in a non-shareable mode (only one process can use it at a time).

Step 2: Hold and Wait.
A process holding at least one allocated resource is waiting to acquire additional resources held by other processes.

Step 3: No Preemption.
Resources cannot be forcibly confiscated from a process; they can only be released voluntarily after completing its task.

Step 4: Circular Wait.
A closed chain of processes {P0​,P1​,…,Pn​} exists such that P0​ waits for a resource held by P1​, P1​ waits for P2​, and Pn​ waits for P0​.

Answer: Deadlock can occur only if all four conditions hold simultaneously.

Representative solved questions

See the kind of question in this topic before opening the full practice set.

Question 1

Using the SCAN (Elevator) disk scheduling algorithm, the disk arm starts at track 100 and moves towards track 0. Requests are at tracks: 95, 180, 34, 119, 11, 123, 62, 64. What is the total head movement?

  1. A.

    208 tracks

  2. B.

    236 tracks

  3. C.

    280 tracks

  4. D.

    314 tracks

Answer: C. 280 tracks

Explanation

Step 1: In the SCAN algorithm, the disk arm moves in the initial direction towards track 0, servicing all requests along the path (95, 64, 62, 34, 11) until reaching the end track 0.
Step 2: Head movement going down: |100 - 0| = 100 tracks.
Step 3: At track 0, the arm reverses direction and moves upward, servicing remaining requests (119, 123, 180) up to the farthest request at track 180.
Step 4: Head movement going up: |180 - 0| = 180 tracks.
Step 5: Total head movement = 100 + 180 = 280 tracks.
Answer: 280 tracks

Sources and review notes

This is an AISEA-authored practice question.

Review status: accepted · Reviewed 2026-08-13 · structure and answer-key checks, editorial quality checks, duplicate screening

Question 2

Which scheduling algorithm may minimise average waiting time but can lead to starvation?

  1. A.

    FCFS

  2. B.

    Round Robin

  3. C.

    Lottery scheduling

  4. D.

    Shortest Job First

Answer: D. Shortest Job First

Explanation

Shortest Job First often reduces average waiting time, but long jobs may starve if shorter jobs continue to arrive.

Sources and review notes

This is an AISEA-authored practice question.

Review status: accepted · Reviewed 2026-08-13 · structure and answer-key checks, editorial quality checks, duplicate screening

Question 3

What is the maximum file size in a file system using inodes with 12 direct pointers, 1 single indirect, 1 double indirect, and 1 triple indirect, with 4KB blocks and 4-byte addresses?

  1. A.

    Approximately 4 GB

  2. B.

    Approximately 4 TB

  3. C.

    Approximately 16 GB

  4. D.

    Approximately 64 TB

Answer: B. Approximately 4 TB

Explanation

Step 1: Block size = 4KB, pointer size = 4 bytes.
Step 2: Pointers per block = 4096 / 4 = 1024 pointers.
Step 3: Direct: 12 x 4KB=48KB.
Step 4: Single indirect: 1024 x 4KB=4MB.
Step 5: Double indirect: 1024 x 1024 x 4KB=4GB.
Step 6: Triple indirect: 1024 x 1024 x 1024 x 4KB=4TB.
Step 7: Total ~= 4TB + 4GB + 4MB + 48KB ~= 4TB.
Step 8: This is the Unix inode structure used in ext2/ext3.
Answer: Approximately 4 TB

Sources and review notes

This is an AISEA-authored practice question.

Review status: accepted · Reviewed 2026-08-13 · structure and answer-key checks, editorial quality checks, duplicate screening

Common mistakes and useful habits

  • For CPU scheduling problems, always draw a Gantt chart to visualise process execution order and calculate completion times accurately.
  • Remember the key differences: Paging uses fixed-size blocks (eliminates external fragmentation), Segmentation uses variable-size blocks (matches program structure).
  • In deadlock questions, check for ALL four necessary conditions. Breaking any one condition prevents deadlock.
  • For page replacement algorithms, track frames visually. LRU approximates Optimal; FIFO suffers from Belady's anomaly.
  • Banker's Algorithm: Always calculate 'Need' matrix first, then find a process that can execute with current Available resources.
  • For disk scheduling, SCAN (elevator) and C-SCAN provide more uniform wait times than SSTF which may cause starvation.

Ready to test your understanding?

Work through 235 questions with explanations after each answer.

Start practice
Next topic: Computer Networks →

Keep building the same skill family.

Programming Concepts

Variables, loops, functions, recursion

Open practice
Data Structures

Arrays, stacks, queues, trees, graphs

Open practice
Algorithms

Sorting, searching, complexity analysis

Open practice
On this page
Formulas and rulesKey conceptsWorked examplesRepresentative questionsCommon mistakesRelated practice

Suggest a correction