Hi,
 
I have some doubts regarding the way in which the Pth scheduler implements"Priority based non-preemptive Scheduling".
 
My program is using the pth "cond" and "mutex" variables for synchronization between the threads.

From a low priority thread, I am calling pth_cond_notify() and immediately a higher priority thread (which was there in the ready queue) was getting scheduled.

I analyzed the pth_cond_notify () and saw a pth_yield() inside that function. This pth_yield() is "preempting" the lower priority thread that called the pth_cond_notify().

But my application was expecting a pure non-preemptive response.

Can I achieve the non-preemptive response if I remove the pth_yield() in pth_cond_notify() ?

Will there be any performance issue with the Pth library, if I remove the pth_yield () in pth_cond_notify() ?

 

Regards

Vinu

-----------------------------------------------------------------------------------------------------------------------------
Disclaimer
-----------------------------------------------------------------------------------------------------------------------------

"This message(including attachment if any)is confidential and may be privileged.Before 
opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not be 
responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If you have 
received this message by mistake please notify the sender by return  e-mail and delete 
this message from your system. Any unauthorized use or dissemination of this message 
in whole or in part is strictly prohibited.  Please note that e-mails are susceptible 
to change and MindTree shall not be liable for any improper, untimely or incomplete 
transmission."

-----------------------------------------------------------------------------------------------------------------------------

Reply via email to