Skip to content

Commit

Permalink
Merge pull request #14 from weihsinyeh/main
Browse files Browse the repository at this point in the history
Summarize concepts about Atomicity
  • Loading branch information
jserv authored Jun 25, 2024
2 parents 34c5180 + ef0d6c5 commit 8a7c0a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions concurrency-primer.tex
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,15 @@ \section{Atomicity}
just make sure that any variables used for thread synchronization
are no larger than the \textsc{CPU} word size.

\includegraphics[keepaspectratio, width=0.8\linewidth]{images/atomicity}
\captionof{figure}{A flowchart depicting how two concurrent programs communicate and coordinate through a shared resource to achieve a goal, accessing the shared resource.}
\label{atomicity}

Summary of concepts from the first three sections, as shown in \fig{atomicity}.
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.
In \secref{seqcst}, we see how two concurrent programs communicate to guarantee the order of operations: t5 \to t6.
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.

\section{Arbitrarily-sized ``atomic'' types}

Along with \cc|atomic_int| and friends,
Expand Down
Binary file added images/atomicity.pdf
Binary file not shown.

0 comments on commit 8a7c0a2

Please sign in to comment.