Intel 253668-032US Benutzerhandbuch

Seite von 806
Vol. 3   7-7
TASK MANAGEMENT
Task switches are carried out faster if the pages containing these structures are 
present in memory before the task switch is initiated.
7.2.2 TSS 
Descriptor
The TSS, like all other segments, is defined by a segment descriptor. Figure 7-3 
shows the format of a TSS descriptor. TSS descriptors may only be placed in the GDT; 
they cannot be placed in an LDT or the IDT. 
An attempt to access a TSS using a segment selector with its TI flag set (which indi-
cates the current LDT) causes a general-protection exception (#GP) to be generated 
during CALLs and JMPs; it causes an invalid TSS exception (#TS) during IRETs. A 
general-protection exception is also generated if an attempt is made to load a 
segment selector for a TSS into a segment register.
The busy flag (B) in the type field indicates whether the task is busy. A busy task is 
currently running or suspended. A type field with a value of 1001B indicates an inac-
tive task; a value of 1011B indicates a busy task. Tasks are not recursive. The 
processor uses the busy flag to detect an attempt to call a task whose execution has 
been interrupted. To insure that there is only one busy flag is associated with a task, 
each TSS should have only one TSS descriptor that points to it.
The base, limit, and DPL fields and the granularity and present flags have functions 
similar to their use in data-segment descriptors (see Section 3.4.5, “Segment 
Descriptors”
). When the G flag is 0 in a TSS descriptor for a 32-bit TSS, the limit field 
must have a value equal to or greater than 67H, one byte less than the minimum size 
Figure 7-3.  TSS Descriptor
31
24 23 22 21 20 19
16 15
13
14
12 11
8 7
0
P
Base 31:24
G
D
P
L
Type
0
0
31
16 15
0
Base Address 15:00
Segment Limit 15:00
Base 23:16
A
V
L
Limit
19:16
0
1
B
0
1
TSS Descriptor
AVL
B
BASE
DPL
G
Available for use by system software
Busy flag
Segment Base Address
Descriptor Privilege Level
Granularity
LIMIT
P
TYPE
Segment Limit
Segment Present
Segment Type
0
4