How overtekk/codexion works
Codexion simulates coders competing for shared dongles under FIFO or EDF scheduling. The runtime starts by validating the eight command-line parameters and initializing simulation state, then creates coder and monitor threads. Each coder requests dongles through the selected scheduler, compiles, releases dongles, then debugs and refactors; monitoring ends the run on burnout or when all coders meet the compile target. Mutex-protected state and serialized logs support concurrency. The README documents both scheduling policies; some lifecycle wiring is not shown in the excerpts, so those links are omitted.
Main entry points: coder.c Coder actions · monitoring.c Burnout monitor · main.c Program entry · scheduler_edf.c EDF scheduler
Components 15
Startup and state
- Program entry
coders/main.c - Argument validation
coders/utils/check_arguments.c - Simulation state
coders/utils/init_struct.c - Thread lifecycle
coders/thread_managements/create_thread.c
Simulation runtime
- Coder actions
coders/simulation/coder.c - Burnout monitor
coders/simulation/monitoring.c
Dongle scheduling
- Dongle management
coders/simulation/dongles_management.c - FIFO scheduler
coders/simulation/scheduler_fifo.c - EDF scheduler
coders/simulation/scheduler_edf.c - FIFO queue
coders/thread_managements/chained_queue.c - EDF priority heap
coders/thread_managements/heap_queue.c
Synchronization and output
- Mutex setup
coders/thread_managements/create_mutex.c - State accessors
coders/utils/getter.c - Simulation logs
coders/simulation/logs.c
Other components
- CLI user
Connections 16
- CLI user → Program entry: runs
README.md - Program entry → Argument validation: validates input
coders/main.c - Argument validation → Simulation state: initializes state
coders/utils/check_arguments.c - Program entry → Mutex setup: initializes locks
coders/main.c - Program entry → Thread lifecycle: starts and joins
coders/main.c - Coder actions → FIFO scheduler: selects FIFO
coders/simulation/coder.c - Coder actions → EDF scheduler: selects EDF
coders/simulation/coder.c - Coder actions → Dongle management: releases dongles
coders/simulation/coder.c - Coder actions → Simulation logs: logs actions
coders/simulation/coder.c - FIFO scheduler → FIFO queue: manages queue
- EDF scheduler → EDF priority heap: pushes and pops
coders/simulation/scheduler_edf.c - EDF scheduler → Dongle management: requests dongles
coders/simulation/scheduler_edf.c - Burnout monitor → State accessors: checks state
coders/simulation/monitoring.c - Burnout monitor → Simulation logs: logs burnout
coders/simulation/monitoring.c - Burnout monitor → FIFO queue: wakes waiters
coders/simulation/monitoring.c - Burnout monitor → EDF priority heap: wakes waiters
coders/simulation/monitoring.c