OS fundamentals
Operating system interview questions
Practise answering common OS questions clearly, like you would in a real interview.
Categories
Showing 60 of 60
Mode
OS fundamentals
Why do operating systems separate kernel mode from user mode?
OS fundamentals
What happens when a program makes a system call?
OS fundamentals
How would you distinguish an interrupt, a trap, and an exception?
OS fundamentals
What is the main trade-off between a monolithic kernel and a microkernel?
OS fundamentals
Can you walk me through what happens when a computer boots?
Processes and threads
What is the difference between a program and a process?
Processes and threads
What states can a process move through during its lifetime?
Processes and threads
What information does the operating system keep in a process control block?
Processes and threads
Suppose I ask you to compare a process with a thread. How would you explain it?
Processes and threads
What exactly is saved during a context switch, and why is the switch not free?
Processes and threads
Why do Unix-like systems have both fork and exec?
CPU scheduling
What is a CPU scheduler trying to optimize?
CPU scheduling
What is the practical difference between preemptive and non-preemptive scheduling?
CPU scheduling
When would Round Robin be a better choice than FCFS or Shortest Job First?
CPU scheduling
What happens if the time quantum in Round Robin is too small or too large?
CPU scheduling
Can a scheduling policy cause starvation? How would you prevent it?
CPU scheduling
How does a multilevel feedback queue respond to different kinds of workloads?
Synchronization
What makes a race condition possible?
Synchronization
What properties should a correct critical-section solution provide?
Synchronization
I often hear mutex and semaphore used interchangeably. Are they actually the same?
Synchronization
When would you use a counting semaphore instead of a binary semaphore?
Synchronization
When can a spinlock make more sense than a mutex?
Synchronization
Why do we need condition variables if we already have mutexes?
Deadlocks
What is a deadlock, in your own words?
Deadlocks
Which conditions must hold for a deadlock to be possible?
Deadlocks
How do deadlock prevention, avoidance, and detection differ?
Deadlocks
What does Banker's algorithm check before granting a resource request?
Deadlocks
How is starvation different from deadlock?
Deadlocks
A service occasionally freezes when two locks are involved. What would you inspect first?
Memory management
Why do modern operating systems use virtual memory?
Memory management
How would you compare paging with segmentation?
Memory management
What role does a page table play in address translation?
Memory management
Why is a TLB important if we already have page tables?
Memory management
Does every page fault mean the program has crashed?
Memory management
How does copy-on-write make fork more efficient?
File systems
What abstractions does a file system provide?
File systems
What is an inode, and what information is not stored in it?
File systems
What is the difference between a hard link and a symbolic link?
File systems
What does a file descriptor represent inside a process?
File systems
How does journaling help a file system recover from a crash?
File systems
What does it mean to mount a file system?
I/O and storage
What problem does a device driver solve?
I/O and storage
When would polling be preferable to interrupts for I/O?
I/O and storage
How does DMA reduce CPU involvement in I/O?
I/O and storage
Can you distinguish buffering, caching, and spooling?
I/O and storage
Why do disk-scheduling algorithms matter more for HDDs than SSDs?
I/O and storage
What are we trading when we choose a RAID level?
Protection and security
How do protection and security differ in an operating system?
Protection and security
What is the difference between authentication and authorization?
Protection and security
Why is the principle of least privilege important at the OS level?
Protection and security
When are basic owner-group-other permissions not enough?
Protection and security
What do ASLR and non-executable memory protect against?
Protection and security
Why is process isolation considered a security boundary?
Practical scenarios
A production process is using almost 100 percent CPU. How would you investigate it?
Practical scenarios
An application's memory usage keeps growing. Is that automatically a memory leak?
Practical scenarios
The system is spending most of its time handling page faults. What might be happening?
Practical scenarios
A process appears stuck in I/O wait. What would you check?
Practical scenarios
What could cause an unusually high number of context switches?
Practical scenarios

