Skip to content

Commit 11c2494

Browse files
committed
Fix typo and grammar mistakes
1 parent 9f196f6 commit 11c2494

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

concurrency-primer.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -955,10 +955,10 @@ \subsection{ABA problem}
955955
In addition to embedding the version number into a pointer, we could consider utilizing an additional 32-bit or 64-bit value next to the target object for the version number.
956956
It requires the compare-and-swap instruction to be capable of comparing a wider size at once.
957957
Sometimes, this is referred to as \introduce{double-width compare-and-swap}.
958-
On x86-64 processors, for atomic instructions that load or store more that a CPU word size, it needs additional hardware support.
959-
You can use \monobox{grep cx16 /proc/crpuinfo} to check if the processor supports 16-byte compare-and-swap.
958+
On x86-64 processors, for atomic instructions that load or store more than a CPU word size, it needs additional hardware support.
959+
You can use \monobox{\$ grep cx16 /proc/cpuinfo} to check if the processor supports 16-byte compare-and-swap.
960960
For hardware that does not support the desired size, software implementations which may have locks involve are used instead as mentioned in \secref{arbitrarily-size}.
961-
Back to the example, the following code is fixed by using an an version number that increments each time a job is added to the empty queue. On x86-64, add a compiler flag \monobox{-mcx64} to enable 16-byte compare-and-swap in \monobox{worker} function.
961+
Back to the example, ABA problem in the following code is fixed by using an version number that increments each time a job is added to the empty queue. On x86-64, add a compiler flag \monobox{-mcx64} to enable 16-byte compare-and-swap in \monobox{worker} function.
962962

963963
\inputminted{c}{./examples/rmw_example_aba.c}
964964

@@ -969,7 +969,7 @@ \subsection{ABA problem}
969969
See \secref{fusing}.
970970
Another way to prevent ABA problem in the example is using safe memory reclamation mechanisms.
971971
Different from previously mentioned acting on the old state, the address of a job is not freed until no one is using it.
972-
This prevents memory allocator or memory pool reuses the address and causing problem.
972+
This prevents memory allocator or memory pool from reusing the address and causing problem.
973973

974974
\section{Sequential consistency on weakly-ordered hardware}
975975

0 commit comments

Comments
 (0)