top
マンページによると:
16. PR -- Priority
The scheduling priority of the task. If you see `rt' in this
field, it means the task is running under real time scheduling priority.
Under linux, real time priority is somewhat misleading since
traditionally the operating itself was not preemptible. And while the 2.6
kernel can be made mostly preemptible, it is not always so.
リアルタイム優先順位を持つように実行中のプロセスを変更してみました。
$ sudo chrt -f -p 1 2179
$ chrt -m
SCHED_OTHER min/max priority : 0/0
SCHED_FIFO min/max priority : 1/99
SCHED_RR min/max priority : 1/99
SCHED_BATCH min/max priority : 0/0
SCHED_IDLE min/max priority : 0/0
SCHED_DEADLINE min/max priority : 0/0
$ chrt -p 2179
pid 2179's current scheduling policy: SCHED_FIFO
pid 2179's current scheduling priority: 1
$
でもtop
見せて
Tasks: 255 total, 3 running, 252 sleeping, 0 stopped, 0 zombie
%Cpu(s): 4.4 us, 0.3 sy, 0.0 ni, 95.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 19658969+total, 19371019+free, 2405528 used, 473984 buff/cache
KiB Swap: 4194300 total, 4194300 free, 0 used. 19352804+avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2179 myuser -2 0 25552 2892 2648 R 100.0 0.0 67:16.22 my_application
-2が優先順位で表示されます。そうすべきですrt
か?
migration/0
私は優先順位のような流れを見ますrt
。