修改线程优先级

更新时间:
2024-03-14
下载文档

修改线程优先级

通过 sprio 命令可以修改线程优先级。

sprio <new priority> <tid>

如下将t_ftpd线程优先级由160修改为170。

[root@sylixos:/root]# ts
thread show >>

      NAME         TID    PID  PRI STAT LOCK SAFE    DELAY   PAGEFAILS FPU CPU
---------------- ------- ----- --- ---- ---- ---- ---------- --------- --- ---
t_idle0          4010000     0 255 RDY     0 YES           0         0       0
t_itimer         4010001     0  20 SLP     0 YES       97116         0       0
t_isrdefer       4010002     0   0 SEM     0 YES           0         0       0
t_except         4010003     0   0 SEM     0 YES           0         0       0
t_log            4010004     0  60 MSGQ    0 YES           0         0       0
t_power          4010005     0 254 SLP     0 YES         285         0       0
t_hotplug        4010006     0 250 SEM     0 YES         281         0       0
t_reclaim        4010008     0 253 MSGQ    0 YES           0         0       0
t_sync           4010009     0 252 SLP     0            1281         0       0
t_dcwpipe        401000a     0 160 SEM     0               0         0       0
t_tpsfs          401000b     0 160 SLP     0            1292         0       0
t_console        401000c     0 150 MSGQ    0 YES           0         0       0
t_netjob         401000d     0 110 SEM     0 YES           0         0       0
t_netproto       401000e     0 110 MSGQ    0 YES          74         0       0
t_snmp           401000f     0 110 MSGQ    0 YES           0         0       0
t_ftpd           4010010     0 160 MSGQ    0               0         0       0
t_telnetd        4010011     0 160 MSGQ    0 YES           0         0       0
t_jobq           4010013     0 200 SEM     0 YES           0         0       0
t_xinput         4010015     0 199 SEM     0               0         0       0
t_tshell         4010016     0 150 RDY     1               0         0       0
t_tshell         4010018     0 150 SEM     0               0         0       0

thread: 21
[root@sylixos:/root]# sprio 170 4010010
[root@sylixos:/root]# ts
thread show >>

      NAME         TID    PID  PRI STAT LOCK SAFE    DELAY   PAGEFAILS FPU CPU
---------------- ------- ----- --- ---- ---- ---- ---------- --------- --- ---
t_idle0          4010000     0 255 RDY     0 YES           0         0       0
t_itimer         4010001     0  20 SLP     0 YES       82090         0       0
t_isrdefer       4010002     0   0 SEM     0 YES           0         0       0
t_except         4010003     0   0 SEM     0 YES           0         0       0
t_log            4010004     0  60 MSGQ    0 YES           0         0       0
t_power          4010005     0 254 SLP     0 YES         259         0       0
t_hotplug        4010006     0 250 SEM     0 YES         255         0       0
t_reclaim        4010008     0 253 MSGQ    0 YES           0         0       0
t_sync           4010009     0 252 SLP     0             254         0       0
t_dcwpipe        401000a     0 160 SEM     0               0         0       0
t_tpsfs          401000b     0 160 SLP     0             266         0       0
t_console        401000c     0 150 MSGQ    0 YES           0         0       0
t_netjob         401000d     0 110 SEM     0 YES           0         0       0
t_netproto       401000e     0 110 MSGQ    0 YES          47         0       0
t_snmp           401000f     0 110 MSGQ    0 YES           0         0       0
t_ftpd           4010010     0 170 MSGQ    0               0         0       0
t_telnetd        4010011     0 160 MSGQ    0 YES           0         0       0
t_jobq           4010013     0 200 SEM     0 YES           0         0       0
t_xinput         4010015     0 199 SEM     0               0         0       0
t_tshell         4010016     0 150 RDY     1               0         0       0
t_tshell         4010018     0 150 SEM     0               0         0       0

thread: 21
[root@sylixos:/root]#
文档内容是否对您有所帮助?
有帮助
没帮助