优先级

如果即将被运行的进程的优先级比正在运行的进程的优先级高,则系统可以强行剥夺正在运行的进程的CPU,让优先级高的进程先运行。

在 Windows 中,優先順序由 1 ~ 31 , 1 為最慢, 31 為最高,系統執行時依執行緒為基於程序之優先順序之混合運算後,得到系統中之優先順序,詳細混合運算量級表如下:

系統優先順序程序優先順序類別執行緒優先順序等級
1IDLE_PRIORITY_CLASSTHREAD_PRIORITY_IDLE
1BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_IDLE
1NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_IDLE
1ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_IDLE
1HIGH_PRIORITY_CLASSTHREAD_PRIORITY_IDLE
2IDLE_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
3IDLE_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
4IDLE_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
4BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
5IDLE_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
5BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
5Background NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
6IDLE_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
6BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
6Background NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
7BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
7Background NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
7Foreground NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
8BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
8NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
8Foreground NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
8ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
9NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
9Foreground NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
9ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
10Foreground NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
10ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
11Foreground NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
11ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
11HIGH_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
12ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
12HIGH_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
13HIGH_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
14HIGH_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
15HIGH_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
15HIGH_PRIORITY_CLASSTHREAD_PRIORITY_TIME_CRITICAL
15IDLE_PRIORITY_CLASSTHREAD_PRIORITY_TIME_CRITICAL
15BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_TIME_CRITICAL
15NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_TIME_CRITICAL
15ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_TIME_CRITICAL
16REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_IDLE
17REALTIME_PRIORITY_CLASS-7
18REALTIME_PRIORITY_CLASS-6
19REALTIME_PRIORITY_CLASS-5
20REALTIME_PRIORITY_CLASS-4
21REALTIME_PRIORITY_CLASS-3
22REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
23REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
24REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
25REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
26REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
27REALTIME_PRIORITY_CLASS3
28REALTIME_PRIORITY_CLASS4
29REALTIME_PRIORITY_CLASS5
30REALTIME_PRIORITY_CLASS6
31REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_TIME_CRITICAL

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值