From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: PR Value in the top command
Date: Tue, 22 Mar 2016 12:28:06 +0700 [thread overview]
Message-ID: <CAGdaadbkojYvTJu1hYeFrpg=+QPLbO+HaZmCo1-DVXNOp9Lo5Q@mail.gmail.com> (raw)
In-Reply-To: <CAGM3cC5zmUVOX4+wDaijg27G2HucmSNvLbSUUybe2sHjz+d-+Q@mail.gmail.com>
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
prev parent reply other threads:[~2016-03-22 5:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 11:37 PR Value in the top command Vishwas Srivastava
2016-03-22 5:28 ` Mulyadi Santosa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGdaadbkojYvTJu1hYeFrpg=+QPLbO+HaZmCo1-DVXNOp9Lo5Q@mail.gmail.com' \
--to=mulyadi.santosa@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).