Memory access ordering

In the instruction set architecture guide, we introduce Simple Sequential Execution (SSE) which is a conceptual model for instruction ordering. Memory access ordering and instructions ordering are two different, but related, concepts. It is important that you understand the difference.

SSE describes the order instructions appear to executed by the processor. To recap, modern processors have long and complex pipelines. Often able to re-order instructions or execute multiple instructions in parallel to maximize performance. SSE means that the processor must behave as if the processor is executing the instructions one at a time, in the order that they are given in the program code. This means that any re-ordering or multi-issuing of instructions by hardware must be invisible to software.

Memory ordering is about the order memory accesses appear in the memory system. Because of mechanisms such as write-buffers and caches, even when instructions are executed in order the related memory accesses may not be executed in order. This is why memory ordering is an important thing to consider even though the processor follows the SSE model for instructions.

Previous Next