0% found this document useful (0 votes)
16 views15 pages

CS325 Operating Systems

The Operating Systems (CS-325) course at Air University Islamabad aims to provide students with a comprehensive understanding of operating systems, focusing on modern Android and open-source Linux systems. The course covers OS structures, resource management, CPU scheduling, and memory management, emphasizing practical applications and problem-solving skills. Students will engage in various assessments and hands-on activities to enhance their knowledge and skills in operating system management and optimization.

Uploaded by

230972
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views15 pages

CS325 Operating Systems

The Operating Systems (CS-325) course at Air University Islamabad aims to provide students with a comprehensive understanding of operating systems, focusing on modern Android and open-source Linux systems. The course covers OS structures, resource management, CPU scheduling, and memory management, emphasizing practical applications and problem-solving skills. Students will engage in various assessments and hands-on activities to enhance their knowledge and skills in operating system management and optimization.

Uploaded by

230972
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

DEPARTMENT OF

COMPUTER
SCIENCE
FACULTY OF COMPUTING & ARTIFICIAL INTELLIGENCE

Course
Guide
Operating Systems (CS-325)
2024-2025

Air University Islamabad


Course Description
The course aims to provide a comprehensive understanding of operating systems by exploring
their role as intermediaries between users and hardware, focusing on both modern Android systems
and open-source Linux. Students will gain insights into OS structures, resource management, CPU
scheduling, multitasking, and memory management from both user and system perspectives. The
course emphasizes the use of current tools and techniques to address contemporary issues and
enhance system performance, fostering problem-solving skills to tackle real-world challenges in
operating system management and optimization.

Course and Reference Material


Text Book(s):
Operating System Concepts, by Silberschatz, Galvin and Gagne, 10th Edition, John Wiley
and Sons.
Reference Book(s):
1. Operating Systems Internals and Design Principles by William Stallings, 9th Edition,
Pearson Ed.
2. Modern Operating Systems by Andrew S Tanenbaum. 5th Edition, Pearson Ed.

Relevant Program Learning Outcomes:


GA-2 Knowledge for Solving Computing Problems: Knowledge for Solving Computing
Problems: Apply knowledge of computing fundamentals, knowledge of a computing
specialization, and mathematics, science, and domain knowledge appropriate for the computing
specialization to the abstraction and conceptualization of computing models from defined
problems and requirements.

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.

Course Learning Outcomes


After the successful completion of this course, students shall be able to:

CLO# CLO (Theory) Domain BT GA#


Level
CLO -1 Understand the core operating systems concepts. Cognitive C2 GA-2
CLO - 2 Apply various operating system concepts that affect system Cognitive C3 GA-3
performance and resource utilization
CLO - 3 Analyse different mechanisms that affect system Cognitive C4 GA-3
performance and resource utilization

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 Assessment to CLO Mapping:

Theory Assessments
CLOs
Taxonomy GA
Quizzes Assignments Midterm Final 45% level
15% 15% 25%

CLO-01 [Quiz 1] [Assg 1] [Q1 20%] [Q1 20%] C2 GA-2

CLO-02 [Quiz 2] [Assg 2] [Q2 50%] C3 GA-4


[Q2 40%]
[Quiz 3] [Assg 3]

CLO-03 [Quiz 4] [Assg 4] [Q3 30%] [Q3 40%] C3 GA-3

Course Outline (Week-wise plan)


Course outline and week wise lecture plan:

Week Lecture Details Activity

Week 1: Analysis of Operating System Q/A


Paradigms and Core Architectures
Reading: Chapter 1 and 2
Underlying Frameworks and Fundamental
Architectures Activity: Students work in groups to
research and present the role and
1. functionality of different operating
● Role and Functionality of the Operating
System systems (e.g., Android, iOS, Windows,
● Interrupt Mechanisms and Concepts Linux). Each group should focus on how
● Architecture of Storage Systems their assigned OS manages processes,
● Structure of Input/Output Systems memory, storage, and I/O systems
● Resource Management

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 Interfaces and Advanced


Structures

● 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

