1

From the beginning of https://en.wikipedia.org/wiki/Interrupt, there are three different kinds of interrupts:

  • a hardware interrupt,

  • A software interrupt caused by an exceptional condition in the processor itself (often called a trap or exception)

  • A software interrupt caused by executing a special instruction in the instruction set. (For example system calls)

My question is that when a cpu switches to run an interrupt handler,

  1. is a new process created for running the interrupt handler?

  2. Or is the running of the interrupt handler part of an existing process, e.g.

    • in the first kind of interrupt, the process which requests some service from a hardware device and then waits for the hardware interrupt which indicates that the device operation finishes,
    • the process which causes an exception in the second kind of interrupt,
    • the process which makes the system call in the third kind of interrupt.
4

1 に答える 1

1

割り込みハンドラを実行するために作成された新しいプロセスですか?

実行中のプロセスは、カーネル モードで割り込みを処理します。

割り込みの 3 つのクラスは、異なるが関連する概念をまとめて「割り込み」という 1 つの用語にまとめています。

フォルトとトラップは例外であり、割り込みではありません。これらは通常、割り込みと同じ方法で処理されますが、命令ストリームと同期して発生し (割り込みは非同期です)、(割り込みとは異なり) ブロックすることはできません。

通常、システム コールは FAULT です。

于 2015-12-04T15:06:14.893 に答える