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.6 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HELO_NO_DOMAIN,MAILING_LIST_MULTI,RDNS_NONE,SPOOFED_FREEMAIL_NO_RDNS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,92afb1e1516ee462,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!proxad.net!cleanfeed2-b.proxad.net!nnrp14-1.free.fr!not-for-mail Return-Path: X-Originating-IP: [172.130.111.224] X-Originating-Email: [jpluto@hotmail.com] X-Sender: jpluto@hotmail.com From: "  jpluto" To: comp.lang.ada@ada-france.org Subject: Task Scheduling Date: Sun, 07 Jan 2007 08:28:28 -0600 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 07 Jan 2007 14:28:33.0472 (UTC) FILETIME=[1C374400:01C73268] X-Virus-Scanned: amavisd-new at ada-france.org X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char C2 hex) in message header 'From': From: "\302\240 jpluto" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.ada Message-ID: X-Leafnode-NNTP-Posting-Host: 88.191.17.134 Organization: Guest of ProXad - France NNTP-Posting-Date: 07 Jan 2007 15:30:03 MET NNTP-Posting-Host: 88.191.14.223 X-Trace: 1168180203 news-4.free.fr 285 88.191.14.223:60382 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:8091 Date: 2007-01-07T15:30:03+01:00 A questions please: I am trying to solve a problem, and I am not sure how to code it. For example, if I have three arbitrary tasks, task1 has a priority than task2. Therefore, task1 will always preempt task2 and task3. However, if task2 ran first and locked a shared data resource that is shared with ONLY task3 and NOT task1. Then if task1 arrives, I want task1 to yield the processor to task2 until task2 is finished using the resource even though task1 has the highest priority. The problem, task1 has a higher priority and does NOT use this shared resource. How can I ask this task1 not to run, and to wait whenever this shared resource is locked by task2 or task3? If you cannot think of a solution, then is there a way to use Timing Events to stop task1 whenever it is running? If so, could you show me the code to do it? I do not think this would be a great solution since there is an overhead of context switching since task1 is run and we have then to tell it to stop, but at least if you can help, it is still a solution to my problem. Thank you very much Jane _________________________________________________________________ Get FREE Web site and company branded e-mail from Microsoft Office Live http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/