Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/concurrency/mail2

    r9fb8f01 r62dbb00  
    2222Software: Practice and Experience Editorial Office
    2323
    24 
    25 
    26 Date: Tue, 12 Nov 2019 22:25:17 +0000
    27 From: Richard Jones <onbehalfof@manuscriptcentral.com>
    28 Reply-To: R.E.Jones@kent.ac.uk
    29 To: tdelisle@uwaterloo.ca, pabuhr@uwaterloo.ca
    30 Subject: Software: Practice and Experience - Decision on Manuscript ID
    31  SPE-19-0219
    32 
    33 12-Nov-2019
    34 
    35 Dear Dr Buhr,
    36 
    37 Many thanks for submitting SPE-19-0219 entitled "Advanced Control-flow and Concurrency in Cforall" to Software: Practice and Experience. The paper has now been reviewed and the comments of the referees are included at the bottom of this letter.
    38 
    39 The decision on this paper is that it requires substantial further work is required. The referees have a number of substantial concerns. All the reviewers found the submission very hard to read; two of the reviewers state that it needs very substantial restructuring. These concerns must be addressed before your submission can be considered further.
    40 
    41 A revised version of your manuscript that takes into account the comments of the referees will be reconsidered for publication.
    42 
    43 Please note that submitting a revision of your manuscript does not guarantee eventual acceptance, and that your revision will be subject to re-review by the referees before a decision is rendered.
    44 
    45 You have 90 days from the date of this email to submit your revision. If you are unable to complete the revision within this time, please contact me to request an extension.
    46 
    47 You can upload your revised manuscript and submit it through your Author Center. Log into https://mc.manuscriptcentral.com/spe  and enter your Author Center, where you will find your manuscript title listed under "Manuscripts with Decisions".
    48 
    49 When submitting your revised manuscript, you will be able to respond to the comments made by the referee(s) in the space provided.  You can use this space to document any changes you make to the original manuscript.
    50 
    51 If you feel that your paper could benefit from English language polishing, you may wish to consider having your paper professionally edited for English language by a service such as Wiley's at http://wileyeditingservices.com. Please note that while this service will greatly improve the readability of your paper, it does not guarantee acceptance of your paper by the journal.
    52  
    53 Once again, thank you for submitting your manuscript to Software: Practice and Experience and I look forward to receiving your revision.
    54 
    55 
    56 Sincerely,
    57 
    58 Prof. Richard Jones
    59 Software: Practice and Experience
    60 R.E.Jones@kent.ac.uk
    61 
    62 
    63 Referee(s)' Comments to Author:
    64 
    65 Reviewing: 1
    66 
    67 Comments to the Author
    68 This article presents the design and rationale behind the various
    69 threading and synchronization mechanisms of C-forall, a new low-level
    70 programming language.  This paper is very similar to a companion paper
    71 which I have also received: as the papers are similar, so will these
    72 reviews be --- in particular any general comments from the other
    73 review apply to this paper also.
    74 
    75 As far as I can tell, the article contains three main ideas: an
    76 asynchronous execution / threading model; a model for monitors to
    77 provide mutual exclusion; and an implementation.  The first two ideas
    78 are drawn together in Table 1: unfortunately this is on page 25 of 30
    79 pages of text. Implementation choices and descriptions are scattered
    80 throughout the paper - and the sectioning of the paper seems almost
    81 arbitrary.
    82 
    83 The article is about its contributions.  Simply adding feature X to
    84 language Y isn't by itself a contribution, (when feature X isn't
    85 already a contribution).  The contribution can be in the design: the
    86 motivation, the space of potential design options, the particular
    87 design chosen and the rationale for that choice, or the resulting
    88 performance.  For example: why support two kinds of generators as well
    89 as user-level threads?  Why support both low and high level
    90 synchronization constructs?  Similarly I would have found the article
    91 easier to follow if it was written top down, presenting the design
    92 principles, present the space of language features, justify chosen
    93 language features (and rationale) and those excluded, and then present
    94 implementation, and performance.
    95 
    96 Then the writing of the article is often hard to follow, to say the
    97 least. Two examples: section 3 "stateful functions" - I've some idea
    98 what that is (a function with Algol's "own" or C's "static" variables?
    99 but in fact the paper has a rather more specific idea than that. The
    100 top of page 3 throws a whole lot of defintions at the reader
    101 "generator" "coroutine" "stackful" "stackless" "symmetric"
    102 "asymmetric" without every stopping to define each one --- but then in
    103 footnote "C" takes the time to explain what C's "main" function is?  I
    104 cannot imagine a reader of this paper who doesn't know what "main" is
    105 in C; especially if they understand the other concepts already
    106 presented in the paper.  The start of section 3 then does the same
    107 thing: putting up a whole lot of definitions, making distinctions and
    108 comparisons, even talking about some runtime details, but the critical
    109 definition of a monitor doesn't appear until three pages later, at the
    110 start of section 5 on p15, lines 29-34 are a good, clear, description
    111 of what a monitor actually is.  That needs to come first, rather than
    112 being buried again after two sections of comparisons, discussions,
    113 implementations, and options that are ungrounded because they haven't
    114 told the reader what they are actually talking about.  First tell the
    115 reader what something is, then how they might use it (as programmers:
    116 what are the rules and restrictions) and only then start comparison
    117 with other things, other approaches, other languages, or
    118 implementations.
    119 
    120 The description of the implementation is similarly lost in the trees
    121 without ever really seeing the wood. Figure 19 is crucial here, but
    122 it's pretty much at the end of the paper, and comments about
    123 implementations are threaded throughout the paper without the context
    124 (fig 19) to understand what's going on.   The protocol for performance
    125 testing may just about suffice for C (although is N constantly ten
    126 million, or does it vary for each benchmark) but such evaluation isn't
    127 appropriate for garbage-collected or JITTed languages like Java or Go.
    128 
    129 other comments working through the paper - these are mostly low level
    130 and are certainly not comprehensive.
    131 
    132 p1 only a subset of C-forall extensions?
    133 
    134 p1 "has features often associated with object-oriented programming
    135 languages, such as constructors, destructors, virtuals and simple
    136 inheritance."   There's no need to quibble about this. Once a language
    137 has inheritance, it's hard to claim it's not object-oriented.
    138 
    139 
    140 p2 barging? signals-as-hints?
    141 
    142 p3 start your discussion of generations with a simple example of a
    143 C-forall generator.  Fig 1(b) might do: but put it inline instead of
    144 the python example - and explain the key rules and restrictions on the
    145 construct.  Then don't even start to compare with coroutines until
    146 you've presented, described and explained your coroutines...
    147 p3 I'd probably leave out the various "C" versions unless there are
    148 key points to make you can't make in C-forall. All the alternatives
    149 are just confusing.
    150 
    151 
    152 p4 but what's that "with" in Fig 1(B)
    153 
    154 p5 start with the high level features of C-forall generators...
    155 
    156 p5 why is the paper explaining networking protocols?
    157 
    158 p7 lines 1-9 (transforming generator to coroutine - why would I do any
    159 of this? Why would I want one instead of the other (do not use "stack"
    160 in your answer!)
    161 
    162 p10 last para "A coroutine must retain its last resumer to suspend
    163 back because the resumer is on a different stack. These reverse
    164 pointers allow suspend to cycle backwards, "  I've no idea what is
    165 going on here?  why should I care?  Shouldn't I just be using threads
    166 instead?  why not?
    167 
    168 p16 for the same reasons - what reasons?
    169 
    170 p17 if the multiple-monitor entry procedure really is novel, write a
    171 paper about that, and only about that.
    172 
    173 p23 "Loose Object Definitions" - no idea what that means.  in that
    174 section: you can't leave out JS-style dynamic properties.  Even in
    175 OOLs that (one way or another) allow separate definitions of methods
    176 (like Objective-C, Swift, Ruby, C#) at any time a runtime class has a
    177 fixed definition.  Quite why the detail about bit mask implementation
    178 is here anyway, I've no idea.
    179 
    180 p25 this cluster isn't a CLU cluster then?
    181 
    182 * conclusion should conclude the paper, not the related.
    183 
    184 
    185 Reviewing: 2
    186 
    187 Comments to the Author
    188 This paper describes the concurrency features of an extension of C (whose name I will write as "C\/" here, for convenience), including much design-level discussion of the coroutine- and monitor-based features and some microbenchmarks exploring the current implementation's performance. The key message of the latter is that the system's concurrency abstractions are much lighter-weight than the threading found in mainstream C or Java implementations.
    189 
    190 There is much description of the system and its details, but nothing about (non-artificial) uses of it. Although the microbenchmark data is encouraging, arguably not enough practical experience with the system has been reported here to say much about either its usability advantages or its performance.
    191 
    192 As such, the main contribution of the paper seem to be to document the existence of the described system and to provide a detailed design rationale and (partial) tutorial. I believe that could be of interest to some readers, so an acceptable manuscript is lurking in here somewhere.
    193 
    194 Unfortunately, at present the writing style is somewhere between unclear and infuriating. It omits to define terms; it uses needlessly many terms for what are apparently (but not clearly) the same things; it interrupts itself rather than deliver the natural consequent of whatever it has just said; and so on. Section 5 is particularly bad in these regards -- see my detailed comments below. Fairly major additional efforts will be needed to turn the present text into a digestible design-and-tutorial document. I suspect that a shorter paper could do this job better than the present manuscript, which is overwrought in parts.
    195 
    196 p2: lines 4--9 are a little sloppy. It is not the languages but their popular implementations which "adopt" the 1:1 kernel threading model.
    197 
    198 line 10: "medium work" -- "medium-sized work"?
    199 
    200 line 18: "is all sequential to the compiler" -- not true in modern compilers, and in 2004 H-J Boehm wrote a tech report describing exactly why ("Threads cannot be implemented as a library", HP Labs).
    201 
    202 line 20: "knows the optimization boundaries" -- I found this vague. What's an example?
    203 
    204 line 31: this paragraph has made a lot of claims. Perhaps forward-reference to the parts of the paper that discuss each one.
    205 
    206 line 33: "so the reader can judge if" -- this reads rather passive-aggressively. Perhaps better: "... to support our argument that..."
    207 
    208 line 41: "a dynamic partitioning mechanism" -- I couldn't tell what this meant
    209 
    210 p3. Presenting concept of a "stateful function" as a new language feature seems odd. In C, functions often have local state thanks to static local variables (or globals, indeed). Of course, that has several limitations. Can you perhaps present your contributions by enumerating these limitations? See also my suggestion below about a possible framing centred on a strawman.
    211 
    212 line 2: "an old idea that is new again" -- this is too oblique
    213 
    214 lines 2--15: I found this to be a word/concept soup. Stacks, closures, generators, stackless stackful, coroutine, symmetric, asymmetric, resume/suspend versus resume/resume... there needs to be a more gradual and structured way to introduce all this, and ideally one that minimises redundancy. Maybe present it as a series of "definitions" each with its own heading, e.g. "A closure is stackless if its local state has statically known fixed size"; "A generator simply means a stackless closure." And so on. Perhaps also strongly introduce the word "activate" as a direct contrast with resume and suspend. These are just a flavour of the sort of changes that might make this paragraph into something readable.
    215 
    216 Continuing the thought: I found it confusing that by these definitinos, a stackful closure is not a stack, even though logically the stack *is* a kind of closure (it is a representation of the current thread's continuation).
    217 
    218 lines 24--27: without explaining what the boost functor types mean, I don't think the point here comes across.
    219 
    220 line 34: "semantically coupled" -- I wasn't surew hat this meant
    221 
    222 p4: the point of Figure 1 (C) was not immediately clear. It seem to be showing how one might "compile down" Figure 1 (B). Or is that Figure 1 (A)?
    223 
    224 It's right that the incidental language features of the system are not front-and-centre, but I'd appreciate some brief glossing of non-C languages features as they appear. Examples are the square bracket notation, the pipe notation and the constructor syntax. These explanations could go in the caption of the figure which first uses them, perhaps. Overall I found the figure captions to be terse, and a missed opportunity to explain clearly what was going on.
    225 
    226 p5 line 23: "This restriction is removed..." -- give us some up-front summary of your contributions and the elements of the language design that will be talked about, so that this isn't an aside. This will reduce the "twisty passages" feeling that characterises much of the paper.
    227 
    228 line 40: "a killer asymmetric generator" -- this is stylistically odd, and the sentence about failures doesn't convincigly argue that C\/ will help with them. Have you any experience writing device drivers using C\/? Or any argument that the kinds of failures can be traced to the "stack-ripping" style that one is forced to use without coroutines? Also, a typo on line 41: "device drives". And saying "Windows/Linux" is sloppy... what does the cited paper actually say?
    229 
    230 p6 lines 13--23: this paragraph is difficult to understand. It seems to be talking about a control-flow pattern roughly equivalent to tail recursion. What is the high-level point, other than that this is possible?
    231 
    232 line 34: "which they call coroutines" -- a better way to make this point is presumably that the C++20 proposal only provides a specialised kind of coroutine, namely generators, despite its use of the more general word.
    233 
    234 line 47: "... due to dynamic stack allocation, execution..." -- this sentence doesn't scan. I suggest adding "and for" in the relevant places where currently there are only commas.
    235 
    236 p8 / Figure 5 (B) -- the GNU C extension of unary "&&" needs to be explained. The whole figure needs a better explanation, in fact.
    237 
    238 p9, lines 1--10: I wasn't sure this stepping-through really added much value. What are the truly important points to note about this code?
    239 
    240 p10: similarly, lines 3--27 again are somewhere between tedious and confusing. I'm sure the motivation and details of "starter semantics" can both be stated much more pithily.
    241 
    242 line 32: "a self-resume does not overwrite the last resumer" -- is this a hack or a defensible principled decision?
    243 
    244 p11: "a common source of errors" -- among beginners or among production code? Presumably the former.
    245 
    246 line 23: "with builtin and library" -- not sure what this means
    247 
    248 lines 31--36: these can be much briefer. The only important point here seems to be that coroutines cannot be copied.
    249 
    250 p12: line 1: what is a "task"? Does it matter?
    251 
    252 line 7: calling it "heap stack" seems to be a recipe for confusion. "Stack-and-heap" might be better, and contrast with "stack-and-VLS" perhaps. When "VLS" is glossed, suggest actually expanding its initials: say "length" not "size".
    253 
    254 line 21: are you saying "cooperative threading" is the same as "non-preemptive scheduling", or that one is a special case (kind) of the other? Both are defensible, but be clear.
    255 
    256 line 27: "mutual exclusion and synchronization" -- the former is a kind of the latter, so I suggest "and other forms of synchronization".
    257 
    258 line 30: "can either be a stackless or stackful" -- stray "a", but also, this seems to be switching from generic/background terminology to C\/-specific terminology.
    259 
    260 An expositional idea occurs: start the paper with a strawman naive/limited realisation of coroutines -- say, Simon Tatham's popular "Coroutines in C" web page -- and identify point by point what the limitations are and how C\/ overcomes them. Currently the presentation is often flat (lacking motivating contrasts) and backwards (stating solutions before problems). The foregoing approach might fix both of these.
    261 
    262 page 13: line 23: it seems a distraction to mention the Python feature here.
    263 
    264 p14 line 5: it seems odd to describe these as "stateless" just because they lack shared mutable state. It means the code itself is even more stateful. Maybe the "stack ripping" argument could usefully be given here.
    265 
    266 line 16: "too restrictive" -- would be good to have a reference to justify this, or at least give a sense of what the state-of-the-art performance in transactional memory systems is (both software and hardware)
    267 
    268 line 22: "simulate monitors" -- what about just *implementing* monitors? isn't that what these systems do? or is the point more about refining them somehow into something more specialised?
    269 
    270 p15: sections 4.1 and 4.2 seem adrift and misplaced. Split them into basic parts (which go earlier) and more advanced parts (e.g. barging, which can be explained later).
    271 
    272 line 31: "acquire/release" -- misses an opportunity to contrast the monitor's "enter/exit" abstraction with the less structured acquire/release of locks.
    273 
    274 p16 line 12: the "implicit" versus "explicit" point is unclear. Is it perhaps about the contract between an opt-in *discipline* and a language-enforced *guarantee*?
    275 
    276 line 28: no need to spend ages dithering about which one is default and which one is the explicit qualifier. Tell us what you decided, briefly justify it, and move on.
    277 
    278 p17: Figure 11: since the main point seems to be to highlight bulk acquire, include a comment which identifies the line where this is happening.
    279 
    280 line 2: "impossible to statically..." -- or dynamically. Doing it dynamically would be perfectly acceptable (locking is a dynamic operation after all)
    281 
    282 "guarantees acquisition order is consistent" -- assuming it's done in a single bulk acquire.
    283 
    284 p18: section 5.3: the text here is a mess. The explanations of "internal" versus "external" scheduling are unclear, and "signals as hints" is not explained. "... can cause thread starvation" -- means including a while loop, or not doing so? "There are three signalling mechanisms.." but the text does not follow that by telling us what they are. My own scribbled attempt at unpicking the internal/external thing: "threads already in the monitor, albeit waiting, have priority over those trying to enter".
    285 
    286 p19: line 3: "empty condition" -- explain that condition variables don't store anything. So being "empty" means that the queue of waiting threads (threads waiting to be signalled that the condition has become true) is empty.
    287 
    288 line 6: "... can be transformed into external scheduling..." -- OK, but give some motivation.
    289 
    290 p20: line 6: "mechnaism"
    291 
    292 lines 16--20: this is dense and can probably only be made clear with an example
    293 
    294 p21 line 21: clarify that nested monitor deadlock was describe earlier (in 5.2). (Is the repetition necessary?)
    295 
    296 line 27: "locks, and by extension monitors" -- this is true but the "by extension" argument is faulty. It is perfectly possible to use locks as a primitive and build a compositional mechanism out of them, e.g. transactions.
    297 
    298 p22 line 2: should say "restructured"
    299 
    300 line 33: "Implementing a fast subset check..." -- make clear that the following section explains how to do this. Restructuring the sections themselves could do this, or noting in the text.
    301 
    302 p23: line 3: "dynamic member adding, eg, JavaScript" -- needs to say "as permitted in JavaScript", and "dynamically adding members" is stylistically better
    303 
    304 p23: line 18: "urgent stack" -- back-reference to where this was explained before
    305 
    306 p24 line 7: I did not understand what was more "direct" about "direct communication". Also, what is a "passive monitor" -- just a monitor, given that monitors are passive by design?
    307 
    308 line 14 / section 5.9: this table was useful and it (or something like it) could be used much earlier on to set the structure of the rest of the paper. The explanation at present is too brief, e.g. I did not really understand the point about cases 7 and 8.
    309 
    310 p25 line 2: instead of casually dropping in a terse explanation for the newly intrdouced term "virtual processor", introduce it properly. Presumably the point is to give a less ambiguous meaning to "thread" by reserving it only for C\/'s green threads.
    311 
    312 Table 1: what does "No / Yes" mean?
    313 
    314 p26 line 15: "transforms user threads into fibres" -- a reference is needed to explain what "fibres" means... guessing it's in the sense of Adya et al.
    315 
    316 line 20: "Microsoft runtime" -- means Windows?
    317 
    318 lines 21--26: don't say "interrupt" to mean "signal", especially not without clear introduction. You can use "POSIX signal" to disambiguate from condition variables' "signal".
    319 
    320 p27 line 3: "frequency is usually long" -- that's a "time period" or "interval", not a frequency
    321 
    322 line 5: the lengthy quotation is not really necessary; just paraphrase the first sentence and move on.
    323 
    324 line 20: "to verify the implementation" -- I don't think that means what is intended
    325 
    326 Tables in section 7 -- too many significant figures. How many overall runs are described? What is N in each case?
    327 
    328 p29 line 2: "to eliminate this cost" -- arguably confusing since nowadays on commodity CPUs most of the benefits of inlining are not to do with call overheads, but from later optimizations enabled as a consequence of the inlining
    329 
    330 line 41: "a hierarchy" -- are they a hierarchy? If so, this could be explained earlier. Also, to say these make up "an integrated set... of control-flow features" verges on the tautologous.
    331 
    332 p30 line 15: "a common case being web servers and XaaS" -- that's two cases
    333 
    334 
    335 Reviewing: 3
    336 
    337 Comments to the Author
    338 # Cforall review
    339 
    340 Overall, I quite enjoyed reading the paper. Cforall has some very interesting ideas. I did have some suggestions that I think would be helpful before final publication. I also left notes on various parts of the paper that I find confusing when reading, in hopes that it may be useful to you.
    341 
    342 ## Summary
    343 
    344 * Expand on the motivations for including both generator and coroutines, vs trying to build one atop the other
    345 * Expand on the motivations for having Why both symmetric and asymettric coroutines?
    346 * Comparison to async-await model adopted by other languages
    347     * C#, JS
    348     * Rust and its async/await model
    349 * Consider performance comparisons against node.js and Rust frameworks
    350 * Discuss performance of monitors vs finer-grained memory models and atomic operations found in other languages
    351 * Why both internal/external scheduling for synchronization?
    352 
    353 ## Generator/coroutines
    354 
    355 In general, this section was clear, but I thought it would be useful to provide a somewhat deeper look into why Cforall opted for the particular combination of features that it offers. I see three main differences from other languages:
    356 
    357 * Generators are not exposed as a "function" that returns a generator object, but rather as a kind of struct, with communication happening via mutable state instead of "return values". That is, the generator must be manually resumed and (if I understood) it is expected to store values that can then later be read (perhaps via methods), instead of having a `yield <Expr>` statement that yields up a value explicitly.
    358 * Both "symmetric" and "asymmetric" generators are supported, instead of only asymmetric.
    359 * Coroutines (multi-frame generators) are an explicit mechanism.
    360 
    361 In most other languages, coroutines are rather built by layering single-frame generators atop one another (e.g., using a mechanism like async-await), and symmetric coroutines are basically not supported. I'd like to see a bit more justification for Cforall including all the above mechanisms -- it seemed like symmetric coroutines were a useful building block for some of the user-space threading and custom scheduler mechanisms that were briefly mentioned later in the paper.
    362 
    363 In the discussion of coroutines, I would have expected a bit more of a comparison to the async-await mechanism offered in other languages. Certainly the semantics of async-await in JavaScript implies significantly more overhead (because each async fn is a distinct heap object). [Rust's approach avoids this overhead][zc], however, and might be worthy of a comparison (see the Performance section).
    364 
    365 ## Locks and threading
    366 
    367 ### Comparison to atomics overlooks performance
    368 
    369 There are several sections in the paper that compare against atomics -- for example, on page 15, the paper shows a simple monitor that encapsulates an integer and compares that to C++ atomics. Later, the paper compares the simplicity of monitors against the `volatile` quantifier from Java. The conclusion in section 8 also revisits this point.
    370 
    371 While I agree that monitors are simpler, they are obviously also significantly different from a performance perspective -- the paper doesn't seem to address this at all. It's plausible that (e.g.) the `Aint` monitor type described in the paper can be compiled and mapped to the specialized instructions offered by hardware, but I didn't see any mention of how this would be done. There is also no mention of the more nuanced memory ordering relations offered by C++11 and how one might achieve similar performance characteristics in Cforall (perhaps the answer is that one simply doesn't need to; I think that's defensible, but worth stating explicitly).
    372 
    373 ### Justification for external scheduling feels lacking
    374 
    375 Cforall includes both internal and external scheduling; I found the explanation for the external scheduling mechanism to be lacking in justification. Why include both mechanisms when most languages seem to make do with only internal scheduling? It would be useful to show some scenarios where external scheduling is truly more powerful.
    376 
    377 I would have liked to see some more discussion of external scheduling and how it  interacts with software engineering best practices. It seems somewhat similar to AOP in certain regards. It seems to add a bit of "extra semantics" to monitor methods, in that any method may now also become a kind of synchronization point. The "open-ended" nature of this feels like it could easily lead to subtle bugs, particularly when code refactoring occurs (which may e.g. split an existing method into two). This seems particularly true if external scheduling can occur across compilation units -- the paper suggested that this is true, but I wasn't entirely clear.
    378 
    379 I would have also appreciated a few more details on how external scheduling is implemented. It seems to me that there must be some sort of "hooks" on mutex methods so that they can detect whether some other function is waiting on them and awaken those blocked threads. I'm not sure how such hooks are inserted, particularly across compilation units. The material in Section 5.6 didn't quite clarify the matter for me. For example, it left me somewhat confused about whether the `f` and `g` functions declared were meant to be local to a translation unit, or shared with other unit.
    380 
    381 ### Presentation of monitors is somewhat confusing
    382 
    383 I found myself confused fairly often in the section on monitors. I'm just going to leave some notes here on places that I got confused in how that it could be useful to you as feedback on writing that might want to be clarified.
    384 
    385 To start, I did not realize that the `mutex_opt` notation was a keyword, I thought it was a type annotation. I think this could be called out more explicitly.
    386 
    387 Later, in section 5.2, the paper discusses `nomutex` annotations, which initially threw me, as they had not been introduced (now I realize that this paragraph is there to justify why there is no such keyword). The paragraph might be rearranged to make that clearer, perhaps by leading with the choice that Cforall made.
    388 
    389 On page 17, the paper states that "acquiring multiple monitors is safe from deadlock", but this could be stated a bit more precisely: acquiring multiple monitors in a bulk-acquire is safe from deadlock (deadlock can still result from nested acquires).
    390 
    391 On page 18, the paper states that wait states do not have to be enclosed in loops, as there is no concern of barging. This seems true but there are also other reasons to use loops (e.g., if there are multiple reasons to notify on the same condition). Thus the statement initially surprised me, as barging is only one of many reasons that I typically employ loops around waits.
    392 
    393 I did not understand the diagram in Figure 12 for some time. Initially, I thought that it was generic to all monitors, and I could not understand the state space. It was only later that I realized it was specific to your example. Updating the caption from "Monitor scheduling to "Monitor scheduling in the example from Fig 13" might have helped me quite a bit.
    394 
    395 I spent quite some time reading the boy/girl dating example (\*) and I admit I found it somewhat confusing. For example, I couldn't tell whether there were supposed to be many "girl" threads executing at once, or if there was only supposed to be one girl and one boy thread executing in a loop. Are the girl/boy threads supposed to invoke the girl/boy methods or vice versa? Surely there is some easier way to set this up? I believe that when reading the paper I convinced myself of how it was supposed to be working, but I'm writing this review some days later, and I find myself confused all over again and not able to easily figure it out.
    396 
    397 (\*) as an aside, I would consider modifying the example to some other form of matching, like customers and support personnel.
    398 
    399 ## Related work
    400 
    401 The paper offered a number of comparisons to Go, C#, Scala, and so forth, but seems to have overlooked another recent language, Rust. In many ways, Rust seems to be closest in philosophy to Cforall, so it seems like an odd omission. I already mentioned above that Rust is in the process of shipping [async-await syntax][aa], which is definitely an alternative to the generator/coroutine approach in Cforall (though one with clear pros/cons).
    402 
    403 ## Performance
    404 
    405 In the performance section in particular, you might consider comparing against some of the Rust web servers and threading systems. For example, actix is top of the [single query TechEmpower Framework benchmarks], and tokio is near the top of the [plainthreading benchmarks][pt] (hyper, the top, is more of an HTTP framework, though it is also written in Rust). It would seem worth trying to compare their "context switching" costs as well -- I believe both actix and tokio have a notion of threads that could be readily compared.
    406 
    407 Another addition that might be worth considering is to compare against node.js promises, although I think the comparison to process creation is not as clean.
    408 
    409 That said, I think that the performance comparison is not a big focus of the paper, so it may not be necessary to add anything to it.
    410 
    411 ## Authorship of this review
    412 
    413 I'm going to sign this review. This review was authored by Nicholas D. Matsakis. In the intrerest of full disclosure, I'm heavily involved in the Rust project, although I dont' think that influenced this review in particular. Feel free to reach out to me for clarifying questions.
    414 
    415 ## Links
    416 
    417 [aa]: https://blog.rust-lang.org/2019/09/30/Async-await-hits-beta.html
    418 [zc]: https://aturon.github.io/blog/2016/08/11/futures/
    419 [sq]: https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=db
    420 [pt]: https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=plaintext
    421 
    422 
    423 
    424 Subject: Re: manuscript SPE-19-0219
    425 To: "Peter A. Buhr" <pabuhr@uwaterloo.ca>
    426 From: Richard Jones <R.E.Jones@kent.ac.uk>
    427 Date: Tue, 12 Nov 2019 22:43:55 +0000
    428 
    429 Dear Dr Buhr
    430 
    431 Your should have received a decision letter on this today. I am sorry that this
    432 has taken so long. Unfortunately SP&E receives a lot of submissions and getting
    433 reviewers is a perennial problem.
    434 
    435 Regards
    436 Richard
    437 
    438 Peter A. Buhr wrote on 11/11/2019 13:10:
    439 >     26-Jun-2019
    440 >     Your manuscript entitled "Advanced Control-flow and Concurrency in Cforall"
    441 >     has been received by Software: Practice and Experience. It will be given
    442 >     full consideration for publication in the journal.
    443 >
    444 > Hi, it has been over 4 months since submission of our manuscript SPE-19-0219
    445 > with no response.
    446 >
    447 > Currently, I am refereeing a paper for IEEE that already cites our prior SP&E
    448 > paper and the Master's thesis forming the bases of the SP&E paper under
    449 > review. Hence our work is apropos and we want to get it disseminates as soon as
    450 > possible.
    451 >
    452 > [3] A. Moss, R. Schluntz, and P. A. Buhr, "Cforall: Adding modern programming
    453 >      language features to C," Software - Practice and Experience, vol. 48,
    454 >      no. 12, pp. 2111-2146, 2018.
    455 >
    456 > [4] T. Delisle, "Concurrency in C for all," Master's thesis, University of
    457 >      Waterloo, 2018.  [Online].  Available:
    458 >      https://uwspace.uwaterloo.ca/bitstream/handle/10012/12888
    459 
    460 
    461 
    462 Date: Mon, 13 Jan 2020 05:33:15 +0000
    463 From: Richard Jones <onbehalfof@manuscriptcentral.com>
    464 Reply-To: R.E.Jones@kent.ac.uk
    465 To: pabuhr@uwaterloo.ca
    466 Subject: Revision reminder - SPE-19-0219
    467 
    468 13-Jan-2020
    469 Dear Dr Buhr
    470 SPE-19-0219
    471 
    472 This is a reminder that your opportunity to revise and re-submit your
    473 manuscript will expire 28 days from now. If you require more time please
    474 contact me directly and I may grant an extension to this deadline, otherwise
    475 the option to submit a revision online, will not be available.
    476 
    477 I look forward to receiving your revision.
    478 
    479 Sincerely,
    480 
    481 Prof. Richard Jones
    482 Editor, Software: Practice and Experience
    483 https://mc.manuscriptcentral.com/spe
    484 
    485 
    486 
    487 Date: Wed, 5 Feb 2020 04:22:18 +0000
    488 From: Aaron Thomas <onbehalfof@manuscriptcentral.com>
    489 Reply-To: speoffice@wiley.com
    490 To: tdelisle@uwaterloo.ca, pabuhr@uwaterloo.ca
    491 Subject: SPE-19-0219.R1 successfully submitted
    492 
    493 04-Feb-2020
    494 
    495 Dear Dr Buhr,
    496 
    497 Your manuscript entitled "Advanced Control-flow and Concurrency in Cforall" has
    498 been successfully submitted online and is presently being given full
    499 consideration for publication in Software: Practice and Experience.
    500 
    501 Your manuscript number is SPE-19-0219.R1.  Please mention this number in all
    502 future correspondence regarding this submission.
    503 
    504 You can view the status of your manuscript at any time by checking your Author
    505 Center after logging into https://mc.manuscriptcentral.com/spe.  If you have
    506 difficulty using this site, please click the 'Get Help Now' link at the top
    507 right corner of the site.
    508 
    509 Thank you for submitting your manuscript to Software: Practice and Experience.
    510 
    511 Sincerely,
    512 Software: Practice and Experience Editorial Office
    513 
Note: See TracChangeset for help on using the changeset viewer.