From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1a44c40a66c293f3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!news.highwinds-media.com!newspeer1-win.ntli.net!newsfe3-win.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: PAR (Was: Embedded languages based on early Ada) User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada References: <1172192349.419694.274670@k78g2000cwa.googlegroups.com> <113ls6wugt43q$.cwaeexcj166j$.dlg@40tude.net> <1i3drcyut9aaw.isde6utlv6iq.dlg@40tude.net> <1c61jqeqo68w$.2irtg70stnsa.dlg@40tude.net> <1vdieyr16h7ct$.1vuvfmghy8dzo$.dlg@40tude.net> <1l5727owshrjf$.uuylbc4ek430.dlg@40tude.net> <45EF1E2B.2020703@obry.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 07 Mar 2007 20:41:37 GMT NNTP-Posting-Host: 82.21.99.109 X-Trace: newsfe3-win.ntli.net 1173300097 82.21.99.109 (Wed, 07 Mar 2007 20:41:37 GMT) NNTP-Posting-Date: Wed, 07 Mar 2007 20:41:37 GMT Organization: NTL Xref: g2news2.google.com comp.lang.ada:9763 Date: 2007-03-07T20:41:37+00:00 List-Id: On Wed, 07 Mar 2007 21:18:51 +0100, Pascal Obry wrote: > I don't see the point of PAR which create dynamically threads all the > time. A waste of time! The T tasks above can be reused during all the > application lifetime if necessary. ??? PAR says "these statements can be done in any order, or concurrently". It does not require threads to be created - that's entirely outside the scope of the language. One implementation might run the code sequentially on a CPU. The compiler might spot code rearrangement, or common subexpressions not guaranteed in sequential code. Another implementation might convert simple statements into combinatorial netlists for dynamic instantiation in an FPGA. Complex statements would be handled another way Another might run code sequentially if the number of instructions were below a threshold. Above that threshold, the statements are run sequentially if the average execution time is below a threshold or there are currently fewed threads than processors. Yet another might assign a thread statically to each concurrent statement and build a software pipeline of processes to move data. This way, thread creation and destruction is eliminated, and data locality may be improved. There are other distinct alternatives. It's not the language construct that would waste the time, but the inappropriate implementation. Dmitry wrote: > If so, then what would be the contribution of PAR? One important > proposition is that there is no any use in PAR running absolutely > independent code. So the question arise, what *exactly* PAR does with: The contribution is the very lightweight syntax and semantics. One extra keyword, to permit a wide choice of implementations, parallel, serial, hardware, pipeline, threaded etc. PAR is ideal for the common case of running absolutely independent code! -- Adrian