kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* PR Value in the top command
@ 2016-03-21 11:37 Vishwas Srivastava
  2016-03-22  5:28 ` Mulyadi Santosa
  0 siblings, 1 reply; 2+ messages in thread
From: Vishwas Srivastava @ 2016-03-21 11:37 UTC (permalink / raw)
  To: kernelnewbies

Hi All,
            i was trying to understand the the meaning of the PR field in
the "top" command.

PR field is the kernel notion of importance of a task.
It is loosely coupled with the "nice" value, which is a user-space concept.
Roughly they are related with..

PR=20+nice   (-20<= nice <=19)
which means, PR can never go below 0.

As an experiment to understand this even more, i created an user-app with
real-time scheduling policy (SCHED_FIFO) and ran this application.

while the application was running i triggerred "top" and what i see that
the PR value for my application displays a -ve value.
what does this mean.
If@all this is correct, what are the valid range of PR which i should
expect?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160321/5274b531/attachment.html 

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

* PR Value in the top command
  2016-03-21 11:37 PR Value in the top command Vishwas Srivastava
@ 2016-03-22  5:28 ` Mulyadi Santosa
  0 siblings, 0 replies; 2+ messages in thread
From: Mulyadi Santosa @ 2016-03-22  5:28 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Mar 21, 2016 at 6:37 PM, Vishwas Srivastava <vishu.kernel@gmail.com>
wrote:

> Hi All,
>             i was trying to understand the the meaning of the PR field in
> the "top" command.
>
> PR field is the kernel notion of importance of a task.
> It is loosely coupled with the "nice" value, which is a user-space concept.
> Roughly they are related with..
>
> PR=20+nice   (-20<= nice <=19)
> which means, PR can never go below 0.
>
> As an experiment to understand this even more, i created an user-app with
> real-time scheduling policy (SCHED_FIFO) and ran this application.
>
> while the application was running i triggerred "top" and what i see that
> the PR value for my application displays a -ve value.
> what does this mean.
> If at all this is correct, what are the valid range of PR which i should
> expect?
>
>
Quick answer: have you check and read sched_setscheduler() in detail,
especially part that explains about SCHED_FIFO?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160322/ecd6e5ae/attachment.html 

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

end of thread, other threads:[~2016-03-22  5:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-21 11:37 PR Value in the top command Vishwas Srivastava
2016-03-22  5:28 ` Mulyadi Santosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).