From: " jpluto" <jpluto@hotmail.com>
To: comp.lang.ada@ada-france.org
Subject: Task Scheduling
Date: Sun, 07 Jan 2007 08:28:28 -0600
Date: 2007-01-07T15:30:03+01:00 [thread overview]
Message-ID: <mailman.13.1168180123.18371.comp.lang.ada@ada-france.org> (raw)
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/
next reply other threads:[~2007-01-07 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-07 14:28 jpluto [this message]
2007-01-07 14:49 ` Task Scheduling Ludovic Brenta
2007-01-07 20:47 ` Jeffrey Creem
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox