30 lines
2.7 KiB
HTML
30 lines
2.7 KiB
HTML
<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
|
<html>
|
|
|
|
<head>
|
|
<title>80386 Programmer's Reference Manual -- Section 7.2</title>
|
|
</head>
|
|
|
|
<body>
|
|
<b>up:</b> <a href="C07.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C07.HTM">Chapter 7 -- Multitasking</a><br>
|
|
<b>prev:</b> <a href="S07_01.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S07_01.HTM">7.1 Task State Segment</a><br>
|
|
<b>next:</b> <a href="S07_03.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S07_03.HTM">7.3 Task Register</a>
|
|
<p>
|
|
<hr>
|
|
<p>
|
|
<h1>7.2 TSS Descriptor</h1>
|
|
The task state segment, like all other segments, is defined by a descriptor. <a href="#fig7-2">Figure 7-2</a> shows the format of a TSS descriptor.
|
|
<p>The B-bit in the type field indicates whether the task is busy. A type code of 9 indicates a non-busy task; a type code of 11 indicates a busy task. Tasks are not reentrant. The B-bit allows the processor to detect an attempt to switch to a task that is already busy.
|
|
<p>The BASE, LIMIT, and DPL fields and the G-bit and P-bit have functions similar to their counterparts in data-segment descriptors. The LIMIT field, however, must have a value equal to or greater than 103. An attempt to switch to a task whose TSS descriptor has a limit less that 103 causes an exception. A larger limit is permissible, and a larger limit is required if an I/O permission map is present. A larger limit may also be convenient for systems software if additional data is stored in the same segment as the TSS.
|
|
<p>A procedure that has access to a TSS descriptor can cause a task switch. In most systems the DPL fields of TSS descriptors should be set to zero, so that only trusted software has the right to perform task switching.
|
|
<p>Having access to a TSS-descriptor does not give a procedure the right to read or modify a TSS. Reading and modification can be accomplished only with another descriptor that redefines the TSS as a data segment. An attempt to load a TSS descriptor into any of the segment registers (CS, SS, DS, ES, FS, GS) causes an exception.
|
|
<p>TSS descriptors may reside only in the GDT. An attempt to identify a TSS with a selector that has TI=1 (indicating the current LDT) results in an exception.
|
|
<p><a name="fig7-2"><img align="center" src="FIG7-2.GIF" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/FIG7-2.GIF" border="0">
|
|
<p>
|
|
<hr>
|
|
<p><b>up:</b> <a href="C07.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C07.HTM">Chapter 7 -- Multitasking</a><br>
|
|
<b>prev:</b> <a href="S07_01.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S07_01.HTM">7.1 Task State Segment</a><br>
|
|
<b>next:</b> <a href="S07_03.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S07_03.HTM">7.3 Task Register</a>
|
|
</body>
|
|
|