Answer :

Answer:

Interrupt (INT) helps operating system to stop work on one process and start work on other process using interrupt signals.

Explanation:

Purpose of interrupts:

• Interrupts are useful when an I/O device needs to be serviced only occasionally at low data transfer rate.

For example, when a peripheral requires the attention of the processor to perform an I/ O operation.

A trap:

• also known as an exception or a fault, is typically a type of synchronous interrupt caused by an exceptional condition

is a software-generated interrupt.

For example it's caused by division by zero or invalid memory access.

Can traps be generated intentionally by a user program?  Yes.

If so, for what purpose?  

• the usual way to invoke a kernel routine (a system call) because those run with a higher priority than user code.  

• Handling is synchronous, so the user code is suspended and continues afterwards.

• In a sense they are active - most of the time, the code expects the trap.

Other Questions