comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: question about tasks, multithreading and multi-cpu machines
Date: Thu, 16 Mar 2006 20:06:00 GMT
Date: 2006-03-16T20:06:00+00:00	[thread overview]
Message-ID: <IyjSf.622480$084.201819@attbi_s22> (raw)
In-Reply-To: <dvb69k$88t$1@sunnews.cern.ch>

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



  parent reply	other threads:[~2006-03-16 20:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-14 16:26 question about tasks, multithreading and multi-cpu machines Norbert Caspari
2006-03-14 16:51 ` Pascal Obry
2006-03-16  4:27   ` Norbert Caspari
2006-03-16 10:04     ` Alex R. Mosteo
2006-03-14 17:18 ` Jean-Pierre Rosen
2006-03-16  4:22   ` Norbert Caspari
2006-03-16  6:58     ` Jean-Pierre Rosen
2006-03-14 18:49 ` Martin Krischik
2006-03-14 18:56 ` tmoran
2006-03-14 23:01 ` Jeffrey Creem
2006-03-15  1:15   ` Jeffrey R. Carter
2006-03-16  8:06   ` Maciej Sobczak
2006-03-16 10:23     ` Ole-Hjalmar Kristensen
2006-03-16 12:59     ` Dmitry A. Kazakov
2006-03-16 15:11       ` Larry Kilgallen
2006-03-16 15:50       ` Maciej Sobczak
2006-03-16 18:03         ` Jean-Pierre Rosen
2006-03-16 20:06           ` Dr. Adrian Wrigley
2006-03-17  3:26       ` Randy Brukardt
2006-03-16 20:06     ` Jeffrey R. Carter [this message]
2006-03-17  8:22       ` Maciej Sobczak
2006-03-17 11:36         ` Dmitry A. Kazakov
2006-03-17 14:23           ` Maciej Sobczak
2006-03-17 19:10             ` Dmitry A. Kazakov
2006-03-17 19:42         ` Jeffrey R. Carter
2006-03-18  0:27           ` tmoran
2006-03-25 21:28     ` Robert A Duff
     [not found]       ` <43gb22h4811ojjh308r2lqf5qqrujijjok@4ax.com>
2006-03-26  0:44         ` Robert A Duff
2006-03-15  6:46 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox