Operating Systems, Databases, Computer Networks, Compiler Design, and Theory of Computation — explained visually, built deeply, by Learn with LSGP.
Every abstraction in modern software is built on top of a core CS subject. When your React app slows to a crawl, you debug it with knowledge of how browsers handle the JavaScript event loop — Operating Systems. When your SQL query takes 30 seconds, you fix it with knowledge of B-tree indexes — DBMS. When a packet drops during a video call, you understand why using knowledge of TCP congestion control — Computer Networks. Core subjects are not academic exercises. They are the conceptual infrastructure beneath every tool and framework you will ever use.
In India, core subjects are also the primary focus of GATE CS, university examinations, and technical interviews at product companies. A student who deeply understands OS scheduling, relational algebra, and finite automata can reason through unfamiliar problems from first principles — the most prized skill in any engineering interview. Learn with LSGP treats these five subjects as the foundation of everything else in the CS curriculum.
OS, DBMS, and Networks appear in every SDE interview at top product companies. TOC and compiler concepts appear at Google, Microsoft, and systems roles.
Together, these five subjects carry 50–60 marks out of 100 in GATE CS. Mastering them alone can secure a strong rank.
Production debugging, database optimisation, network tuning, and compiler toolchains all require applied core CS knowledge.
Core subjects teach you to reason from first principles — the skill that distinguishes senior engineers from juniors regardless of experience level.
An Operating System (OS) is the master program that manages all hardware and software resources on a computer. It acts as the middleman between your applications and the bare hardware — so when you write open("file.txt") in Python, it is the OS that actually talks to the disk controller. Understanding how an OS works transforms you from a developer who uses abstractions to an engineer who understands what lies beneath them.
The OS scheduler decides which process gets the CPU at any moment. Below is a Round Robin schedule (time quantum = 2) for four processes: P1(burst=4), P2(burst=3), P3(burst=5), P4(burst=2).
PCB structure, context switching, process vs thread, user threads vs kernel threads, fork() and exec().
FCFS, SJF, SRTF, Round Robin, Priority scheduling. Calculate waiting time, turnaround time, CPU utilisation.
Race conditions, critical sections, semaphores, mutexes, monitors. Producer-consumer, readers-writers, dining philosophers.
Four conditions (mutual exclusion, hold & wait, no preemption, circular wait). Banker's algorithm. Detection & recovery.
Paging, segmentation, page tables, TLB, virtual memory, demand paging, page replacement (FIFO, LRU, Optimal).
Inode structure, allocation methods (contiguous, linked, indexed), disk scheduling (SCAN, C-SCAN, SSTF).
A Database Management System is software that manages organised collections of data, providing interfaces for storing, retrieving, and manipulating it reliably. Every application that stores data — banking apps, social networks, government portals, EdTech platforms like Learn with LSGP — uses a database. Understanding DBMS teaches you not just how to write SQL, but why relational databases are designed the way they are: to eliminate redundancy, maintain consistency, and support concurrent access at scale.
| Normal Form | Rule | Violation Example |
|---|---|---|
| 1NF | All attributes are atomic; no repeating groups | Storing "Math, Science" in one cell |
| 2NF | 1NF + no partial dependency on composite PK | StudentName → StudentID in a table keyed (StudentID, CourseID) |
| 3NF | 2NF + no transitive dependency | ZipCode → City when PK is StudentID |
| BCNF | Every determinant is a candidate key (stricter than 3NF) | Non-key attribute determining part of a candidate key |
-- Find students enrolled in more than 2 courses SELECT s.name, COUNT(e.course_id) AS total FROM students s JOIN enrolments e ON s.id = e.student_id GROUP BY s.id, s.name HAVING COUNT(e.course_id) > 2; -- Find courses with no enrolments (left join pattern) SELECT c.title FROM courses c LEFT JOIN enrolments e ON c.id = e.course_id WHERE e.course_id IS NULL; -- Relational algebra: π(name)(σ(level='beginner')(courses)) -- Same as: SELECT name FROM courses WHERE level = 'beginner';
Computer Networks is the study of how data moves between computers — from the physical signals on a wire to the protocols that ensure your video call does not turn into garbled noise. Every piece of software you write that communicates with another machine, an API, a database, or the internet — uses the protocols and principles you study here. Understanding networks makes you a better backend developer, a better systems engineer, and a much more effective debugger of production issues.
Hover over each layer to highlight it and see which protocols operate there.
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Guaranteed delivery, ordering, retransmission | Best-effort, no guarantee |
| Speed | Slower (overhead for reliability) | Faster (no overhead) |
| Use case | HTTP, email, file transfer, SSH | DNS, video streaming, gaming, VoIP |
| Header size | 20–60 bytes | 8 bytes |
| Flow control | Yes (sliding window) | No |
A compiler translates source code written in a high-level language (like C or Java) into machine code that the CPU can execute. The process is not a single step — it is a pipeline of six distinct phases, each transforming the program into a progressively lower-level representation. Understanding compilers reveals what is happening when you write int x = a + b * 2; — how the compiler parses it, checks types, optimises it, and ultimately generates the machine instructions that run on your CPU.
Parses left-to-right, leftmost derivation. Uses First and Follow sets to build a predictive parsing table. No left recursion allowed. Used in recursive descent parsers.
More powerful than LL. SLR(1) → LALR(1) → CLR(1) in increasing power. Uses shift-reduce parsing. LALR(1) is the most widely used — it's what yacc/bison generates.
Theory of Computation (TOC) answers the most fundamental question in computer science: what can a computer compute, and what are its fundamental limits? This is not about the speed of your laptop or the size of your RAM — it is about what is theoretically computable at all, regardless of resources. TOC is the most abstract of the core subjects, but also the most intellectually beautiful. Its results — like the undecidability of the Halting Problem — are among the deepest theorems in all of mathematics.
| Problem | Decidable? | Why |
|---|---|---|
| Does DFA M accept string w? | ✅ Yes | Simulate M on w — always terminates |
| Is regular language L empty? | ✅ Yes | Check if any state is reachable from start |
| Does CFG G generate any string? | ✅ Yes | Check if start symbol can derive terminal strings |
| Halting Problem: Does TM M halt on input w? | ❌ No | Proof by diagonalisation (Turing 1936) |
| Post Correspondence Problem | ❌ No | Reduction from Halting Problem |
| Is TM M's language empty? | ❌ No | Reduction from Halting Problem |
Core CS subjects are best studied in a specific order that builds on conceptual dependencies. Learn with LSGP recommends the sequence below for students targeting GATE, university examinations, or technical interviews simultaneously.
After studying a topic, close the book and explain it aloud as if teaching a peer. Gaps in your explanation reveal gaps in understanding.
Before reading about OS paging or network encapsulation, try to draw the diagram from memory. The mismatch between your sketch and reality is where learning happens.
After finishing each sub-topic, immediately solve GATE PYQs on it. Do not wait until the whole subject is done. Feedback should be immediate.
Every wrong answer goes into a log with the correct concept and approach. Review the log every Sunday. This is how patterns get internalised.
Draw process state diagrams, OSI stacks, compilation flowcharts, and ER diagrams by hand. Hand-drawn is better than reading — it forces active engagement.
Revisit completed topics weekly using flashcards or quick formula reviews. Memory decays — scheduled review keeps it sharp without full re-study.