Segment of state of task

A segment of state of task or Task state segment ( TSS ) is a Structure specific to the processors of the family X86 where is stored all the context of a process. Its descriptor is placed in the GDT (total Table of descriptors).

As a segment, the segments of state of task are referred by descriptors of state of task (TSSD) located in GDT.

Structure of the TSS

Static information

The TSS can contain the static information initialized during the creation of the process:

  • the Selector of segment of the LDT of the task
  • the logical address of the pile of execution of the task for the various levels of priorities
  • the field T (debug trap bit)
  • the address of the matrix of permissions for the i/o

Dynamic information

The TSS also contains information which is updated at each commutation of context:

  • general registers EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI
  • registers of segments CS, ES, S, DS, FS, GS
  • register EFLAGS
  • instruction counter EIP
  • the selector of the TSS of the task which was carried out
previously

Use

Under Linux

Under Linux, with each Commutation of context, the core (thanks to the macro " SWITCH_TO") updates the TSS by information (general registers, EIP, flags EFLAGS, etc) of the new process, because there exists only one single TSS under Linux.

The TSS is used inter alia by the core to return from a Appel system or for the management of the exception " double" error; (the Processor, not being able more to trust its registers, uses the TSS).

See too

Random links:ISO 6709 | Kagetoki Kajiwara | Humbler | Championships of the world of cross-country skiing 1974 | Sveštica | La_défunte_défunte_exposition_(série_télévisée_de_CBS)