Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/concurrency/response2

    r016b1eb rb54118a  
    2727      thread creation and destruction?
    2828
    29 Fixed, changed sentence to:
    30 
    31  A programmer needs mechanisms to create, block and unblock, and join with a
    32  thread, even if these basic mechanisms are supplied indirectly through
    33  high-level features.
     29The best description of Smalltalk concurrency I can find is in J. Hunt,
     30Smalltalk and Object Orientation, Springer-Verlag London Limited, 1997, Chapter
     3131 Concurrency in Smalltalk. It states on page 332:
     32
     33  For a process to be spawned from the current process there must be some way
     34  of creating a new process. This is done using one of four messages to a
     35  block. These messages are:
     36
     37    aBlock fork: This creates and schedules a process which will execute the
     38    block. The priority of this process is inherited from the parent process.
     39    ...
     40
     41  The Semaphore class provides facilities for achieving simple synchronization,
     42  it is simple because it only allows for two forms of communication signal and
     43  wait.
     44
     45Hence, "aBlock fork" creates, "Semaphore" blocks/unblocks (as does message send
     46to an aBlock object), and garbage collection of an aBlock joins with its
     47thread. The fact that a programmer *implicitly* does "fork", "block"/"unblock",
     48and "join", does not change their fundamental requirement.
    3449
    3550
     
    88103storage, too, which is a single instance across all generator instances of that
    89104type, as for static storage in an object type. All the kinds of storage are
    90 at play with semantics that is the same as in other languages.
     105at play with semantics that is virtually the same as in other languages.
    91106
    92107
     
    103118Just-in-Time Compiler. We modified our test programs based on his advise, and
    104119he validated our programs as correctly measuring the specified language
    105 feature. Dave's help is recognized in the Acknowledgment section.  Similarly,
    106 we verified our Node.js programs with Gregor Richards, an expert in
    107 just-in-time compilation for dynamic typing.  Hence, we have taken into account
    108 all issues related to performing benchmarks in JITTED languages.  Also, all the
    109 benchmark programs are publicly available for independent verification.
     120feature. Hence, we have taken into account all issues related to performing
     121benchmarks in JITTED languages.  Dave's help is recognized in the
     122Acknowledgment section. Also, all the benchmark programs are publicly available
     123for independent verification.
     124
     125Similarly, we verified our Node.js programs with Gregor Richards, an expert in
     126just-in-time compilation for dynamic typing.
    110127
    111128
     
    138155Since many aspects of Cforall are not OO, the rest of the paper *does* depend
    139156on Cforall being identified as non-OO, otherwise readers would have
    140 significantly different expectations for the design. We did not mean to suggest
    141 that languages that support function pointers with structures support an OO
    142 style. We revised the footnote to avoid this interpretation. Finally, Golang
    143 does not identify itself as an OO language.
    144 https://golang.org/doc/faq#Is_Go_an_object-oriented_language
     157significantly different expectations for the design. We believe your definition
     158of OO is too broad, such as including C. Just because a programming language
     159can support aspects of the OO programming style, does not make it OO. (Just
     160because a duck can swim does not make it a fish.)
     161
     162Our definition of non-OO follows directly from the Wikipedia entry:
     163
     164  Object-oriented programming (OOP) is a programming paradigm based on the
     165  concept of "objects", which can contain data, in the form of fields (often
     166  known as attributes or properties), and code, in the form of procedures
     167  (often known as methods). A feature of objects is an object's procedures that
     168  can access and often modify the data fields of the object with which they are
     169  associated (objects have a notion of "this" or "self").
     170  https://en.wikipedia.org/wiki/Object-oriented_programming
     171
     172Cforall fails this definition as code cannot appear in an "object" and there is
     173no implicit receiver. As well, Cforall, Go, and Rust do not have nominal
     174inheritance and they not considered OO languages, e.g.:
     175
     176 "**Is Go an object-oriented language?** Yes and no. Although Go has types and
     177 methods and allows an object-oriented style of programming, there is no type
     178 hierarchy. The concept of "interface" in Go provides a different approach
     179 that we believe is easy to use and in some ways more general. There are also
     180 ways to embed types in other types to provide something analogous-but not
     181 identical-to subclassing. Moreover, methods in Go are more general than in
     182 C++ or Java: they can be defined for any sort of data, even built-in types
     183 such as plain, "unboxed" integers. They are not restricted to structs (classes).
     184 https://golang.org/doc/faq#Is_Go_an_object-oriented_language
    145185
    146186
     
    179219Whereas, the coroutine only needs the array allocated when needed. Now a
    180220coroutine has a stack which occupies storage, but the maximum stack size only
    181 needs to be the call chain allocating the most storage, whereas the generator
     221needs to be the call chain allocating the most storage, where as the generator
    182222has a maximum size of all variable that could be created.
    183223
     
    274314
    275315 \item[\newterm{execution state}:] is the state information needed by a
    276  control-flow feature to initialize and manage both compute data and execution
    277  location(s), and de-initialize. For example, calling a function initializes a
    278  stack frame including contained objects with constructors, manages local data
    279  in blocks and return locations during calls, and de-initializes the frame by
     316 control-flow feature to initialize, manage compute data and execution
     317 location(s), and de-initialize, \eg calling a function initializes a stack
     318 frame including contained objects with constructors, manages local data in
     319 blocks and return locations during calls, and de-initializes the frame by
    280320 running any object destructors and management operations.
    281321
     
    290330appropriate word?
    291331
    292 
    293332    "computation only" as opposed to what?
    294333
     
    296335i.e., the operation starts with everything it needs to compute its result and
    297336runs to completion, blocking only when it is done and returns its result.
    298 Computation only occurs in "embarrassingly parallel" problems.
    299337
    300338
     
    558596    * coroutines/generators/threads: here there is some discussion, but it can
    559597      be improved.
    560     * internal/external scheduling: I didn't find any direct comparison between
     598    * interal/external scheduling: I didn't find any direct comparison between
    561599      these features, except by way of example.
    562600
     
    634672  }
    635673
    636 Additional text has been added to the start of Section 3.2 addressing this
    637 comment.
     674Additonal text has been added to the start of Section 3.2 address this comment.
    638675
    639676
     
    750787and its shorthand form (not shown in the paper)
    751788
    752   waitfor( remove, remove2 : buffer );
    753 
    754 A call to either of these remove functions satisfies the waitfor (exact
    755 selection details are discussed in Section 6.4).
     789  waitfor( remove, remove2 : t );
     790
     791A call to one these remove functions satisfies the waitfor (exact selection
     792details are discussed in Section 6.4).
    756793
    757794
     
    798835signal or signal_block.
    799836
    800 
    801837    I believe that one difference between the Go program and the Cforall
    802838    equivalent is that the Goroutine has an associated queue, so that
     
    806842Actually, the buffer length is 0 for the Cforall call and the Go unbuffered
    807843send so both are synchronous communication.
    808 
    809844
    810845    I think this should be stated explicitly. (Presumably, one could modify the
     
    950985      sout | "join";
    951986  }
    952 
    953987  int main() {
    954988      T t[3]; // threads start and delay
Note: See TracChangeset for help on using the changeset viewer.