comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <condicma@bogon.pwfl.com>
Subject: Re: tasking, Cpu's, and more
Date: 1999/09/10
Date: 1999-09-10T00:00:00+00:00	[thread overview]
Message-ID: <37D9146B.66C151B9@pwfl.com> (raw)
In-Reply-To: 37D8D0B9.9278642@interact.net.au

G wrote:

> 1) If a program runs several tasks and the hardware has several CPU's.
> Does the whole
> process of coding the tasks require that a specific CPU is allocated to
> each one ?  I can understand how different threads of activity can be

That depends on what you mean by "coding the tasks". From an Ada source code
level, the whole issue of which processor (real or virtual) is executing
which task is totally invisible. You view it as if each task is somehow
going to magically run on its own processor and the underlying
implementation is going to handle the rest.

If by "coding" you mean the translation of the Ada source to some underlying
machine instructions, the answer is "it depends". If the target machine is
running a conventional operating system like WindowsNT or Unix, then the
compiler will (likely) map the tasks to operating system provided
"processes" or "threads" and the problem of assigning a processor to a
process then belongs to the operating system. How it does that is very
dependent on which OS running on which hardware you want to talk about.

In bare board machines with multiple processors, the answer is "it depends"
even moreso. Sometimes the processors are configured for highly parallelized
execution and sometimes the processors may have very specific, dedicated
jobs to do and communicate with each other very little. For these
situations, you typically end up having to custom modify the run time kernel
(RTK) that the compiler uses to handle its tasking responsibilities. Either
that, or often there are ways of fooling around with link images after
compilation is done (You build separate "main" programs in effect and assign
them to specific processors.). In either event, the tasks may be hard-wired
to specific processors or they may float between processors based on the
first available unit. The choice of which will depend on the hardware
configuration and how much work you want to do in modifying the compiler
implementation.

In any case, from the practical viewpoint of your garden variety application
programmer, all this is invisible and you just presume it happens.

MDC
--
Marin David Condic
Real Time & Embedded Systems, Propulsion Systems Analysis
United Technologies, Pratt & Whitney, Large Military Engines
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
***To reply, remove "bogon" from the domain name.***

Visit my web page at: http://www.mcondic.com/






  reply	other threads:[~1999-09-10  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-10  0:00 tasking, Cpu's, and more G
1999-09-10  0:00 ` Marin David Condic [this message]
1999-09-10  0:00 ` Mark Lundquist
replies disabled

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