How shanju1010/os-program-demo works
This repository is a set of standalone C operating-system lab demonstrations, not one integrated application. The user supplies inputs to an individual program, which runs an algorithm or system-call demonstration and prints its results. The README highlights CPU scheduling and producer–consumer synchronization; the tree and sampled source also show memory allocation and paging, deadlock avoidance, disk scheduling, dining philosophers, process creation, and file copying. Programs are independent; edges show only their user-facing run-and-output behavior, not calls between them.
Main entry points: fcfs-cpu-scheduling.c FCFS scheduling · sjf-non-preemptive-scheduling.c SJF scheduling · round-robin-cpu-scheduling.c Round Robin · priority-cpu-scheduling.c Priority scheduling
Components 14
CPU Scheduling
- FCFS scheduling
fcfs-cpu-scheduling.c - SJF scheduling
sjf-non-preemptive-scheduling.c - Round Robin
round-robin-cpu-scheduling.c - Priority scheduling
priority-cpu-scheduling.c
Memory And Resources
- Contiguous allocation
11 Memory Management - Contiguous Allocation.c - Page replacement
Memory Management - Page Replacement Algorithms.c - Banker's algorithm
Deadlock Avoidance - Banker's Algorithm.c - Disk scheduling
Disk-Scheduling-Algorithms.c
Synchronization
- Producer-consumer
producer-consumer-semaphores.c - Dining philosophers
PS-Dining Philosophers Problem using Semaphores.c
Process And Files
- Fork exec wait
os_lab_fork_exec_wait.c - System-call file copy
file-copy-system-calls.c
Other components
- Lab user
- Console results
Connections 24
- Lab user → FCFS scheduling: provides process data
- FCFS scheduling → Console results: prints metrics
- Lab user → SJF scheduling: provides process data
- SJF scheduling → Console results: prints metrics
- Lab user → Round Robin: provides process data
- Round Robin → Console results: prints metrics
- Lab user → Priority scheduling: provides process data
- Priority scheduling → Console results: prints metrics
- Lab user → Contiguous allocation: provides block and process sizes
- Contiguous allocation → Console results: prints allocations
- Lab user → Page replacement: provides page references
- Page replacement → Console results: prints faults and frames
- Lab user → Banker's algorithm: provides resource data
- Banker's algorithm → Console results: prints safety results
- Lab user → Disk scheduling: provides requests and head data
- Disk scheduling → Console results: prints seek results
- Lab user → Producer-consumer: runs demonstration
- Producer-consumer → Console results: prints activity
- Lab user → Dining philosophers: runs demonstration
- Dining philosophers → Console results: prints activity
- Lab user → Fork exec wait: runs demonstration
- Fork exec wait → Console results: prints process status
- Lab user → System-call file copy: provides file names
- System-call file copy → Console results: reports copy result