Exceptions and Interrupts

Exceptions and interrupts are conditions that cause the operating system to immediately divert program execution to an area outside of its normal flow. This condition can be triggered either in hardware or in software. The term trap describes the mechanism the kernel implements for handling the situation. In Windows 2000, the procedure for the trap is as follows:

  • Note state information (capture) and suspend the thread executing at the time of the event that triggered the trap.
  • Switch from user mode to kernel mode.
  • Transfer control to the kernel's Trap Handler.

The trap handler then figures out why the trap occurred and transfers control to the appropriate code to take care of the situation.

An interrupt can occur at any ...

Get Microsoft® Windows® 2000 Security Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.