<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 6:37 PM, Vishwas Srivastava <span dir="ltr">&lt;<a href="mailto:vishu.kernel@gmail.com" target="_blank">vishu.kernel@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi All,<br></div>            i was trying to understand the the meaning of the PR field in the &quot;top&quot; command.<br><br></div>PR field is the kernel notion of importance of a task.<br></div>It is loosely coupled with the &quot;nice&quot; value, which is a user-space concept.<br></div>Roughly they are related with..<br><br></div>PR=20+nice   (-20&lt;= nice &lt;=19)<br>which means, PR can never go below 0.<br><br></div><div>As
 an experiment to understand this even more, i created an user-app with 
real-time scheduling policy (SCHED_FIFO) and ran this application.<br><br></div><div>while the application was running i triggerred &quot;top&quot; and what i see that the PR value for my application displays a -ve value.<br>what does this mean.<br></div>If at all this is correct, what are the valid range of PR which i should expect?<div><div><img></div></div></div><br></blockquote></div><br></div><div class="gmail_extra">Quick answer: have you check and read sched_setscheduler() in detail, especially part that explains about SCHED_FIFO?<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">regards,<br><br>Mulyadi Santosa<br>Freelance Linux trainer and consultant<br><br>blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a></div>
</div></div>