Aperçu des sections
- Généralités
- OS2
OS2
Faculty of Exact Sciences and Nature and Life Sciences
Department of Mathematics and Computer Science
Operating Systems II

Intended for:
3rd Year of Bachelor's Degree
Field:
Computer Science (ISSE)
Objectives:
Review the fundamentals of operating systems and process management. Program threads and mutual exclusion mechanisms in C under Unix. Learn advanced concepts about operating systems. Conduct a theoretical and practical study of the models used in process management and synchronization.
Prerequisites:
- Operating Systems 1
- Algorithms and Data Structures
Content:
- Chapter 2: Process Synchronization
- Chapter 3: Interprocess Communication
- Chapter 4: Interlock
Evaluation Method:
- Exam : 60%
- Continued Evaluation: 40% (20% + 20%)
References :
- Tanenbaum, A. S. (Modern operating systems, 3rd edition). Pearson, 2012.
- Silberschatz, A., Galvin, P. B., & Gagne, G. (Operating System Concepts). Dunod, 1994.
- McHoes, A. (Operating systems: A system-based approach). Cengage Learning, 2012.
- Stallings, W. (Operating systems: Internals and design principles). Pearson, 2012.
- S. K. (Principes des systèmes d'exploitation et des systèmes d'exploitation). Dunod, 1993.
- Pretest
- Chapter 1: Generalities
Chapter 1: Generalities
Chapter 1: Generalities
Objectives
- Understand OS fundamentals: Define the operating system's role as hardware-software interface and resource manager.
- Identify core OS functions: Memory, processor, process, I/O, and file management.
- Distinguish programs vs. processes: Recognize static code vs. dynamic execution instances with PCBs.
- Master process lifecycle: Track state transitions (New → Ready → Running → Blocked → Terminated).
- Understand threads and parallelism: Apply Bernstein's condition and precedence graphs to identify parallelizable tasks.
- Analyze task system determinism: Determine if concurrent executions yield consistent results.
- Optimize parallelism: Identify and remove redundant precedence constraints for maximal parallelism.
Chapter Content:
1. Operating System Basics
2. Core Concepts: Programs, Processes, Threads
3. Shared Resources
4. Task Systems & Parallelism
- Questions about Chapter 1 are asked and answered in this forum.
- Chapter 2: Process Synchronization
Chapter 2: Process Synchronization
Chapter 2: Process Synchronization
Objectives:
- Understand race conditions: Identify data inconsistency risks when processes access shared resources concurrently.
- Define critical sections: Isolate code that accesses shared resources to ensure safe execution.
- Solve mutual exclusion: Ensure only one process accesses a shared resource at a time.
- Apply synchronization mechanisms: Use locks, semaphores, and monitors appropriately.
- Meet correctness criteria: Guarantee safety, fairness, bounded waiting, and portability.
- Implement atomic operations: Use indivisible P/V or wait/signal primitives correctly.
Chapter Content:
1 Race Conditions
2 Mutual Exclusion
3 Locks
4 Semaphores
5 Monitors- Questions about Chapter 2 are asked and answered in this forum.
- Chapter 3: Interprocess CommunicationCette section
Chapter 3: Interprocess Communication
Chapter 3: Interprocess Communication
Objectives
- Understand process cooperation: Distinguish independent vs. cooperative processes and identify why IPC is needed.
- Master shared memory IPC: Use memory segments for high-speed data exchange with proper synchronization.
- Apply message passing: Implement mailbox/port-based communication for decoupled, asynchronous messaging.
- Use pipes effectively: Leverage anonymous and named pipes (FIFOs) for unidirectional process communication.
- Program socket communication: Build networked and local IPC using TCP, UDP, and UNIX domain sockets.
- Solve classic synchronization problems: Apply IPC primitives to Producer-Consumer and Readers-Writers scenarios.
Chapter Content:
1 Process Cooperation 2 Shared Memory 3 Message Passing (Mailboxes/Ports) 4 Pipes 5 Sockets
- Questions about Chapter 3 are asked and answered in this forum.
- Chapter 4: Deadlock
Chapter 4: Deadlock
Chapter 4: Deadlock
Objectives
- Understand deadlock fundamentals: Define deadlock and recognize why it threatens system reliability and performance.
- Identify the four necessary conditions: Mutual exclusion, hold-and-wait, no preemption, circular wait.
- Model resource allocation: Use Resource Allocation Graphs (RAG) to visualize and detect potential deadlocks.
- Apply deadlock handling strategies: Compare prevention, avoidance, and detection/recovery approaches.
- Implement the Banker's Algorithm: Use safety checks to avoid unsafe states in resource allocation.
- Design recovery mechanisms: Handle deadlocks via process termination or resource preemption when they occur.
Chapter Content:
1 Introduction to Deadlock 2 System Model & Resource Types 3 Four Necessary Conditions for Deadlock 4 Resource Allocation Graph (RAG) 5 Deadlock Handling Methods
- Prevention (Break one necessary condition)
- Avoidance (Banker's Algorithm)
- Detection & Recovery
- Ignore (Ostrich)
- Questions about Chapter 4 are asked and answered in this forum.
- Announcement: short exam
- Test for Exam Preparation