C
C
ClaraOswald2015-12-20 15:17:13
linux
ClaraOswald, 2015-12-20 15:17:13

How to set process priorities in Linux?

Two tasks, A and B, are needed to do the same amount of work. But task A has a higher priority and needs more CPU time. Explain how this can be achieved in each of the Linux schedulers described in this chapter, in O(1) and in CFS.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg Tsilyurik, 2015-12-20
@ClaraOswald

But task A has a higher priority and needs more CPU time.

Understand what is priority in the O(1) Linux scheduler (i.e., more precisely, that nice is not a priority at all ... but there is some "compliance" ;-)) ... but on "make more time" can affect:
$ nice -n1 A
...
$ nice -n19 B
...

If you really want priorities, then you need "realtime priorities" and the chrt command , see Re:rare useful commands .

S
Saboteur, 2015-12-20
@saboteur_kiev

https://en.wikipedia.org/wiki/Nice
some priority levels can only be set as root.

V
vitaliy2, 2016-04-27
@vitaliy2

nice -n10 ionice -c3 command arg1 arg2 arg3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question