Skip to content

Overview

What is Exception control flow

  • From the time we first apply power to a processor until the time we turn it off, the program counter (register) assumes a sequence of values a0,a1,…,an-1 where:
    • Each ak is the address of some corresponding instruction Ik
    • Each transition from

… to be continued

  • A system must be able to react to changes in the system states that are not captured by internal program variables and are not necessary related to the execution of the program.
  • Modern systems react to these situations by making abrupt changes in the control flow. There abrupt changes are referred as exceptional control flow (ECF)
  • ECF occurs at all levels of a computer system:
    • Hardware level: events detected by the hardware trigger abrupt control transfers to exception handlers.
    • OS level: the kernel transfers control from one user process to another via context switches.
    • Application level: a process can send a signal to another process that abruptly transfers control to a signal handler in the recipient.