Home/Interview Prep/Operating Systems

Operating Systems Interview Questions

Processes and threads, scheduling, synchronisation, deadlocks, memory and virtual memory, file systems and I/O — framed for backend engineers debugging real services, not exam revision.

ThreadsSchedulingDeadlocksMemoryLinuxAria-powered explanations
0 / 100 answered
0%
10 Easy51 Medium39 Hard

Showing 120 of 100

#1What is the difference between a process and a thread?

Easy
Processes & Threads

#2What is stored in a Process Control Block?

Medium
Processes & Threads

#3Walk through what happens during a context switch.

Medium
Processes & Threads

#4What are the states a process moves through?

Easy
Processes & Threads

#5What is a zombie process and what is an orphan?

Medium
Processes & Threads

#6Explain fork() and exec() and why they are separate calls.

Medium
Processes & Threads

#7What is copy-on-write and where does it matter?

Hard
Processes & Threads

#8What is the difference between user-level and kernel-level threads?

Hard
Processes & Threads

#9What is the difference between concurrency and parallelism?

Medium
Processes & Threads

#10How do you decide the size of a thread pool?

Medium
Processes & Threads

#11What is a system call and what does it cost?

Medium
Processes & Threads

#12What is the difference between kernel mode and user mode?

Easy
Processes & Threads

#13Compare the main CPU scheduling algorithms.

Medium
CPU Scheduling

#14What is the difference between preemptive and non-preemptive scheduling?

Easy
CPU Scheduling

#15What is starvation and how does ageing solve it?

Medium
CPU Scheduling

#16How do you calculate turnaround time and waiting time?

Easy
CPU Scheduling

#17What is priority inversion and how is it solved?

Hard
CPU Scheduling

#18What is the convoy effect?

Medium
CPU Scheduling

#19How does the Linux Completely Fair Scheduler work?

Hard
CPU Scheduling

#20What is the difference between load average and CPU utilisation?

Medium
CPU Scheduling

Showing 120 of 100

Ask Aria about Operating Systems

Sign in to chat with Aria

