This project is a modular operating system simulation developed as part of the Operating Systems (CSEN 602) course.
It implements core OS concepts including process management, memory allocation, scheduling algorithms, synchronization, and system calls, with a clear system architecture centered around a kernel and modular components.
- Process Scheduling Algorithms (RR, HRRN, MLFQ)
- Memory Management & Swapping
- Synchronization (Mutex & Semaphores)
- System Calls & Interpreter Design
- Process Control Blocks (PCB)
- Modular OS Architecture
The system follows a modular kernel-based design, where a central kernel coordinates all subsystems:
- Kernel → Controls system execution and coordination
- Process Manager → Handles process creation and lifecycle
- Scheduler → Implements RR, HRRN, and MLFQ
- Memory Manager → Allocates memory and enforces boundaries
- Swap Manager → Handles process swapping between memory and disk
- Interpreter → Executes program instructions
- System Calls Layer → Handles I/O and memory operations
- Mutex Manager → Ensures mutual exclusion on shared resources
- Queues → Ready & Blocked process queues
- Trace Module → Logs system state at each clock cycle
-
Processes created from program text files at configurable arrival times
-
Each process has a PCB containing:
- Process ID
- State
- Program Counter
- Memory Boundaries
-
Full lifecycle simulation (Ready, Running, Blocked, Finished)
-
Fixed memory size: 40 words
-
Stores:
- Instructions
- Variables
- PCB data
-
Memory protection between processes
-
Process swapping to disk when memory is full
- Round Robin (RR) → Preemptive scheduling with time slices
- Highest Response Ratio Next (HRRN) → Non-preemptive scheduling
- Multi-Level Feedback Queue (MLFQ) → Multi-priority scheduling system
-
Mutexes for:
- File access
- User input
- Output display
-
Uses:
semWaitsemSignal
-
Blocked queues for waiting processes
- File read/write
- User input handling
- Output display
- Memory read/write operations
Executes instructions from program files, including:
assignprintreadFilewriteFileprintFromTosemWait/semSignal
- Ready & Blocked queues after each scheduling event
- Current executing process
- Executed instruction per cycle
- Memory state at each clock cycle
- Process swapping logs (memory ↔ disk)
- C Programming Language
- Data Structures & Algorithms
- Operating Systems Concepts
- Designed to simulate core OS behavior, not a full production OS
- Emphasis on correctness, modularity, and system architecture
Developed as part of coursework at the German University in Cairo.