CS 347M : Operating Systems Minor

Course runs in Slot : 5, Wed and Friday 9.30 am to 10.55 am.

Place: SIC 201 (Kanwal Rekhi Building)

Teaching Assistants:
1. Aakash Chaudhary (aakashc@cse) 2. Vijayalakshmi Vedantham (vvedantham@cse)
3. Lavudiya Goutam (goutam@cse) 4. Achala Bhati (abhati@cse)

Class Hours: Wed and Friday after the class at 10.55 hrs. outside SIC-201.
(I would also be available at some other times for meeting students; send me a mail to fix a time.)

Text book:
D. M. Dhamdhere : Operating Systems---A concept-based approach, Third Edition,
Tata McrGraw Hill, 2012.

Syllabus of the course

Introduction to Operating Systems. Interaction between the OS, computer system and user programs.

Process management---Creation and scheduling of processes, Process synchronization, Deadlocks.

Memory management---relocation and execution of programs, sharing of programs, Virtual memory management.

File systems---file organization, directory structures, file system reliability.Disk scheduling.

Security and Protection.

Extent of coverage of Memory management and File Systems would depend on availability of class time.

Credit distribution:
Quizzes (10%), Home Assignment (10-15%), Mid-sem (25-30%), End-sem (50%).
(Redistribution may be made depending on nature of home assignment.)

Honesty policy:
Highest standards of academic honesty would be enforced.
Students must not discuss or copy in any evaluation unit---home assignment, quiz, exams, lab assignment, etc.
Even looking in the direction of someone's answerpaper during a written quiz or exam would be
considered dishonest and would be dealt with accordingly.

Copy-detection software would be used on all submissions.

Log of lectures:

Lecture 1 (4 Jan 2017):
Introduction to the course---motivation, honesty policy, tips for learning effectiveness.
Projecting architecture prerequisites.
Introduction to critical thinking skills. Slides (This topic will not be done explicitly, students to study from slides.)

Lecture 2 (6 Jan 2017):
Abstract view of OS. Arrangement of programs in memory---the Memory Map.
Use of computer architecture features in program management.
The PSW/PSR as collection of control registers of the CPU. Importance of CPU mode.

Lecture 3 (11 Jan 2017):
Parallelism and concurrency.
Interrupt driven operation of an OS.
Overlapped execution of programs. The CPU state.

Lecture 4 (13 Jan 2017):
CPU state and Program information. Interrupts.

Lecture 5 (18 Jan 2017):
Interrupt processing routines and interrupt handlers. Masking of interrupts.
External interrupts. System Calls.

Lecture 6 (20 Jan 2017):
System calls (contd.)
Complete example of program management in priority-based and time-slicing operating systems.
Computing environments --- Non-interactive, interactive, and real time environments.

Lecture 7 (25 Jan 2017):
System calls examples.
System-centric and user-centric views of performance.

Lecture 8 (27 Jan 2017):
Functions of an OS: Program management, resource management, Protection and Security.
Program management: 1. Initiation of a program: Login, loading of UI, loading of program, reloading of UI, etc.
2. Pre-emption, 3. Termination, 4. Scheduling. Context switching of programs and overhead.
Multiprogramming: Classification of programs into CPU-bound and I/O-bound, Assignment of priorities, Degree of multiprogramming.

Lecture 9 (1 February 2017):
Multiprogramming OS (Contd). Time-sharing OS.

Lecture 10 (3 February 2017):
Real time applications. Features of a real-time OS: Priority for programs, Concurrency within a program.
Modern OSs have several scheduling policies. Multi-level scheduling.

Lecture 11 (8 February 2017):
Resource management---Partitioned and pool-based allocation. Virtual resources.
Processes---process creation and the process tree.
Signals and signal handlers.

Lecture 12 (10 February 2017):
Process management in the OS---Process definition as an n-tuple.
The process control block (PCB). Important fields in the PCB.
Signal handling using the signals vector accessible from the PCB.

Lecture 13 (15 February 2017):
Use of the Vee Diagram in systematic thinking.
Some child-process related system calls.
The notion of process state and its use in process management. Process states Running, Ready, and Blocked.

Lecture 14 (17 February 2017):
Process management related data structures of the OS kernel---Interrupt vector, Process Control Block (PCB) and Signal Vector.
The Event Control Block (ECB) and its use in simplifying event management.
Causes of process state transitions. Examples of completion of an I/O operation, and a parent process wishing to sleep until a specific child process completes.

Lecture 15 (1 March 2017):
Swapping states for processes.
Context of a process. Kernel-level threads and User-level threads.

Lecture 16 (3 March 2017):
Concurrent processes---interacting and independent processes.
Conventions for showing concurrent programs having processes/threads.
Race conditions in data sharing. Critical sections. Indivisible operations for implementing critical sections.

Lecture 17 (8 March 2017):
Data access synchronization using critical sections. Control synchronization. Busy waits.
Semaphores. Classic Process Synchronication problems: Producers--Consumers using semaphores.

Lecture 18 (10 March 2017):
Properties of CS implementation---Mutual exclusion, Progress, Bounded wait.
Monitors and Condition variables. Producers--Consumers using Monitors.
Classic Process Synchronization problems: Readers and Writers.

Lecture 19 (15 March 2017):
Pthreads package --- threads, mutexes, condition variables
Readers and Writers using pthreads
Algorithmic implementation of critical sections.

Lecture 20 (17 March 2017):
Algorithmic implementation of CS (contd)
Introduction to deadlocks -- Definition, conditions for deadlock, deadlock detection.

Lecture 21 (22 March 2017):
Deadlock prevention approaches.
Deadlock avoidance using Banker's algorithm.

Lecture 22 (22 March 2017):
Model of memory allocation to a process.
Contiguous memory allocation. Reuse of memory using first-fit and best-fit allocation.
Buddy system and Powers of 2 allocators.

Lecture 23 (29 March 2017):
Contiguous memory allocation (contd.) Internal and external fragmentation.
Non-contiguous memory allocation. Virtual Memory using paging.
Address translation, page fault, swap space of a process.

Lecture 24 (31 March 2017):
Page table format, Desirable characteristics of page fault vs # of pages in RAM.
Page-in and page-out operations. Page replacement algorithms.
One-handed clock page replacement algorithm.

Lecture 25 (5 April 2017):
Page reference string and its use in illustrating operation of a page replacement algorithm.
Translation look-aside buffer (TLB)
TDS on FIFO, LRU, One-handed clock, and Optimal page replacement algorithms.

Lecture 26 (7 April 2017):
Introduction to File Systems---File system and IOCS.
Directory hierarchy, File organization and logical view of data, Disk cache.
Directory entry, Disk space allocation and the File Map Table (FMT).
The File Control Block (FCB).

Lecture 27 (12 April 2017):
Recap of file system and IOCS, File Control Block (FCB).
Disk cache management.
Fundamentals of Protection and Security. Overview of authentication and authorization.