CLI Reference¶
Schedsim provides four command-line tools for generating task sets, running simulations, analyzing traces, and testing multi-cluster allocators.
schedsim¶
Run a real-time scheduling simulation on a given platform and scenario.
schedsim -i scenario.json -p platform.json [options]
Options¶
Option |
Default |
Description |
|---|---|---|
|
(required) |
Scenario file (JSON) |
|
(required) |
Platform configuration file (JSON) |
|
|
Scheduling algorithm. Currently only |
|
|
Bandwidth reclamation: |
|
|
DVFS policy: |
|
|
Minimum time between DVFS transitions (milliseconds) |
|
|
DPM policy: |
|
|
Target C-state level for DPM idle transitions |
|
auto |
Simulation duration in seconds. When |
|
Enable energy tracking |
|
|
Enable context switch overhead modelling |
|
|
|
Trace output file path |
|
|
Output format: |
|
Print summary metrics to stderr after simulation |
|
|
Verbose progress messages on stderr |
|
|
Show help and exit |
Behavioural Notes¶
When
--dvfsisffaorcsf, the--dpm basicoption is silently ignored because FFA and CSF manage DPM internally.The
--dpm-cstatevalue is passed to FFA/CSF even though--dpmis ignored, controlling the idle C-state used by those policies.
Exit Codes¶
Code |
Meaning |
|---|---|
|
Success |
|
Configuration or runtime error (bad JSON, I/O failure) |
|
Admission control failure (task set exceeds schedulable bound) |
|
Invalid command-line arguments |
Example¶
# EDF with GRUB reclamation and FFA DVFS on Exynos 5422
schedsim -i scenario.json -p platforms/exynos5422.json \
--reclaim grub --dvfs ffa --dvfs-cooldown 1 \
--energy -o trace.json
See Your First Simulation and DVFS and Energy Management for step-by-step walkthroughs.
schedgen¶
Generate random task sets using UUniFast-Discard with configurable period distributions and optional Weibull-distributed job execution times.
schedgen -n 10 -u 3.0 [options]
Options¶
Option |
Default |
Description |
|---|---|---|
|
(required) |
Number of tasks to generate |
|
(required) |
Target total utilization (can exceed 1.0 for multicore) |
|
|
Minimum per-task utilization [0, 1] |
|
|
Maximum per-task utilization [0, 1] |
|
|
Weibull success rate for deadline budget (0, 1] |
|
|
Compression ratio (min job duration / WCET) [0, 1] |
|
|
Period selection: |
|
|
Minimum period in ms (range mode only) |
|
|
Maximum period in ms (range mode only) |
|
Use log-uniform period distribution (default for range mode) |
|
|
Use uniform period distribution (range mode only) |
|
|
|
Simulation duration in seconds for job generation (range mode only).
When |
|
|
Actual execution / WCET ratio for job durations (range mode only) |
|
|
Output file path |
|
Random seed for reproducibility |
|
|
Show help and exit |
Generation Modes¶
Range mode (default) draws periods uniformly or log-uniformly from
[period-min, period-max]. WCET is derived from the UUniFast utilization
split. If --duration is specified, concrete jobs are generated up to that
time with execution times scaled by --exec-ratio.
Harmonic mode is the legacy name for a fixed 100–500 microsecond period
grid. It produces Weibull-distributed job execution times controlled by
--success and --compression.
Batch Mode¶
Generate multiple task sets in parallel:
Option |
Default |
Description |
|---|---|---|
|
Number of scenarios to generate |
|
|
(required with |
Output directory (created if it does not exist) |
|
hardware concurrency |
Number of parallel threads |
Files are named 1.json, 2.json, … in the output directory.
Validation Rules¶
num_tasks >= 1utilization > 0uminandumaxmust be in [0, 1] andumin <= umaxnum_tasks * umin <= utilization <= num_tasks * umax(feasibility)In range mode:
period-min <= period-max,exec-ratioin (0, 1],utilization <= num_tasks
Examples¶
# 10 implicit-deadline tasks, total U=3.0, log-uniform periods, with jobs
schedgen -n 10 -u 3.0 --period-min 5 --period-max 200 -d 1.0 -o taskset.json
# Fixed-grid task set (legacy harmonic mode, 90% success rate)
schedgen -n 8 -u 2.5 --period-mode harmonic -s 0.9 -c 0.5 -o taskset.json
# Batch: 1000 task sets with 4 threads
schedgen -n 10 -u 3.5 -d 0.5 --batch 1000 --dir scenarios/ --threads 4
See Generating and Loading Scenarios for detailed usage.
schedview¶
Compute scheduling metrics from simulation trace files.
schedview trace.json [options]
Options¶
Option |
Default |
Description |
|---|---|---|
|
Positional argument: path to a JSON trace file |
|
|
Process all |
|
|
Show per-task deadline miss details |
|
|
Show per-task response time statistics |
|
|
Show energy breakdown per processor |
|
|
|
Output format: |
|
Show help and exit |
Either a positional trace file or --directory is required.
Batch Mode¶
When --directory is given, schedview processes all *.json files in
the directory (sorted alphabetically) and produces combined output. In CSV
format, each row contains the filename plus all metrics including extra columns
not shown in single-file mode:
transitions— frequency transition eventscluster_migrations— tasks moved between clusterscore_state_requests— C-state change requestsfrequency_requests— DVFS frequency change requests
Examples¶
# Text summary with energy
schedview trace.json --energy
# CSV output with full stats
schedview trace.json --format csv --energy --response-times
# Batch: all traces in a directory
schedview -d traces/ --format csv --energy > results.csv
See Trace Analysis and Metrics for metrics interpretation.
alloc¶
Test multi-cluster task allocation strategies. Runs a simulation with the chosen allocator and reports the allocation result.
alloc -i scenario.json -p platform.json -a ff_big_first [options]
Options¶
Option |
Default |
Description |
|---|---|---|
|
(required) |
Scenario file (JSON) |
|
(required) |
Platform configuration file (JSON) |
|
(required) |
Allocator name (see table below) |
|
|
Allocation granularity: |
|
Allocator argument as |
|
|
Utilization target for LITTLE clusters (perf < 1.0) |
|
|
|
Reclamation: |
|
|
DVFS policy: |
|
|
DVFS cooldown in ms |
|
Verbose progress on stderr |
|
|
Show help and exit |
Allocators¶
Name |
Description |
|---|---|
|
First-fit, big cluster first |
|
First-fit, little cluster first |
|
First-fit with capacity checking |
|
Capacity-aware with linear adaptation |
|
Capacity-aware with polynomial adaptation |
|
First-fit with load balancing |
|
Counts allocations without simulating (result = allocation count) |
|
Classic first-fit |
|
Worst-fit (most remaining capacity) |
|
Best-fit (least remaining capacity) |
|
Monte Carlo tree search with a fixed pattern |
Allocator Arguments¶
The --alloc-arg option passes key-value pairs to allocators. Currently
only mcts uses this:
alloc -i s.json -p p.json -a mcts -A pattern=0,1,0,1
The pattern value is a comma-separated list of cluster indices.
Behavioural Notes¶
In
per-coremode,--reclaimand--dvfsare ignored with a warning on stderr.--dvfssupportsffa-timerandcsf-timermodes that are not available inschedsim.The
countingallocator returns the number of allocations instead of rejected tasks.The
ff_cap_adaptive_linearandff_cap_adaptive_polyallocators automatically receive the total scenario utilization for their adaptation logic.
Output Format¶
A single semicolon-separated line per run:
<scenario-file>;<allocator>;<result>
Where <result> is the number of rejected tasks (or allocation count for
counting). For ff_cap with --target, the allocator label includes
the target value (e.g. ff_cap_0.5).
Exit Codes¶
Code |
Meaning |
|---|---|
|
Success |
|
Configuration or runtime error |
|
Admission control failure |
|
Invalid command-line arguments |
Example¶
# Test first-fit big-first with GRUB on Exynos 5422
alloc -i scenario.json -p platforms/exynos5422.json \
-a ff_big_first --reclaim grub
# Per-core granularity
alloc -i scenario.json -p platforms/orion6.json \
-a worst_fit -g per-core