next up previous
Next: Message Passing Up: Interprocess Communication Previous: Shared Memory

Software Interrupt

We can introduce a service call that lets one process cause a software interrupt in another:

Interrupt(process id, interrupt number)
and another that allows a process to associate a handler with an interrupt:
Handle(interrupt number, handler)

Software interrupts are often used by an operating system to inform a process about the following events:
The user typed the ``attention key''.
An alarm scheduled by the process has expired.
Some limit, such as file size or virtual time, has been exceeded.

It is important to distinguish among interrupts, traps, and software interrupts. In all cases, the handler is a software program. Interrupt and trap numbers are defined by the hardware which is also responsible for calling the procedure. Software trap numbers are defined by the operating system which is responsible for calling the procedure. An interrupt handler is called in response to a signal from another device while a trap handler is called in response to an instruction executed within the cpu. A software interrupt handler is called in response to the invocation of a system call.


Prasun Dewan
Tue Sep 24 14:33:02 EDT 1996