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,1a44c40a66c293f3 X-Google-Thread: 1089ad,7e78f469a06e6516 X-Google-Attributes: gid103376,gid1089ad,public X-Google-Language: ENGLISH,ASCII-7-bit Subject: Re: Embedded languages based on early Ada (from "Re: Preferred OS, processor family for running embedded Ada?") From: Simon Farnsworth Date: Sat, 03 Mar 2007 12:12:10 +0000 Message-ID: References: <113ls6wugt43q$.cwaeexcj166j$.dlg@40tude.net> <1i3drcyut9aaw.isde6utlv6iq.dlg@40tude.net> <1j0a3kevqhqal.riuhe88py2tq$.dlg@40tude.net> NNTP-Posting-Host: 81.187.250.195 Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.mediascape.de!zen.net.uk!demorgan.zen.co.uk!peernews.merula.net!bbc!news-peer-lilac.gradwell.net!not-for-mail Newsgroups: comp.lang.ada,comp.lang.vhdl X-Trace: 1172926802 news.aaisp.net.uk 763 81.187.250.195:43434 Followup-To: comp.lang.ada,comp.lang.vhdl User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: aaispnews-abuse@gradwell.net Xref: g2news2.google.com comp.lang.ada:9653 comp.lang.vhdl:7617 Date: 2007-03-03T12:12:10+00:00 List-Id: Jonathan Bromley wrote: > On Sat, 3 Mar 2007 12:00:08 +0100, "Dmitry A. Kazakov" > wrote: > >>> The compiler should be able to generate code which generates a >>> reasonable number of threads, depending on the hardware being used. >> >>Yes > > For heaven's sake... You have a statically-determinable number of > processors. It's your (or your compiler's) choice whether each of > those processors runs a single thread, or somehow runs multiple > threads. If each processor is entitled to run multiple threads, then > there's no reason why the number and structure of cooperating > threads should not be dynamically variable. If you choose to run > one thread on each processor, your thread structure is similarly > static. Hardware people have been obliged to think about this > kind of thing for decades. Software people seem to have a > pretty good grip on it too, if the textbooks and papers I've read > are anything to go by. Why is it suddenly such a big deal? > Not disagreeing with most of what you're saying, but I do feel the need to point out the existence of systems with hotpluggable CPUs. Sun and IBM have both sold systems for some years where CPUs can be added and removed at runtime; software is expected to just cope with this. Also in the software domain; there is a cost to switching between different threads. Thus, in software, the aim is to limit the number of runnable threads to the number of active CPUs. If there are more threads runnable than CPUs available, some CPU time is wasted switching between threads, which is normally undesirable behaviour. -- Simon Farnsworth