✔ States of a Process (New, Activity: Provide students with a sample


Running, Waiting, Ready, Process Control Block (PCB) structure.
Terminated Have them identify and describe the role
2. of each component (e.g., Process State,
● Process Control Block (PCB): Program Counter, CPU Registers). Then,
✔ Components of PCB (Process use a real-world example (e.g., a task
State, Program Counter, CPU manager) to identify what information
Registers, etc.) might be included in a PCB.

● Operations on Processes: Objective: Ensure students grasp the


critical elements of PCB and their
✔ Process Creation functions in process management.
✔ Process Termination

● Process Context:
✔ CPU Context and Context

Switching
Interprocess Communication (IPC)

● Concepts of Interprocess
Communication:
✔ The Need for IPC in
Multitasking Environments
✔ Mechanisms of IPC

● IPC in Shared-Memory Systems:


✔ Shared Memory Model

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

Threading Mechanisms Activity: Divide students into small


✔ Threads vs. Processes groups and assign each group a set of
✔ Thread Lifecycle and scenarios (e.g., a web server application,
a video processing application). Each
Management
group must choose whether to implement
3. ✔ Context Switching Efficiency the solution using threads or processes,
✔ Resource Allocation and providing a detailed justification for their
Isolation choice based on the characteristics of
threading mechanisms, lifecycle
✔ Creation and Termination Costs management, context switching, and
resource allocation.

Objective: Deepen understanding of the


● Multithreading Models: differences and similarities between
✔ Many-to-One Model threads and processes.
✔ One-to-One Model
✔ Many-to-Many Model

● 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

Reading: Chapter 6 and 7


Fundamental Concepts and Solutions and
Synchronization Mechanisms
6.
● The Critical-Section Problem
● Hardware Support for
Synchronization:
● Mutex Locks:
o Definition and Usage
o Implementation of Mutex.

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

● Basics of CPU Scheduling: Activity: Create a set of sample


● CPU Scheduling Criteria: processes with different burst times and
o CPU Utilization arrival times. Have students calculate the
o Throughput CPU Utilization, Throughput,
o Turnaround Time Turnaround Time, Waiting Time, and
7. o Waiting Time Response Time for each algorithm
o Response Time (FCFS, SJN, Priority Scheduling, Round
● Scheduling Algorithms: Robin). Use a table to organize their
o First-Come, First-Served results for comparison.
(FCFS):
o Shortest Job Next (SJN): Objective: Compare and contrast
▪ Preemptive vs. Non- different scheduling algorithms.
Preemptive SJN

● Scheduling Algorithms (Cont):


o Priority Scheduling
o Shortest Job First
o Round Robin (RR)

● Multilevel Queue Scheduling:


o Concept and Implementation
Scheduling Between Queues.
8. Midterm Exam

7
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
Week 9: Deadlocks Q/A

Understanding Deadlocks Reading: Chapter 8


● Principles of Deadlock:
o Necessary Conditions for Activity: Divide students into groups and
Deadlock (Mutual Exclusion, assign each group a real-world system or
Hold and Wait, No Pre-emption, application where deadlocks might occur
Circular Wait) (e.g., database systems, file systems).
● Deadlock in Multithreaded Each group identifies potential deadlock
Applications: scenarios, discusses the implications, and
o How Deadlocks Occur in presents their findings.
Multithreaded Environments
o Examples of Multithreaded Objective: Analyze and discuss real-
9. Deadlock Scenarios world examples of deadlocks.

Deadlock Handling Methods

● 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

● Address Space: Intel 32- and 64-bit Architectures


o Logical Address Space ARMv8 Architecture
o Physical Address Space
 Memory Partitioning:
10. Fixed vs. Variable Partitioning
● Contiguous Memory Allocation
● Protection and Fragmentation:
o Fragmentation:
▪ Internal
Fragmentation: Causes
and Solutions
▪ External
Fragmentation: Causes
and Techniques to
mitigate internal and
external fragmentation.

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

Page Replacement Algorithms

● Page Replacement Algorithms:


o FIFO (First-In, First-Out) Page
Replacement
o Optimal Page Replacement:
o LRU (Least Recently Used) Page.

9
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
12. Week 12: Mass-Storage Structure Q/A

Mass Storage Architectures and Management Reading: Chapter 11


Mass-Storage Structure
Assignment 4
● Non-Volatile Memory (NVM)
● Volatile Memory: Activity: Provide students with a set of
● Secondary Storage Connection Methods features and specifications for various types
● Address Mapping: of NVM (e.g., SSDs, Flash) and volatile
o Techniques: Logical vs. Physical memory (e.g., RAM). Ask them to create a
Address Mapping. comparative chart highlighting key
differences, advantages, and use cases.

Advanced Storage Management and RAID


Objective: Compare Non-Volatile Memory
● HDD Scheduling (NVM) and Volatile Memory.
● NVM Scheduling
● RAID Structure
 RAID Levels
 RAID Implementation
 Hardware vs. Software RAID
Week 13: I/O Systems Q/A
I/O System Architecture and Management Reading: Chapter 12

● I/O System Architecture


● Application I/O Interface:
o System Calls and APIs:
Mechanisms for I/O Operations
13. ● Device Drivers:
o Development and Integration:
How Drivers Interact with
Hardware

Advanced I/O Concepts and Techniques

● 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

Advanced File-System Topics

● File System Mounting


● File Sharing:
o Locking and Synchronization:
Managing concurrent access
● Directory Implementation
● Protection and Security
● Memory-Mapped Files.
15. Week 15: Security Article: Anderson, R. (2020). Security
Engineering: A Guide to Building
Security Policies vs. Security Mechanisms Dependable Distributed Systems.
Enhancing OS Security:
● Access Control Models Link: Security Engineering by Anderson
● Access Control Mechanisms
● Authentication Techniques Article: Tanenbaum, A. S., & Bos, H.
● Parallel and Distributed Systems (2014). Modern Operating Systems.
Concepts
Note: While this is a textbook, it includes
relevant sections on fault tolerance and
Fault Tolerance and Reliability techniques.
● Fault Tolerance Techniques
● Reliability in Parallel and Distributed Article: M. Herlihy and N. Shavit (2012).
Systems The Art of Multiprocessor Programming
16. Final Term Exam

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%

CLO-01 Lab task in each [Q1 40%] [Q1 40%] C3 GA-3


lab
[Q1 60%] [Q1 60%]

[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

Week-01 Linux commands and use of g++. Lab Exercise # 01

Shell Programming: Dynamic I/O Stream Manipulation and


Conditional Variable Processing in Shell Environments.

● Interactive Command-Line Input Acquisition in Shell.


Week-02 ● Terminal-Based Output Channel Manipulation in Shell.
● Dynamic Runtime Variable Instantiation in Shell.
● Shell Environment State and Variable Persistence in Shell.
● Conditional Command Execution and State Resolution in Lab Exercise # 02
Shell.

G++ Programming: Hierarchical Process Instantiation and


Management through Fork-Based Process Duplication in Linux

● Instantiation of one child process.


Week-03 ● Instantiation of multiple child processes.
● Passing data from one process to another. Lab Exercise # 03
● Manipulating local and global variables using multiple
processes.

Hierarchical Process Instantiation and Management through


Fork-II

● 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.

Intra-Kernel Inter-Process Communication via Ephemeral


Unidirectional Data Channels in Linux
Week-05 ● Data Ingestion into the IPC Stream.
● Data Extraction from IPC Stream.
● Output Stream Data Injection.
Lab Exercise # 05
● Input Stream Data Ingestion.

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.

Persistent Bidirectional Inter-Process Communication through


Named FIFO Constructs in Linux.

● Asynchronous Inter-Process Data Exchange Across


Week-06 Autonomous Process Boundaries.
● Data Ingestion in FIFO Constructs. Lab Exercise # 06
● Data Extraction from FIFO Constructs.
● Full Duplex Inter-Process Communication via Named
Pipes for Real-Time Synchronous Messaging.

Signal Handling and Signal Set

● Graceful Termination of Programs.


Week-07 ● Handling User Interrupts.
● Real-Time Data Processing. Lab Exercise # 07
● Alarm Timers.
● Handling Child Process Termination.

Deterministic Modelling of CPU Scheduling Paradigms for


Week-08 Optimized Process Orchestration in Multi-Core Architectures.
Lab Exercise # 08

Week-09 Mid Exam

Threads

● Thread Instantiation via Concurrency-Oriented Progenitor


Invocation.
Week-10 ● Self-Referential Thread Contextualization and Identifier
Retrieval Mechanism. Lab Exercise # 09
● Thread Termination via Autonomous Execution Context
Deallocation Protocol.
● Argument Encapsulation for Concurrent Execution.

Thread Attributes

● Detach State and Joinable Threads.


Week-11 ● Stack size.
● Stack Address. Lab Exercise # 10
● Scheduling Policy
● Scheduling Priority

Semaphores (Counting, Binary)


Week-12
● Producer Consumer Problem Lab Exercise # 11
● Dining Philosophers Problem

14
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.
● Printer Spooler Problem

Mutex

Week -13 ● Reader Writer Problem


● Bank Account Transaction Problem.
● Comparison of Mutex and Semaphores. Lab Exercise # 12

Deadlock Avoidance, Deadlock detection algorithms- A Case Study

Kernel Alchemy: Recompiling the OS with Custom


Modifications.
Week 14 Lab Exercise # 13
● Kernel Architecture.
● Setting Up the Development Environment.
● Exploring the Kernel Source Code.

Kernel Alchemy: Recompiling the OS with Custom


Modifications.
Lab Exercise # 14
Week-15 ● Making Simple Modifications to the Kernel.
● Recompiling the Kernel.
● Testing the Modified Kernel.

15
Created and revised by, Mr. Hafiz Obaid Ullah
Department of Computer Science, Air University, Islamabad.

You might also like