This repository contains 10 Operating System practical programs designed for B.Sc. Computer Science Second Year students. The practicals cover the fundamental concepts of Operating Systems using Python, including Process Synchronization, Inter-Process Communication (IPC), Multithreading, Thread Synchronization, Readers-Writers Problem, Producer-Consumer Problem, and CPU Scheduling Algorithms.
Each practical includes:
- Aim
- Python Source Code
- Sample Output
- Explanation
- Viva Questions (optional)
- Beginner-friendly implementation
Aim: To implement the Producer–Consumer problem using Semaphores for process synchronization.
Topics Covered
- Process Synchronization
- Producer Process
- Consumer Process
- Semaphore
- Multiprocessing
Aim: To demonstrate Inter-Process Communication (IPC) using Shared Memory and Message Passing techniques.
Topics Covered
- IPC
- Shared Memory
- Message Passing
- Queue
- Multiprocessing
Aim: To study thread creation and the thread life cycle using Python threading.
Topics Covered
- Threads
- Thread Creation
- Thread States
- Thread Execution
- Join()
Aim: To compare Sequential Execution and Multithreaded Execution and analyze execution time.
Topics Covered
- Sequential Processing
- Multithreading
- Performance Comparison
- Execution Time
Aim: To implement thread synchronization using Locks and demonstrate thread safety while accessing shared resources.
Topics Covered
- Lock
- Critical Section
- Race Condition
- Thread Safety
- Shared Variables
Aim: To simulate the Producer–Consumer (Bounded Buffer) problem using Mutex Locks and Semaphores.
Topics Covered
- Mutex
- Semaphore
- Bounded Buffer
- Synchronization
- Multithreading
Aim: To implement the Readers–Writers Problem with reader and writer prioritization.
Topics Covered
- Readers-Writers Problem
- Synchronization
- Shared Resources
- Locks
- Concurrency
Aim: To simulate the First Come First Serve (FCFS) CPU Scheduling Algorithm.
Topics Covered
- CPU Scheduling
- FCFS
- Process Scheduling
- Burst Time
- Arrival Time
Aim: To analyze Waiting Time, Turnaround Time, and Gantt Chart generation for CPU Scheduling.
Topics Covered
- Waiting Time
- Turnaround Time
- Gantt Chart
- Scheduling Analysis
- CPU Utilization
Aim: To implement the Round Robin CPU Scheduling Algorithm using a configurable Time Quantum.
Topics Covered
- Round Robin Scheduling
- Time Quantum
- Context Switching
- CPU Scheduling
- Performance Analysis
- Python 3.x
- multiprocessing
- threading
- queue
- concurrent.futures
- time
- random
After completing these practicals, students will be able to:
- Understand Operating System fundamentals.
- Implement Process Synchronization techniques.
- Demonstrate Inter-Process Communication (IPC).
- Create and manage Threads.
- Apply Thread Synchronization using Locks and Semaphores.
- Solve Producer-Consumer and Readers-Writers problems.
- Implement CPU Scheduling algorithms.
- Analyze Scheduling performance using Waiting Time, Turnaround Time, and Gantt Charts.
- Compare Sequential and Parallel execution.
Operating-System-Practicals/
│
├── Practical-01/
├── Practical-02/
├── Practical-03/
├── Practical-04/
├── Practical-05/
├── Practical-06/
├── Practical-07/
├── Practical-08/
├── Practical-09/
├── Practical-10/
│
└── README.md
- Python 3.x
- VS Code / PyCharm / IDLE
- Basic knowledge of Python
- Basic understanding of Operating System concepts
- Clone the repository.
git clone https://github.com/yourusername/Operating-System-Practicals.git-
Open the project folder.
-
Navigate to the required practical.
-
Run the Python program.
python practical.py- Operating System Basics
- Processes
- Threads
- Synchronization
- Mutex
- Semaphores
- Locks
- Inter-Process Communication (IPC)
- Shared Memory
- Message Passing
- Producer-Consumer Problem
- Readers-Writers Problem
- CPU Scheduling
- FCFS Scheduling
- Round Robin Scheduling
- Waiting Time
- Turnaround Time
- Gantt Chart
- B.Sc. Computer Science
- B.Sc. IT
- BCA
- MCA (Basics)
- Python Operating System Laboratory
Aditya G. Nanaware
Assistant Professor
Department of Computer Science
This project is created for educational and academic purposes.