CS Fundamentals (OS, Networks, DBMS) interview questions

The theory that written tests and campus interviews love: processes and threads, memory, deadlocks, OSI/TCP, DNS, ACID, normalisation and design patterns.

Readiness: 0 of 33 nailed

How to use this page: 1. Read a question2. Type your answer3. Check with AI4. Open the model answer5. Timed drill when you’re 70% ready

Operating systems

FoundationConcept

What is the difference between a process and a thread?

JuniorConcept

What is a deadlock? What are the four conditions for it?

FoundationConcept

Stack vs heap memory?

Mid-levelConcept

What is virtual memory and paging?

JuniorConcept

Name CPU scheduling algorithms and their trade-offs.

Mid-levelConcept

Mutex vs semaphore?

JuniorConcept

What is a race condition? Give a real example.

JuniorConcept

What is caching in a CPU and memory hierarchy sense?

JuniorConcept

Concurrency vs parallelism?

Networking

FoundationConcept

Explain the OSI model layers. Where do HTTP, TCP and IP sit?

FoundationConcept

TCP vs UDP?

JuniorConcept

Explain the TCP three-way handshake.

JuniorConcept

How does DNS work?

FoundationConcept

HTTP vs HTTPS? How does TLS work at a high level?

JuniorConcept

What is an IP address, a port, and the difference between IPv4 and IPv6?

JuniorConcept

What does a load balancer do?

FoundationConcept

What is a CDN?

Databases

FoundationConcept

What are the ACID properties?

JuniorConcept

Explain 1NF, 2NF and 3NF with an example.

FoundationConcept

Primary key vs foreign key vs unique key vs candidate key?

Mid-levelConcept

Clustered vs non-clustered index?

JuniorConcept

Name the main types of NoSQL databases.

Design patterns

JuniorConcept

Explain Singleton, Factory and Observer patterns with examples.

Software engineering

FoundationConcept

What is SDLC? Waterfall vs Agile?

FoundationConcept

Compiled vs interpreted languages? What are the JDK, JRE and JVM?

OOP

FoundationConcept

Method overloading vs overriding?

FoundationConcept

Encapsulation vs abstraction: what’s the difference?

JuniorConcept

Why do people say “prefer composition over inheritance”?

Complexity

JuniorConcept

What is space complexity? Give examples.

Data structures

JuniorConcept

How does a hash table work? What is a collision?

FoundationConcept

Array vs linked list?

JuniorConcept

What is a heap / priority queue used for?

FoundationConcept

Tree vs graph?

Also prepare