Skip to content

Commit 8a7c0a2

Browse files
authored
Merge pull request #14 from weihsinyeh/main
Summarize concepts about Atomicity
2 parents 34c5180 + ef0d6c5 commit 8a7c0a2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

concurrency-primer.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,15 @@ \section{Atomicity}
343343
just make sure that any variables used for thread synchronization
344344
are no larger than the \textsc{CPU} word size.
345345

346+
\includegraphics[keepaspectratio, width=0.8\linewidth]{images/atomicity}
347+
\captionof{figure}{A flowchart depicting how two concurrent programs communicate and coordinate through a shared resource to achieve a goal, accessing the shared resource.}
348+
\label{atomicity}
349+
350+
Summary of concepts from the first three sections, as shown in \fig{atomicity}.
351+
In \secref{background}, we observe the importance of maintaining the correct order of operations: t3 \to t4 \to t5 \to t6 \to t7, so that two concurrent programs can function as expected.
352+
In \secref{seqcst}, we see how two concurrent programs communicate to guarantee the order of operations: t5 \to t6.
353+
In \secref{atomicity}, we understand that certain operations must be treated as a single atomic step to ensure the order of operations: t3 \to t4 \to t5 and the order of operations: t6 \to t7.
354+
346355
\section{Arbitrarily-sized ``atomic'' types}
347356

348357
Along with \cc|atomic_int| and friends,

images/atomicity.pdf

10 KB
Binary file not shown.

0 commit comments

Comments
 (0)