From 99a06b1db3c241c76210e6dce71958d02890bdcd Mon Sep 17 00:00:00 2001 From: Yu-Ting Shi Date: Tue, 23 Jul 2024 03:56:51 +0800 Subject: [PATCH] Address text consistency and merge related statements - Changed "doesn't" to "does not" for formal English writing - Fixed the inconsistency of quotation marks - Merged related statements into one paragraph --- concurrency-primer.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/concurrency-primer.tex b/concurrency-primer.tex index fd40a89..6a58285 100644 --- a/concurrency-primer.tex +++ b/concurrency-primer.tex @@ -1092,9 +1092,8 @@ \section{Memory orderings} \subsection{Memory consistency models} -When a program is compiled and executed, it doesn't always follow the written order. +When a program is compiled and executed, it does not always follow the written order. The system may change the sequence and optimize it to simulate line-by-line execution, as long as the final result matches the expected outcome. - This requires an agreement between the programmer and the system (hardware, compiler, etc.), ensuring that if the rules are followed, the execution will be correct. Correctness here means defining permissible outcomes among all possible results, known as memory consistency models. These models allow the system to optimize while ensuring correct execution.