Re: Difference between chrt and nice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux