Index: doc/papers/concurrency/Paper.tex
===================================================================
--- doc/papers/concurrency/Paper.tex	(revision 76d73fc8570bdc8cdfe063abd75851b37ac7d58b)
+++ doc/papers/concurrency/Paper.tex	(revision 956910d39d624df9d8f62219d45b5db9e6b20227)
@@ -110,5 +110,6 @@
 \newcommand{\abbrevFont}{\textit}			% set empty for no italics
 \@ifundefined{eg}{
-\newcommand{\EG}{\abbrevFont{e}\abbrevFont{g}}
+%\newcommand{\EG}{\abbrevFont{e}\abbrevFont{g}}
+\newcommand{\EG}{for example}
 \newcommand*{\eg}{%
 	\@ifnextchar{,}{\EG}%
@@ -117,5 +118,6 @@
 }}{}%
 \@ifundefined{ie}{
-\newcommand{\IE}{\abbrevFont{i}\abbrevFont{e}}
+%\newcommand{\IE}{\abbrevFont{i}\abbrevFont{e}}
+\newcommand{\IE}{that is}
 \newcommand*{\ie}{%
 	\@ifnextchar{,}{\IE}%
@@ -264,10 +266,10 @@
 \address[1]{\orgdiv{Cheriton School of Computer Science}, \orgname{University of Waterloo}, \orgaddress{\state{Waterloo, ON}, \country{Canada}}}
 
-\corres{*Peter A. Buhr, Cheriton School of Computer Science, University of Waterloo, 200 University Avenue West, Waterloo, ON, N2L 3G1, Canada. \email{pabuhr{\char`\@}uwaterloo.ca}}
+\corres{*Peter A. Buhr, Cheriton School of Computer Science, University of Waterloo, 200 University Avenue West, Waterloo, ON N2L 3G1, Canada. \email{pabuhr{\char`\@}uwaterloo.ca}}
 
 % \fundingInfo{Natural Sciences and Engineering Research Council of Canada}
 
 \abstract[Summary]{
-\CFA is a polymorphic, non-object-oriented, concurrent, backwards compatible extension of the C programming language.
+\CFA is a polymorphic, nonobject-oriented, concurrent, backwards compatible extension of the C programming language.
 This paper discusses the design philosophy and implementation of its advanced control-flow and concurrent/parallel features, along with the supporting runtime written in \CFA.
 These features are created from scratch as ISO C has only low-level and/or unimplemented concurrency, so C programmers continue to rely on library approaches like pthreads.
@@ -280,5 +282,5 @@
 }%
 
-\keywords{generator, coroutine, concurrency, parallelism, thread, monitor, runtime, C, \CFA (Cforall)}
+\keywords{C \CFA (Cforall) coroutine concurrency generator monitor parallelism runtime thread}
 
 
@@ -291,5 +293,5 @@
 \section{Introduction}
 
-\CFA~\cite{Moss18,Cforall} is a modern, polymorphic, non-object-oriented\footnote{
+\CFA~\cite{Moss18,Cforall} is a modern, polymorphic, nonobject-oriented\footnote{
 \CFA has object-oriented features, such as constructors, destructors, and simple trait/interface inheritance.
 % Go interfaces, Rust traits, Swift Protocols, Haskell Type Classes and Java Interfaces.
@@ -298,5 +300,5 @@
 % Java, Rust, and Haskell (not sure about Swift) have nominal inheritance, where there needs to be a specific statement that "this type inherits from this type".
 However, functions \emph{cannot} be nested in structures and there is no mechanism to designate a function parameter as a receiver, \lstinline@this@, parameter.},
-backwards-compatible extension of the C programming language.
+, backward-compatible extension of the C programming language.
 In many ways, \CFA is to C as Scala~\cite{Scala} is to Java, providing a vehicle for new typing and control-flow capabilities on top of a highly popular programming language\footnote{
 The TIOBE index~\cite{TIOBE} for May 2020 ranks the top five \emph{popular} programming languages as C 17\%, Java 16\%, Python 9\%, \CC 6\%, and \Csharp 4\% = 52\%, and over the past 30 years, C has always ranked either first or second in popularity.}
@@ -309,12 +311,13 @@
 The \CFA control-flow framework extends ISO \Celeven~\cite{C11} with new call/return and concurrent/parallel control-flow.
 Call/return control-flow with argument and parameter passing appeared in the first programming languages.
-Over the past 50 years, call/return has been augmented with features like static and dynamic call, exceptions (multi-level return) and generators/coroutines (see Section~\ref{s:StatefulFunction}).
+Over the past 50 years, call/return has been augmented with features like static and dynamic call, exceptions (multilevel return) and generators/coroutines (see Section~\ref{s:StatefulFunction}).
 While \CFA has mechanisms for dynamic call (algebraic effects~\cite{Zhang19}) and exceptions\footnote{
 \CFA exception handling will be presented in a separate paper.
-The key feature that dovetails with this paper is nonlocal exceptions allowing exceptions to be raised across stacks, with synchronous exceptions raised among coroutines and asynchronous exceptions raised among threads, similar to that in \uC~\cite[\S~5]{uC++}}, this work only discusses retaining state between calls via generators and coroutines.
-\newterm{Coroutining} was introduced by Conway~\cite{Conway63} (1963), discussed by Knuth~\cite[\S~1.4.2]{Knuth73V1}, implemented in Simula67~\cite{Simula67}, formalized by Marlin~\cite{Marlin80}, and is now popular and appears in old and new programming languages: CLU~\cite{CLU}, \Csharp~\cite{Csharp}, Ruby~\cite{Ruby}, Python~\cite{Python}, JavaScript~\cite{JavaScript}, Lua~\cite{Lua}, \CCtwenty~\cite{C++20Coroutine19}.
+The key feature that dovetails with this paper is nonlocal exceptions allowing exceptions to be raised across stacks, with synchronous exceptions raised among coroutines and asynchronous exceptions raised among threads, similar to that in \uC~\cite[\S~5]{uC++}}
+, this work only discusses retaining state between calls via generators and coroutines.
+\newterm{Coroutining} was introduced by Conway~\cite{Conway63}, discussed by Knuth~\cite[\S~1.4.2]{Knuth73V1}, implemented in Simula67~\cite{Simula67}, formalized by Marlin~\cite{Marlin80}, and is now popular and appears in old and new programming languages: CLU~\cite{CLU}, \Csharp~\cite{Csharp}, Ruby~\cite{Ruby}, Python~\cite{Python}, JavaScript~\cite{JavaScript}, Lua~\cite{Lua}, \CCtwenty~\cite{C++20Coroutine19}.
 Coroutining is sequential execution requiring direct handoff among coroutines, \ie only the programmer is controlling execution order.
 If coroutines transfer to an internal event-engine for scheduling the next coroutines (as in async-await), the program transitions into the realm of concurrency~\cite[\S~3]{Buhr05a}.
-Coroutines are only a stepping stone towards concurrency where the commonality is that coroutines and threads retain state between calls.
+Coroutines are only a stepping stone toward concurrency where the commonality is that coroutines and threads retain state between calls.
 
 \Celeven and \CCeleven define concurrency~\cite[\S~7.26]{C11}, but it is largely wrappers for a subset of the pthreads library~\cite{Pthreads}.\footnote{Pthreads concurrency is based on simple thread fork and join in a function and mutex or condition locks, which is low-level and error-prone}
@@ -322,9 +325,9 @@
 While the \Celeven standard does not state a threading model, the historical association with pthreads suggests implementations would adopt kernel-level threading (1:1)~\cite{ThreadModel}, as for \CC.
 In contrast, there has been a renewed interest during the past decade in user-level (M:N, green) threading in old and new programming languages.
-As multi-core hardware became available in the 1980/90s, both user and kernel threading were examined.
+As multicore hardware became available in the 1980/1990s, both user and kernel threading were examined.
 Kernel threading was chosen, largely because of its simplicity and fit with the simpler operating systems and hardware architectures at the time, which gave it a performance advantage~\cite{Drepper03}.
 Libraries like pthreads were developed for C, and the Solaris operating-system switched from user (JDK 1.1~\cite{JDK1.1}) to kernel threads.
 As a result, many languages adopt the 1:1 kernel-threading model, like Java (Scala), Objective-C~\cite{obj-c-book}, \CCeleven~\cite{C11}, C\#~\cite{Csharp} and Rust~\cite{Rust}, with a variety of presentation mechanisms.
-From 2000 onwards, several language implementations have championed the M:N user-threading model, like Go~\cite{Go}, Erlang~\cite{Erlang}, Haskell~\cite{Haskell}, D~\cite{D}, and \uC~\cite{uC++,uC++book}, including putting green threads back into Java~\cite{Quasar}, and many user-threading libraries have appeared~\cite{Qthreads,MPC,Marcel}.
+From 2000 onward, several language implementations have championed the M:N user-threading model, like Go~\cite{Go}, Erlang~\cite{Erlang}, Haskell~\cite{Haskell}, D~\cite{D}, and \uC~\cite{uC++,uC++book}, including putting green threads back into Java~\cite{Quasar}, and many user-threading libraries have appeared~\cite{Qthreads,MPC,Marcel}.
 The main argument for user-level threading is that it is lighter weight than kernel threading because locking and context switching do not cross the kernel boundary, so there is less restriction on programming styles that encourages large numbers of threads performing medium-sized work to facilitate load balancing by the runtime~\cite{Verch12}.
 As well, user-threading facilitates a simpler concurrency approach using thread objects that leverage sequential patterns versus events with call-backs~\cite{Adya02,vonBehren03}.
@@ -335,5 +338,5 @@
 One solution is low-level qualifiers and functions, \eg @volatile@ and atomics, allowing \emph{programmers} to explicitly write safe, race-free~\cite{Boehm12} programs.
 A safer solution is high-level language constructs so the \emph{compiler} knows the concurrency boundaries, \ie where mutual exclusion and synchronization are acquired and released, and provide implicit safety at and across these boundaries.
-While the optimization problem is best known with respect to concurrency, it applies to other complex control-flow, like exceptions and coroutines.
+While the optimization problem is best known with respect to concurrency, it applies to other complex control-flows like exceptions and coroutines.
 As well, language solutions allow matching the language paradigm with the approach, \eg matching the functional paradigm with data-flow programming or the imperative paradigm with thread programming.
 
@@ -346,5 +349,5 @@
 However, spurious wakeup is \emph{not} a foundational concurrency property~\cite[\S~9]{Buhr05a};
 it is a performance design choice.
-We argue removing spurious wakeup and signals-as-hints make concurrent programming simpler and safer as there is less local non-determinism to manage.
+We argue removing spurious wakeup and signals-as-hints make concurrent programming simpler and safer as there is less local nondeterminism to manage.
 If barging acquisition is allowed, its specialized performance advantage should be available as an option not the default.
 
@@ -375,5 +378,5 @@
 
 % \item
-% a non-blocking I/O library
+% a nonblocking I/O library
 
 \item
@@ -404,5 +407,5 @@
 \begin{description}[leftmargin=\parindent,topsep=3pt,parsep=0pt]
 \item[\newterm{execution state}:]
-is the state information needed by a control-flow feature to initialize and manage both compute data and execution location(s), and de-initialize.
+It is the state information needed by a control-flow feature to initialize and manage both compute data and execution location(s), and de-initialize.
 For example, calling a function initializes a stack frame including contained objects with constructors, manages local data in blocks and return locations during calls, and de-initializes the frame by running any object destructors and management operations.
 State is retained in fixed-sized aggregate structures (objects) and dynamic-sized stack(s), often allocated in the heap(s) managed by the runtime system.
@@ -413,5 +416,5 @@
 
 \item[\newterm{threading}:]
-is execution of code that occurs independently of other execution, where an individual thread's execution is sequential.
+It is execution of code that occurs independently of other execution, where an individual thread's execution is sequential.
 Multiple threads provide \emph{concurrent execution};
 concurrent execution becomes parallel when run on multiple processing units, \eg hyper-threading, cores, or sockets.
@@ -419,12 +422,12 @@
 
 \item[\newterm{mutual-exclusion / synchronization (MES)}:]
-is the concurrency mechanism to perform an action without interruption and establish timing relationships among multiple threads.
+It is the concurrency mechanism to perform an action without interruption and establish timing relationships among multiple threads.
 We contented these two properties are independent, \ie mutual exclusion cannot provide synchronization and vice versa without introducing additional threads~\cite[\S~4]{Buhr05a}.
-Limiting MES functionality results in contrived solutions and inefficiency on multi-core von Neumann computers where shared memory is a foundational aspect of its design.
+Limiting MES functionality results in contrived solutions and inefficiency on multicore von Neumann computers where shared memory is a foundational aspect of its design.
 \end{description}
 These properties are fundamental as they cannot be built from existing language features, \eg a basic programming language like C99~\cite{C99} cannot create new control-flow features, concurrency, or provide MES without (atomic) hardware mechanisms.
 
 
-\subsection{Structuring Execution Properties}
+\subsection{Structuring execution properties}
 
 Programming languages seldom present the fundamental execution properties directly to programmers.
@@ -447,5 +450,5 @@
 \vspace*{-5pt}
 \begin{tabular}{c|c||l|l}
-\multicolumn{2}{c||}{execution properties} & \multicolumn{2}{c}{mutual exclusion / synchronization} \\
+\multicolumn{2}{c||}{Execution properties} & \multicolumn{2}{c}{Mutual exclusion / synchronization} \\
 \hline
 stateful			& thread	& \multicolumn{1}{c|}{No} & \multicolumn{1}{c}{Yes} \\
@@ -470,8 +473,8 @@
 Structures are a foundational mechanism for data organization, and access functions provide interface abstraction and code sharing in all programming languages.
 Case 2 is case 1 with thread safety to a structure's state where access functions provide serialization (mutual exclusion) and scheduling among calling threads (synchronization).
-A @mutex@ structure, often called a \newterm{monitor}, provides a high-level interface for race-free access of shared data in concurrent programming-languages.
+A @mutex@ structure, often called a \newterm{monitor}, provides a high-level interface for race-free access of shared data in concurrent programming languages.
 Case 3 is case 1 where the structure can implicitly retain execution state and access functions use this execution state to resume/suspend across \emph{callers}, but resume/suspend does not retain a function's local state.
 A stackless structure, often called a \newterm{generator} or \emph{iterator}, is \newterm{stackless} because it still borrows the caller's stack and thread, but the stack is used only to preserve state across its callees not callers.
-Generators provide the first step toward directly solving problems like finite-state machines that retain data and execution state between calls, whereas normal functions restart on each call.
+Generators provide the first step toward directly solving problems like finite-state machines (FSMs) that retain data and execution state between calls, whereas normal functions restart on each call.
 Case 4 is cases 2 and 3 with thread safety during execution of the generator's access functions.
 A @mutex@ generator extends generators into the concurrent domain.
@@ -488,8 +491,8 @@
 Given the execution-properties taxonomy, programmers now ask three basic questions: is state necessary across callers and how much, is a separate thread necessary, is thread safety necessary.
 Table~\ref{t:ExecutionPropertyComposition} then suggests the optimal language feature needed for implementing a programming problem.
-The following sections describe how \CFA fills in \emph{all} the non-rejected table entries with language features, while other programming languages may only provide a subset of the table.
-
-
-\subsection{Design Requirements}
+The following sections describe how \CFA fills in \emph{all} the nonrejected table entries with language features, while other programming languages may only provide a subset of the table.
+
+
+\subsection{Design requirements}
 
 The following design requirements largely stem from building \CFA on top of C.
@@ -497,5 +500,5 @@
 \item
 All communication must be statically type checkable for early detection of errors and efficient code generation.
-This requirement is consistent with the fact that C is a statically-typed programming-language.
+This requirement is consistent with the fact that C is a statically typed programming language.
 
 \item
@@ -505,5 +508,5 @@
 
 \item
-All communication is performed using function calls, \ie data is transmitted from argument to parameter and results are returned from function calls.
+All communication is performed using function calls, \ie data are transmitted from argument to parameter and results are returned from function calls.
 Alternative forms of communication, such as call-backs, message passing, channels, or communication ports, step outside of C's normal form of communication.
 
@@ -528,5 +531,5 @@
 
 
-\subsection{Asynchronous Await / Call}
+\subsection{Asynchronous await / call}
 
 Asynchronous await/call is a caller mechanism for structuring programs and/or increasing concurrency, where the caller (client) postpones an action into the future, which is subsequently executed by a callee (server).
@@ -540,5 +543,5 @@
 Specifically, control between caller and callee occurs indirectly through the event-engine precluding direct handoff and cycling among events, and requires complex resolution of a control promise and data.
 Note, @async-await@ is just syntactic-sugar over the event engine so it does not solve these deficiencies.
-For multi-threaded languages like Java, the asynchronous call queues a callee action with an executor (server), which subsequently executes the work by a thread in the executor thread-pool.
+For multithreaded languages like Java, the asynchronous call queues a callee action with an executor (server), which subsequently executes the work by a thread in the executor thread-pool.
 The problem is when concurrent work-units need to interact and/or block as this effects the executor by stopping threads.
 While it is possible to extend this approach to support the necessary mechanisms, \eg message passing in Actors, we show monitors and threads provide an equally competitive approach that does not deviate from normal call communication and can be used to build asynchronous call, as is done in Java.
@@ -548,5 +551,5 @@
 \label{s:StatefulFunction}
 
-A \emph{stateful function} has the ability to remember state between calls, where state can be either data or execution, \eg plugin, device driver, finite-state machine (FSM).
+A \emph{stateful function} has the ability to remember state between calls, where state can be either data or execution, \eg plugin, device driver, FSM.
 A simple technique to retain data state between calls is @static@ declarations within a function, which is often implemented by hoisting the declarations to the global scope but hiding the names within the function using name mangling.
 However, each call starts the function at the top making it difficult to determine the last point of execution in an algorithm, and requiring multiple flag variables and testing to reestablish the continuation point.
@@ -606,5 +609,5 @@
 \end{tabular}
 \end{center}
-\CFA's preferred presentation model for generators/coroutines/threads is a hybrid of functions and classes, giving an object-oriented flavour.
+\CFA's preferred presentation model for generators/coroutines/threads is a hybrid of functions and classes, giving an object-oriented flavor.
 Essentially, the generator/coroutine/thread function is semantically coupled with a generator/coroutine/thread custom type via the type's name.
 The custom type solves several issues, while accessing the underlying mechanisms used by the custom types is still allowed for flexibility reasons.
@@ -621,5 +624,5 @@
 The \CFA \lstinline|with| clause opens an aggregate scope making its fields directly accessible, like Pascal \lstinline|with|, but using parallel semantics;
 multiple aggregates may be opened.
-\CFA has rebindable references \lstinline|int i, & ip = i, j; `&ip = &j;`| and non-rebindable references \lstinline|int i, & `const` ip = i, j; `&ip = &j;` // disallowed|.
+\CFA has rebindable references \lstinline|int i, & ip = i, j; `&ip = &j;`| and nonrebindable references \lstinline|int i, & `const` ip = i, j; `&ip = &j;` // disallowed|.
 }%
 
@@ -803,6 +806,5 @@
 called a \emph{generator main} (leveraging the starting semantics for program @main@ in C), which is connected to the generator type via its single reference parameter.
 The generator main contains @suspend@ statements that suspend execution without ending the generator versus @return@.
-For the Fibonacci generator-main,
-the top initialization state appears at the start and the middle execution state is denoted by statement @suspend@.
+For the Fibonacci generator-main, the top initialization state appears at the start and the middle execution state is denoted by statement @suspend@.
 Any local variables in @main@ \emph{are not retained} between calls;
 hence local variables are only for temporary computations \emph{between} suspends.
@@ -816,5 +818,5 @@
 At the start of the generator main, the @static@ declaration, @states@, is initialized to the N suspend points in the generator, where operator @&&@ dereferences or references a label~\cite{gccValueLabels}.
 Next, the computed @goto@ selects the last suspend point and branches to it.
-The  cost of setting @restart@ and branching via the computed @goto@ adds very little cost to the suspend and resume calls.
+The cost of setting @restart@ and branching via the computed @goto@ adds very little cost to the suspend and resume calls.
 
 An advantage of the \CFA explicit generator type is the ability to allow multiple type-safe interface functions taking and returning arbitrary types.
@@ -933,5 +935,5 @@
 \ldots\, STX \ldots\, message \ldots\, ESC ETX \ldots\, message \ldots\, ETX 2-byte crc \ldots
 \end{center}
-where the network message begins with the control character STX, ends with an ETX, and is followed by a 2-byte cyclic-redundancy check.
+where the network message begins with the control character STX, ends with an ETX, and is followed by a two-byte cyclic-redundancy check.
 Control characters may appear in a message if preceded by an ESC.
 When a message byte arrives, it triggers an interrupt, and the operating system services the interrupt by calling the device driver with the byte read from a hardware register.
@@ -1083,6 +1085,6 @@
 Figure~\ref{f:CPingPongSim} shows the C implementation of the \CFA symmetric generator, where there is still only one additional field, @restart@, but @resume@ is more complex because it does a forward rather than backward jump.
 Before the jump, the parameter for the next call @partner@ is placed into the register used for the first parameter, @rdi@, and the remaining registers are reset for a return.
-The @jmp comain@ restarts the function but with a different parameter, so the new call's behaviour depends on the state of the coroutine type, i.e., branch to restart location with different data state.
-While the semantics of call forward is a tail-call optimization, which compilers perform, the generator state is different on each call rather a common state for a tail-recursive function (i.e., the parameter to the function never changes during the forward calls.
+The @jmp comain@ restarts the function but with a different parameter, so the new call's behavior depends on the state of the coroutine type, \ie branch to restart location with different data state.
+While the semantics of call forward is a tail-call optimization, which compilers perform, the generator state is different on each call rather a common state for a tail-recursive function (\ie the parameter to the function never changes during the forward calls).
 However, this assembler code depends on what entry code is generated, specifically if there are local variables and the level of optimization.
 Hence, internal compiler support is necessary for any forward call or backwards return, \eg LLVM has various coroutine support~\cite{CoroutineTS}, and \CFA can leverage this support should it eventually fork @clang@.
@@ -1157,5 +1159,5 @@
 \end{cfa}
 A call to this function is placed at the end of the device driver's coroutine-main.
-For complex finite-state machines, refactoring is part of normal program abstraction, especially when code is used in multiple places.
+For complex FSMs, refactoring is part of normal program abstraction, especially when code is used in multiple places.
 Again, this complexity is usually associated with execution state rather than data state.
 
@@ -1446,8 +1448,8 @@
 
 
-\subsection{Generator / Coroutine Implementation}
+\subsection{Generator / coroutine implementation}
 
 A significant implementation challenge for generators and coroutines (and threads in Section~\ref{s:threads}) is adding extra fields to the custom types and related functions, \eg inserting code after/before the coroutine constructor/destructor and @main@ to create/initialize/de-initialize/destroy any extra fields, \eg the coroutine stack.
-There are several solutions to this problem, which follow from the object-oriented flavour of adopting custom types.
+There are several solutions to this problem, which follow from the object-oriented flavor of adopting custom types.
 
 For object-oriented languages, inheritance is used to provide extra fields and code via explicit inheritance:
@@ -1670,5 +1672,5 @@
 
 
-\subsection{Thread Implementation}
+\subsection{Thread implementation}
 
 Threads in \CFA are user level run by runtime kernel threads (see Section~\ref{s:CFARuntimeStructure}), where user threads provide concurrency and kernel threads provide parallelism.
@@ -1806,8 +1808,8 @@
 \CFA designated functions are marked by an explicitly parameter-only pointer/reference qualifier @mutex@ (discussed further in Section\ref{s:MutexAcquisition}).
 Whereas, Java designated members are marked with \lstinline[language=java]|synchronized| that applies to the implicit reference parameter @this@.
-In the example, the increment and setter operations need mutual exclusion while the read-only getter operation can be non-mutex if reading the implementation is atomic.
-
-
-\subsection{Monitor Implementation}
+In the example, the increment and setter operations need mutual exclusion while the read-only getter operation can be nonmutex if reading the implementation is atomic.
+
+
+\subsection{Monitor implementation}
 
 For the same design reasons, \CFA provides a custom @monitor@ type and a @trait@ to enforce and restrict the monitor-interface functions.
@@ -1835,5 +1837,5 @@
 
 
-\subsection{Mutex Acquisition}
+\subsection{Mutex acquisition}
 \label{s:MutexAcquisition}
 
@@ -1850,5 +1852,5 @@
 Because of the statically unknown size, \CFA only supports a single reference @mutex@ parameter, @f1@.
 
-The \CFA @mutex@ qualifier does allow the ability to support multi-monitor functions,\footnote{
+The \CFA @mutex@ qualifier does allow the ability to support multimonitor functions,\footnote{
 While object-oriented monitors can be extended with a mutex qualifier for multiple-monitor members, no prior example of this feature could be found.}
 where the number of acquisitions is statically known, called \newterm{bulk acquire}.
@@ -1980,5 +1982,6 @@
 % There are many aspects of scheduling in a concurrency system, all related to resource utilization by waiting threads, \ie which thread gets the resource next.
 % Different forms of scheduling include access to processors by threads (see Section~\ref{s:RuntimeStructureCluster}), another is access to a shared resource by a lock or monitor.
-This section discusses scheduling for waiting threads eligible for monitor entry~\cite{Buhr95b}, \ie which user thread gets the shared resource next. (See Section~\ref{s:RuntimeStructureCluster} for scheduling kernel threads on virtual processors.)
+This section discusses scheduling for waiting threads eligible for monitor entry~\cite{Buhr95b}, \ie which user thread gets the shared resource next.
+(See Section~\ref{s:RuntimeStructureCluster} for scheduling kernel threads on virtual processors.)
 While monitor mutual-exclusion provides safe access to its shared data, the data may indicate a thread cannot proceed, \eg a bounded buffer may be full/\-empty so produce/consumer threads must block.
 Leaving the monitor and retrying (busy waiting) is impractical for high-level programming.
@@ -1991,22 +1994,22 @@
 For complex scheduling, the approaches can be combined, so there are threads waiting inside and outside.
 
-\CFA monitors do not allow calling threads to barge ahead of signalled threads via barging prevention, which simplifies synchronization among threads in the monitor and increases correctness.
+\CFA monitors do not allow calling threads to barge ahead of signaled threads via barging prevention, which simplifies synchronization among threads in the monitor and increases correctness.
 A direct consequence of this semantics is that unblocked waiting threads are not required to recheck the waiting condition, \ie waits are not in a starvation-prone busy-loop as required by the signals-as-hints style with barging.
 Preventing barging comes directly from Hoare's semantics in the seminal paper on monitors~\cite[p.~550]{Hoare74}.
 % \begin{cquote}
 % However, we decree that a signal operation be followed immediately by resumption of a waiting program, without possibility of an intervening procedure call from yet a third program.
-% It is only in this way that a waiting program has an absolute guarantee that it can acquire the resource just released by the signalling program without any danger that a third program will interpose a monitor entry and seize the resource instead.~\cite[p.~550]{Hoare74}
+% It is only in this way that a waiting program has an absolute guarantee that it can acquire the resource just released by the signaling program without any danger that a third program will interpose a monitor entry and seize the resource instead.~\cite[p.~550]{Hoare74}
 % \end{cquote}
 Furthermore, \CFA concurrency has no spurious wakeup~\cite[\S~9]{Buhr05a}, which eliminates an implicit self barging.
 
-Monitor mutual-exclusion means signalling cannot have the signaller and signalled thread in the monitor simultaneously, so only the signaller or signallee can proceed and the other waits on an implicit urgent list~\cite[p.~551]{Hoare74}.
+Monitor mutual-exclusion means signaling cannot have the signaller and signaled thread in the monitor simultaneously, so only the signaller or signallee can proceed and the other waits on an implicit urgent list~\cite[p.~551]{Hoare74}.
 Figure~\ref{f:MonitorScheduling} shows internal and external scheduling for the bounded-buffer examples in Figure~\ref{f:GenericBoundedBuffer}.
 For internal scheduling in Figure~\ref{f:BBInt}, the @signal@ moves the signallee, front thread of the specified condition queue, to the urgent list (see Figure~\ref{f:MonitorScheduling}) and the signaller continues (solid line).
 Multiple signals move multiple signallees to urgent until the condition queue is empty.
 When the signaller exits or waits, a thread is implicitly unblocked from urgent, if available, before unblocking a calling thread to prevent barging.
-(Java conceptually moves the signalled thread to the calling queue, and hence, allows barging.)
-Signal is used when the signaller is providing the cooperation needed by the signallee, \eg creating an empty slot in a buffer for a producer, and the signaller immediately exits the monitor to run concurrently consuming the buffer element, and passes control of the monitor to the signalled thread, which can immediately take advantage of the state change.
+(Java conceptually moves the signaled thread to the calling queue, and hence, allows barging.)
+Signal is used when the signaller is providing the cooperation needed by the signallee, \eg creating an empty slot in a buffer for a producer, and the signaller immediately exits the monitor to run concurrently consuming the buffer element, and passes control of the monitor to the signaled thread, which can immediately take advantage of the state change.
 Specifically, the @wait@ function atomically blocks the calling thread and implicitly releases the monitor lock(s) for all monitors in the function's parameter list.
-Signalling is unconditional because signalling an empty condition queue does nothing.
+Signalling is unconditional because signaling an empty condition queue does nothing.
 It is common to declare condition queues as monitor fields to prevent shared access, hence no locking is required for access as the queues are protected by the monitor lock.
 In \CFA, a condition queue can be created and stored independently.
@@ -2146,5 +2149,5 @@
 	rcnt += 1;
 	if ( ! empty(RWers) && `front(RWers) == READER` )
-		`signal( RWers )`;  // daisy-chain signalling
+		`signal( RWers )`;  // daisy-chain signaling
 }
 void StartWrite( ReadersWriter & mutex rw ) with(rw) {
@@ -2201,8 +2204,8 @@
 
 Finally, external scheduling requires urgent to be a stack, because the signaller expects to execute immediately after the specified monitor call has exited or waited.
-Internal schedulling performing multiple signalling results in unblocking from urgent in the reverse order from signalling.
+Internal scheduling performing multiple signaling results in unblocking from urgent in the reverse order from signaling.
 It is rare for the unblocking order to be important as an unblocked thread can be time-sliced immediately after leaving the monitor.
-If the unblocking order is important, multiple signalling can be restructured into daisy-chain signalling, where each thread signals the next thread.
-Hence, \CFA uses a single urgent stack to correctly handle @waitfor@ and adequately support both forms of signalling.
+If the unblocking order is important, multiple signaling can be restructured into daisy-chain signaling, where each thread signals the next thread.
+Hence, \CFA uses a single urgent stack to correctly handle @waitfor@ and adequately support both forms of signaling.
 (Advanced @waitfor@ features are discussed in Section~\ref{s:ExtendedWaitfor}.)
 
@@ -2270,5 +2273,5 @@
 \end{figure}
 
-Figure~\ref{f:DatingServiceMonitor} shows a dating service demonstrating non-blocking and blocking signalling.
+Figure~\ref{f:DatingServiceMonitor} shows a dating service demonstrating nonblocking and blocking signaling.
 The dating service matches girl and boy threads with matching compatibility codes so they can exchange phone numbers.
 A thread blocks until an appropriate partner arrives.
@@ -2315,5 +2318,5 @@
 \end{cquote}
 For @wait( e )@, the default semantics is to atomically block the signaller and release all acquired mutex parameters, \ie @wait( e, m1, m2 )@.
-To override the implicit multi-monitor wait, specific mutex parameter(s) can be specified, \eg @wait( e, m1 )@.
+To override the implicit multimonitor wait, specific mutex parameter(s) can be specified, \eg @wait( e, m1 )@.
 Wait cannot statically verify the released monitors are the acquired mutex-parameters without disallowing separately compiled helper functions calling @wait@.
 While \CC supports bulk locking, @wait@ only accepts a single lock for a condition queue, so bulk locking with condition queues is asymmetric.
@@ -2324,8 +2327,8 @@
 }
 \end{cfa}
-must have acquired at least the same locks as the waiting thread signalled from a condition queue to allow the locks to be passed, and hence, prevent barging.
+must have acquired at least the same locks as the waiting thread signaled from a condition queue to allow the locks to be passed, and hence, prevent barging.
 
 Similarly, for @waitfor( rtn )@, the default semantics is to atomically block the acceptor and release all acquired mutex parameters, \ie @waitfor( rtn : m1, m2 )@.
-To override the implicit multi-monitor wait, specific mutex parameter(s) can be specified, \eg @waitfor( rtn : m1 )@.
+To override the implicit multimonitor wait, specific mutex parameter(s) can be specified, \eg @waitfor( rtn : m1 )@.
 @waitfor@ does statically verify the monitor types passed are the same as the acquired mutex-parameters of the given function or function pointer, hence the prototype must be accessible.
 % When an overloaded function appears in an @waitfor@ statement, calls to any function with that name are accepted.
@@ -2345,5 +2348,5 @@
 	... signal( `e` ); ...
 \end{cfa}
-The @wait@ only releases @m1@ so the signalling thread cannot acquire @m1@ and @m2@ to enter @bar@ and @signal@ the condition.
+The @wait@ only releases @m1@ so the signaling thread cannot acquire @m1@ and @m2@ to enter @bar@ and @signal@ the condition.
 While deadlock can occur with multiple/nesting acquisition, this is a consequence of locks, and by extension monitor locking is not perfectly composable.
 
@@ -2409,11 +2412,11 @@
 
 
-\subsection{Bulk Barging Prevention}
-
-Figure~\ref{f:BulkBargingPrevention} shows \CFA code where bulk acquire adds complexity to the internal-signalling semantics.
+\subsection{Bulk barging prevention}
+
+Figure~\ref{f:BulkBargingPrevention} shows \CFA code where bulk acquire adds complexity to the internal-signaling semantics.
 The complexity begins at the end of the inner @mutex@ statement, where the semantics of internal scheduling need to be extended for multiple monitors.
 The problem is that bulk acquire is used in the inner @mutex@ statement where one of the monitors is already acquired.
-When the signalling thread reaches the end of the inner @mutex@ statement, it should transfer ownership of @m1@ and @m2@ to the waiting threads to prevent barging into the outer @mutex@ statement by another thread.
-However, both the signalling and waiting threads W1 and W2 need some subset of monitors @m1@ and @m2@.
+When the signaling thread reaches the end of the inner @mutex@ statement, it should transfer ownership of @m1@ and @m2@ to the waiting threads to prevent barging into the outer @mutex@ statement by another thread.
+However, both the signaling and waiting threads W1 and W2 need some subset of monitors @m1@ and @m2@.
 \begin{cquote}
 condition c: (order 1) W2(@m2@), W1(@m1@,@m2@)\ \ \ or\ \ \ (order 2) W1(@m1@,@m2@), W2(@m2@) \\
@@ -2482,5 +2485,5 @@
 \end{figure}
 
-One scheduling solution is for the signaller S to keep ownership of all locks until the last lock is ready to be transferred, because this semantics fits most closely to the behaviour of single-monitor scheduling.
+One scheduling solution is for the signaller S to keep ownership of all locks until the last lock is ready to be transferred, because this semantics fits most closely to the behavior of single-monitor scheduling.
 However, this solution is inefficient if W2 waited first and immediate passed @m2@ when released, while S retains @m1@ until completion of the outer mutex statement.
 If W1 waited first, the signaller must retain @m1@ amd @m2@ until completion of the outer mutex statement and then pass both to W1.
@@ -2495,5 +2498,5 @@
 \label{s:waitforImplementation}
 
-In a statically-typed object-oriented programming language, a class has an exhaustive list of members, even when members are added via static inheritance (see Figure~\ref{f:uCinheritance}).
+In a statically typed object-oriented programming language, a class has an exhaustive list of members, even when members are added via static inheritance (see Figure~\ref{f:uCinheritance}).
 Knowing all members at compilation, even separate compilation, allows uniquely numbered them so the accept-statement implementation can use a fast and compact bit mask with $O(1)$ compare.
 
@@ -2539,9 +2542,9 @@
 \hspace{3pt}
 \subfloat[\CFA]{\label{f:CFinheritance}\usebox\myboxB}
-\caption{Member / Function visibility}
+\caption{Member / function visibility}
 \label{f:MemberFunctionVisibility}
 \end{figure}
 
-However, the @waitfor@ statement in translation unit 2 (see Figure~\ref{f:CFinheritance}) cannot see function @g@ in translation unit 1 precluding a unique numbering for a bit-mask because the monitor type only carries the protected shared-data.
+However, the @waitfor@ statement in translation unit 2 (see Figure~\ref{f:CFinheritance}) cannot see function @g@ in translation unit 1 precluding a unique numbering for a bit-mask because the monitor type only carries the protected shared data.
 (A possible way to construct a dense mapping is at link or load-time.)
 Hence, function pointers are used to identify the functions listed in the @waitfor@ statement, stored in a variable-sized array.
@@ -2550,8 +2553,8 @@
 
 
-\subsection{Multi-Monitor Scheduling}
+\subsection{Multimonitor scheduling}
 \label{s:Multi-MonitorScheduling}
 
-External scheduling, like internal scheduling, becomes significantly more complex for multi-monitor semantics.
+External scheduling, like internal scheduling, becomes significantly more complex for multimonitor semantics.
 Even in the simplest case, new semantics need to be established.
 \begin{cfa}
@@ -2565,5 +2568,5 @@
 \end{cfa}
 Both locks are acquired by function @g@, so when function @f@ is called, the lock for monitor @m2@ is passed from @g@ to @f@, while @g@ still holds lock @m1@.
-This behaviour can be extended to the multi-monitor @waitfor@ statement.
+This behavior can be extended to the multimonitor @waitfor@ statement.
 \begin{cfa}
 monitor M { ... };
@@ -2574,5 +2577,5 @@
 % Also, the order of the monitors in a @waitfor@ statement must match the order of the mutex parameters.
 
-Figure~\ref{f:UnmatchedMutexSets} shows internal and external scheduling with multiple monitors that must match exactly with a signalling or accepting thread, \ie partial matching results in waiting.
+Figure~\ref{f:UnmatchedMutexSets} shows internal and external scheduling with multiple monitors that must match exactly with a signaling or accepting thread, \ie partial matching results in waiting.
 In both cases, the set of monitors is disjoint so unblocking is impossible.
 
@@ -2766,5 +2769,5 @@
 
 
-\subsection{\texorpdfstring{\protect\lstinline@mutex@ Generators / Coroutines / Threads}{monitor Generators / Coroutines / Threads}}
+\subsection{\texorpdfstring{\protect\lstinline@mutex@ Generators / coroutines / threads}{monitor Generators / coroutines / threads}}
 
 \CFA generators, coroutines, and threads can also be @mutex@ (Table~\ref{t:ExecutionPropertyComposition} cases 4, 6, 12) allowing safe \emph{direct communication} with threads, \ie the custom types can have mutex functions that are called by other threads.
@@ -2808,5 +2811,5 @@
 %
 %
-% \subsection{User Threads}
+% \subsection{User threads}
 %
 % A direct improvement on kernel threads is user threads, \eg Erlang~\cite{Erlang} and \uC~\cite{uC++book}.
@@ -2823,5 +2826,5 @@
 
 \begin{comment}
-\subsection{Thread Pools}
+\subsection{Thread pools}
 
 In contrast to direct threading is indirect \newterm{thread pools}, \eg Java @executor@, where small jobs (work units) are inserted into a work pool for execution.
@@ -2902,5 +2905,5 @@
 The purpose of a cluster is to control the amount of parallelism that is possible among threads, plus scheduling and other execution defaults.
 The default cluster-scheduler is single-queue multi-server, which provides automatic load-balancing of threads on processors.
-However, the design allows changing the scheduler, \eg multi-queue multi-server with work-stealing/sharing across the virtual processors.
+However, the design allows changing the scheduler, \eg multi-queue multiserver with work-stealing/sharing across the virtual processors.
 If several clusters exist, both threads and virtual processors, can be explicitly migrated from one cluster to another.
 No automatic load balancing among clusters is performed by \CFA.
@@ -2912,5 +2915,5 @@
 
 
-\subsection{Virtual Processor}
+\subsection{Virtual processor}
 \label{s:RuntimeStructureProcessor}
 
@@ -2935,5 +2938,5 @@
 This storage is allocated at the base of a thread's stack before blocking, which means programmers must add a small amount of extra space for stacks.
 
-In \CFA, ordering of monitor acquisition relies on memory ordering to prevent deadlock~\cite{Havender68}, because all objects have distinct non-overlapping memory layouts, and mutual-exclusion for a monitor is only defined for its lifetime.
+In \CFA, ordering of monitor acquisition relies on memory ordering to prevent deadlock~\cite{Havender68}, because all objects have distinct nonoverlapping memory layouts, and mutual-exclusion for a monitor is only defined for its lifetime.
 When a mutex call is made, pointers to the concerned monitors are aggregated into a variable-length array and sorted.
 This array persists for the entire duration of the mutual exclusion and is used extensively for synchronization operations.
@@ -2954,5 +2957,5 @@
 
 Nondeterministic preemption provides fairness from long-running threads, and forces concurrent programmers to write more robust programs, rather than relying on code between cooperative scheduling to be atomic.
-This atomic reliance can fail on multi-core machines, because execution across cores is nondeterministic.
+This atomic reliance can fail on multicore machines, because execution across cores is nondeterministic.
 A different reason for not supporting preemption is that it significantly complicates the runtime system, \eg Windows runtime does not support interrupts and on Linux systems, interrupts are complex (see below).
 Preemption is normally handled by setting a countdown timer on each virtual processor.
@@ -2962,5 +2965,5 @@
 The only issue with this approach is that signal masks from one kernel thread may be restored on another as part of returning from the signal handler;
 therefore, the same signal mask is required for all virtual processors in a cluster.
-Because preemption interval is usually long (1 millisecond) performance cost is negligible.
+Because preemption interval is usually long (1 ms) performance cost is negligible.
 
 Linux switched a decade ago from specific to arbitrary virtual-processor signal-delivery for applications with multiple kernel threads.
@@ -2973,9 +2976,9 @@
 
 
-\subsection{Debug Kernel}
-
-There are two versions of the \CFA runtime kernel: debug and non-debug.
-The debugging version has many runtime checks and internal assertions, \eg stack non-writable guard page, and checks for stack overflow whenever context switches occur among coroutines and threads, which catches most stack overflows.
-After a program is debugged, the non-debugging version can be used to significantly decrease space and increase performance.
+\subsection{Debug kernel}
+
+There are two versions of the \CFA runtime kernel: debug and nondebug.
+The debugging version has many runtime checks and internal assertions, \eg stack nonwritable guard page, and checks for stack overflow whenever context switches occur among coroutines and threads, which catches most stack overflows.
+After a program is debugged, the nondebugging version can be used to significantly decrease space and increase performance.
 
 
@@ -2984,21 +2987,22 @@
 
 To test the performance of the \CFA runtime, a series of microbenchmarks are used to compare \CFA with pthreads, Java 11.0.6, Go 1.12.6, Rust 1.37.0, Python 3.7.6, Node.js 12.14.1, and \uC 7.0.0.
-For comparison, the package must be multi-processor (M:N), which excludes libdil and libmil~\cite{libdill} (M:1)), and use a shared-memory programming model, \eg not message passing.
+For comparison, the package must be multiprocessor (M:N), which excludes libdil and libmil~\cite{libdill} (M:1)), and use a shared-memory programming model, \eg not message passing.
 The benchmark computer is an AMD Opteron\texttrademark\ 6380 NUMA 64-core, 8 socket, 2.5 GHz processor, running Ubuntu 16.04.6 LTS, and pthreads/\CFA/\uC are compiled with gcc 9.2.1.
 
