comp.lang.ada
 help / color / mirror / Atom feed
* why use "task"?
@ 1998-08-06  0:00 Te-Cheng, Shen
  1998-08-11  0:00 ` Frank Ecke
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Te-Cheng, Shen @ 1998-08-06  0:00 UTC (permalink / raw)


Hi:
    What is "task" used for? I know how to use it but dont know when we
will use it? Can anyone give me a " real example?" It means we will use
it
in reality, not just for demostrating.

Thanks in advance

Shen






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why use "task"?
  1998-08-06  0:00 why use "task"? Te-Cheng, Shen
@ 1998-08-11  0:00 ` Frank Ecke
  1998-08-12  0:00   ` Marc A. Criley
  1998-08-12  0:00 ` Tom Moran
  1998-08-17  0:00 ` Dr. Hubert B. Keller
  2 siblings, 1 reply; 7+ messages in thread
From: Frank Ecke @ 1998-08-11  0:00 UTC (permalink / raw)


On Thu, 06 Aug 1998 11:39:30, Te-Cheng, Shen <techeng@imap4.asu.edu> wrote:


>Hi:
>    What is "task" used for? I know how to use it but dont know when we
>will use it? Can anyone give me a " real example?" It means we will use
>it
>in reality, not just for demostrating.
>
>Thanks in advance
>
>Shen
>
>


A task is Ada's concept of expressing concurrency within a program.  Tasks are
entities that execute in parallel.  Each task represents a separate thread of
control and runs independently between the points where it interacts with other
tasks.
   Examples of using tasks are applications requiring the use of concurreny:
large and complex systems (which are inherently concurrent), such as avionics
systems, industry controlling systems, robots, spacecrafts, databases, missile
control facilities, and so forth.  Additionally, if you wish to exploit multi-
processor hardware, tasks are a suitable means to do so.
   In essence, tasks allow you to cope with what is known as multitasking or
multithreading.

   From my point of view, the powerful tasking concept incorporated into Ada
adds to the beauty of the language.


Regards,

Frank




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why use "task"?
  1998-08-11  0:00 ` Frank Ecke
@ 1998-08-12  0:00   ` Marc A. Criley
  1998-08-12  0:00     ` Frank Ecke
  0 siblings, 1 reply; 7+ messages in thread
From: Marc A. Criley @ 1998-08-12  0:00 UTC (permalink / raw)


Frank Ecke wrote:
> 
> On Thu, 06 Aug 1998 11:39:30, Te-Cheng, Shen <techeng@imap4.asu.edu> wrote:
> 
> >Hi:
> >    What is "task" used for? I know how to use it but dont know when we
> >will use it? Can anyone give me a " real example?" It means we will use
> >it
> >in reality, not just for demostrating.
> >
> >Thanks in advance
> >
> >Shen
> >
> >
> 
> A task is Ada's concept of expressing concurrency within a program.  Tasks are
> entities that execute in parallel.  Each task represents a separate thread of
> control and runs independently between the points where it interacts with other
> tasks.
>    Examples of using tasks are applications requiring the use of concurreny:
> large and complex systems (which are inherently concurrent), such as avionics
> systems, industry controlling systems, robots, spacecrafts, databases, missile
> control facilities, and so forth.  Additionally, if you wish to exploit multi-

