/>

Lesson 12 — Advanced

Top 50 CS Questions

Interview ke liye top 50 questions jo har MNC mein poochte jaate hain. Quick revision — har question ka crisp answer.

⏱ 30 min• Advanced• All topics

Operating Systems — Top 15

# 1. Process aur Thread mein kya difference hai?
? Process = independent program (separate memory)
? Thread = execution unit within process (shared memory)

# 2. Context Switching kya hai?
? CPU ek process se doosre pe switch karna
? State PCB mein save hota hai, naya process load hota hai

# 3. Virtual Memory kya hai?
? Har process ko lagta hai poora address space hai
? Physical memory se zyada virtual memory available hoti hai

# 4. Paging vs Segmentation?
? Paging = fixed size blocks (physical view)
? Segmentation = variable size blocks (logical view)

# 5. Page Fault kya hai?
? Jab requested page physical memory mein nahi hota
? OS disk se page load karta hai

# 6. Deadlock kya hai? 4 conditions?
? Circular wait for resources
? Mutual exclusion, Hold & Wait, No Preemption, Circular Wait

# 7. Deadlock Prevention vs Avoidance?
? Prevention = condition todna permanently
? Avoidance = runtime pe safe state check (Banker's Algorithm)

# 8. FCFS, SJF, Round Robin mein difference?
? FCFS = First Come First Serve (convoy effect)
? SJF = Shortest Job First (optimal avg wait)
? Round Robin = Time quantum based (fair)

# 9. Starvation kya hai?
? Low priority process kabhi execute na ho paaye
? Aging se solve karo (priority badhte jao)

# 10. Semaphore kya hai?
? Synchronization tool — integer variable
? P() = wait (decrement), V() = signal (increment)

# 11. Mutex vs Semaphore?
? Mutex = binary lock (1 thread only)
? Semaphore = counting (N threads)

# 12. IPC methods?
? Pipes, Message Queues, Shared Memory, Sockets, Signals

# 13. Thrashing kya hai?
? Bahut zyada page faults = system slow
? Working set model se solve karo

# 14. Fork() kya hai?
? Naya process create karta hai (child)
? Child parent ka copy hota hai (COW)

# 15. Zombie vs Orphan process?
? Zombie = completed but parent ne wait nahi kiya
? Orphan = parent dead, child running (init adopts)

DBMS — Top 20

# 16. ACID properties?
? Atomicity, Consistency, Isolation, Durability

# 17. SQL vs NoSQL?
? SQL = structured, fixed schema, ACID
? NoSQL = flexible, scalable, eventual consistency

# 18. B-Tree vs B+ Tree?
? B-Tree: Data in all nodes
? B+ Tree: Data only in leaves, linked leaves

# 19. Normalization kya hai?
? Redundancy eliminate karna
? 1NF — 2NF — 3NF — BCNF

# 20. 1NF, 2NF, 3NF?
? 1NF = Atomic values
? 2NF = No partial dependency
? 3NF = No transitive dependency

# 21. Clustered vs Non-Clustered Index?
? Clustered = Physical order (1 per table)
? Non-Clustered = Logical order with pointer (multiple)

# 22. Transaction States?
? Active — Partially Committed — Committed — Aborted

# 23. Isolation Levels?
? Read Uncommitted — Read Committed — Repeatable Read — Serializable

# 24. Dirty Read kya hai?
? Uncommitted data padhna doosre transaction se

# 25. Lock types?
? Shared Lock (Read), Exclusive Lock (Write)

# 26. Two-Phase Locking?
? Growing phase (acquire) + Shrinking phase (release)

# 27. Deadlock in DBMS?
? Wait-for graph mein cycle = deadlock
? Timeout, Detection, Prevention se handle

# 28. MVCC kya hai?
? Multi-Version Concurrency Control
? Multiple versions of data for non-blocking reads

# 29. Views kya hai?
? Virtual table based on query
? Security + abstraction

# 30. JOIN types?
? INNER, LEFT, RIGHT, FULL OUTER, CROSS, SELF JOIN

# 31. GROUP BY vs HAVING?
? GROUP BY = rows group karo
? HAVING = groups pe filter (WHERE group pe nahi lag sakta)

# 32. Subquery vs JOIN?
? Subquery = nested query
? JOIN = combine tables
? Performance ke liye JOIN better hai mostly

# 33. Cursor kya hai?
? ResultSet ko row-by-row process karna
? Memory intensive, avoid when possible

# 34. Trigger kya hai?
? Event (INSERT/UPDATE/DELETE) pe auto execute
? Audit logging, validation

# 35. Stored Procedure vs Function?
? SP = business logic, return 0 or more values
? Function = calculation, return single value

# 36. Primary Key vs Unique Key?
? PK = NOT NULL + UNIQUE (only 1 per table)
? UNIQUE = can be NULL (multiple per table)

# 37. Foreign Key?
? Column jo doosri table ki PK refer karta hai
? Referential integrity maintain karta hai

# 38. Cascade operations?
? ON DELETE CASCADE = parent delete — child delete
? ON UPDATE CASCADE = parent update — child update

# 39. Acid vs BASE?
? ACID = strong consistency (SQL)
? BASE = Basically Available, Soft state, Eventual consistency (NoSQL)

# 40. Sharding vs Replication?
? Sharding = data horizontal divide
? Replication = data copy on multiple servers

Networking — Top 10

# 41. OSI Model kitne layers?
? 7 layers: Application, Presentation, Session, Transport, Network, Data Link, Physical

# 42. TCP vs UDP?
? TCP = Reliable, connection-oriented, slow
? UDP = Unreliable, connectionless, fast

# 43. TCP 3-way handshake?
? SYN — SYN-ACK — ACK
? Connection establish hota hai

# 44. HTTP vs HTTPS?
? HTTP = Port 80, No encryption
? HTTPS = Port 443, SSL/TLS encryption

# 45. DNS kya hai?
? Domain Name System — domain — IP mapping
? UDP port 53

# 46. HTTP Status Codes?
? 200 OK, 301 Redirect, 404 Not Found, 500 Server Error

# 47. HTTP Methods?
? GET, POST, PUT, PATCH, DELETE

# 48. Cookie vs Session?
? Cookie = client-side (browser mein store)
? Session = server-side (server pe store)

# 49. REST API kya hai?
? Representational State Transfer
? Stateless, resource-based, HTTP methods use

# 50. Load Balancer kya hai?
? Traffic distribute karna multiple servers pe
? Round Robin, Least Connections, IP Hash algorithms
Quick Revision Strategy: 1. Pehle saare questions padho (15 min) 2. Jo nahi aata uska answer yaad karo 3. Apne words mein answer likho 4. Mock interview mein practice karo 5. Revision daily karo — spaced repetition

Exercise

Question: ACID ke 4 properties kya hain? (Full form)

Question: OSI Model ki 7 layers kya hain? (Kam se kam 4 batao)

Interview Tips

Course Complete!

Congratulations! CS Fundamentals course complete ho gaya. Ab interview ke liye ready ho — OS, DBMS, Networking sab clear hai!

Popular courses: Data Science Course in Lucknow · AI Course in Lucknow · Python Course in Lucknow · Power BI Course · Data Analytics Course