"SteenbeckDigital wrote:"
> Hi Maryam
> as I used RtKernel before I used RtLinux,
> there are probably thing to miss.
> Part one is priority passing for semaphores.
>
> Example;
> Running two tasks called HI and LO named like their priorities.
> LO grabs the semaphore (SEM) and gets interrupted by HI.
> HI tries to grab the same SEM that LO already has.
> To get out of this quickly LO gets the HI priority
> to release the SEM as fast as possible.
> When LO drops the SEM it looses the priority and HI will run.
I missed the early parts of this thread, so if my comments are
mis-directed, I apologize.
In the example above, the solution of somehow having LO's priority
elevated to greater than HI is a problem which has been created by
choice of architecture.
Why not put the activity which is being serialized by SEM into it's
own task which reads a queue or other IPC mechanism. By placing this
work in a separate task you eliminate the complexity associated with
the deadlock.
Just be sure that LO and HI communicate with the 3rd process atomically.
One way to achieve this is to have the SEM task run at a priority greater
than or equal to the priority of HI. Atomic writes to a message queue is
another.
Just a thought,
Ray
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/