[LITMUS^RT] Synchronization of resources

shijunjie92 shijunjie92 at gmail.com
Tue Aug 30 15:21:14 CEST 2016


Hello all:

When we simulate the critical section within one task using 'rtspin'. We will enter the resource id. But there is no such id information included by semaphore. So how can we know the semaphore locks which resource. (Different resources use different wait_queues?)

Why the function pfp_mpcp_lock( as well as other lock function) calls 'init_waitqueue_entry' everytime when the resource is occupied. When more then two tasks try to get the resource, the wait_queue will be initialized more than once? How to explain that?

The last question is about the MPCP_VS protocol in P-FP plugin.
When we use MPCP_VS protocol:
cpu_0: task_0 is excuting by holding the resource_0 
cpu_1: task_1 is excuting by holding the resource_1 
cpu_2: task_2 is spinning but not excuting for waitting one resource (resource_0 or resource_1)

Now, task_0 is preempted by one higher priority task, but it still hold the semaphore of resource_0.
Is there any possible that lets task_0 know whether the task_2 is waitting for resource_0 or resource_1 or not?

Thanks for your help!
2016-08-30


shijunjie92 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20160830/9b6f4383/attachment.html>


More information about the litmus-dev mailing list