comp.lang.ada
 help / color / mirror / Atom feed
* Task Scheduling
@ 2007-01-07 14:28   jpluto
  2007-01-07 14:49 ` Ludovic Brenta
  2007-01-07 20:47 ` Jeffrey Creem
  0 siblings, 2 replies; 3+ messages in thread
From:   jpluto @ 2007-01-07 14:28 UTC (permalink / raw)
  To: comp.lang.ada



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/




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-07 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-07 14:28 Task Scheduling   jpluto
2007-01-07 14:49 ` Ludovic Brenta
2007-01-07 20:47 ` Jeffrey Creem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox