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,ddf3891c0469bb9f X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Task management Date: 1999/06/17 Message-ID: <1999Jun17.190645.1@eisner>#1/1 X-Deja-AN: 490962528 X-Nntp-Posting-Host: eisner.decus.org References: X-Trace: news.decus.org 929660810 23807 KILGALLEN [216.44.122.34] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 1999-06-17T00:00:00+00:00 List-Id: In article , dale@cs.rmit.edu.au (Dale Stanbrough) writes: > I'm sure the answer to my question is no, but anyway... > > Is there a way to determine how many processors a computer has > so that you can spawn the appropriate # of tasks to take advantage > of them (e.g. you may want to create sufficient tasks to farm work > out to, but not so many that you get thrashing). Well certainly the answer is yes in some cases, depending on the operating system. But the question itself may not be the right question to be asking, as you probably really care about how many processors in the computer might be allocated to your Ada program at a time, considering how your compiler implements tasking, how the OS controls allocation of processors to user programs for that tasking model (e.g., threads vs. separate processes) etc. Larry Kilgallen