A simplified simulation of core Operating System functionalities, designed to demonstrate how modern OS components interact with hardware, manage processes, and execute tasks efficiently.
-
Hardware Resources
Simulated CPU cores and memory blocks for resource management and allocation. -
Operating System Boot
Initializes hardware abstraction, sets up process tables, and loads system modules. -
Instruction Guide
A CLI-based user guide to help users interact with and test various OS features. -
Task Execution
Tasks are executed usingexeclp, enabling isolated child processes to simulate real-world execution. -
Process Scheduling
A dynamic scheduler backed by a circular queue structure that ensures fair and efficient process execution. -
Process Lifecycle
Complete management of process creation, execution, waiting, and termination, with proper resource cleanup. -
Data Storage
Simulated file and block-based storage for temporary data generated by processes. -
Handling Interrupts
InstalledSIGCHLDhandlers to detect child process terminations and trigger resource deallocation.
null
-
Uncontrolled Task Execution
Tasks failed to run in sequence.
✅ Fixed usingexeclpin child processes along with the--waitflag to ensure sequential execution. -
Inefficient Process Queuing
Resource limitations blocked new processes.
✅ Solved with a circular queue and retry logic in the scheduler when resources become available. -
Resource Leakage on Process Termination
Memory/CPU remained locked after task exit.
✅ Resolved by handlingSIGCHLD, deallocating resources, and removing stale process table entries.
- Deep understanding of process lifecycle from creation to termination.
- How OS manages hardware resources, including CPU time and memory.
- The critical role of context switching for smooth multitasking.
- Why and how resource leaks affect system stability, and ways to prevent them.
- Implemented real-world OS concepts like interrupt handling, child processes, and dynamic scheduling.
- Clone the repo
git clone https://github.com/MahrozSarmad/OperatingSystemSimul