All 100 Operating Systems questions at a glance
  1. What is the difference between a process and a thread?(Easy)
  2. What is stored in a Process Control Block?(Medium)
  3. Walk through what happens during a context switch.(Medium)
  4. What are the states a process moves through?(Easy)
  5. What is a zombie process and what is an orphan?(Medium)
  6. Explain fork() and exec() and why they are separate calls.(Medium)
  7. What is copy-on-write and where does it matter?(Hard)
  8. What is the difference between user-level and kernel-level threads?(Hard)
  9. What is the difference between concurrency and parallelism?(Medium)
  10. How do you decide the size of a thread pool?(Medium)
  11. What is a system call and what does it cost?(Medium)
  12. What is the difference between kernel mode and user mode?(Easy)
  13. Compare the main CPU scheduling algorithms.(Medium)
  14. What is the difference between preemptive and non-preemptive scheduling?(Easy)
  15. What is starvation and how does ageing solve it?(Medium)
  16. How do you calculate turnaround time and waiting time?(Easy)
  17. What is priority inversion and how is it solved?(Hard)
  18. What is the convoy effect?(Medium)
  19. How does the Linux Completely Fair Scheduler work?(Hard)
  20. What is the difference between load average and CPU utilisation?(Medium)
  21. What is CPU affinity and why would you set it?(Hard)
  22. What is the difference between I/O-bound and CPU-bound processes, and why does the scheduler care?(Medium)
  23. What is a race condition and what makes one possible?(Easy)
  24. What is a critical section and what must a correct solution guarantee?(Medium)
  25. What is the difference between a mutex and a semaphore?(Medium)
  26. What is a spinlock and when is it better than a blocking lock?(Hard)
  27. Explain the producer-consumer problem and how to solve it.(Medium)
  28. What is a condition variable and why must wait() be in a loop?(Hard)
  29. What does the volatile keyword actually guarantee?(Hard)
  30. What is a memory barrier and why is one needed?(Hard)
  31. What is the readers-writers problem?(Medium)
  32. What is an atomic operation and how is one implemented?(Hard)
  33. What is the difference between synchronized and ReentrantLock in Java?(Medium)
  34. What is thread confinement and why is it the best synchronisation strategy?(Medium)
  35. What is false sharing?(Hard)
  36. What is a monitor?(Medium)
  37. What are the four necessary conditions for deadlock?(Medium)
  38. How do you prevent deadlock in application code?(Medium)
  39. What is the Banker's algorithm?(Hard)
  40. How do you detect and diagnose a deadlock in a running Java application?(Medium)
  41. What is the difference between deadlock, livelock, and starvation?(Medium)
  42. What is the dining philosophers problem and what does it illustrate?(Medium)
  43. What is deadlock recovery and what are the options?(Hard)
  44. Why do thread pools deadlock, and how do you avoid it?(Hard)
  45. What is virtual memory and what problems does it solve?(Medium)
  46. What is paging and how does address translation work?(Medium)
  47. What is a TLB and why does it matter for performance?(Hard)
  48. What is the difference between internal and external fragmentation?(Medium)
  49. What is a page fault and what are the different kinds?(Medium)
  50. Compare page replacement algorithms.(Hard)
  51. What is thrashing and how do you recognise it?(Medium)
  52. What is the working set model?(Hard)
  53. What is the difference between the stack and the heap?(Easy)
  54. What is memory-mapped I/O and when would you use it?(Hard)
  55. What is the difference between swap and the page cache?(Medium)
  56. What is the OOM killer and how does it choose a victim?(Medium)
  57. What is the difference between segmentation and paging?(Medium)
  58. How does the JVM heap relate to operating system memory?(Hard)
  59. What is demand paging?(Medium)
  60. What is Belady's anomaly?(Hard)
  61. What is the difference between a logical and a physical address?(Easy)
  62. How do multi-level page tables save memory?(Hard)
  63. What are huge pages and when do they help?(Hard)
  64. What is a dirty page and why does it matter?(Medium)
  65. What is memory overcommit and why does Linux do it?(Hard)
  66. What is NUMA and why should a backend engineer care?(Hard)
  67. What is the difference between RSS, VSZ, and PSS?(Medium)
  68. What is a memory leak in a garbage-collected language?(Medium)
  69. How does copy-on-write interact with garbage collection?(Hard)
  70. Why does a container get OOM-killed even though the application heap looks fine?(Hard)
  71. What is an inode and what does it contain?(Medium)
  72. What is the difference between a hard link and a symbolic link?(Easy)
  73. What is a file descriptor?(Medium)
  74. What does fsync do and why does it matter for databases?(Hard)
  75. What is journaling in a file system?(Hard)
  76. How does the page cache speed up file I/O?(Medium)
  77. What is the difference between buffered, direct, and asynchronous I/O?(Hard)
  78. What happens when you delete a file that a process still has open?(Medium)
  79. What is the difference between a block device and a character device?(Medium)
  80. How does a copy-on-write filesystem differ from a journaling one?(Hard)
  81. What is the difference between blocking, non-blocking, and multiplexed I/O?(Hard)
  82. What is DMA and why does it matter?(Hard)
  83. What is an interrupt and how does it differ from polling?(Hard)
  84. What is zero-copy and how does sendfile achieve it?(Hard)
  85. What are the main disk scheduling algorithms?(Medium)
  86. What is the difference between a pipe, a named pipe, and a socket?(Medium)
  87. A production service is slow. How do you determine whether it is CPU, memory, disk, or network bound?(Medium)
  88. What does high iowait actually tell you?(Hard)
  89. How do you find which process is consuming a resource on Linux?(Medium)
  90. What are cgroups and namespaces, and how do they make containers work?(Hard)
  91. How do CPU limits in Kubernetes actually work, and what is throttling?(Hard)
  92. What is the difference between SIGTERM, SIGKILL, and SIGSTOP?(Medium)
  93. Why does PID 1 matter in a container?(Hard)
  94. How would you diagnose a process stuck at 100% CPU?(Hard)
  95. What does strace do and when would you use it?(Medium)
  96. What is the difference between a soft link limit and a hard limit on file descriptors?(Medium)
  97. What happens between typing a command in a shell and it running?(Medium)
  98. What is the difference between a soft real-time and hard real-time system?(Medium)
  99. Why can adding more threads make an application slower?(Medium)
  100. Why does the operating system matter to a backend engineer who writes application code?(Easy)