Re: missile control facilities.  As a specific example, the Advanced
Tomahawk
Weapon Control System (ATWCS) makes extensive use of tasking (this is in
the
ship's onboard weapon command and control system, not the missile itself). 
When
ATWCS is at its maximum load, there are literally over a thousand active
tasks.

> processor hardware, tasks are a suitable means to do so.
>    In essence, tasks allow you to cope with what is known as multitasking or
> multithreading.
> 
>    From my point of view, the powerful tasking concept incorporated into Ada
> adds to the beauty of the language.

Tasking provided an excellent fit to the entities within the ATWCS system,
making a clean, clear design and implementation possible.

> 
> Regards,
> 
> Frank

-- 
Marc A. Criley
Chief Software Architect
Lockheed Martin ATWCS
marc.a.criley@lmco.com
Phone: (610) 354-7861
Fax  : (610) 354-7308




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why use "task"?
  1998-08-12  0:00   ` Marc A. Criley
@ 1998-08-12  0:00     ` Frank Ecke
  0 siblings, 0 replies; 7+ messages in thread
From: Frank Ecke @ 1998-08-12  0:00 UTC (permalink / raw)


On Wed, 12 Aug 1998 07:08:22, Marc A. Criley <marc.a.criley@lmco.com> wrote:

> Re: missile control facilities.  As a specific example, the Advanced
> Tomahawk
> Weapon Control System (ATWCS) makes extensive use of tasking (this is in
> the
> ship's onboard weapon command and control system, not the missile itself).
> When
> ATWCS is at its maximum load, there are literally over a thousand active
> tasks.

Now, this is what I call a *real example* (hopefully, Shen will do so as well).
Thank you very much for these information.  It is good to know that there are
folks out there that really make use of tasking besides the more or less
pedagogical examples found in books or in university lectures.

> Tasking provided an excellent fit to the entities within the ATWCS system,
> making a clean, clear design and implementation possible.


For me, even without any knowledge of ATWCS, this is absolutely conceivable.


Regards,

Frank




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why use "task"?
  1998-08-06  0:00 why use "task"? Te-Cheng, Shen
  1998-08-11  0:00 ` Frank Ecke
@ 1998-08-12  0:00 ` Tom Moran
  1998-08-17  0:00 ` Dr. Hubert B. Keller
  2 siblings, 0 replies; 7+ messages in thread
From: Tom Moran @ 1998-08-12  0:00 UTC (permalink / raw)


My first 'real' use of Ada tasking was a program for my local
community access TV station.  It was a teleprompter running on a DOS
machine with TV set as monitor.  One task smoothly scrolled the
on-screen text while another periodically read a chunk of text file
and filled a buffer.  It certainly could have been done without
tasking, but was much simpler with tasking.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why use "task"?
  1998-08-06  0:00 why use "task"? Te-Cheng, Shen
  1998-08-11  0:00 ` Frank Ecke
  1998-08-12  0:00 ` Tom Moran
@ 1998-08-17  0:00 ` Dr. Hubert B. Keller
  1998-08-17  0:00   ` Frank Ecke
  2 siblings, 1 reply; 7+ messages in thread
From: Dr. Hubert B. Keller @ 1998-08-17  0:00 UTC (permalink / raw)


Tasking is mostly to model concurrent behavior on a single processor
machine.
Please keep in mind, that parallel execution on a single processor is only
a model that works
not always in real.
Parallel execution is only done in real on a n processor for n tasks
machine.
A process doing NOPs for waiting of an other process with lower priority
and which is suspended will
never be called from this, because the low prio process will never become
activ, that means executed.
Real examples are process control applications. (Or think about the work of
a house wife doing
cooking, children watching, accepts telephone calls and welcomes visitors -
all the same time.
So priorities, dispatching and hard real time contrsints apply.
H.K.

Te-Cheng, Shen schrieb:

> Hi:
>     What is "task" used for? I know how to use it but dont know when we
> will use it? Can anyone give me a " real example?" It means we will use
> it
> in reality, not just for demostrating.
>
> Thanks in advance





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: why use "task"?
  1998-08-17  0:00 ` Dr. Hubert B. Keller
@ 1998-08-17  0:00   ` Frank Ecke
  0 siblings, 0 replies; 7+ messages in thread
From: Frank Ecke @ 1998-08-17  0:00 UTC (permalink / raw)


On Mon, 17 Aug 1998, Dr. Hubert B. Keller <keller@iai.fzk.de> wrote:

>Tasking is mostly to model concurrent behavior on a single processor
>machine.
>Please keep in mind, that parallel execution on a single processor is only
>a model that works
>not always in real.

IMHO, on the abstract level, one should not get bogged down by the actual
number of processors and, indeed, most concurrent programming languages (Ada
amongst them) consider it to be immaterial whether there is a single processor
or a multi-processor system.  Ada says:

``Concurrent task execution may be implemented on multicomputers,
multiprocessors, or with interleaved execution on a single physical processor.
On the other hand, whenever an implementation can determine that the required
semantic effects can be achieved when parts of the execution of a given task
are performed by different physical processors acting in parallel, it may
choose to perform them in this way.'' (Ada 95 Reference Manual, Section 9)


Note that this is a NOTE, i.e., it should not be the programmers concern how
the implementation actually works.  Of course, someone designing realtime
systems ought to pay attention to this subject. But for general application of
concurrency?


>Parallel execution is only done in real on a n processor for n tasks
>machine.

Well, the number of processors is fixed but the number of tasks can vary as
they can be created/destroyed at runtime.  Hence, we could---from the abstract
point of view---always restrict ourselves to a single processor.


Regards,

Frank




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-08-17  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-06  0:00 why use "task"? Te-Cheng, Shen
1998-08-11  0:00 ` Frank Ecke
1998-08-12  0:00   ` Marc A. Criley
1998-08-12  0:00     ` Frank Ecke
1998-08-12  0:00 ` Tom Moran
1998-08-17  0:00 ` Dr. Hubert B. Keller
1998-08-17  0:00   ` Frank Ecke

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