|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
本帖最后由 mytomorrow 于 2020-6-1 14:27 编辑
, [, H3 q! W; e. d" S! w# d- |
) d6 |, K! Z0 P! {+ h1. 内核线程没有地址空间,这通过将mm指针设为NULL来实现。也就是说内核线程是没有用户上下文的进程。' P* n4 p- y) s4 K& q$ c0 }, P
: r; h6 v& I( N* ^8 H# ]$ c(Kernel threads do not have a process address space and therefore do not have an associated, ~' A ?* J' q ^; R( G
memory descriptor.Thus, the mm field of a kernel thread’s process descriptor is NULL.
& p6 ~ H2 _1 ]5 B' bThis is the definition of a kernel thread—processes that have no user context. )
$ I2 |0 e: I8 n! l, v" q6 L- l) Y/ i& T( t# ~: g
2. 内核线程只工作在内核空间,不会切换至用户空间运行。但是,内核线程同样是可调度的(schedulable)和可抢占的(preemptable)。( P/ t# t+ L7 B% o/ X* ^! G4 X
) H1 s" E$ `7 [$ ~ H9 c5 }
而常规进程在内核态工作,也可以在用户态工作。
- y8 N# N9 \9 _/ ]. X1 u: ]
1 b( L" d3 w. E: I8 \1 K3. 内核线程只工作在内核态,因此只能访问3GB以上的内存,而常规进程可以访问整个4GB线性地址空间。0 i! T9 x8 e/ y$ }- s4 _( ^( x& i
; l, {$ k v, F; v/ [3 A
. H1 x* g# v% i |
|