- 论坛徽章:
- 8
|
本帖最后由 firocu 于 2015-06-22 11:09 编辑
个人理解:
上下文对应英文的context, 字面意思就是在一起的结构, 注意text是texture的缩写, 有层次, 前后的潜在意思.
按照wikipedia的解释, 通常context说的都是 task context.
In computer science, a task context is the minimal set of data used by a task (which may be a process or thread) that must be saved to allow a task interruption at a given date, and a continuation of this task at the point it has been interrupted and at an arbitrary future date.
注意这里面的minimal set这个词, 一个进程运行需要很多内容, 包括cpu registers , memory, disk等等.
但构成上下文的只是很小的集合:
The context data may be located in processor registers, memory used by the task, or in control registers used by some operating systems to manage the task.
在我看来就是, 一些cpu的寄存器, 还有内核和进程相关的数据结构task_struct里面的thread_struct之类的数据.
除此之外, 还有interrupt context.也是类似的意思.
个人理解, FIXME!
|
|