Solution—Set a Watchdog on the DOS Application

Starting with the 386 processor, Intel®'s solution to this problem is to provide a hardware/software combination tasked with monitoring the behavior of an DOS program on an instruction-by-instruction basis and intercepting all actions which may prove injurious to the overall multitasking environment.

The OS creates a separate 32-bit TSS (see Figure 15-1 on page 331) associated with each DOS task. It cannot be a 16-bit, 286-style TSS because:

  • The 286 TSS only has a 16-bit field for the Flag register image.

  • It doesn't have a 32-bit EFlags register field containing the VM bit.

Figure 15-1. Task State Segment (TSS)


When the OS creates the TSS for a DOS task, it sets the VM bit to one in the EFlags register image within the TSS. Whenever a task switch to a DOS task occurs, the processor copies the EFlags image from the task's TSS into the EFlags register, setting EFlags[VM] = 1. EFlags[VM] = 1 informs the processor that the current task is a DOS task and enables the processor's watchdog logic that monitors for anarchistic behavior. Note that “watchdog” is the author's term, not Intel®'s.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.90.44