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=2.6 required=5.0 tests=BAYES_40,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.edu:2890 comp.lang.ada:3154 comp.lang.misc:3861 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!ubc-cs!manis From: manis@cs.ubc.ca (Vincent Manis) Newsgroups: comp.edu,comp.lang.ada,comp.lang.misc Subject: Re: Teaching Concurrency Message-ID: <6219@ubc-cs.UUCP> Date: 11 Jan 90 19:27:22 GMT References: <7588@hubcap.clemson.edu> <602@agcsun.UUCP> <10330@june.cs.washington.edu> <5598@bd.sei.cmu.edu> Sender: news@cs.ubc.ca Reply-To: manis@cs.ubc.ca (Vincent Manis) Organization: The Invisible City of Kitezh List-Id: In article <5598@bd.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes: >(3) veryslowsort. the program reads a list of integers and creates > one task per integer, whose priority is given by the integer and > whose sole action is to print the integer. the integers are > therefore output in task priority order, ie they are sorted. Aaargh! I feel like I'm flogging a dead horse, posting two articles in succession on the subject of underlying processor models. There is absolutely no reason why this should work. Not all schedulers guarantee strict ordering of execution on a priority basis. Process aging is one of many factors which could produce incorrect output. Similarly, the scheduler might ignore priorities (the multi-task kernel I wrote, for example!). However, veryslowsort is an excellent example of how *not* to use parallelism. Apology dept: My last article contained a slighting remark about Ada. I didn't notice that comp.lang.ada was included in the Newsgroups: line. Mindful of Usenet protocol, I apologise for posting this to comp.lang.ada. -- \ Vincent Manis "There is no law that vulgarity and \ Department of Computer Science literary excellence cannot coexist." /\ University of British Columbia -- A. Trevor Hodge / \ Vancouver, BC, Canada V6T 1W5 (604) 228-2394