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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a5901dadc6bd8c24 X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: tasking, Cpu's, and more Date: 1999/09/10 Message-ID: <37D9146B.66C151B9@pwfl.com>#1/1 X-Deja-AN: 523396842 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <37D8D0B9.9278642@interact.net.au> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: e108678@pwflcom Newsgroups: comp.lang.ada Date: 1999-09-10T00:00:00+00:00 List-Id: 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/