This repository contains various C programs written for understanding core concepts of Operating Systems. Each file represents a different scheduling algorithm, memory management technique, or synchronization problem.
fcfs.c: First-Come, First-Served scheduling.sjf.c: Shortest Job First scheduling.roundrobin.c: Round Robin scheduling.proirity.c(Note: may be a typo forpriority.c): Priority scheduling.
diskfcfs.c: Disk scheduling using First-Come, First-Served.disksstf.c: Shortest Seek Time First disk scheduling.diskscan.c: SCAN disk scheduling algorithm.
pagefifo.c: FIFO (First In First Out) page replacement.pagelru.c: LRU (Least Recently Used) page replacement.pagelfu.c: LFU (Least Frequently Used) page replacement.
phill.c: Dining Philosophers problem.producerconsumer.c: Producer-Consumer problem using semaphores.pipe.c: Inter-process communication using anonymous pipes.sharedmemory.c: Shared memory demonstration usingshmgetandshmat.
banker.c: Banker's Algorithm for deadlock avoidance.
a.exe: Executable file (likely compiled output).
You can compile any of the .c files using gcc:
gcc filename.c -o output
./outputMake sure you have build-essential tools installed:
sudo apt update && sudo apt install build-essential- These programs are primarily intended for educational purposes and OS lab practice.
- Contributions and improvements are welcome!