Task Switching
80486
Invisible Registers
Task State Segment ( TSS )
• Each task is assigned a Task State segment
• TSS contains-
 Registers and flag contents
 Selector for tasks LDT
 Link to TSS of prviously executing task ( Call / INT )
TSS
Task Switch
• Call / Jump
 Directly Point
 Indirectly Point via Task Gate
• INT
 Indirect via Task Gate
• IRET
Task Switch using TSS- direct
1. CALL / JMP - FAR
Segment --- Selector
2. CPL & RPL <= DP[L
if no --- exception
3. Check if TSS is in memory
if no loaded into memory by exception ISR
4. Copied Current Task's Register content to Current Tasks TSS
5. Load TR with selector & descriptor of new task TSS
6. Registeer values copied from TSS into registers
7.New task Begins.
Task Switch using TSS- indirect- Task Gate
1. CALL / JMP - FAR
Segment --- Selector
2. CPL & RPL <= DP[L
if no --- exception
3. Task Gate
Selector --- Descriptor
4. Check if TSS is in memory
if no loaded into memory by exception ISR
5. Copies Current Task's Register content to Current Tasks TSS
6. Load TR with selector & descriptor of new task TSS
7. Registeer values copied from TSS into registers
8.New task Begins.

Task Switching in advanced microprocessor.pptx

  • 1.
  • 2.
  • 3.
    Task State Segment( TSS ) • Each task is assigned a Task State segment • TSS contains-  Registers and flag contents  Selector for tasks LDT  Link to TSS of prviously executing task ( Call / INT )
  • 4.
  • 7.
    Task Switch • Call/ Jump  Directly Point  Indirectly Point via Task Gate • INT  Indirect via Task Gate • IRET
  • 8.
    Task Switch usingTSS- direct 1. CALL / JMP - FAR Segment --- Selector 2. CPL & RPL <= DP[L if no --- exception 3. Check if TSS is in memory if no loaded into memory by exception ISR 4. Copied Current Task's Register content to Current Tasks TSS 5. Load TR with selector & descriptor of new task TSS 6. Registeer values copied from TSS into registers 7.New task Begins.
  • 10.
    Task Switch usingTSS- indirect- Task Gate 1. CALL / JMP - FAR Segment --- Selector 2. CPL & RPL <= DP[L if no --- exception 3. Task Gate Selector --- Descriptor 4. Check if TSS is in memory if no loaded into memory by exception ISR 5. Copies Current Task's Register content to Current Tasks TSS 6. Load TR with selector & descriptor of new task TSS 7. Registeer values copied from TSS into registers 8.New task Begins.