Operating System (IOPS332C, 2-1-1)


AUTUMN 2022-2023
Lecture: Thursday (9:00 AM - 11:00 AM); Tut: Wednesday (3:00 PM - 5:00PM); Lab: Tuesday (3:00 PM - 5:00 PM)





Course Objective:

This course is primarily meant to teach undergraduate students the design and services provided by an operating system. It will help them understand system calls, processes, synchronization and scheduling. It will discuss approaches to memory management and organization of file systems.

Course Outline:

Component Unit Topics
Component 1 Unit 1 : Introduction and System Calls OS Basics - Definition, Operating Systems as resource manager, Evolution of OS, Structural overview,Types of OS System Calls, Types of System Call, Hardware requirements: protection, context switching, privileged mode;
Process Concepts; Process Concepts : Process, Operation on Process, system calls for process operations
Threads : Overview, Multithreading Models, Threads and their Management;
Component 1 Unit 2: Process Management CPU Scheduling : Scheduling Criteria, Scheduling Algorithms, Multiple-Processor Scheduling
Interprocess Communication : Concept of shared memory, message passing, pipes
Process Synchronization : The Critical-Section Problem, Peterson's Solution, Synchronization Hardware, Monitors, Semaphores, Classic Problems of Synchronization
Deadlocks : System Model, Dynamic Resource Allocation, Deadlock Characterization, Methods for Handling Deadlocks, Deadlock Prevention, Deadlock Avoidance, Deadlock Detection, Recovery From Deadlock
Component 2 Unit 1 : Memory Management Main Memory Basics, Swapping, Contiguous Memory Allocation, Paging, Structure of the Page Table, Segmentation, Basics of Virtual Memory, Demand Paging, Page Replacement, Allocation of Frames, Thrashing
Component 2 Unit 2: File Management Storage Management : Mass-Storage Structure, Overview of Mass-Storage, Disk Scheduling, Disk Management, Design of IO systems
File Management : File Concept, Protection, Access Methods, Directory Structure, File-System Mounting, File Sharing, File-System Structure, File-System Implementation, Directory Implementation, Allocation Methods,

