PlacementPrep IndiaPowered by AcePrep
Core CSBeginner • Intermediate • Advanced

Operating Systems (OS) Mock Interview

Operating Systems is a staple across SDE, Systems Engineer, and Embedded campus placements in India. Interviewers probe beyond textbook definitions into concurrency bugs, paging overheads, and real Linux kernel mechanics.

Frequently Asked By:MicrosoftQualcommCiscoOracleAmazonSamsung R&DTCS Prime

3-Level OS Placement Syllabus

Beginner Tier
  • Process vs Thread & PCB
  • CPU Scheduling (FCFS, SJF, RR)
  • System Calls & User/Kernel Mode
  • Context Switching
Intermediate Tier
  • Mutex vs Semaphore & Race Conditions
  • Deadlock Conditions & Avoidance (Banker's)
  • Paging, Segmentation & Page Faults
  • Thrashing & Working Set
Advanced Tier
  • Copy-on-Write (fork)
  • TLB Misses & Multi-Level Page Tables
  • Priority Inversion & Lock-Free Primitives
  • Virtual File Systems & Inodes
INTERACTIVE BROWSER DEMO • ZERO INSTALL

Try a Spoken or Typed Mock Interview Right Now

OSBeginnerQ1 / 4

“What is the practical difference between a process and a thread, and why is context switching between threads cheaper?”

Focus log (info only): 0 blurs • 0 pastes

High-Frequency Spoken OS Questions & Rubric Criteria

Study how interviewers probe beyond definitions with adaptive follow-ups and what AcePrep's 0–10 scoring rubric checks in your spoken explanation.

QUESTION 01Beginner

What is the practical difference between a process and a thread, and why is context switching between threads cheaper?

Adaptive Follow-Up Probe

If threads share heap memory and open file descriptors, what is the biggest reliability risk compared to multi-process architectures like Chrome tabs?

What the Rubric Checks

  • • Identifies shared vs private memory spaces accurately
  • • Explains TLB flush and address-space overhead in process switching
  • • Highlights fault isolation vs communication overhead trade-off

High-Scoring Answer Blueprint

A process has an isolated virtual address space, PCB, and resources; threads within a process share code, heap, and file descriptors while keeping their own stack and registers. Thread context switches avoid switching page tables and flushing the TLB, making them faster — at the cost of weaker fault isolation.

QUESTION 02Intermediate

State the four Coffman conditions required for a deadlock, and explain how real operating systems usually handle deadlocks in practice.

Adaptive Follow-Up Probe

Why do general-purpose OSes like Linux or Windows choose the 'ostrich algorithm' rather than running Banker's algorithm on every resource request?

What the Rubric Checks

  • • Names all four conditions (Mutual Exclusion, Hold & Wait, No Preemption, Circular Wait)
  • • Distinguishes prevention, avoidance, detection, and recovery
  • • Explains runtime overhead of Banker's algorithm vs lock ordering

High-Scoring Answer Blueprint

List Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait. Breaking Circular Wait via strict global lock ordering is the most practical prevention technique in engineering; general OSes avoid Banker's algorithm because future resource claims are rarely known in advance and checking safe states on every allocation is too costly.

QUESTION 03Intermediate

Walk me through what happens step by step when a CPU accesses a virtual memory address that causes a page fault.

Adaptive Follow-Up Probe

What is thrashing, and how can an OS detect and mitigate it before system throughput collapses?

What the Rubric Checks

  • • Traces MMU -> TLB -> Page Table -> Trap to OS -> Disk I/O -> Page Table update -> Instruction restart
  • • Mentions page replacement policies (LRU/Clock)
  • • Connects working-set size to thrashing

High-Scoring Answer Blueprint

The MMU checks the TLB, misses, checks the page table, sees the valid bit is 0, and triggers a page fault trap to the OS kernel. The OS locates the page on disk, selects a victim frame if RAM is full, schedules disk I/O, updates the page table and TLB, and restarts the faulting instruction.

QUESTION 04Advanced

How does a Mutex differ from a Binary Semaphore, and when can a Binary Semaphore lead to subtle bugs that a Mutex prevents?

Adaptive Follow-Up Probe

Explain priority inversion and how priority inheritance solves it.

What the Rubric Checks

  • • Emphasizes ownership semantics of a Mutex
  • • Distinguishes locking vs signaling use cases
  • • Explains priority inheritance clearly

High-Scoring Answer Blueprint

A Mutex enforces ownership — only the thread that locked it can unlock it, enabling priority inheritance. A Semaphore is a signaling counter with no ownership, so another thread can post/signal it, which is great for producer-consumer coordination but unsafe as a drop-in lock if accidental double-release occurs.

OS Interview FAQs

Which OS topics are asked most frequently in B.Tech campus placements?

Processes vs threads, synchronization (mutex/semaphore), deadlocks, virtual memory (paging, TLB, page faults), and CPU scheduling make up over 80% of OS interview questions.

Does the AI ask OS follow-up questions based on my answer?

Yes. AcePrep adapts follow-ups directly to what you say — for example, probing TLB overhead or fault isolation if you explain process vs thread switching.

Continue Practicing Related Tracks