CS325 Operating Systems
CS325 Operating Systems
COMPUTER
SCIENCE
FACULTY OF COMPUTING & ARTIFICIAL INTELLIGENCE
Course
Guide
Operating Systems (CS-325)
2024-2025
GA-3 Problem Analysis: Problem Analysis: Identify, formulate, research literature, and solve
complex computing problems reaching substantiated conclusions using fundamental principles of
mathematics, computing sciences, and relevant domain disciplines.
2
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
CLO# CLO (Lab) Domain BT GA#
Level
Apply Operating System techniques to effectively manage
CLO - 1 and control operating system processes, resources, and custom Cognitive C3 GA-3
configurations to enhance system functionality and
performance.
Design and develop a customised, recompiled version of an Cognitive C3 GA-4
CLO - 2 open-source operating system
Theory Assessments
CLOs
Taxonomy GA
Quizzes Assignments Midterm Final 45% level
15% 15% 25%
3
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
● Virtualization Concepts Objective: Deepen understanding of OS
● Free and Open-Source Operating roles by comparing real-world examples.
Systems
● Operating-System Services
● User and Operating-System Interface
● System Calls and Their Types
● System Services
● Operating System Architecture:
Week 2: Process Concepts and Interprocess Q/A
Communication
Reading: Chapter 3
Process Concepts Quiz 1
● Process States: Assignment 1
● Process Context:
✔ CPU Context and Context
Switching
Interprocess Communication (IPC)
● Concepts of Interprocess
Communication:
✔ The Need for IPC in
Multitasking Environments
✔ Mechanisms of IPC
4
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
● IPC in Message-Passing Systems:
✔ Message-Passing Model
✔ Direct and Indirect
Communication
Week 3: Foundational Paradigms and Q/A
Advanced Dynamics of Threading
Mechanisms Reading: Chapter 4
● Thread Libraries:
✔ Overview of Common Thread
Libraries (e.g., POSIX)
✔ Creation, Management, and
Termination of Threads
Week 4: Concurrency: Concepts and Q/A
Practical Applications
Reading: Chapter 4
Theoretical Foundations and Practical
Assignment 1
Frameworks
Scenario: Present a simplified
Concurrency vs. Parallelism
multithreaded banking system where
multiple threads attempt to update the
Problems in Concurrency:
4. account balance simultaneously.
✔ Race Conditions
Activity: Ask students to identify
✔ Critical Sections
potential race conditions and critical
✔ Starvation
sections in the provided scenario. Have
✔ Livelock
them propose synchronization
✔ Synchronization Overheads
mechanisms to address these issues,
5
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
Classical Concurrency Problems Objective: Enhance understanding of
how race conditions and critical sections
● The Producer-Consumer Problem: affect program behavior and how
✔ Problem Definition and synchronization techniques can resolve
Solutions these problems.
✔ Implementations and Challenges
● The Readers-Writers Problem:
✔ Problem Definition and Variants
✔ Solutions and Considerations
● The Dining Philosophers Problem:
✔ Problem Definition and
Solutions
✔ Implementation Strategies
Week 5: Classical Concurrency Problems Q/A
and Advanced Topics Quiz -02
Reading: Chapter 4
Concurrency in Practice
Scenario: Present different variants of
the readers-writers problem, including
● Implementing Concurrency:
✔ Concurrency in Modern
scenarios where readers have priority
over writers and vice versa.
Operating Systems
✔ Thread Libraries and
Task: Divide students into groups and
Concurrency Support
assign each group a variant to analyze.
They should propose and discuss
5. solutions, addressing the trade-offs
between reader and writer priorities.
Groups will present their findings and
● Concurrency in Multicore Systems:
proposed solutions to the class.
✔ Challenges and Techniques for
Efficient Concurrency
✔ Examples of Concurrency in
Objective: Enhance comprehension of
Real-World Applications. the readers-writers problem through
collaborative analysis and presentation of
different solution strategies.
Week 6: Synchronization Tools Q/A
6
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
● Semaphores:
o Definition and Types (Counting
and Binary Semaphores)
o Semaphore Usage and
Implementation
● Monitors:
o Definition and Concept
o Implementation Using
Semaphores.
Week 7: CPU Scheduling Q/A
Assignment-2
Fundamental Theories and Advanced Reading: Chapter 5
Mechanisms in CPU Scheduling Paradigms
7
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
Week 9: Deadlocks Q/A
● Deadlock Characterization:
o Techniques for Characterizing
Deadlocks
o Resource Allocation Graphs
● Methods for Handling Deadlocks:
o Prevention
o Avoidance
o Detection
o Recovery from Deadlock.
Week 10: Address Space and Memory Q/A
Management Assignment 3
Address Space and Memory Allocation Reading: Chapter 9
8
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
● Paging:
o Concept of Paging
o Page-Table Based Registers
● Swapping:
o Standard Swapping
o Swapping with Paging.
Week 11: Virtual Memory
Q/A
Virtual Memory and Demand Paging
Reading: Chapter 10
● Introduction to Virtual Memory
● Pure Demand Paging Quiz – 03
o Locality of Reference: Temporal
and Spatial Locality in Demand
Paging
● Performance of Demand Paging
o Page Fault Rate
11.
o Effective Access Time
9
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
12. Week 12: Mass-Storage Structure Q/A
● I/O Buffering:
o Types of Buffers: Input Buffers,
Output Buffers
● I/O Protection
● I/O Software Layers
Memory-Mapped I/O and Programmed I/O
Direct Memory Access (DMA)
10
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
Week 14: File-System Interface
Q/A
File Concepts and Operations
Reading: Chapter 13 and 14
● File Concept
● File Operations Quiz 4
● File Access Methods:
o Sequential Access
o Direct Access
o Indexed Access
● Directory Structure:
14. o Hierarchical vs. Flat Structures
o Directory Operations
11
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
Lab Assessment to CLO Mapping:
Lab Assessments
Taxonomy GA
CLOs Lab Tasks Midterm Project Final level
40% 15% 20% 25%
[P1 100%]
CLO-02 C3 GA-4
12
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
Lab Outline
Evaluation
Weeks Contents/Topics
Activity
● Orphan Processes.
● Zombie Processes.
● Killing Zombie Processes.
Week-04 ● Wait for a parent process.
● Wait for any process. Lab Exercise # 04
● Replacing current process image with a new executable.
● Replacing current process image passing arguments and
explicitly defined environment variables.
● Replacing the current process image, searching for the
executable in PATH and passing arguments as a list.
13
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
● Full Duplex Inter-Process Communication via Unnamed
Pipes for Real-Time Synchronous Messaging.
Threads
Thread Attributes
14
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
● Printer Spooler Problem
Mutex
15
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.