The entire course will be based on the xv6 operating system (a teaching operating system developed in the summer of 2006 for MIT's operating systems course)
The xv6 weblink is available at : https://pdos.csail.mit.edu/6.828/2014/xv6.html





1.      Abraham Silberschatz Peter B. Galvin and Greg Gagne, Operating System Concepts, Wiley 8th Edition, 2008. [Slides Available Here]

2.      Garry. J. Nutt, Operating Systems: A Modern Perspective, Addison-Wesley

3.      Andrew S. Tanenbaum and Herbert Bros, Modern Operating Systems (4th Edition), Pearson

4.      William Stallings , Operating Systems: Internals and Design Principles, Prentice Hall of India

5.      D. M. Dhamdhere , Operating Systems: A Concept-Based Approach, Tata McGraw-Hill

5.      Russ Cox, Frans Kaashoek, Robert Morris , xv6: a simple, Unix-like teaching operating system [Download]





Important Instructions:

1.         The course will be conducted in off-line mode. Lectures will be deliverd using chalk-board/slide presentation. All announcements and notifications related to the course will be made available via Google classroom page for the course. A Google classroom for the Operating System course has been created and students are expected to register themselves in order to receive updates regarding the course, notifications and important links.

2.         Official slide sets and miscellaneous study materials from some of the main text books will be uploaded on the web site on a regular basis.

3.         Every student is expected to have access to at least one of the reference books mentioned above-.

4.         Attendance in the classes is mandatory. If the attendance of a student falls below 75%, he/she may will be dropped from the course after Component 2

5.         The course will consist of take-home assignments and laboratory assignments, which has to be done very seriously. If a student does not submit the assignments, his/her grade will remain as incomplete. In addition a short quiz will be conducted at the end of each lecture.

6.         Grading Policy :

o   30%: Component 1 - Closed book exam (7.5%); Evaluation of Home-Work assignments (7.5%); Weekly Viva (5%) and Evaluation of Lab assignment in the form of demo and viva (10%)

o   30%: Component 1 - Closed book exam (7.5%); Evaluation of Home-Work assignments (7.5%); Weekly Viva (5%) and Evaluation of Lab assignment in the form of demo and viva (10%)

o   40%: Component 3 - Closed book exam (10%); Evaluation of Home-Work assignments and lab assignments(10%); Project evaluation (20%)

7.         Take-home assignments : They will be assigned at the beginning of a module (announcements will be made on the course web-site every week). These assignments will not only help you in development of an in-depth idea of each topic of the course but will also serve to prepare for your written examinations.
There will be two kinds of take home assignments :
(i) Homework assignments - To be done individually. These assignments need not be submitted but it is expected that the students complete them in order to have better understanding of the concepts covered in lecture sessions. Interact with your TAs during tutorial sessions to clear your doubts regarding the homework assignments.

(ii) Group Assignments - To be done in groups of four (max). These problems will be more harder problems involving rigorous mathematical/analytical treatment or implementation based assignments. These assignments which have to be completed within a given deadline and will be evaluated in the third (C3) component.

8.         Tutorial Classes : The tutorial classes scheduled every week will have a dual role in the course. First they will serve as doubt clearing sessions where the TAs will interact with the students to clear their doubts and discuss the homework assignments. The second purpose of the tutorial classes would be to assess the understanding of the concepts through quiz/viva conducted on-line.

9.         The lab classes will mainly consist of implementation of operating sytsem concepts discussed in class and the assignments covered in tutorial sessions. Students will also perform hand on with the xv6 operating system Lab Page of the course website


Interesting Links

1.         The UNIX Operating System, AT&T Archives, at YouTube

2.         The UNIX Time-Sharing System, Dennis M. Ritchie and Ken L. Thompson, Bell System Technical Journal 57(6)

3.         A Narrative History of BSD, Kirk McKusick, at YouTube




Lecture Slides:

Sl. No.


Practice Problems (Homework)


Helpful Resources



[ Slides ]

[ Video Lecture : Introduction to Operating Systems (New) ]

[ Video Lecture : Introduction (Old) ]

Homework Set 1


common.h mem.c cpu.c

C programming environment on UNIX systems

File Handling in C







Fundamental Concepts : System Calls, Booting, Interrupts

[ Slides ]

[ Notes ]

[ Video Lecture : Fundamental Concepts I (New) ]

[ Video Lecture Part 1 (Old) ]

[ Video Lecture Part 2 (Old) ]

Homework Set 2

[ Tutorial Video on UNIX Fundamentals]

common.h mem.c cpu.c

va.c hello_cpu_bound.c hello_io_bound.c




simulating "ls" command

Unix Time Sharing System

Unix System Calls

Intro to xv6 System Calls


Process Management

[ Slides ]

[ Video Lecture ]

[ Tutorial Video : Introducing Process]

Operating System :Three Easy Pieces (Process)

Process Managment in xv6


Working with Process Management Interfaces (in UNIX)

[ Slides ]

[ Video Lecture ]

Homework Set 3

Coding Assignments on Process Management


[ Tutorial Video : System Calls for Process Management in UNIX ]


fork_1.c fork_2.c multiple_fork.c fork_wait.c fork_execute.c





Operating System :Three Easy Pieces (Process API)


CPU Scheduling I

[ Slides ]

[ Video Lecture ]

CPU Scheduling II

[ Slides ]

[ Video Lecture ]

Homework Set 4

Coding Assignments on Process Scheduling



SJF SJF Preemptive

Round Robin

Operating System :Three Easy Pieces (Process Scheduling)



[ Slides ]

[ Video Lecture ]


thread_example1 thread_example2

thread_example3 thread_example4




POSIX Thread Programming : A Tutorial


Inter Process Communication

[ Slides ]

[ Video Lecture ]

Shared memory usage example

Shared memory usage: server_code

Shared memory usage: client_code

Using Pipe- I

Using Pipe - II

Linux IPC Mechanism : A Tutorial


Process Synchonization I : Concurrency


[ Video Lecture : Process Synchronization I ]

[ Video Lecture : Process Synchronization II ]



Lamport's Bakery Algorithm

Notes - Locks (Operating Systems: Three Easy Pieces)


Process Synchonization II : Conditional Variables, Semaphores, Synchronization Problems


[ Video Lecture : Process Synchronization III ]

[ Video Lecture : Process Synchronization IV ]

Homework Set 5 : Problems on Synchronization

Tut : POSIX Semaphores

Producer-Consumer Problem uisng Semaphore 1

Producer-Consumer Problem uisng Semaphore 2

Notes - Conditional Variables (Operating Systems: Three Easy Pieces)

Notes - Semaphores (Operating Systems: Three Easy Pieces)

Little Book of Semaphores (Contains many Synchronization problems)

Notes on Conditional Variables and Semaphores by Prof.M. Vutukuru, Dept. of CSE, IIT Bombay]








Memory Management


[ Video Lecture : Memory Management I ]

Homework Set 6 : Problems on Memory Management

Notes - Virtual Memory (Operating Systems: Three Easy Pieces)

Notes - Virtual Memory API (Operating Systems: Three Easy Pieces)

Notes - Address Translation (Operating Systems: Three Easy Pieces)

Notes - Segmentation (Operating Systems: Three Easy Pieces)

Notes - Paging (Operating Systems: Three Easy Pieces)

Notes - TLBs (Operating Systems: Three Easy Pieces)


Demand Paging

[ Slides ]

[ Video Lecture : Memory Management II]

Notes - Demand Paging I (Operating Systems: Three Easy Pieces)

Notes - Demand Paging II (Operating Systems: Three Easy Pieces)



[Slides : Paul Krzyzanowski, Rutgers University Rutgers University]

[ Video Lecture : Devices]

Notes - I/O Management (Operating Systems: Three Easy Pieces)

Hard Disk Drives

Notes - Hard Disk Drives (Operating Systems: Three Easy Pieces)


Files and Directories

[Slides : Files and Directories by Paul Krzyzanowski, Rutgers University Rutgers University]

[ Video Lecture : Files and Directories]

[ Video Lecture : File System Operations]

Notes - Files and Directories (Operating Systems: Three Easy Pieces)


File System Implementation

[Slides : File System Implementation by Paul Krzyzanowski, Rutgers University]

[ Video Lecture : File System Implementation]

Homework Set 7 : Problems on File System

Notes - File System Implementation (Operating Systems: Three Easy Pieces)

Tut 1 : File System in USer Space (FUSE)

Tut 2 : File System in USer Space (FUSE)

Tut 3 : File System in USer Space (FUSE)