CS Fundamentals Interview Questions: DBMS, OS and More
Last updated 2026-11-19
Technical interviews for freshers rarely stop at coding. Interviewers move to the subjects you studied for your degree: database management systems, operating systems, computer networks and object-oriented programming. These subjects are tested because they explain how real systems behave, and because they are a quick way to tell whether a candidate understood the course or only passed it.
The guides in this section take each subject and, where it is large, split it into subtopics such as normalisation and transactions in DBMS, or scheduling and deadlocks in operating systems. Each question has a worked answer written the way you could say it in an interview: a definition, a reason it matters and a short example.
How to answer a fundamentals question
Use a three-part structure: say what it is in one sentence, say why it exists or what problem it solves, then give a short example. For instance, a deadlock is a state where processes wait on each other forever; it arises when four conditions hold together; and a classic example is two threads each holding one lock and wanting the other. That structure sounds confident and leaves the interviewer a natural follow-up to ask.
The subjects that come up most
- DBMS: keys, normalisation, transactions, ACID, indexing and SQL queries.
- Operating systems: processes and threads, scheduling, memory management, synchronisation and deadlocks.
- Computer networks: the layered models, TCP versus UDP, HTTP, DNS and what happens when you type a URL.
- Object-oriented programming: the four pillars, with examples from the language on your resume.
Prefer understanding to definitions
Textbook definitions are a starting point, but follow-up questions test understanding. If you say that an index speeds up queries, expect to be asked what it costs on writes and when it would not help. When you practise, ask yourself the follow-up before reading the worked answer.
Pair theory with something you can run
Where possible, try the idea on a real system. Write a small SQL schema and run a join, observe a query plan, use a command line tool to inspect a connection, or write two threads that deadlock on purpose. Hands-on memory is more durable than reading, and it gives you real examples to mention.
Where this fits in your preparation
Fundamentals usually come after the coding round in a typical technical interview, so they are where a borderline candidate is decided. Cover them alongside DSA practice and the language guides, and revisit them in the final week before any interview.
All 50 guides in this section
- Abstraction and Encapsulation Interview QuestionsAbstraction and encapsulation interview questions with code: data hiding, immutability, defensive copies, abstract class vs interface and a payment example.
- Cache Memory and Computer Organization Interview Questions with NumericalsCache memory and computer organization interview questions: direct, set-associative mapping, address bits, AMAT, hit ratio, write policies and DMA.
- Caching Interview Questions and AnswersCaching interview questions with worked answers: cache-aside, write-through, LRU vs LFU, invalidation, stampede, penetration, avalanche and hit-ratio maths.
- Cloud Computing Basics Interview Questions with AnswersCloud computing interview questions for freshers: IaaS, PaaS, SaaS, deployment models, virtualization, scaling, availability numericals, serverless and IAM.
- Computer Architecture Interview Questions with NumericalsComputer architecture interview questions: Von Neumann vs Harvard, RISC vs CISC, pipelining speedup, hazards, CPI and Amdahl numericals, IEEE 754.
- Computer Networks Interview Questions with Worked Answers and NumericalsComputer networks interview questions: devices, topologies, switching, ARP, NAT, MAC vs IP, delay and stop-and-wait numericals with worked answers.
- CPU Scheduling Interview Questions with Gantt Chart NumericalsCPU scheduling interview questions with worked Gantt charts for FCFS, SJF, SRTF, round robin and priority, plus average waiting time calculations.
- Database Indexing Interview QuestionsIndexing interview questions with worked answers: B+ tree fan-out, composite index order, covering indexes, hash indexes and why an index is ignored.
- DBMS Concurrency Control Interview QuestionsConcurrency control interview questions with worked examples: 2PL, strict 2PL, deadlock handling, timestamp ordering, MVCC and multiple granularity locking.
- DBMS Interview Questions and AnswersFourteen DBMS interview questions with worked answers: schemas, SQL command types, joins, views, triggers, second-highest salary and deadlocks.
- DBMS Keys Interview QuestionsDBMS keys interview questions with worked examples: super key, candidate key, primary key, foreign key actions and counting keys from dependencies.
- Deadlock Interview Questions with Banker's Algorithm Worked ExampleDeadlock interview questions with answers: four conditions, prevention, avoidance, detection, Banker's algorithm worked example and a Java deadlock demo.
- Design Patterns Interview Questions with CodeDesign patterns interview questions with Java and Python code: thread-safe singleton, factory, builder, decorator, observer, strategy and when to use each.
- Distributed Systems Interview QuestionsDistributed systems interview questions with worked examples: CAP, consistency models, Raft, quorums, 2PC, Lamport and vector clocks, replication.
- DNS Interview Questions: Resolution, Record Types, Caching and TroubleshootingDNS interview questions with answers: resolution steps, record types, recursive vs iterative, TTL caching, dig output, DNSSEC, reverse lookup and failures.
- ER Model Interview QuestionsER model interview questions with worked mapping to tables: cardinality, weak entities, specialization, aggregation and a hospital design example.
- File System Interview Questions: Inodes, Allocation and Disk SchedulingFile system interview questions with answers: inode structure, allocation methods, hard vs soft links, journaling, RAID and disk scheduling numericals.
- Git Interview Questions and Answers with CommandsGit interview questions with commands: staging area, merge vs rebase, reset vs revert, stash, cherry-pick, conflicts, reflog, bisect and undoing mistakes.
- HTTP and HTTPS Interview Questions: Methods, Status Codes, TLS and CachingHTTP and HTTPS interview questions with answers: methods, status codes, HTTP/1.1 vs 2 vs 3, cookies, caching, CORS, the TLS handshake and page-load timing.
- Inheritance and Polymorphism Interview QuestionsInheritance and polymorphism interview questions with output-prediction code: overriding rules, constructor order, field hiding, MRO and Liskov substitution.
- IP Addressing and Subnetting Interview Questions with Worked SolutionsIP addressing and subnetting interview questions with worked solutions: CIDR, subnet masks, VLSM, supernetting, host counts, IPv6 and DHCP.
- Linux Commands Interview Questions with ExamplesLinux commands interview questions with working examples: grep, find, awk, sed, xargs, sort, uniq, tar, ps, kill, chmod, df, du and pipelines.
- Linux Interview Questions and Answers: Concepts, Permissions and ProcessesLinux interview questions with answers: boot process, file system hierarchy, permissions and umask, processes, signals, systemd, swap and load average.
- Load Balancing Interview Questions and AnswersLoad balancing interview questions with worked examples: L4 vs L7, round robin, least connections, consistent hashing, health checks, sticky sessions.
- Low-Level Design Interview Questions with CodeLow-level design interview questions with class designs and code: parking lot, LRU cache, tic-tac-toe, vending machine, elevator, seat booking and Splitwise.
- Memory Management Interview Questions with NumericalsMemory management interview questions: fragmentation, first fit vs best fit numerical, segmentation address translation, buddy system and swapping.
- Message Queue and Kafka Interview QuestionsMessage queue and Kafka interview questions: partitions, consumer groups, acks and ISR, delivery semantics, ordering, RabbitMQ exchanges and partition sizing.
- Microservices Interview Questions and AnswersMicroservices interview questions with worked answers: service boundaries, saga, circuit breaker, outbox, API gateway, discovery and data per service.
- MongoDB Interview Questions and AnswersMongoDB interview questions with working queries: CRUD, aggregation pipeline, indexes, embedding vs referencing, replica sets, sharding and transactions.
- Network Security Interview Questions: Cryptography, Firewalls and AttacksNetwork security interview questions with answers: CIA triad, encryption, hashing, firewalls, VPN, common attacks, Diffie-Hellman and RSA numericals.
- Normalization Interview Questions with Worked ExamplesNormalization interview questions with worked decompositions: 1NF to BCNF, attribute closure, lossless join, dependency preservation and 4NF.
- NoSQL Interview Questions and AnswersNoSQL interview questions with worked answers: CAP theorem, BASE, document vs key-value vs wide-column, sharding, quorum reads and when to pick NoSQL.
- OOPs Interview Questions and AnswersFourteen OOPs interview questions with code: four pillars, overloading vs overriding, abstract class vs interface, composition, diamond problem and vtables.
- Operating Systems Interview Questions with Worked AnswersOperating systems interview questions for freshers: kernel, system calls, processes, memory, deadlock and effective access time, with worked answers.
- OSI Model Interview Questions: Layers, PDUs, Devices and EncapsulationOSI model interview questions with answers: seven layers, PDUs, devices per layer, encapsulation overhead calculation, OSI vs TCP/IP and troubleshooting.
- Paging and Virtual Memory Interview Questions with NumericalsPaging and virtual memory interview questions with FIFO, LRU and optimal page-fault counts, Belady anomaly, TLB access time and page-table size.
- Process and Thread Interview Questions with fork() Output ProblemsProcess and thread interview questions: states, PCB, fork output counts, IPC, user vs kernel threads, zombies and Amdahl law, with worked answers.
- Process Synchronization Interview Questions: Semaphores, Mutex and Classic ProblemsProcess synchronization interview questions with answers: critical section, Peterson, semaphores, mutex, producer-consumer, readers-writers and code.
- Redis Interview Questions and AnswersRedis interview questions with commands: data structures, persistence, eviction, caching patterns, distributed locks, replication and cluster hash slots.
- REST API Interview Questions and AnswersREST API interview questions with working code: HTTP methods, idempotency, status codes, PUT vs PATCH, versioning, pagination, auth and REST vs GraphQL.
- Routing Protocols Interview Questions: RIP, OSPF, BGP and Shortest Path ExamplesRouting protocols interview questions: distance vector vs link state, RIP, OSPF, BGP, Dijkstra and Bellman-Ford worked examples and longest prefix match.
- SDLC and Agile Interview QuestionsSDLC and Agile interview questions with worked examples: waterfall vs agile, Scrum roles and events, user stories, velocity, Kanban, CI/CD and testing levels.
- Shell Scripting Interview Questions with Bash ExamplesBash and shell scripting interview questions with working scripts: variables, quoting, loops, functions, exit codes, set -euo pipefail, trap and getopts.
- SOLID Principles Interview Questions with ExamplesSOLID principles interview questions with before-and-after Java code: SRP, OCP, LSP, ISP, DIP, dependency injection and when SOLID goes too far.
- System Design Interview Questions for FreshersSystem design interview questions for freshers: scaling, latency vs throughput, what happens on a URL request, results-day load and a simple chat app.
- System Design Interview Questions with Worked DesignsSystem design interview questions with worked designs and numbers: URL shortener, rate limiter, news feed, chat, unique IDs, autocomplete and trade-offs.
- TCP vs UDP Interview Questions with Socket Code and NumericalsTCP vs UDP interview questions: differences, headers, when to use each, QUIC, bandwidth-delay product, window throughput and Python socket examples.
- TCP/IP Interview Questions: Handshake, Congestion Control and NumericalsTCP/IP interview questions with answers: three-way handshake, sequence numbers, congestion control, fragmentation numerical, RTT estimation and flags.
- Transactions and ACID Interview QuestionsDBMS transaction and ACID interview questions with worked schedules: isolation levels, serializability, recoverability, logging and recovery.
- What Happens When You Type a URL in the Browser: The Complete AnswerWhat happens when you type a URL in a browser: parsing, DNS, ARP, TCP, TLS, HTTP, server, rendering, with timing numbers and interview follow-ups.
Frequently asked questions
Which CS subjects matter most for placements?
DBMS, operating systems, computer networks and object-oriented programming appear most often, with DBMS and SQL being the most reliably tested.
How detailed should my answers be?
Give a one-sentence definition, the reason it exists and one example. Stop there and let the interviewer ask for more.
Do I need to memorise every normal form?
Know the first three normal forms and BCNF well enough to explain with a small table. Higher forms are rarely asked at fresher level.
Are networks questions asked for software roles?
Yes, usually at a basic level such as TCP versus UDP, HTTP and what happens when you open a web page. Know those thoroughly.