-All benchmarks are run using the following harness. (The Java harness is augmented to circumvent JIT issues.)
+All benchmarks are run using the following harness.
+(The Java harness is augmented to circumvent JIT issues.)
 \begin{cfa}
 #define BENCH( `run` ) uint64_t start = cputime_ns();  `run;`  double result = (double)(cputime_ns() - start) / N;
 \end{cfa}
 where CPU time in nanoseconds is from the appropriate language clock.
-Each benchmark is performed @N@ times, where @N@ is selected so the benchmark runs in the range of 2--20 seconds for the specific programming language;
+Each benchmark is performed @N@ times, where @N@ is selected so the benchmark runs in the range of 2--20 s for the specific programming language;
 each @N@ appears after the experiment name in the following tables.
 The total time is divided by @N@ to obtain the average time for a benchmark.
 Each benchmark experiment is run 13 times and the average appears in the table.
 For languages with a runtime JIT (Java, Node.js, Python), a single half-hour long experiment is run to check stability;
-all long-experiment results are statistically equivalent, \ie median/average/standard-deviation correlate with the short-experiment results, indicating the short experiments reached a steady state.
+all long-experiment results are statistically equivalent, \ie median/average/SD correlate with the short-experiment results, indicating the short experiments reached a steady state.
 All omitted tests for other languages are functionally identical to the \CFA tests and available online~\cite{CforallConcurrentBenchmarks}.
 
