Tribhuvan University
Institute of Science and Technology
Bachelor of Science in Computer Science and Information Technology
| Course Title: Operating Systems | Full Marks: 60 + 20 + 20 |
| Course no: CSC264 | Pass Marks: 24 + 8 + 8 |
| Semester: IV | Credit Hours: 3 |
| Nature of course: Theory + Lab | |
Course Description: This course includes the basic concepts of operating system components. It consists of process management, deadlocks and process synchronization, memory management techniques, File system implementation, and I/O device management principles. It also includes case study on Linux operating system.
Course Objective:
- Describe need and role of operating system
- Understand OS components such as scheduler, memory manager, file system handlers and I/O device managers
- Analyze and criticize techniques used in OS components
- Demonstrate and simulate algorithms used in OS components
- Identify algorithms and techniques used in different components of Linux
Course Contents
Unit 1. Operating System Overview (4 Hrs.)
- Definition, Two views of operating system, Evolution of operating system, Types of OS
- System Call, Handling System Calls, System Programs, Operating System Structures, The Shell, Open Source Operating Systems
Unit 2. Process Management (10 Hrs.)
- Process vs Program, Multiprogramming, Process Model, Process States, Process Control Block
- Threads, Thread vs Process, User and Kernel Space Threads
- Inter Process Communication, Race Condition, Critical Section
- Implementing Mutual Exclusion: Mutual Exclusion with Busy Waiting (Disabling Interrupts, Lock Variables, Strict Alternation, Peterson’s Solution, Test and Set Lock), Sleep and Wakeup, Semaphore, Monitors, Message Passing
- Classical IPC problems: Producer Consumer, Sleeping Barber, Dining Philosopher Problem
- Process Scheduling: Goals, Batch System Scheduling (First-Come First-Served, Shortest Job First, Shortest Remaining Time Next), Interactive System Scheduling (Round-Robin Scheduling, Priority Scheduling, Multiple Queues), Overview of Real Time System Scheduling
Unit 3. Process Deadlocks (6 Hrs.)
- Introduction, Deadlock Characterization, Preemptable and Non-preemptable Resources, Resource–Allocation Graph, Conditions for Deadlock
- Handling Deadlocks: Ostrich Algorithm, Deadlock prevention, Deadlock Avoidance, Deadlock Detection (For Single and Multiple Resource Instances), Recovery From Deadlock (Through Preemption and Rollback)
Unit 4. Memory Management (8 Hrs.)
- Introduction, Monoprogramming vs. Multi-programming, Modelling Multiprogramming, Multiprogramming with fixed and variable partitions, Relocation and Protection
- Memory management (Bitmaps & Linked-list), Memory Allocation Strategies
- Virtual memory: Paging, Page Table, Page Table Structure, Handling Page Faults, TLBs
- Page Replacement Algorithms: FIFO, Second Chance, LRU, Optimal, LFU, Clock, WS-Clock, Concept of Locality of Reference, Belady’s Anomaly
- Segmentation: Need of Segmentation, its Drawbacks, Segmentation with Paging (MULTICS)
Unit 5. File Management (6 Hrs.)
- File Overview: File Naming, File Structure, File Types, File Access, File Attributes, File Operations, Single Level, two Level and Hierarchical Directory Systems, File System Layout
- Implementing Files: Contiguous allocation, Linked List Allocation, Linked List Allocation using Table in Memory, Inodes
- Directory Operations, Path Names, Directory Implementation, Shared Files
- Free Space Management: Bitmaps, Linked List
Unit 6. Device Management (6 Hrs.)
- Classification of IO devices, Controllers, Memory Mapped IO, DMA Operation, Interrupts
- Goals of IO Software, Handling IO (Programmed IO, Interrupt Driven IO, IO using DMA), IO Software Layers (Interrupt Handlers, Device Drivers)
- Disk Structure, Disk Scheduling (FCFS, SSTF, SCAN, CSCAN, LOOK, CLOOK), Disk Formatting (Cylinder Skew, Interleaving, Error handling), RAID
Unit 7. Linux Case Study (5 Hrs.)
- History, Kernel Modules, Process Management, Scheduling, Inter-process Communication, Memory Management, File System Management Approaches, Device Management Approaches
Laboratory Works
The laboratory work includes solving problems in operating system. The lab work should include:
- Demonstration of basic Linux Commands
- Process creation and termination, thread creation and termination
- Simulation of IPC techniques
- Simulation of process Scheduling algorithms
- Simulation of deadlock avoidance and deadlock detection algorithms
- Simulation of page replacement algorithms
- Simulation of File allocation techniques
- Simulate free space management techniques
- Simulation of disk scheduling algorithms