Os LDB July 2025
Os LDB July 2025
YouTube Channels:
Knowledge GATE (Sanchit Jain) & GATE Smasher (Varun Singla)
Project Ideas:
1. Mini Shell (Command Line Interpreter)
Develop a lightweight shell that supports basic commands, redirection, pipes, and background jobs. Students will
Learn:
o Process creation (fork, exec)
o Parsing and I/O redirection
o Signals and job control
o Tools/Languages: C, Unix/Linux
2. Inter-Process Communication System
Build a simple system where multiple processes communicate using pipes, shared memory, message queues,
or sockets.
o IPC mechanisms
o Process synchronization
o Producer-consumer or client-server models
o Tools/Languages: C/C++, Unix/Linux APIs
5. Mini OS Kernel
Write a tiny monolithic or microkernel from scratch that supports booting, basic I/O, task switching, and
memory handling.
o Kernel architecture
o Bootloaders (like GRUB)
o Low-level memory and I/O
o Tools/Languages: C, Assembly, QEMU emulator
Lec. Content Pre-Reading Context Setting / Detailed Delivery Thought- Post-Class Actual
No. Topics / Ques Teaching Strategy Approach (What & How Provoking Activities / Delivery
(Before Class) to Teach) Questions Readings / dates and
Assignments detailed
remarks
1-2 Understand the Read Book -Which OS you -Introduce computer If we remove the Write a short note
class and Galvin: page no have in your system components: operating system on "The Role of an
Context setting 4-46, laptop? Name any hardware, software, from a computer, Operating System"
five OS. users. can it still work?
YouTube videos: -Discuss the need for an
Introduction of Knowledge -Begin with operating system as an Why or why not? Research OS used
OS GATE (Sanchit relatable intermediary. in 3 different
Jain) & GATE scenarios: using a How a C program devices (PC,
Smasher (Varun mobile phone, Analogy: OS as a company is going to mobile, embedded
Singla withdrawing cash manager coordinating execute? system)
from an ATM, and resources.
What is a playing a game.
computer Show live demo: opening How does a
system? -What lies behind files, viewing processes, computer do
the scenes enabling etc. Multitask?
What happens these tasks?
when you turn Brief history of operating Why Does a
on your systems: punch cards to Program Crash?
computer? smartphones.
You have two
Discuss users and system Program Files
viewpoint of OS. folders: One
labeled
Discuss GUI/ CLI simply Program
concept of OS. Files and the
other labeled
Highlight Windows/ Program Files
Linux development in (x86). Why?
context of programing.
3-6 Operating Read Book Begin by Define OS and explain Why can't we use Create a
System Galvin: page no discussing various classification: Batch, a mobile OS on a comparison table
Classification, 55-95, scenarios: Time-Sharing, real-time medical of any 5 OS types
Structures and Unlocking a Distributed, Real-Time, device? with use-case and
system call. YouTube videos: Phone, ATM Cash Network, Mobile, example.
Knowledge Withdrawal, Using Embedded, etc. What limitations
GATE (Sanchit a Personal would arise if a Quiz: 10 MCQs on
Jain) & GATE Computer, Present table comparing classification and
Smasher (Varun University Lab, AI features, advantages, smartphone used real-world usage
Singla Workload / limitations, and examples a batch OS? of OS types.
Supercomputer.
Chapter on Comparison among Which type of Compare
“Types of OS” You are hungry different structures of OS Kernel is used in Monolithic and
from your and want food. and advantages/ windows? Microkernal.
course textbook The kitchen has disadvantages of each
(e.g., Galvin’s OS all the ingredients one. Why do
book) and chefs, but you Different structures of OS operating
such as Monolithic, systems provide
can't go in
Layered and Microkernal system calls
directly. So, what Discuss system call, how
do you do? instead of
it works in terms of user
allowing direct
mode and kernel mode.
access to
hardware
resources by user
programs?
7-9 Process Read Book Begin the Understand difference What is the use of Simulate a Process
Concept and Galvin: page no discussion with b/w program and scheduler in state Scheduler in
Process States 106-109, how a patient process? transition? Python or C.
enters a hospital,
YouTube videos: where they have Process concepts and PCB Why does a Write a short
Knowledge to go through and transition diagram process move report: What
GATE (Sanchit stages, starting like 5 and 7 state. from the happens during a
Jain) & GATE from registration 'Running' state to context switch and
Smasher (Varun to follow-up with Types of processes and the 'Ready' state count the number
Singla the doctor. schedulers. without of context switch
completing its that happened.
- execution?
How the scheduler works What would How can
in different states. happen if there corruption of a
were no ‘Waiting’ PCB affect system
Explain context switching state in the stability?
between processes with process life cycle
diagram. What role does
If a process is the PCB play in
How process stored in stuck in the enforcing process
memory. In different 'Waiting' state security and
states? indefinitely, what access control?
kind of problem
Difference between does it indicate?
thread and process.
Research and
describe how a
popular operating
system (Linux,
Windows, or
macOS)
implements CPU
scheduling.
Highlight the
algorithms used
and any special
features or
optimizations.
15- Process Read Galvin -Imagine a Start with introduction of What could go Implement the
21 Synchronization Book page no hospital with a process concurrency and wrong if two Producer-
257-272: single operation its conditions & processes access Consumer
theatre (shared challenges. a shared resource problem using
YouTube videos: resource):Multiple without semaphores. Test
Knowledge surgical teams Interprocess synchronization? different scenarios
GATE (Sanchit communication using Can you think of a and observe
(processes) may
Jain) & GATE Shared memory and real-world synchronization
Smasher (Varun
be scheduled, but message passing with example? effects.
Singla) only one team can examples
use the operation If mutual Discuss the
Principle of theatre at a time - Explain critical section exclusion ensures solution to
Concurrency, this represents the problem and its solutions. only one process prevent deadlock
Inter Process critical section. (Lock variable, petersons accesses the in Dining
Communication To ensure safety solution etc.) critical section, Philosopher
models and and efficiency, the why do we still problem?
Schemes, operation theatre Use of Semaphore for face issues like
multi process deadlock and Discuss some real-
Critical Section is locked during
surgery-no other synchronization and starvation? world systems
Problem, discussed solution of that resemble the
Semaphores, team can enter
until the ongoing some classical problems How does producer-
(Producer Consumer, process
Synchronization procedure is Reaser Write and Dining synchronization consumer
Hardware. completed. This Philosopher, etc) differ between relationship.
lock symbolizes single-core and
the multi-core Explain numerical
synchronization systems? example of the
mechanism. Reader-writer
problem using
semaphores with
-In modern
a bounded buffer
computing
systems, multiple
processes often
run concurrently
and may need to
access shared
resources such as
memory, files, or
devices. Without
proper
coordination, this
can lead to
inconsistent data,
race conditions,
and system
crashes.
Example of Race
Condition with
pseudo code
Module 2: Lecture Plan
Module Learning 1. Understand Deadlock and its Handling in Operating Systems.
Objectives 2. Understand Memory Management Techniques.
3. Apply Virtual Memory Concepts.
4. Analyze I/O Management and Disk Scheduling
5. Understand File System allocation and Management.
Lec. Content Pre-Reading Context Setting / Detailed Delivery Thought- Post-Class Activities / Actual
No. Topics / Ques Teaching Strategy Approach (What & Provoking Readings / Assignments Delivery
(Before Class) How to Teach) Questions dates and
detailed
remarks
1-4 Deadlock Read Book -Ask students: Introduce deadlock In what -A system has 3 processes
Galvin: page no “Have you ever and its necessary scenarios might and 4 instances of a
318-341, seen a program conditions. deadlock resource type. Each
hang or freeze?” prevention process can request up to
YouTube videos: “Can you think of Visualize and degrade overall 2 instances. Can deadlock
Knowledge reasons why a Analyze of Resource system occur? Justify your answer
GATE (Sanchit program might Allocation Graph throughput using the concept of safe
Jain) & GATE wait forever?” (RAG). more than state.
Smasher (Varun deadlock itself?
Singla This sparks Deadlock handling -Write a program that
curiosity and ties techniques Can a system be simulates resource
System model, new content to (Prevention, in a safe state allocation and implements
Deadlock existing Avoidance, and still the Banker’s Algorithm to
characterization knowledge. Detection, and experience check for safe states.
, Prevention, Recovery). deadlock?
Avoidance and -Use Analogies Explain. -Explain the trade-offs in
detection, 1) Traffic Gridlock: Explain about safe deadlock prevention vs.
Cars block each and unsafe states Why is it called detection
Recovery from
other in a circular using the Banker's the Banker's
deadlock, Algorithm. Algorithm? Is
Combined way, and no one the Banker's -Why can't deadlocks be
Approach. can move. Algorithm solved by just killing a
2) Bank ATM practical in real- process?
Scenario: Multiple time systems?
users holding
cards and waiting
for PIN machines.
-Imagine Process A
holds a printer and
waits for a
scanner, while
Process B holds
the scanner and
waits for the
printer. Neither
can proceed until
the other releases
its resource. This
creates a deadlock,
just like a standoff-
both are stuck
waiting forever,
blocking progress
in the system.
5- Memory Read Book -Use the hotel Introduction of How does Draw and explain the
10 Management Galvin: page no room analogy: logical and physical external structure of page tables
349-3483, Hotel = Main address space fragmentation and segment tables with
Memory (offset, page, frame). occur in examples.
YouTube videos: Guests = Processes variable
Knowledge Receptionist = partitions, and A system has a 32-bit
GATE (Sanchit Memory Manager logical address space and
Jain) & GATE Room allocation = Address mapping can it ever be uses paging with a page
Smasher (Varun Memory allocation (conversion of logical completely size of 4 KB. How many
Singla This helps to physical address). eliminated? bits are used for the page
students visualize number and how many for
Memory and its partitioning, In what the offset?
types, partitions, dynamic Memory Partition scenarios would
and allocation, with fixed and A system uses a two-level
segmentation
fragmentation. swapping, and variable size (First, paging scheme. The logical
fragmentation. best, and worst fit).
be more address is 32 bits, and the
Concepts of -Start with the advantageous page size is 4 KB. If the
paging and memory hierarchy Visualization and than paging outer page table has 1024
segmentation. and gradually analysis of despite its entries, how many bits are
progress to fragmentation, fragmentation used for each level of the
complex Paging, TLB, risks? page table and the offset?
techniques: segmentation and
1) Memory paged segmentation How does
hierarchy: with examples. paged
Registers, cache, segmentation
RAM, disk balance
2) Address flexibility and
binding: Compile- complexity, and
time, load-time,
why is it
run-time
3) Logical vs
preferred in
Physical modern
addresses systems?
4) Contiguous
allocation Working of
5) Paging and Translation
segmentation Lookaside
6) Virtual Buffer (TLB),
memory and and why is it
demand paging important in
Use step-by-step memory
illustrations aid systems?
comprehension.
11- Virtual Read Book Imagine your Concept of Virtual Why is virtual Among FIFO, LRU, and
13 Memory Galvin: page no computer’s RAM is Memory and its memory Optimal page replacement
389-436, limited, but you importance essential in algorithms, which one
want to run modern balances performance and
YouTube videos: multiple large Need of Demand computing complexity best in real-
Knowledge programs paging with page systems, world systems? Why?
GATE (Sanchit simultaneously. fault and page hit especially when
Jain) & GATE How does the concept. physical RAM is
Smasher (Varun system manage large? Page Reference String:
Singla memory efficiently Detailed discussion 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5
by loading only the on Page replacement Why does Calculate page faults using
Demand paging, necessary parts of algorithms (FIFO, Belady’s FIFO, MRU, and LIFO for 3-
Page programs on LRU, Optimal) Anomaly occur and 4-page frames
replacement demand? in FIFO but not
algorithms, Discussion on in LRU or
Locality of When you open important terms Optimal page
reference. multiple apps on such as Thrashing, replacement
your laptop - web Locality of reference algorithms?
browser, music
player, and video Can Adding
editor—your More RAM
system uses virtual Completely
memory to load Eliminate
only necessary Thrashing?
parts of each app
into RAM. Demand
paging and smart
page replacement
keep everything
running smoothly,
preventing
slowdowns caused
by constantly
swapping data in
and out.
14- I/O Read Book When you watch a Types of I/O devices Which disk A disk has 200 tracks (0–
16 Management Galvin: page no video, type, and and characteristics. scheduling 199). The disk head is at
and Disk 489-521, download a file at algorithm 100, moving towards 0.
Scheduling the same time, Architecture of Disk minimizes seek Request queue: 55, 58, 39,
YouTube videos: your computer and its terminology. time most 18, 90, 160, 150, 38, 184.
Knowledge manages many I/O effectively in a Calculate total seek
GATE (Sanchit tasks. It uses Concept and highly loaded distance using FCFS, SSTF,
Jain) & GATE buffers to hold numerical on disk system? SCAN, C-SCAN, LOOK and
Smasher (Varun data temporarily scheduling algorithm C-LOOK.
Singla and schedules disk (FCFS, SSTF, SCAN, C- How does SSTF
access smartly to SCAN, LOOK, C- potentially lead A hard disk has 5 platters,
I/O avoid delays. This LOOK). to starvation in each with 2 surfaces. Each
Management I/O management disk scheduling? surface has 1,000 tracks,
and Disk helps everything each track has 100 sectors,
Scheduling, I/O run smoothly In what and each sector holds 512
buffering, Disk without slowing scenario would bytes. Calculate the total
storage. down your system. C-SCAN disk capacity in gigabytes
outperform (GB).
I/O management is SCAN in terms
like a restaurant of response A disk with 4 platters has 2
kitchen handling uniformity? read/write heads per
multiple orders. platter and spins at 7,200
Buffers keep How does LOOK RPM. If each track contains
dishes warm improve upon 500 sectors and each
temporarily, while SCAN in terms sector is 512 bytes,
disk scheduling of head estimate the total storage
ensures meals movement capacity, assuming 1,024
(data) are served efficiency? tracks per surface.
efficiently without
delays, keeping Why might an
everything OS choose C-
running smoothly. LOOK over
SCAN even
though both
provide similar
seek
optimizations?
17- File System Read Book -Begin with Real- Concept of files and -Can a file exist-Create a table comparing
20 Galvin: page no Life Analogy directories. without a name Contiguous, Linked, and
529-582, Use the example of in a file system?Indexed allocation based
a library: File allocation on:
YouTube videos: Books = Files methods -Why is file • Speed of access
Knowledge Shelves = (Contiguous, Linked, metadata as • Disk space
GATE (Sanchit Directories Index allocation). important as the utilization
Jain) & GATE Index/Library file's actual • Support for
Smasher (Varun Catalog = File Free space data? random/sequential
Singla Allocation Table management access
(FAT) (Bitmap, Link list, -Why is indexed • Fragmentation
File concept, File This makes Grouping, Counting) file access type
organization abstract ideas better than (internal/external)
and access concrete and sequential • Implementation
mechanism, File relatable. access for large complexity
directories, File - Define the databases?
allocation Basics -Why does using a bitmap
methods, Free Introduce key -What happens for free space tracking
space concepts: when a file is scale better than a linked
management. 1) Files, deleted? list?
directories, path
names
2) File attributes -Why are -How can inefficient free
and metadata different file space management
3) Operations on systems (like degrade file system
files (create, FAT, NTFS, ext4, performance?
delete, read, write, etc.) needed?
etc.)