-\paragraph{Creation}
+\subsection{Creation}
 
 Creation is measured by creating and deleting a specific kind of control-flow object.
@@ -3030,5 +3034,5 @@
 
 \begin{tabular}[t]{@{}r*{3}{D{.}{.}{5.2}}@{}}
-\multicolumn{1}{@{}r}{N\hspace*{10pt}} & \multicolumn{1}{c}{Median} & \multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
+\multicolumn{1}{@{}r}{Object(N)\hspace*{10pt}} & \multicolumn{1}{c}{Median} & \multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
 \CFA generator (1B)			& 0.6		& 0.6		& 0.0		\\
 \CFA coroutine lazy	(100M)	& 13.4		& 13.1		& 0.5		\\
@@ -3049,7 +3053,7 @@
 
 \vspace*{-10pt}
-\paragraph{Internal Scheduling}
-
-Internal scheduling is measured using a cycle of two threads signalling and waiting.
+\subsection{Internal scheduling}
+
+Internal scheduling is measured using a cycle of two threads signaling and waiting.
 Figure~\ref{f:schedint} shows the code for \CFA, with results in Table~\ref{t:schedint}.
 Note, the \CFA incremental cost for bulk acquire is a fixed cost for small numbers of mutex objects.
@@ -3093,5 +3097,5 @@
 
 \begin{tabular}{@{}r*{3}{D{.}{.}{5.2}}@{}}
