Prev: 6.5 Combining Page and Segment Protection

Next: 7.1 Task State Segment

Chapter 7 Multitasking


To provide efficient, protected multitasking, the 80386 employs several special data structures. It does not, however, use special instructions to control multitasking; instead, it interprets ordinary control-transfer instructions differently when they refer to the special data structures. The registers and data structures that support multitasking are:

  Task state segment
  Task state segment descriptor
  Task register
  Task gate descriptor

With these structures the 80386 can rapidly switch execution from one task to another, saving the context of the original task so that the task can be restarted later. In addition to the simple task switch, the 80386 offers two other task-management features:

  1. Interrupts and exceptions can cause task switches (if needed in the
          system design). The processor not only switches automatically to the
          task that handles the interrupt or exception, but it automatically
          switches back to the interrupted task when the interrupt or exception
          has been serviced. Interrupt tasks may interrupt lower-priority
          interrupt tasks to any depth.
    
  2. With each switch to another task, the 80386 can also switch to
          another LDT and to another page directory. Thus each task can have a
          different logical-to-linear mapping and a different linear-to-physical
          mapping. This is yet another protection feature, because tasks can be
          isolated and prevented from interfering with one another.
    


Prev: 6.5 Combining Page and Segment Protection

Next: 7.1 Task State Segment