home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / transput / 949 < prev    next >
Encoding:
Text File  |  1992-08-18  |  3.7 KB  |  95 lines

  1. Newsgroups: comp.sys.transputer
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!mips!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!dutrun!dutrun2!dutncp8!rob
  3. From: rob@pact.nl (Rob Kurver)
  4. Subject: Re: large granularity & going all the way (was: Y should U consider occam?
  5. Message-ID: <rob.714223777@dutncp8>
  6. Sender: news@dutrun2.tudelft.nl (UseNet News System)
  7. Nntp-Posting-Host: dutncp8.tn.tudelft.nl
  8. Organisation: PACT, Delft, The Netherlands
  9. Organization: Delft University of Technology
  10. References: <1992Aug14.155639.1045@EE.Surrey.Ac.UK> <rob.714140217@dutncp8> <1480@eagle.ukc.ac.uk>
  11. Date: Wed, 19 Aug 1992 11:29:37 GMT
  12. Lines: 81
  13.  
  14. In <1480@eagle.ukc.ac.uk> wgd@ukc.ac.uk (W.G.Day) writes:
  15.  
  16. >This article is in two parts, both are questions, the former being more of
  17. >a discussion.
  18.  
  19. >In <1992Aug14.155639.1045@EE.Surrey.Ac.UK> Roger Peel writes:
  20. >Parallel
  21. >enhancements to a sequential language might be acceptable for particularly
  22. >large-grained parallel tasks, too, but this is not where occam stands out,
  23. >either.
  24.  
  25. >In article <rob.714140217@dutncp8> rob@pact.nl (Rob Kurver) writes:
  26. >Such function calls don't
  27. >provide the necessary level of abstraction for fine-grain parallelism,
  28. >and often cause an unacceptable overhead.
  29.  
  30. >In what way isn't occam good at large-grained parallelism?
  31.  
  32. I don't think either Roger or I were implying that Occam isn't good at
  33. large-grain parallelism, but rather than sequential languages with a
  34. library of parallel support functions hacked on to it aren't very good
  35. at fine-grain parallelism.  For fine-grain parallelism you want to be
  36. able to say something like
  37.  
  38.     /* PACT Parallel C */        /* Occam [sorry for any typos] */
  39.  
  40.     par {                PAR
  41.         a = b + c;            a := b + c
  42.         f();        or        f ()
  43.         x = 3;                x := 3
  44.     }
  45.  
  46. instead of
  47.  
  48.     /* C with library support */
  49.  
  50.     void fn1 (void) { a = b + c; }
  51.     void fn3 (void) { x = 3; }
  52.     ...
  53.     Process *p1, *p2, *p3;
  54.     p1 = ProcAlloc (fn1, ...);
  55.     p2 = ProcAlloc (f,   ...);
  56.     p3 = ProcAlloc (fn3, ...);
  57.     ProcPar (p1, p2, p3, NULL);
  58.  
  59. I think the function approach is OK for large-grain parallelism, where a
  60. program starts but a few threads at the start.  Although a good network
  61. configuration language that allows tasks to be placed and connected seems
  62. a whole lot easier to use even then...
  63.  
  64. >Rob again:
  65. >This allows fine-grain parallelism to be expressed just as easily as in Occam.
  66.  
  67. >Does it have the compilation checks too?
  68.  
  69. It has the normal C compilation checks (channel type etc.), but not
  70. nearly as much as languages like Occam or Pascal.  Many of these checks
  71. become quite impossible in a language that allows modules to be compiled
  72. separately and linked with libraries, and has pointers and the like.
  73. Some checks are done at runtime (stack expansion), and others must be
  74. coded explicitly by the programmer if s/he wants them.  This is all in
  75. the spirit of C, of course, and is considered an advantage by some and
  76. a disadvantage to others.  Just as one chooses between Pascal and C for
  77. sequential programming, one must also decide between Occam and
  78. PACT Parallel C for parallel programming.
  79.  
  80. As I stated in an earlier message, I don't want to get dragged into a
  81. religious debate about languages, but merely want to point out that
  82. there does exist a Parallel C compiler that provides more than a library
  83. of functions, and allows parallel programs to be written as legibly and
  84. efficiently as Occam.  It does not provide the same level of compile-
  85. time checking as Occam, but does give you structures, recursion, free
  86. format source files and all those other things a lot of people have
  87. got used to since the days of punch-cards.
  88.  
  89. Rob
  90. --
  91.      PACT                   Rob Kurver
  92.     Foulkeslaan 87         rob@pact.nl
  93.    2625 RB Delft     ph: +31 15 616864 
  94.   The Netherlands   fax: +31 15 610032
  95.