-\multicolumn{1}{@{}r}{N\hspace*{10pt}} & \multicolumn{1}{c}{Median} & \multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
+\multicolumn{1}{@{}r}{Object(N)\hspace*{10pt}} & \multicolumn{1}{c}{Median} & \multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
 \CFA @signal@, 1 monitor (10M)	& 364.4		& 364.2		& 4.4		\\
 \CFA @signal@, 2 monitor (10M)	& 484.4		& 483.9		& 8.8		\\
@@ -3106,5 +3110,5 @@
 
 
-\paragraph{External Scheduling}
+\subsection{External scheduling}
 
 External scheduling is measured using a cycle of two threads calling and accepting the call using the @waitfor@ statement.
@@ -3140,5 +3144,5 @@
 \label{t:schedext}
 \begin{tabular}{@{}r*{3}{D{.}{.}{3.2}}@{}}
-\multicolumn{1}{@{}r}{N\hspace*{10pt}} & \multicolumn{1}{c}{Median} &\multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
+\multicolumn{1}{@{}r}{Object(N)\hspace*{10pt}} & \multicolumn{1}{c}{Median} &\multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
 \CFA @waitfor@, 1 monitor (10M)	& 367.1	& 365.3	& 5.0	\\
 \CFA @waitfor@, 2 monitor (10M)	& 463.0	& 464.6	& 7.1	\\
