public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* Difference between chrt and nice
@ 2009-03-31  5:43 Jaakko Sipari
  2009-03-31  6:07 ` Tobias Knutsson
  2009-04-01 23:54 ` Thomas Gleixner
  0 siblings, 2 replies; 3+ messages in thread
From: Jaakko Sipari @ 2009-03-31  5:43 UTC (permalink / raw)
  To: linux-rt-users

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?
And how do using both of these commands compare with a normal vs.
realtime-kernel  (PREEMPT_RT)?

BR, Jaakko

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

* Re: Difference between chrt and nice
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Knutsson @ 2009-03-31  6:07 UTC (permalink / raw)
  To: Jaakko Sipari; +Cc: linux-rt-users

Hi Jaakko,

I'm relatively new in this field so take this information will a grain of salt.

From what i understand, the nice command will only change the priority
within the SCHED_OTHER scheduling policy. It is not possible to assign
the process to another policy such as SCHED_RR or SCHED_FIFO, which
would have precedence over all SCHED_OTHER processes. This can be done
with chrt.

Both of these commands should work both with a vanilla and an rt
kernel. The result will be different however. Since the locking
mechanisms in the rt kernel are much more sophisticated, it will be
able to provide much more deterministic latencies to the processes
assigned to the processes assigned to the realtime scheduling policies
(round robin and fifo).

//Tobbe

On Tue, Mar 31, 2009 at 07:43, Jaakko Sipari <jaakko.sipari@gmail.com> 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?
> And how do using both of these commands compare with a normal vs.
> realtime-kernel  (PREEMPT_RT)?
>
> BR, Jaakko
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 

Hälsningar/Regards
Tobias Knutsson
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Difference between chrt and nice
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2009-04-01 23:54 UTC (permalink / raw)
  To: Jaakko Sipari; +Cc: linux-rt-users

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

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

end of thread, other threads:[~2009-04-01 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox