Interview Questions
Interview Questions
The questions below are mixed and asked most frequently in interviews , please
read the articles mentioned on top of page first then it’ll become easy for you to
answer such questions . ( You can also refer Chat-GPT for these questions )
1. TCP vs UDP
2. Swap without using 3rd variable (Code , Xor wala method ek Plus , Minus wala)
3. ACID properties of DBMS
4. Explain and write code for Binary search
5. Explain how merge sort works ? (Code + Dry Run)
6. Why do we need Computer Networks ?
7. FIat file or File System vs Data Base
8. What is an Operating System ?
9. Types of Operating System ?
10. Python vs C++ (Python has interpreter and C++ has compiler , slow and fast….other
things)
11. Reverse a linked list
12. Explain and write code for quick sort
13. Thread vs Process
14. Process vs Program
15. WHat is thread ?
16. Different Process states ?
17. What is Thrashing , what is Belady’s anomaly and in which Page replacement algorithm
it happens (FIFO) ?
18. What is paging ?
19. Paging vs Segmentation ?
20. What is demand paging ?
21. What is virtual memory ?
22. What is Dead Lock ? How we can prevent it ? (Dead lock avoidance and Dead lock
prevention )
23. What is starvation ? Starvation vs Dead lock
24. What is internal and external fragmentation ?
25. What is non-contigous and contiguous memory mgmt ?
26. What is cache memory ?
27. What is a semaphore ? explain it’s types and usage ? (Binary vs counting )
28. What are locks and how does it differ from semaphores ?
29. What is the critical section ?
30. What are race conditions and how does it occur ?
31. What is mutual exclusion ?
32. What is mutex ?
33. Explain OS boot process in detail ? ( Lecture 6: How Operating System Boots up? )
34. What is inter process communication ?
35. Shared Memory model vs message passing ?
36. Preemptive vs non-preemtive scheduling ?
37. Orphan and Zombie process ?
38. How to prevent starvation ? (Aging : slowly increase priority over time)
39. What is context switching and why it is necessary ?
40. What is multiprogramming vs multi processing vs multi tasking OS ?
41. What is Process Control Block ?
42. What is safe state ?
43. What is Dispatcher ? (A module which actually gives control of CPU to process once the
CPU scheduler decides which process to be given CPU)
44. STS vs LTS vs MTS
45. How to achieve process synchronisation ?
46. Multi-threading and it’s advantages
47. Necessary condition for dead-lock
48. What is compaction and when does it occur ?
49. Functions of OS ?
50. How to recover from a deadlock?
51. All problems such as producer-consumer , dining philosopher etc.
For each protocol and server you must also remember the port number associated with it
ex: http 80 , FTP control : 21 and Data : 20
DBMS
1. What is LILO?
Ans: LILO means Linux Loader is a boot loader that is used for the Linux operating system.
Most of the Linux Operating systems use LILO, to boot the operating system into main
Linux | DigitalOcean
Linux/Unix Process Management: ps, kill, top, df, free, nice Commands (guru99.com)