@@ -3149,9 +3153,9 @@
 \end{multicols}
 
-\paragraph{Mutual-Exclusion}
+\subsection{Mutual-Exclusion}
 
 Uncontented mutual exclusion, which frequently occurs, is measured by entering and leaving a critical section.
-For monitors, entering and leaving a mutex function is measured, otherwise the language-appropriate mutex-lock is measured.
-For comparison, a spinning (versus blocking) test-and-test-set lock is presented.
+For monitors, entering and leaving a mutex function are measured, otherwise the language-appropriate mutex-lock is measured.
+For comparison, a spinning (vs.\ blocking) test-and-test-set lock is presented.
 Figure~\ref{f:mutex} shows the code for \CFA with results in Table~\ref{t:mutex}.
 Note the incremental cost of bulk acquire for \CFA, which is largely a fixed cost for small numbers of mutex objects.
@@ -3176,5 +3180,5 @@
 \label{t:mutex}
 \begin{tabular}{@{}r*{3}{D{.}{.}{3.2}}@{}}
-\multicolumn{1}{@{}r}{N\hspace*{10pt}} & \multicolumn{1}{c}{Median} &\multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
+\multicolumn{1}{@{}r}{Object(N)\hspace*{10pt}} & \multicolumn{1}{c}{Median} &\multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
 test-and-test-set lock (50M)		& 19.1	& 18.9	& 0.4	\\
 \CFA @mutex@ function, 1 arg. (50M)	& 48.3	& 47.8	& 0.9	\\
