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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: assigning priority to task Date: Tue, 23 Sep 2014 20:31:27 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 24 Sep 2014 03:31:29 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="ff2e5d21b9fb0a12a9871c15f1d89f02"; logging-data="14655"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+WbJ8Jt8B88ypA8uESAXCuJ2KHsu6Ql8=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 In-Reply-To: Cancel-Lock: sha1:pWEi6wyEPrOjMib1ryzYdSjmUVw= Xref: number.nntp.dca.giganews.com comp.lang.ada:189117 Date: 2014-09-23T20:31:27-07:00 List-Id: On 09/23/2014 06:50 PM, Stribor40 wrote: > I am playing with example from here.. > http://www.infres.enst.fr/~pautet/Ada95/e_c26_p2.ada > > and each run i get different output which is ok but what I am trying to do is somehow control running of each of those 3 tasks by assigning priority to each task by using pragma PRIORITY(some int) where higher the int higher the priority. > So my question is this ....If i assign first task priority(8) and second priority(4) and third priority(2) does that mean that first task will always run first second second and third third? How does OS time slicing fit into this when priority is assigned to each task? Suppose you run the program on a system with 4 cores. Will the priorities control the order in which the tasks run? -- Jeff Carter "All citizens will be required to change their underwear every half hour. Underwear will be worn on the outside, so we can check." Bananas 29