Parallelized sequential composition, pipelines, and hardware weak memory models

05/06/2021
by   Robert J. Colvin, et al.
0

Since the introduction of the CDC 6600 in 1965 and its `scoreboarding' technique processors have not (necessarily) executed instructions in program order. Programmers of high-level code may sequence independent instructions in arbitrary order, and it is a matter of significant programming abstraction and computational efficiency that the processor can be relied upon to make sensible parallelizations/reorderings of low-level instructions to take advantage of, eg., multiple ALUs. At the architectural level such reordering is typically implemented via a per-processor pipeline, into which instructions are fetched in order, but possibly committed out of order depending on local considerations, provided any reordering preserves sequential semantics from that processor's perspective. However multicore architectures, where several pipelines run in parallel, can expose these processor-level reorderings as unexpected, or `weak', behaviours. Such weak behaviours are hard to reason about, and (via speculative execution) underlie at least one class of widespread security vulnerability. In this paper we introduce a novel program operator, parallelized sequential composition, which can be instantiated with a function that controls the reordering of atomic instructions. It generalises both sequential and parallel composition, and when appropriately instantiated exhibits many of the weak behaviours of well-known hardware weak memory models. Our framework admits the application of established compositional techniques (eg. Owicki-Gries) for reasoning about weak behaviours, and is convenient for abstractly expressing properties from the literature. The semantics and theory is encoded and verified in a theorem prover, and we give an implementation of the pipeline semantics which we use to empirically show conformance against established models of ARM and RISC-V.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/03/2018

A high-level operational semantics for hardware weak memory models

Modern processors deploy a variety of weak memory models, which for effi...
research
02/13/2018

A wide-spectrum language for verification of programs on weak memory models

Modern processors deploy a variety of weak memory models, which for effi...
research
05/28/2023

An evaluation of a microprocessor with two independent hardware execution threads coupled through a shared cache

We investigate the utility of augmenting a microprocessor with a single ...
research
09/02/2022

Automatic Detection of Speculative Execution Combinations

Modern processors employ different prediction mechanisms to speculate ov...
research
11/15/2021

Design and Evaluation Frameworks for Advanced RISC-based Ternary Processor

In this paper, we introduce the design and verification frameworks for d...
research
02/08/2019

ARM2GC: Succinct Garbled Processor for Secure Computation

We present ARM2GC, a novel secure computation framework based on Yao's G...
research
07/19/2018

A Queuing Model for CPU Functional Unit and Issue Queue Configuration

In a superscalar processor, instructions of various types flow through a...

Please sign up or login with your details

Forgot password? Click here to reset