@@ -3190,5 +3194,5 @@
 \end{multicols}
 
-\paragraph{Context Switching}
+\subsection{Context switching}
 
 In procedural programming, the cost of a function call is important as modularization (refactoring) increases.
@@ -3237,5 +3241,5 @@
 \label{t:ctx-switch}
 \begin{tabular}{@{}r*{3}{D{.}{.}{3.2}}@{}}
-\multicolumn{1}{@{}r}{N\hspace*{10pt}} & \multicolumn{1}{c}{Median} &\multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
+\multicolumn{1}{@{}r}{Object(N)\hspace*{10pt}} & \multicolumn{1}{c}{Median} &\multicolumn{1}{c}{Average} & \multicolumn{1}{c@{}}{Std Dev} \\
 C function (10B)			& 1.8		& 1.8		& 0.0	\\
 \CFA generator (5B)			& 1.8		& 2.0		& 0.3	\\
@@ -3290,5 +3294,5 @@
 
 \medskip
-\textbf{Flexible Scheduling:}
+\textbf{Flexible scheduling:}
 An important part of concurrency is scheduling.
 Different scheduling algorithms can affect performance, both in terms of average and variation.
@@ -3296,5 +3300,5 @@
 One solution is to offer various tuning options, allowing the scheduler to be adjusted to the requirements of the workload.
 However, to be truly flexible, a pluggable scheduler is necessary.
