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!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: question about tasks, multithreading and multi-cpu machines References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.214.7.86 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1142539560 12.214.7.86 (Thu, 16 Mar 2006 20:06:00 GMT) NNTP-Posting-Date: Thu, 16 Mar 2006 20:06:00 GMT Date: Thu, 16 Mar 2006 20:06:00 GMT Xref: g2news1.google.com comp.lang.ada:3385 Date: 2006-03-16T20:06:00+00:00 List-Id: Maciej Sobczak wrote: > > The "task" is something that needs to be done. It's an objective, or a > goal to achieve. (I'm not an English native speaker, but my dictionaries > seem to confirm this.) > > To actually perform any given work, some kind of "resource" is needed. > Whether it is a human resource or a computing resource does not matter - > what's important is that this "resource" is treated as an *ability* to > perform work. What's even more important is that there might be unused > resources lying around, which can be just used to perform some work if > they are available. > > Now, "thread" is a software resource that represents the ability of the > system to do some work. > > The difference between "task" and "thread" is that "task" is something > to do, whereas "thread" is a way to do it. The way to design SW in a decent language such as Ada is to create in SW a model of the problem. If your problem includes multiple tasks to be completed concurrently, then your SW model of the problem should include multiple objects which are models of these tasks and which execute concurrently. A good name for such objects in general would be "task", since that is their general name in the problem space. "Thread" is an implementation detail which should be hidden by the much higher-level abstraction of your model. -- Jeff Carter "Now go away or I shall taunt you a second time." Monty Python & the Holy Grail 07