3. Materials and Methods
3.1. nSim-RV Timing-Oriented Framework
The experimental infrastructure used is built around nSim-RV, a configurable RISC-V simulation framework for timing evaluation under real-time workloads. The framework is designed to execute controlled experiments in which identical workload and scheduling conditions are preserved across different execution organizations. Its purpose is not to replace full-system architectural simulators, but to provide a compact and reproducible environment for observing timing variability, scheduler-induced execution effects, workload-density behavior, and deadline-oriented trends under periodic real-time workloads. nSim-RV advances execution in cycle steps and combines instruction-level execution control with explicit pipeline-state modeling.
This execution model allows the same experimental workload to be evaluated under different execution organizations while preserving a common scheduler, timing model, and instrumentation interface. This allows the same experimental workload to be evaluated under different execution organizations while preserving a common scheduler, timing model, and instrumentation interface. The framework compares conventional Standard shared-pipeline execution with an nMPRA-inspired preserved-context execution mode. The nMPRA and nHSE concepts provide the architectural background for preserved execution context and hardware-supported scheduling in real-time systems [
8,
9]. In nSim-RV, these concepts are modeled at the execution-organization level and are used as a controlled comparison case, rather than as a cycle-accurate reproduction of a specific hardware implementation.
At simulation level, the Standard mode uses a shared in-flight pipeline state across tasks. When a task switch occurs, the currently active pipeline context is interrupted, and useful pipeline progress must be rebuilt before the resumed task can continue. In the nMPRA-inspired mode, task-specific architectural state and pipeline-related execution state are maintained per context, including the program counter, general-purpose register state, and modeled pipeline-stage registers. A resumed task can therefore continue from its preserved state rather than rebuilding execution progress in a shared pipeline. This abstraction captures the timing effect of preserved context on task resumption while avoiding claims of cycle-accurate equivalence to a specific hardware implementation.
The framework also supports configurable pipeline depth. The 4-stage configuration merges execution and memory access into a combined EX/MEM stage followed by writeback, whereas the 5-stage configuration follows the conventional IF, ID, EX, MEM, and WB organization. The 5-stage configuration serves as the primary reference, while the 4-stage configuration replicates the full experimental matrix to verify that timing-scalability trends are not specific to a single pipeline depth.
A central methodological requirement in nSim-RV is that scheduling conditions remain consistent across configurations. Task release, period, deadline, budget, and completion information are tracked through the same timing model, while context-switch and execution-progress indicators are collected through a common instrumentation interface. This makes it possible to compare execution modes and pipeline configurations without introducing additional variability caused by different scheduler policies or workload definitions.
The scheduler used in the evaluation is a fixed-priority preemptive scheduler. Each task is assigned a static priority in the workload configuration, and released jobs become eligible according to their configured period and release offset. At each scheduling decision point, the ready job with the highest priority is selected for execution; if multiple ready jobs share the same priority, a deterministic task-identifier order is used as tie-breaking. A newly released higher-priority job may preempt the currently executing task. The same scheduler policy, priority assignment, release model, execution budgets, and deadline definitions are preserved across Standard and nMPRA-inspired execution modes.
Figure 1 summarizes the nSim-RV evaluation workflow used in this study, from reproducible configuration inputs to automated campaign execution, dataset aggregation, and timing-scalability analysis.
The framework records both scheduler-level and execution-level timing information. At the scheduler level, it tracks task activations, completed jobs, response-time behavior, deadline misses, and context-switch activity. At the execution level, it records pipeline-related timing statistics and progress indicators needed to characterize workload-density effects. These measurements support the scalability-oriented metrics used, including response-time variability, execution jitter, deadline miss ratio, context-switch and switch-overhead indicators, and phase-oriented scalability behavior.
3.2. Experimental Orchestration Workflow
The experimental workflow implemented around nSim-RV is organized as a configuration-driven process. Each simulation run is generated from an explicit set of workload, timing, and execution parameters, including workload class, task count, observation window, execution mode, pipeline organization, and cache setting. This structure follows established reproducibility practices, where explicit configuration metadata and repeatable execution procedures support consistent evaluation across large design spaces [
10,
11].
The first stage defines the experimental design matrix. This matrix combines the selected workload classes, task-count settings, observation-window durations, execution modes, pipeline configurations, and cache modes. Each generated configuration therefore represents a unique experimental point that can be reproduced, inspected, or rerun under the same input conditions. By explicitly encoding these dimensions, the workflow reduces the risk of implicit configuration changes between simulation runs.
The second stage performs automated campaign generation and execution. The orchestration scripts expand the design matrix into executable simulation scenarios, instantiate the corresponding nSim-RV configuration files, launch the simulator, and store the raw outputs using consistent naming and metadata conventions. This automated process limits manual intervention and ensures consistent execution across all evaluated configurations.
Table 2 summarizes the main stages of the nSim-RV orchestration process and the artifacts generated at each stage.
During each run, nSim-RV executes the selected workload under the configured execution model and scheduler-controlled task model. The simulator records both raw execution outputs and structured timing information, including task-level response behavior, completed jobs, deadline-related data, context-switch activity, and execution-progress indicators. The same output structure is used across workloads, execution modes, and pipeline configurations, which simplifies aggregation and supports consistent comparison.
After simulation execution, the aggregation pipeline merges the per-run outputs into CSV and JSON datasets. Each row is associated with explicit metadata describing the corresponding experimental configuration. The aggregation process uses a composite configuration key based on pipeline stage count, execution mode, workload, task count, observation window, and cache mode. This key is used to identify duplicate configurations and retain a single authoritative result for each unique configuration.
The validated dataset is then used as input for timing-scalability analysis. The analysis stage derives the metrics used, including response-time variability, execution jitter, deadline miss ratio, context-switch demand, modeled switch-overhead pressure, average IPC, and scalability-phase behavior. Average IPC is retained as a secondary throughput reference for interpreting degradation trends under increasing task-count pressure, while the primary interpretation remains focused on timing variability, deadline pressure, and scheduler-induced execution effects.
This separation of concerns, design-space generation, simulation execution, aggregation, validation, and metric extraction as distinct stages, is what makes the methodology portable to alternative execution models, scheduling policies, or workload classes without re-engineering the orchestration layer.
3.3. Workload and Scalability Configuration
The evaluation configuration is designed to expose timing behavior under increasing workload density while preserving comparability across execution modes and pipeline organizations. For this reason, the experimental space combines workload diversity, task-count scaling, observation-window scaling, execution-mode variation, pipeline-depth variation, and cache configuration.
Three workload classes are used in the evaluation. CoreMark is included as a compute-oriented embedded benchmark designed to provide a compact and portable measure of processor execution capability [
24]. Dhrystone is included as a classical integer benchmark with branch and control-flow characteristics that remain useful for lightweight embedded evaluation contexts [
25]. In addition, RT-Control is used as a synthetic control-oriented workload designed to expose scheduler-induced timing variability under increasing task-count pressure. RT-Control is not treated as a standardized benchmark; instead, it provides controlled periodic task sets with reproducible activations, execution budgets, and deadline-pressure conditions.
RT-Control uses two deterministic generation paths, depending on the experiment type. The first path supports the unified scalability sweeps and builds task sets by selecting the first N templates from a fixed pool. This path supports the evaluated scalability counts, including N = 2, and maps the generated tasks to the RT-Control workload program. For example, the N = 2 configuration is deterministically generated from the first two templates of the pool: Task 0 uses priority 1, WCET 20000 cycles, period 40000 cycles, and next release 0, while Task 1 uses priority 2, WCET 50 cycles, period 1000 cycles, and next release 0.
The second path supports the targeted C1–C4 validation scenarios. These scenarios start from explicit four-task JSON configurations representing baseline, preemption-stress, near-overload, and tight-deadline cases. In this path, scaling below four tasks is not supported; larger task sets are generated by replicating the four-task base configuration. During replication, periods and implicit deadlines are scaled by the replication factor, execution budgets are preserved, and release offsets are interleaved deterministically. Nominal scenarios use implicit deadlines equal to task periods, whereas tight-deadline scenarios explicitly define constrained deadlines.
Table 3 summarizes the two RT-Control workload-generation paths used in the evaluation. This distinction is important for reproducibility because task counts below four are generated only by the unified template-pool mechanism and not by the four-task scenario replication mechanism.
For reproducibility, the complete RT-Control template pool and the generated scenario files are treated as part of the experimental artifacts. The manuscript reports the workload-generation mechanism and a representative N = 2 configuration, while the full set of task templates, generated JSON configurations, workload program mappings, aggregation scripts, and phase-classification scripts are provided as supporting artifacts according to the Data Availability Statement.
Across both generation paths, the same scheduler semantics and task definitions are preserved when comparing Standard and nMPRA-inspired execution modes. This ensures that differences observed between the execution organizations are not caused by different workload definitions within the same evaluated configuration. The unified scalability sweep is used to support task-count scalability analysis, while the C1–C4 scenario path provides targeted validation cases for baseline, preemption-stress, near-overload, and tight-deadline behavior.
Task-count scaling uses selected values from N = 2 to N = 32 concurrent tasks, depending on the generation path and the available validated configurations. The selected task-count set covers low-density, intermediate, saturation-oriented, and high-pressure workload regions without assuming continuous coverage of every possible task count. This design allows the evaluation to observe how response-time variability, execution jitter, deadline miss behavior, switch-overhead pressure, and throughput retention evolve as the number of scheduler-managed execution contexts increases.
Observation-window scaling is performed using fixed execution intervals of 50k, 100k, 500k, and 1M simulation cycles. The use of fixed observation windows provides a common basis for comparing configurations under identical simulation budgets. Shorter windows capture bounded early run timing behavior, whereas longer windows expose sustained scheduler-pressure effects and phase transitions that may not be visible in compact runs. The 50k and 100k windows are therefore interpreted as compact observation intervals rather than as steady-state estimates.
The evaluated modes include Standard shared-pipeline execution and nMPRA-inspired preserved-context execution. Both modes are evaluated under identical scheduler and workload conditions, so that observed timing differences can be attributed to the execution mode rather than to scheduling policy or workload structure. The analysis therefore focuses on how timing variability and deadline-oriented behavior evolve under identical workload and scheduling conditions, rather than on isolated microarchitectural recovery mechanisms.
The evaluation includes both 5-stage and 4-stage pipeline organizations. The 5-stage configuration is used as the reference pipeline organization, while the 4-stage configuration was evaluated through a complete parity matrix that mirrors the same workload, task-count, observation-window, cache, and execution-mode structure. In the results, both matrices are reported together for the main cache-disabled timing analysis, while the interpretation remains focused on timing behavior rather than pipeline-depth optimization.
Table 4 summarizes the main experimental dimensions used in the evaluation.
The resulting configuration space supports a timing-scalability analysis centered on temporal stability and scheduler pressure. This configuration strategy provides the basis for the metrics defined in the next section.
3.4. Timing-Oriented Metrics
The evaluation focuses on metrics that describe how execution behavior evolves under increasing task-count pressure. The selected metrics capture temporal variability, execution jitter, deadline pressure, context-switch activity, modeled switch-overhead pressure, and scalability-phase transitions. Average IPC is retained as a secondary throughput reference, since the main objective of this study is not peak instruction retirement, but timing stability under scalable real-time workloads.
For each completed task job, response time is measured as the interval between job release and job completion. For job k of task i, response time is defined as:
where R_(i,k) is the response time of job k of task i, t_(i,k)^release is the release cycle, and t_(i,k)^finish is the completion cycle.
Response-time variability is represented by the spread between the maximum and minimum observed response times for a given task within the evaluated interval:
where R_i^max and R_i^min are the maximum and minimum observed response times for task i. A lower response-time spread indicates more stable task completion behavior, whereas a larger spread reflects increased timing variability.
Execution jitter quantifies activation-level timing variation across repeated scheduler-controlled task releases. Unlike response-time spread, which captures completion-time dispersion, jitter is defined here as an activation-related timing-spread indicator:
where A_i^max and A_i^min denote the maximum and minimum observed activation-to-resumption timing values for task i under the same configuration, measured from the cycle at which a released task becomes scheduler-eligible to the cycle at which it resumes useful modeled execution. This separates jitter from response-time variability: response-time variability describes the spread of job completion behavior, while jitter emphasizes activation-to-activation timing variation induced by scheduler activity and workload-density pressure.
Deadline behavior is evaluated using the deadline miss ratio. This metric normalizes the number of deadline violations by the number of evaluated jobs in the corresponding simulation interval:
where, N_miss is the number of jobs that miss their configured deadline and N_jobs is the total number of evaluated jobs in the corresponding simulation interval. The deadline miss ratio provides a configuration-level view of deadline pressure and enables comparison across task-count settings, workloads, and observation windows.
Context-switch demand is used as a scheduler-level validation indicator. It captures the frequency of context-switch requests relative to the simulated execution interval:
where N_switch is the number of observed task-to-task context-switch events and C_total is the total number of simulated cycles in the observation window. This metric is used to verify that matched Standard and nMPRA-inspired configurations are subjected to comparable scheduler demand.
Switch-overhead pressure is used as a modeled execution-level indicator. It measures the fraction of the observation window accounted for by explicit context-switch overhead cycles in the simulator:
where C_switch is the number of cycles explicitly accounted as context-switch overhead by the simulator, and C_total is the total number of simulated cycles in the observation window.
In Standard mode, this pressure reflects the pipeline-depth-dependent penalty associated with task-to-task switching in the shared-pipeline organization. In the simulator, each Standard-mode task-to-task switch adds a modeled flush-and-recovery penalty of four cycles for the 5-stage organization and three cycles for the 4-stage organization. These constants represent the modeled recovery interval required before useful execution resumes after disrupting the shared in-flight pipeline state. In the nMPRA-inspired mode, this explicit modeled penalty is not applied because task-specific pipeline-related state is preserved across activations. Switch-overhead pressure should therefore be interpreted as a modeled execution-organization effect, not as the number of scheduler switch requests or as a hardware measurement of a specific implementation.
Average IPC is retained as a secondary throughput indicator. It is computed directly from the number of retired instructions and the total number of simulated cycles:
where N_retired is the number of retired instructions and C_total is the number of simulated cycles in the observation window.
Average IPC provides a useful-work reference for interpreting throughput retention and degradation under increasing task-count pressure. However, the timing-oriented interpretation remains centered on response-time variability, execution jitter, deadline miss ratio, context-switch demand, and switch-overhead pressure.
Table 5 summarizes the metrics used and their role in the timing-scalability analysis.
Scalability-phase characterization summarizes timing behavior progression across the task-count axis. Phase labels are assigned using an operational rule applied independently to each trajectory: a unique combination of workload, execution mode, pipeline stage count, cache mode, and observation window. A trajectory is defined as a unique combination of workload, execution mode, pipeline stage count, cache mode, and observation window. For each trajectory, the maximum observed IPC is first identified, and each task-count configuration is then evaluated relative to this trajectory-specific peak.
The phase classifier uses IPC only to locate the empirical throughput peak and to detect post-peak degradation. The timing interpretation of the phases is based on the combined behavior of switch-overhead pressure and deadline-miss behavior, together with the response-time and jitter trends analyzed in the results. This avoids assigning phases from fixed task-count intervals and makes the classification reproducible from the validated dataset.
For a configuration with IPC value IPC(N), the relative peak ratio is defined as:
The phase rules are applied in descending severity order. A configuration is classified as collapse if IPC_peak_ratio(N) < 0.90 or if the deadline miss ratio exceeds 0.05. If the collapse condition is not met, the configuration is classified as saturation when switch-overhead pressure is at least 2.5% or deadline miss ratio is at least 0.02. If neither collapse nor saturation is met, the configuration is classified as tipping when switch-overhead pressure is at least 1.0% or deadline miss ratio is at least 0.005. All remaining configurations are classified as stable.
The selected thresholds were chosen as internal operational cut points after inspecting the distribution of switch-overhead pressure, deadline miss ratio, and post-peak IPC degradation in the validated dataset. They are intended to distinguish low-overhead operation, first observable timing stress, persistent deadline or switch-overhead pressure, and severe post-peak degradation. They should therefore be interpreted as reproducible dataset-level criteria rather than as universal real-time schedulability thresholds.
Table 6 summarizes the resulting phase-classification rule.
Microarchitectural continuity metrics such as Useful Work Ratio, Execution Disruption Ratio, and Resume Latency are excluded because their cross-mode comparability depends on implementation-level pipeline details outside the scope of nSim-RV’s execution-mode abstraction.
3.5. Dataset Aggregation and Validation
The experimental campaigns generate multiple per-run outputs that must be aggregated before comparative timing analysis can be performed. For consistency and reproducibility, each result is associated with explicit metadata describing the pipeline stage count, execution mode, workload, task count, observation window, cache mode, and scenario label where applicable. For a fixed configuration, nSim-RV produces deterministic execution behavior and identical metric values across repeated runs; therefore, the study reports configuration-level deterministic outcomes rather than statistical confidence intervals.
The journal-analysis dataset is organized around two pipeline-specific matrices. The primary 5-stage scalability matrix contains 432 unique configurations. To provide a pipeline-depth parity evaluation, a complete 4-stage matrix was generated using the same workload, task-count, observation-window, cache, and execution-mode structure, resulting in an additional 432 validated configurations. The combined evaluation therefore includes 864 validated pipeline-specific configurations. The 4-stage matrix mirrors the 5-stage configuration space and is used to assess whether the workflow and main timing-scalability trends remain consistent across pipeline depth.
The aggregation process also preserves row-level analysis outputs used by the figure-generation and phase-classification scripts. In the primary journal-analysis files, multiple rows may correspond to derived or expanded analysis views of the same unique configuration. For this reason, the manuscript uses validated unique configurations as the main dataset-size indicator; additional analysis rows are retained only for plotting, filtering, and phase characterization.
Table 7 summarizes the composition of the aggregated dataset and the validation rules applied during dataset construction.
To prevent repeated experimental configurations, duplicate detection uses a composite key composed of pipeline stage count, execution mode, workload, task count, observation window, cache mode, and scenario label where applicable. When duplicate entries are encountered during aggregation, a single authoritative result is retained for the corresponding unique configuration.
The validated dataset provides a unified basis for the analyses presented in this study. Response-time variability, execution jitter, deadline miss ratio, context-switch demand, modeled switch-overhead pressure, average IPC, and scalability-phase labels are derived from consistently structured data sources. For the operational scalability-phase classifier, both pipeline stage count and cache mode are included in the trajectory key so that pipeline-depth and cache configurations are evaluated relative to their own trajectory-specific IPC peaks.
By preserving configuration metadata, applying composite-key duplicate detection, and generating structured CSV/JSON outputs, the aggregation pipeline ensures that each row in the analysis dataset can be traced to its originating simulation configuration, a prerequisite for the figure-generation and phase-classification scripts provided in the reproducibility package.