Task Management notes IA-32-3A Chapter 6

1. What is task?

A task is a unit of work that a processor can dispatch, execute, and suspend.

2. Task Structure.

A task is made up of two parts: a task execution space and a task-state segment
(TSS). The task execution space consists of a code segment(cs), a stack segment(ss), and
one or more data segments(ds).

The TSS specifies the segments that make up the task execution space and provides
3. Executing a task.

Software or the processor can dispatch a task for execution in one of the following
ways:
*A explicit call to a task with the CALL instruction.
*A explicit jump to a task with the JMP instruction.

*An implicit call (by the processor) to an interrupt-handler task.
*An implicit call to an exception-handler task.
*A return (initiated with an IRET instruction) when the NT flag in the EFLAGS
register is set.

4. Data structure for handling task-related activities:


a storage place for task state information. In multitasking systems, the TSS also
provides a mechanism for linking tasks.
Task-state segment (TSS). including all the general registers, segment selectors, iomap base address, espX...Similar as trap frame in jos.
Task-gate descriptor. -> A way to access TSS descriptor( final goal is still access a task), maybe in GDT, LDT or IDT.
TSS descriptor. -> it's stored only in GDT, not LDT or IDT
Task register. 2 parts, visible part point to TSS descriptor in GDT, invisible part cache the segment descriptor. Use STR/LDR to w/r visible part.
NT flag in the EFLAGS register.

5. What's in GDT?

Different Segment Descriptors: Kernel text, Kernel data, User text, User data, TSS descriptors for each CPU.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值