This repository contains a collection of Operating Systems (OS) lab programs and theory notes, implemented in C and shell scripting. These are designed for academic and practical understanding of key OS concepts such as process management, memory management, and file systems.
- ALP Program
- Classical Problems – Solutions to classical synchronization problems like Producer-Consumer, Reader-Writer, Dining Philosophers.
- Computing Time – Programs to calculate system and user execution time.
- Deadlock – Deadlock detection and avoidance algorithms.
- Disk Scheduling Algorithms – FCFS, SSTF, SCAN, C-SCAN, etc.
- Matrix Operations – OS-relevant matrix operations.
- Multi-Threading Theory – Theoretical concepts of multithreading.
- MultiThreading – Practical implementation using
pthread
. - Page Replacement Algorithms – FIFO, LRU, Optimal algorithms.
- Read and Copy File Content – Programs to demonstrate basic file handling.
- ShellAdvanceProgram – Advanced shell scripting examples.
- System Call – Demonstration of Linux system calls like
fork()
,exec()
,wait()
. - Zombie_Orphan – Understanding zombie and orphan processes.
- shellScripting – Basic shell scripting exercises.
- how to run Threaded Code – Instructions for compiling and running threaded C programs.
- Clone the repository:
git clone https://github.com/athrocks/OS.git
cd OS
- Navigate to any directory and compile the C programs:
gcc filename.c -o outputname -lpthread
./outputname
- For shell scripts, provide execute permission and run:
chmod +x script.sh
./script.sh
Requirements
-
GCC Compiler (for C programs)
-
Bash (for shell scripts)
-
Linux-based OS recommended for compatibility