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!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: question about tasks, multithreading and multi-cpu machines Date: Thu, 16 Mar 2006 09:06:12 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: References: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1142496372 8477 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060203 Red Hat/1.7.12-1.1.3.4 X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:3375 Date: 2006-03-16T09:06:12+01:00 List-Id: Jeffrey Creem wrote: > Actually, > threads is misleading since threads are just tasks minus rendevous. It > all just depends on your perspective. Since Ada had tasking before > (most) unix had threads I think Unix got the name wrong :) In my humble opinion, Ada got it wrong in the first place. {Pre-flame note: below is a very informal description of how I think about these terms while designing/programming/etc., not how they are defined in any language/system/etc. standard.} What's funny, the terminology is correctly used in even simplest programs for project planning, organizers, and such. 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 tasks in Ada do not match any of the above. Other languages (for example Java) also got it wrong, by treating threads as objects or even by allowing a programmer to "subclass" or "specialize" a thread class. None of the languages that I'm aware of allows me to treat tasks and threads as they really are, which means that everybody got it wrong in one way or another. :) > So, the only thing I am trying to say here is that people seem to assume > that task, thread and process have some formal definition that is all > powerful. This is not true. Right. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/