-Currently, the \CFA pluggable scheduler is too simple to handle complex scheduling, \eg quality of service and real-time, where the scheduler must interact with mutex objects to deal with issues like priority inversion~\cite{Buhr00b}.
+Currently, the \CFA pluggable scheduler is too simple to handle complex scheduling, \eg quality of service and real time, where the scheduler must interact with mutex objects to deal with issues like priority inversion~\cite{Buhr00b}.
 
 \smallskip
@@ -3302,12 +3306,12 @@
 Many modern workloads are not bound by computation but IO operations, common cases being web servers and XaaS~\cite{XaaS} (anything as a service).
 These types of workloads require significant engineering to amortizing costs of blocking IO-operations.
-At its core, non-blocking I/O is an operating-system level feature queuing IO operations, \eg network operations, and registering for notifications instead of waiting for requests to complete.
+At its core, nonblocking I/O is an operating-system level feature queuing IO operations, \eg network operations, and registering for notifications instead of waiting for requests to complete.
 Current trends use asynchronous programming like callbacks, futures, and/or promises, \eg Node.js~\cite{NodeJs} for JavaScript, Spring MVC~\cite{SpringMVC} for Java, and Django~\cite{Django} for Python.
-However, these solutions lead to code that is hard to create, read and maintain.
-A better approach is to tie non-blocking I/O into the concurrency system to provide ease of use with low overhead, \eg thread-per-connection web-services.
-A non-blocking I/O library is currently under development for \CFA.
+However, these solutions lead to code that is hard to create, read, and maintain.
+A better approach is to tie nonblocking I/O into the concurrency system to provide ease of use with low overhead, \eg thread-per-connection web-services.
+A nonblocking I/O library is currently under development for \CFA.
 
 \smallskip
-\textbf{Other Concurrency Tools:}
+\textbf{Other concurrency tools:}
 While monitors offer flexible and powerful concurrency for \CFA, other concurrency tools are also necessary for a complete multi-paradigm concurrency package.
 Examples of such tools can include futures and promises~\cite{promises}, executors and actors.
@@ -3316,5 +3320,5 @@
 
 \smallskip
-\textbf{Implicit Threading:}
+\textbf{Implicit threading:}
 Basic \emph{embarrassingly parallel} applications can benefit greatly from implicit concurrency, where sequential programs are converted to concurrent, with some help from pragmas to guide the conversion.
 This type of concurrency can be achieved both at the language level and at the library level.
