Operating System Syllabus
Operating System Syllabus
Operating System Syllabus
LTPJC
2 0 24 4
Preamble
The course will impart an understanding of the challenges encountered when designing, implementing,
and using operating systems.
Objectives
The objective of the course is to
enable the student to appreciate the need to protection, isolation, abstraction and virtualization.
Understand and evaluate trade-offs between conflicting objectives in large scale system design.
Expected Outcome
On completion of the course, the student should be able to
a) Differentiate between the user and kernel mode operations
b) Describe use of semaphores, interrupts, context switching
c) Write a program implementing concurrency
d) Write simple multi-threaded programs
e) Evaluate the trade-offs in the memory hierarchy
f) Summarize the principles of Virtual Memory
g) Evaluate trade-offs due to virtualization
h Explain OS Virtualization – Create Linux Containers
i) Discuss the issues related to security in the operating system
Module Topics L Hrs SLO
1 Introduction to OS: - Functionality of OS - OS Design issues -
Structuring methods (monolithic, layered, modular, micro-kernel
2 2
models) - Abstractions, processes, and resources - influence of security,
networking, multimedia
2 OS Principles: System Calls – System/Application Call Interface -
Protection User/Kernel modes - Interrupts – Processes and Threads - 3 11
Structures (Process Control Block, Ready List etc)
3 Scheduling: Processes Scheduling - CPU Scheduling - Pre-emptive &
non-pre-emptive - Resource allocation and management - Deadlocks – 5 17
Deadlock Handling Mechanisms
4 Concurrency: Inter-process communication – Synchronization -
Implementing Synchronization Primitives – Semaphores - Monitors - 4 17
Multiprocessors and Locking - Scalable Locks - Lock-free Coordination
5 Memory management: Main Memory management - Memory
allocation strategies – Caching -Virtual Memory Hardware – TLB -
5 14
Virtual Memory OS techniques – Paging – Segmentation – Page Faults
– Page Replacement – Thrashing – Working Set
6 Virtualization: Virtual Machines – Virtualization (Hardware/Software,
Server, Service, Network) – Hypervisors -OS - Container Virtualization 4 11
- Cost of virtualization
7 File System – File system interface - file system implementation – File
system recovery – Journaling - Soft updates & LFS - Distributed file 3 17
system
8 Security and Protection - Mechanism Vs Policies – Access and
authentication - models of protection – Memory Protection - Disk 3
Scheduling - OS performance, Scaling OS - Mobile OS: 11
Recent Trends
Future directions in Mobile OS / Multi-core Optimization /Power 1
efficient Scheduling
30
Lab - Indicative List of Experiments (in the areas of interest)
Each experiment should require the student to submit a design document that details
the reason for design choices in the module and alternatives considered. The
experiment may be submitted before the next lab if not completed within class
hours. Collaboration and discussion with co-students on the experiments is
encouraged. However, plagiarism will be penalized severely as per University
regulations. Every student shall encode his own experiments.
1. Write a boot loader - to load a particular OS say TinyOS/ KolibriOS image - code
to access from BIOS to loading the OS - involves little assembly code – may use
QEMU/virtual machines for emulation of hardware.
2. Recompile kernel with you own program for 'cat'. Your 'cat' should read and
display contents of file on screen, check for errors, do it for multiple files while
taking input via command line.
5. Create an interrupt to handle a system call and continue the previously running
process after servicing the interrupt.
6. Write a Disk driver for the SATA interface. Take care to check readiness of the
controller, locked buffer cache, accept interrupts from OS during the period,
interrupting the OS again once done and clearing buffers.
7. Demonstrate the use of locks in conjunction with the IDE driver.
8. Implement DMA access, measure times required for varying sizes of the files.
Compare the times taken for a conventional read write via a OS for the same files.
9. Create a simple context switching module that switches between processes taking
care of all issues. Switch from process kernel thread to scheduler thread and back. 14
10. Compare the task creation times. Execute a process and kernel thread, determine
the time taken to create and run the threads.
11. Write a program to put a process to sleep and then wake it up and then kill it
when completed.
12. Run an experiment to determine the context switch time from one process to 14
another and one kernel thread to another. Compare the findings.
14. Compare the overhead of a system call with a procedure call. What is the cost of
a minimal system call?
14
15. Determine the latency of individual integer access times in main memory, L1
Cache and L2 Cache. Plot the results in log of memory accessed vs average latency.
16. Determine the file read time for sequential and random access based of varying
sizes of the files. Take care not to read from cached data - used the raw device
interface. Draw a graph log/log plot of size of file vs average per-block time. 14
Project 60 8
# Generally a team project [3 to 4 members] [Non
# Concepts studied in Operating Systems Course should have been used. Contact
# Innovative idea should have been attempted. hrs]
# Design Document on the iterative improvements and design decisions made with
justification in Digital format with all figures using software package like
Xfig/Ooffice Draw to be submitted.
# Assessment on a continuous basis with a min of 3 reviews.
Measurement
Perform a cost / benefit analysis of dynamically loaded libraries vs. statics
libraries.
Run a standard workload on top of a virtual machine & native OS, measure the
performance loss/benefit report the results.
Measure the isolation capabilities of different isolation techniques and virtual
machine monitors, such as processes, vservers, jails, Xen, and VMware.
OS kernels
Since the Virtual Machine runs a OS find the services that can be removed
from it for redundancies as compared to the Host OS. (eg drivers, memory
management etc.) Remove these components, recreate the Virtual Machine, now
what is the resulting performance?
File Systems
Analyze the performance of the Xen Virtual machine monitor. Understand how
I/O works in a Virtual environment as compared to a normal OS.
Disks fail often, data corruption, sector errors are common. Incorporate
modules in your OS that will address disk errors. You may consider checksums,
parity checks etc. Simulate the errors and show the OS is able to detect these errors.
Show that file system benchmarks like Postmark, Andrew, TPC-B etc., do
not do a good job. Determine the type of stress these benchmarks do. Create your
own benchmark that will imitate these I/O loads and show how your benchmark is
better. You may look into effects of caching, memory load of these benchmarks etc.
Analyze how new applications like iTunes, iPhoto, iMovie etc. stresses the
file system of OS X, in manners different than the conventional I/O workloads.
Security
Create a rootkit detection tool that accesses the DMA directly. It should be
able to avoid the malicious rootkit's hiding capabilities.
Current mobiles have heterogeneous cores. Some cores more capable than
others. Create a module that can find which thread needs high-performance core.
Write a scheduling algorithms that can execute in lower-performance core.
Text Books
1. Remzi H. Arpaci-Dusseau, Andrea C. Arpaci-Dusseau, Operating Systems, Three Easy Pieces,
Arpaci-Dusseau Books, Inc (2015).
2. Abraham Silberschatz, Peter B. Galvin, Greg Gagne-Operating System Concepts, Wiley (2012).
3. Ramez Elmasri, A Carrick, David Levine, Operating Systems, A Spiral Approach - McGraw-Hill
Science_Engineering_Math (2009).
Reference Books:
1. Robert Love-Linux Kernel Development-Addison-Wesley Professional (2010).
2. XV6, a simple, Unix-like teaching operating system, Russ Cox, Frans Kaashoek, Robert Morris.
3. Comer, Douglas-Operating System Design_ The Xinu Approach-Chapman & Hall (2015).
4. K. C. Wang (auth.)-Design and Implementation of the MTX Operating System-Springer
International Publishing (2015).
Operating Systems
Knowledge Areas that contain topics and learning outcomes covered in the course
OS/Virtual Machines 2
File systems, standard implementation techniques,
journaling and log-structured file systems.
OS/File Systems
CE-OPS7 File systems
2
OS/System What is to be evaluated?
Performance
Evaluation
CS: IAS- CS: IAS(Information Security and Protection - mechanism Vs policies – access 3
Assurance and and authentication - models of protection – memory
Security) protection.
Total hours 30
Where does the course fit in the curriculum?
This course is a
Core Course.
Suitable from 3th semester onwards.
Knowledge of any one programming language is essential.
An understanding of Data Structures is desirable
Module 1: Introduction: This module introduces the functionality of an Operating System, the issues in
design of a OS, Different approaches to create the OS, and more importantly the abstraction of all
underlying systems.
Module 2: OS Principles: System calls, their interfaces, API's are introduced in this module. The
important isolation via use of kernel and user modes is introduced. The module also covers processes,
threads and how they are managed.
Module 3: Concurrency: Concurrent access of resources, mechanisms to implement them, issues that
arise when we deal with more than one processor/core is discussed here. Use of locks and approaches to
Lock free coordination is highlighted.
Module 4: Scheduling of processes, the algorithms for the same, design decisions to pre-empt or not a
running process are important concepts discussed. Deadlocks when processes try to access shared
resources & mechanisms to break and avoid deadlocks are the issues discussed in this module.
Module 5: Main Memory, its hierarchy, use of caches are introduced in this module. The need for virtual
memory concepts, TLB hardware, the use of pages and management of the pages are highlights of the
topics discussed in this module.
Module 6: Abstraction, virtualization and relation to main memory are concepts to be discussed here. OS
virtualization via containers is a current topic introduced. The cost of virtualization is also to be evaluated
in terms of system design.
Module 7: In this module, file systems, its implementation, recovery in case of file system failures, Log
Structured file system/journaling for this purpose is highlighted.
Module 8: Important concepts of security of the OS, its protection, policies for the same, authentication
models is introduced in this module. OS performance measurements and related issues are discussed.
What is the format of the course?
This Course is designed with 100 minutes of in-classroom sessions per week. The course requires that
pre-class reading material be shared with the students. This could be in videos or documents/chapters of
a book. It could take a form of flipped classroom also. The student’s comprehension of the pre-class
reading material will be assessed by a 'in-video' quiz or a short quiz at the beginning of the class. Failure
to complete this pre-class work may lead to restriction in allowing classroom participation.
There is a 100-minute lab session per week conducted as described earlier. The course also requires 200
minutes of non-contact time spent on implementing course related project. The key part of the course is
that the lab and project components together give a hands-on experience to design an operating system.
It can also be evaluated for its performance.
Generally, this course should have the combination of lectures, in-class discussion, case studies, guest-
lectures, mandatory pre-class reading material & quizzes.