How mo2hefny/process_scheduler works
Process Scheduler simulates multiprocessor scheduling from a user-selected input file, advances processes through scheduling and I/O states, and writes process and processor statistics. The principal workflow is input loading → timestep simulation → statistics/output, with UI monitoring alongside execution. Scheduling algorithms, process state, and queue/container implementations form the main internal layers. The README documents simulation stages and capabilities; sampled source confirms the entry point, UI interactions, and core data structures, but not every scheduler-to-processor call.
Main entry points: Scheduler.cpp Scheduler · Processor.cpp Processor base · UI.cpp Simulation UI · LinkedQueue.h Linked queue
Components 23
Application flow
- Program entry
main.cpp - Simulation UI
UI/UI.cpp
Simulation domain
- Scheduler
Scheduler/Scheduler.cpp - Input loading
Scheduler/Scheduler.cpp - Timestep simulation
Scheduler/Scheduler.cpp - Process transitions
Scheduler/Scheduler.cpp - Migration and stealing
Scheduler/Scheduler.cpp - Statistics and output
Scheduler/Scheduler.cpp - Process state
Process/Process.cpp
Scheduling algorithms
- Processor base
Processors/Processor.cpp - FCFS scheduling
Processors/First_Come_First_Serve.cpp - SJF scheduling
Processors/Shortest_Job_First.cpp - Round Robin
Processors/Round_Robin.cpp - Deadline scheduling
Processors/Earliest_Deadline_First.cpp
Data structures
- Domain definitions
DEFS.h - Linked list
Data Structures/Linked List/LinkedList.h - Linked node
Data Structures/Node.h - Linked queue
Data Structures/Queue/LinkedQueue.h - Priority queue
Data Structures/Queue/PriorityQueue.h - Queue interface
Data Structures/Queue/QueueADT.h - Array stack
Data Structures/Stack/ArrayStack.h - Stack interface
Data Structures/Stack/StackADT.h
Other components
- User
Connections 24
- User → Program entry: starts
main.cpp - Program entry → Scheduler: creates
main.cpp - Scheduler → Input loading: loads input
README.md - Input loading → Timestep simulation: provides processes
README.md - Timestep simulation → Process transitions: advances states
README.md - Timestep simulation → Migration and stealing: handles migration
README.md - Timestep simulation → Statistics and output: collects results
README.md - Scheduler → Simulation UI: creates UI
- Simulation UI → Scheduler: reads simulation
UI/UI.cpp - Scheduler → Process state: manages processes
- Scheduler → Processor base: uses processors
- Processor base → FCFS scheduling: specialized by
- Processor base → SJF scheduling: specialized by
- Processor base → Round Robin: specialized by
- Processor base → Deadline scheduling: specialized by
- Scheduler → Statistics and output: writes output
README.md - Simulation UI → Linked queue: prints lists
UI/UI.cpp - Simulation UI → Priority queue: prints ready queues
UI/UI.cpp - Linked list → Linked node: links nodes
Data Structures/Linked List/LinkedList.h - Linked queue → Linked node: links nodes
Data Structures/Queue/LinkedQueue.h - Priority queue → Linked node: uses nodes
Data Structures/Queue/PriorityQueue.h - Linked queue → Queue interface: implements
Data Structures/Queue/LinkedQueue.h - Array stack → Stack interface: implements
Data Structures/Stack/ArrayStack.h - Process state → Domain definitions: uses process data