Operating Systems

Course: COL331, and COL633
Semester II, 2017-18
Credits: 5 (3-0-4)



Instructor: Prof. Smruti R. Sarangi

Lectures
: Tuesday, Wednesday and Friday: 10 AM to 11 AM, LHC 416

Course Load: Minor 1, Minor 2, End term, 3 programming assignments
Office Hours: Friday 3 to 5 PM, (SIT 215)

Evaluation: 15% (Minor 1), 15% (Minor 2), 25% (Major), Assignments (12.5% + 12.5% + 20%)
Passing Criteria: At least 30% in assignments AND at least 30% in theory

Policy for late assignments and re-minor:
1. We will hold one re-minor for people who have missed one minor at the end of the major exam. Note that
to ensure a level playing field, it will be significantly harder than the original minor exams. The student needs
to show documentary evidence such as a medical certificate to the TA on the day of the reminor. Please don't
send any mails to the instructor or the TAs regarding this.

2. Every homework will have a 3-day buffer period. (-15%) penalty per day.


Teaching Assistants:

Shubhankar Suman Singh
Priyanka Singla
Aditi Bhateja
Sunaina Srivastava
Sandeep Kumar
Namrata Jain
Diksha Moolchandani

Reference Books
[Textbook]  Operating Systems: A Design Oriented Approach, McGrawHill, 2017
                   Link to slides.


Lectures and Slides:

Date
Lecture
References/Remarks
Jan 2nd
Course policies
Link
Jan 4th Basics of operating systems, and resource management.
Time and space multiplexing.
Basic idea of virtual memory, and registers.
Chapter 1
Jan 8th
Register usage convention, system calls, interrupts, exceptions, disk controller.
Chapter 2
Jan 9th
Life cycle of a system call
Chapter 3: system calls
Jan 11th
System calls to manipulate files, shell, and terminal.
Difference between terminal and
shell: (link)
Jan 15th
Creating and managing processes

Jan 16th
Writing your own shell
Chapter 4 (read on your own)
Jan 18th
System constants and process creation
Chapter 5
Jan 22nd
System call handling

Jan 23rd
Message queues and Disk I/O
[Run the command: lspci -v]

Jan 25th
Pre-empting system calls, threads, memory and I/O address space
Additional slides: slides on I/O
Jan 29th
Atomic operations, Peterson's lock, Test-and-exchange
GCC atomics: link
Jan 30th
Compare-and-set, The consensus problem,  Multiprocessor operating systems

Feb 1st
Kernel stacks, Multiprocessing within the kernel

Feb 8th
Discussion on Minor 1

Feb 12th
Inter-process communication using message queues
Chapter 7
Feb 13th
Software interrupts, and signal handlers. Rendezvous patterns.
1. Signals in C, link
2. Linux signal handling. link
3. Signal handling. link
Feb 19th
Reader-writer lock, and binary semaphores
Chapter 8
Feb 20th
Counting semaphores, Scheduling schemes: FCFS, shortest job first, round-robin
Chapter 8
Feb 22nd
Deadlocks, two-phase locking, acquiring resources in an increasing order of ids, The
dining philosopher's problem, Safety, Liveness, Deadlock avoidance, prevention, and recovery
[Self Study: Chapter 9]
Chapter 8 (finished)
Feb 26th
Process of compilation and linking, dynamically linked libraries.
Linux commands: nm, objdump, strip, ldd
Chapter 10
Creating static/dynamic
libraries in Linux. (link)
Feb 27th
Process of linking and loading, load-time and run-time linking, buddy allocator, linked-list based memory allocator, bitmap based allocator
Buddy allocator (link)
Linux slab allocator (link)
Mar 1st
Background on virtual memory (overlap + size), swap space, page tables (1-level and 2-level), TLBs
link to slides
Mar 12th
Clarifications on homework 2

Mar 13th
Stack smashing, code reuse attacks and code injection attacks, buffer overflows, segmentation
Code for the buffer overflow attack: link
Code reuse attack: link
Stuxnet worm: link
Mar
15th
Page table, TLB, swap space
link
Mar 19th
Replacement policies, stack distance, FIFO, Belady's anomaly
link
Mar 20th
LRU, LFU, MFU, MRU, Optimal algorithm

Mar 22nd
Working sets, WS-Clock algorithm, Thrashing, Copy-on-write

Minor 2
Mar
29th
I/O systems: physical (transmission) layer
slides: link
Apr 2nd
Types of buses (synchronisation layer), framing, error detection, I/O ports
Notes of this part in Scopes
Apr 3rd
Network and protocol layers, PCI-Express and USB

Apr 5th
Hard disks, and CD drives

Apr 9th
USB drives

Apr 10th
RAID, FAT file system

Apr 12th
File system basics, hard links, soft links, mounting, unmounting

Apr 16th
I-nodes, disk defragmentation, disk access scheduling (elevator algorithm, optimized algorithms)

Apr 23rd
Basic concepts in OS security, Type 0, 1, and 2 hypervisors
Virtual machine slides
Apr 24th
Guest lecture on Cryptography (Prof. Ragesh Jaiswal)
slides
Apr 26th
Guest lecture on Cryptography (continued)