public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jaakko Sipari <jaakko.sipari@gmail.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Difference between chrt and nice
Date: Thu, 2 Apr 2009 01:54:36 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0904020139340.12916@localhost.localdomain> (raw)
In-Reply-To: <901f25b80903302243q5ae531fs92113638539ea557@mail.gmail.com>

On Tue, 31 Mar 2009, Jaakko Sipari wrote:

> Hi!
> 
> I've already asked this in a couple of forums but got no answers. I
> would appreciate it if someone in this list could take some time to
> answer to my possibly stupid question(s):
> 
> What's the difference of setting process priority with chrt and nice?

"nice" is an historic utility which was used in the early days of batch
computing to be "nice" to other users and give up some CPU time. It's
still in use and useful and applies only to processes which run with
the SCHED_OTHER policy on Linux. 

"chrt" is a tool to change scheduling policy(SCHED_OTHER, _FIFO, RR)
and the priority of a process/task. With chrt you can either start a
process with such a policy or modify an already running process/tasks
policy. You need to have the permissions to do that.

So the main difference is that "nice" can only operate within the nice
levels of the SCHED_OTHER policy while "chrt" can change the policy
and the priority of a process/task.

> And how do using both of these commands compare with a normal vs.
> realtime-kernel  (PREEMPT_RT)?

Both commands are the same on vanilla and -rt kernels. The difference
is just the runtime behaviour of the -rt enabled kernel. processes /
tasks which run with real time scheduling policy have a deterministic
behaviour which is not and can not (yet) be guaranteed by the vanilla
kernel.

Hope that helps.

Thanks,

	tglx

P.S.: further info at http://rt.wiki.kernel.org

      parent reply	other threads:[~2009-04-01 23:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31  5:43 Difference between chrt and nice Jaakko Sipari
2009-03-31  6:07 ` Tobias Knutsson
2009-04-01 23:54 ` Thomas Gleixner [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=alpine.LFD.2.00.0904020139340.12916@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=jaakko.sipari@gmail.com \
    --cc=linux-rt-users@vger.kernel.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