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,3f60acc31578c72b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 17 Mar 2006 18:27:52 -0600 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: question about tasks, multithreading and multi-cpu machines References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Fri, 17 Mar 2006 18:27:53 -0600 NNTP-Posting-Host: 67.169.16.3 X-Trace: sv3-acZIgbgCQAEW4d5BBnHnpxRcpTdVruYpnv84M6NUVKeLvDxCMhmthsISXnGVbMatJsa+ig/bxOzi2cO!1vJgtRzgaYRZl/IUe3CzjtRIXozv+U5v9R528LbFb5d3yiOexxFQ3TBnPqWBtQrdX2jm9Y9QiN0= X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:3415 Date: 2006-03-17T18:27:53-06:00 List-Id: There's rather a big difference between statement level granularity (like the Occam examples) and module level (like Ada tasks). It's merely confusing to mix them together. >The interesting problem is writing portable code that takes advantage of N >processors (N = 1, 2, 3, ...), with N unknown until run time. A multitasking quicksort on my hyperthreaded machine runs faster than the single tasking version IF the "extra" CPU isn't already busy doing something else and IF the data set to sort isn't so big that breaking it up results in cache thrashing. Writing such code portably is indeed an "interesting problem".