Improving Timing-Related Guarantees for Main Memory in Multicore Critical Embedded Systems

Asier Fernández de Lecea, Mohamed Hassan, Enrico Mezzetti, Jaume Abella, Francisco J. Cazorla

Introduction

Researchers have developed MCTrack, a lightweight hardware mechanism designed to solve the "black box" problem of memory contention in multicore processors. By directly tracking how much one core delays another at the memory controller level, MCTrack provides the precise timing evidence required for safety-critical certification in avionics and automotive systems. It outperforms traditional event-counting methods by up to 7x in bandwidth regulation efficiency.

The Challenge of Inter-Core Contention

In modern safety-critical systems, such as autonomous vehicles or fly-by-wire aircraft, there is a transition from simple single-core processors to high-performance Multiprocessor Systems-on-Chip (MPSoCs). While these chips offer high performance, they introduce a major challenge for safety engineers: inter-core contention.

When multiple cores share main memory (DRAM), they compete for access. A high-priority task on one core can be significantly delayed if another core saturates the memory controller with requests. Current hardware typically provides Performance Monitoring Counters (PMCs) that track events like total reads or writes. However, these are poor proxies for actual delay; knowing a core performed 1,000 reads does not quantify the specific cycle-level delay experienced by another core.

Safety standards, such as avionics' A(M)C 20-193, require rigorous evidence that such interference is understood and bounded. Without precise tracking, engineers must assume worst-case scenarios, leading to significant underutilization of multicore performance.

The MCTrack Methodology

MCTrack is a hardware extension for memory controllers that decomposes a task’s execution time into a "budget" of cycles. It classifies every cycle into one of four Execution Time Components (ETC):

  1. Idle: No requests are pending for the core.
  2. Running: The core is successfully issuing commands to memory.
  3. Refresh: The core is stalled due to mandatory DRAM maintenance.
  4. Contention: The core is stalled because another core is utilizing the shared resource.
Figure 3: Breakdown of total execution cycles into Idle, Refresh, Running, and Contention components.

MCTrack tracks contention at two distinct stages within the memory controller:

  • The Front-End (Request Queues): Where incoming requests wait to be translated into DRAM commands.
  • The Back-End (Command Queues): Where specific DRAM commands (e.g., Activate, Precharge) must adhere to strict JEDEC timing constraints.
Figure 1: Memory controller architecture showing the flow from request queues to bank command queues and scheduling stages.

The system utilizes coreID tagging to attribute delays to specific "aggressor" cores. A key innovation is the "realistic" implementation that handles overlapping timing constraints—where a single delay might stem from multiple previous commands—without requiring complex, high-overhead hardware tables.

Evaluation and Results

The researchers evaluated MCTrack using a full-system simulation environment based on gem5 and DRAMsim3. They tested the system against synthetic benchmarks (designed to stress-test bank conflicts and queue saturation) and representative AI workloads like Image-to-Columns (I2C) and Matrix Multiplication (MM).

Key Insights

  • Accountability over Counting: Traditional bandwidth regulators throttle cores based on access counts, which is imprecise. MCTrack tracks the actual impact (cycles lost) rather than just traffic volume.
  • Direct Metrics for Performance: By providing a direct metric of interference, MCTrack allows systems to operate closer to their performance limits without compromising safety guarantees.
  • Hardware Minimalism: The "realistic" version of MCTrack performs within 1% of a theoretically "ideal" tracker while maintaining a negligible hardware footprint.

Performance Gains

  • Efficiency: In bandwidth regulation scenarios, MCTrack enabled contending tasks to achieve 7x better latency compared to traditional access-count methods.
  • Low Overhead: For an 8-core system, MCTrack requires approximately 2.5 KB of storage, an increase of less than 0.04% in the transistor count of a modern mobile SoC.
  • Precision: Evaluation demonstrated that MCTrack effectively distinguishes between different memory mapping techniques, providing the "hard evidence" needed to validate software-level bank partitioning.

Conclusion and Future Work

MCTrack addresses a critical gap in multicore safety certification by providing direct evidence of memory contention. Future research will explore attributing contention during write-batching bursts and integrating MCTrack with other shared resources like the Interconnect and Last-Level Cache (LLC) for a holistic safety argument.

Summary updated

BibTeX
@inproceedings{lecea2023improving,
  author = {Asier Fernández de Lecea and Mohamed Hassan and Enrico Mezzetti and Jaume Abella and Francisco J. Cazorla},
  title = {{Improving Timing-Related Guarantees for Main Memory in Multicore Critical Embedded Systems}},
  booktitle = {RTSS},
  year = {2023},
  doi = {10.1109/rtss59052.2023.00031},
}
Figure