|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
本帖最后由 mytomorrow 于 2020-6-1 14:27 编辑
! N" M! V" _2 _( W) `( [( `/ u, o% x
+ N" b- g* i3 ~' q& |1. 内核线程没有地址空间,这通过将mm指针设为NULL来实现。也就是说内核线程是没有用户上下文的进程。
" i6 A; Q/ [/ U; C0 h& L, H" f1 Z
(Kernel threads do not have a process address space and therefore do not have an associated/ S2 ~ E# f. Y4 {: N( \9 Y0 I* W; d
memory descriptor.Thus, the mm field of a kernel thread’s process descriptor is NULL.8 P; h2 H7 Q& S* W: B! Q+ S& P
This is the definition of a kernel thread—processes that have no user context. ) T0 e% l! [; C. R& N& O/ M% Y# h4 v
9 ^: l9 _8 h* `6 K8 s$ o2. 内核线程只工作在内核空间,不会切换至用户空间运行。但是,内核线程同样是可调度的(schedulable)和可抢占的(preemptable)。
1 F2 o/ `3 J$ H( Z. _' [; p8 d2 R4 H! m7 }0 t' r' I
而常规进程在内核态工作,也可以在用户态工作。/ L3 W! I5 J1 e8 I% M* M8 a! b
* ?' B- U0 n6 }# t1 L+ y
3. 内核线程只工作在内核态,因此只能访问3GB以上的内存,而常规进程可以访问整个4GB线性地址空间。! Q, I1 f7 C4 w9 M
* p. u9 _0 r: s& G0 E9 B4 T
5 `8 p7 d; u* }# a: T
|
|