Index: doc/papers/concurrency/annex/local.bib
===================================================================
--- doc/papers/concurrency/annex/local.bib	(revision 76d73fc8570bdc8cdfe063abd75851b37ac7d58b)
+++ doc/papers/concurrency/annex/local.bib	(revision 956910d39d624df9d8f62219d45b5db9e6b20227)
@@ -29,7 +29,8 @@
     booktitle	= {Supercomputing, 2005. Proceedings of the ACM/IEEE SC 2005 Conference},
     publisher	= {IEEE},
+    location	= {Seattle, Washington, U.S.A.},
+    month	= nov,
     year	= {2005},
     pages	= {35-35},
-    month	= nov,
 }
 
@@ -58,10 +59,10 @@
 
 @manual{Cpp-Transactions,
-	keywords	= {C++, Transactional Memory},
-	title		= {Tech. Spec. for C++ Extensions for Transactional Memory},
-	organization= {International Standard ISO/IEC TS 19841:2015 },
-	publisher   = {American National Standards Institute},
-	address	= {http://www.iso.org},
-	year		= 2015,
+    keywords	= {C++, Transactional Memory},
+    title	= {Tech. Spec. for C++ Extensions for Transactional Memory {ISO/IEC} {TS} 19841:2015},
+    organization= {International Standard Organization},
+    address	= {Geneva, Switzerland},
+    year	= 2015,
+    note	= {\href{https://www.iso.org/standard/66343.html}{https://\-www.iso.org/\-standard/\-66343.html}},
 }
 
@@ -109,9 +110,11 @@
 @manual{affinityLinux,
 	key	= {TBB},
-	title		= "{Linux man page - sched\_setaffinity(2)}"
+	title		= "{Linux man page - sched\_setaffinity(2)}",
+	note	= {\href{https://man7.org/linux/man-pages/man2/sched_setaffinity.2.html}{https://\-man7.org/\-linux/man-pages/\-man2/sched\_setaffinity.2.html}},
 }
 
 @manual{affinityWindows,
-	title		= "{Windows (vs.85) - SetThreadAffinityMask function}"
+	title		= "{Windows documentation - SetThreadAffinityMask function}",
+	note	= {\href{https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadaffinitymask}{https://\-docs.microsoft.com/\-en-us/\-windows/\-win32/api/\-winbase/\-nf-winbase-setthreadaffinitymask}}
 }
 
Index: doc/papers/concurrency/mail
===================================================================
--- doc/papers/concurrency/mail	(revision 76d73fc8570bdc8cdfe063abd75851b37ac7d58b)
+++ doc/papers/concurrency/mail	(revision 956910d39d624df9d8f62219d45b5db9e6b20227)
@@ -10,5 +10,5 @@
 Dear Dr Buhr,
 
-Your manuscript entitled "Concurrency in C∀" has been received by Software:
+Your manuscript entitled "Concurrency in Cforall" has been received by Software:
 Practice and Experience. It will be given full consideration for publication in
 the journal.
@@ -41,5 +41,5 @@
 Dear Dr Buhr,
 
-Many thanks for submitting SPE-18-0205 entitled "Concurrency in C∀" to Software: Practice and Experience.
+Many thanks for submitting SPE-18-0205 entitled "Concurrency in Cforall" to Software: Practice and Experience.
 
 In view of the comments of the referees found at the bottom of this letter, I cannot accept your paper for publication in Software: Practice and Experience. I hope that you find the referees' very detailed comments helpful.
Index: doc/papers/concurrency/mail2
===================================================================
--- doc/papers/concurrency/mail2	(revision 76d73fc8570bdc8cdfe063abd75851b37ac7d58b)
+++ doc/papers/concurrency/mail2	(revision 956910d39d624df9d8f62219d45b5db9e6b20227)
@@ -1,3 +1,2 @@
-
 Date: Wed, 26 Jun 2019 20:12:38 +0000
 From: Aaron Thomas <onbehalfof@manuscriptcentral.com>
@@ -1286,2 +1285,101 @@
 
 Wiley Author Services
+
+
+
+From: "Pacaanas, Joel -" <jpacaanas@wiley.com>
+To: "Peter A. Buhr" <pabuhr@uwaterloo.ca>
+CC: Thierry Delisle <tdelisle@uwaterloo.ca>
+Subject: RE: Action: Proof of SPE_EV_SPE2925 for Software: Practice And Experience ready for review
+Date: Thu, 5 Nov 2020 02:03:27 +0000
+
+Dear Dr Buhr,
+
+Thank you for letting me know. We will wait for your corrections then.
+
+Best regards,
+Joel
+
+Joel Q. Pacaanas
+Production Editor
+On behalf of Wiley
+Manila
+We partner with global experts to further innovative research.
+
+E-mail: jpacaanas@wiley.com 
+Tel: +632 88558618
+Fax: +632 5325 0768
+
+-----Original Message-----
+From: Peter A. Buhr [mailto:pabuhr@uwaterloo.ca] 
+Sent: Thursday, November 5, 2020 5:57 AM
+To: SPE Proofs <speproofs@wiley.com>
+Cc: Thierry Delisle <tdelisle@uwaterloo.ca>
+Subject: Re: Action: Proof of SPE_EV_SPE2925 for Software: Practice And Experience ready for review
+
+       This is an external email.
+
+    We appreciate that the COVID-19 pandemic may create conditions for you that
+    make it difficult for you to review your proof within standard time
+    frames. If you have any problems keeping to this schedule, please reach out
+    to me at (SPEproofs@wiley.com) to discuss alternatives.
+
+Hi,
+
+We are in the middle of reading the proofs but it will take a little more
+time. I can send the proofs back by Monday Nov 9, but probably earlier.
+
+
+
+From: "Pacaanas, Joel -" <jpacaanas@wiley.com>
+To: "Peter A. Buhr" <pabuhr@uwaterloo.ca>
+CC: "tdelisle@uwaterloo.ca" <tdelisle@uwaterloo.ca>
+Subject: RE: Action: Proof of SPE_EV_SPE2925 for Software: Practice And Experience ready for review
+Date: Fri, 20 Nov 2020 05:27:18 +0000
+
+Dear Peter,
+
+We have now reset the proof back to original stage. Please refer to the below editable link.
+
+https://wiley.eproofing.in/Proof.aspx?token=ab7739d5678447fbbe5036f3bcba2445081500061 
+
+Since the proof was reset, your added corrections before has also been removed. Please add them back. 
+
+Please return your corrections at your earliest convenience.
+
+Best regards,
+Joel
+
+Joel Q. Pacaanas
+Production Editor
+On behalf of Wiley
+Manila
+We partner with global experts to further innovative research.
+
+E-mail: jpacaanas@wiley.com 
+Tel: +632 88558618
+Fax: +632 5325 0768
+
+
+ 
+From: "Wiley Online Proofing" <notifications@eproofing.in>
+To: pabuhr@uwaterloo.ca
+Cc: SPEproofs@wiley.com
+Reply-To: eproofing@wiley.com
+Date: 26 Nov 2020 18:57:27 +0000
+Subject: Corrections successfully submitted for SPE_EV_SPE2925, Advanced control-flow in Cforall.
+
+Corrections successfully submitted
+
+Dear Dr. Peter Buhr,
+
+Thank you for reviewing the proof of the Software: Practice And Experience article Advanced control-flow in Cforall.
+
+View Article https://wiley.eproofing.in/Proof.aspx?token=ab7739d5678447fbbe5036f3bcba2445081500061
+
+This is a read-only version of your article with the corrections you have marked up.
+
+If you encounter any problems or have questions please contact me, Joel Pacaanas at (SPEproofs@wiley.com). For the quickest response include the journal name and your article ID (found in the subject line) in all correspondence.
+
+Best regards,
+Joel Pacaanas
