- File:
-
- 1 edited
-
doc/papers/concurrency/response2 (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/response2
r016b1eb rb54118a 27 27 thread creation and destruction? 28 28 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. 29 The best description of Smalltalk concurrency I can find is in J. Hunt, 30 Smalltalk and Object Orientation, Springer-Verlag London Limited, 1997, Chapter 31 31 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 45 Hence, "aBlock fork" creates, "Semaphore" blocks/unblocks (as does message send 46 to an aBlock object), and garbage collection of an aBlock joins with its 47 thread. The fact that a programmer *implicitly* does "fork", "block"/"unblock", 48 and "join", does not change their fundamental requirement. 34 49 35 50 … … 88 103 storage, too, which is a single instance across all generator instances of that 89 104 type, 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.105 at play with semantics that is virtually the same as in other languages. 91 106 92 107 … … 103 118 Just-in-Time Compiler. We modified our test programs based on his advise, and 104 119 he 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. 120 feature. Hence, we have taken into account all issues related to performing 121 benchmarks in JITTED languages. Dave's help is recognized in the 122 Acknowledgment section. Also, all the benchmark programs are publicly available 123 for independent verification. 124 125 Similarly, we verified our Node.js programs with Gregor Richards, an expert in 126 just-in-time compilation for dynamic typing. 110 127 111 128 … … 138 155 Since many aspects of Cforall are not OO, the rest of the paper *does* depend 139 156 on 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 157 significantly different expectations for the design. We believe your definition 158 of OO is too broad, such as including C. Just because a programming language 159 can support aspects of the OO programming style, does not make it OO. (Just 160 because a duck can swim does not make it a fish.) 161 162 Our 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 172 Cforall fails this definition as code cannot appear in an "object" and there is 173 no implicit receiver. As well, Cforall, Go, and Rust do not have nominal 174 inheritance 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 145 185 146 186 … … 179 219 Whereas, the coroutine only needs the array allocated when needed. Now a 180 220 coroutine has a stack which occupies storage, but the maximum stack size only 181 needs to be the call chain allocating the most storage, where as the generator221 needs to be the call chain allocating the most storage, where as the generator 182 222 has a maximum size of all variable that could be created. 183 223 … … 274 314 275 315 \item[\newterm{execution state}:] is the state information needed by a 276 control-flow feature to initialize and manage bothcompute data and execution277 location(s), and de-initialize . For example, calling a function initializes a278 stack frame including contained objects with constructors, manages local data279 inblocks and return locations during calls, and de-initializes the frame by316 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 280 320 running any object destructors and management operations. 281 321 … … 290 330 appropriate word? 291 331 292 293 332 "computation only" as opposed to what? 294 333 … … 296 335 i.e., the operation starts with everything it needs to compute its result and 297 336 runs to completion, blocking only when it is done and returns its result. 298 Computation only occurs in "embarrassingly parallel" problems.299 337 300 338 … … 558 596 * coroutines/generators/threads: here there is some discussion, but it can 559 597 be improved. 560 * inter nal/external scheduling: I didn't find any direct comparison between598 * interal/external scheduling: I didn't find any direct comparison between 561 599 these features, except by way of example. 562 600 … … 634 672 } 635 673 636 Additional text has been added to the start of Section 3.2 addressing this 637 comment. 674 Additonal text has been added to the start of Section 3.2 address this comment. 638 675 639 676 … … 750 787 and its shorthand form (not shown in the paper) 751 788 752 waitfor( remove, remove2 : buffer);753 754 A call to either of these remove functions satisfies the waitfor (exact755 selectiondetails are discussed in Section 6.4).789 waitfor( remove, remove2 : t ); 790 791 A call to one these remove functions satisfies the waitfor (exact selection 792 details are discussed in Section 6.4). 756 793 757 794 … … 798 835 signal or signal_block. 799 836 800 801 837 I believe that one difference between the Go program and the Cforall 802 838 equivalent is that the Goroutine has an associated queue, so that … … 806 842 Actually, the buffer length is 0 for the Cforall call and the Go unbuffered 807 843 send so both are synchronous communication. 808 809 844 810 845 I think this should be stated explicitly. (Presumably, one could modify the … … 950 985 sout | "join"; 951 986 } 952 953 987 int main() { 954 988 T t[3]; // threads start and delay
Note:
See TracChangeset
for help on using the changeset viewer.