answersLogoWhite

0


Best Answer

An interrupt is generally initiated by an I/O device, and causes the CPU to stop what it's doing, save its context, jump to the appropriate interrupt service routine, complete it, restore the context, and continue execution. For example, a serial device may assert the interrupt line and then place an interrupt vector number on the data bus. The CPU uses this to get the serial device interrupt service routine, which it then executes as above.

A trap is usually initiated by the CPU hardware. When ever the trap condition occurs (on arithmetic overflow, for example), the CPU stops what it's doing, saves the context, jumps to the appropriate trap routine, completes it, restores the context, and continues execution. For example, if overflow traps are enabled, adding two very large integers would cause the overflow bit to be set AND the overflow trap service routine to be initiated.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is key difference between a trap and interrupt?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the key difference between a protosun and a sun?

what is the key difference between a protosun and the real sun?


What is the difference between a key and a legend?

There is no difference.


HOW IS SOFTWARE INTERRUPT INITIATED?

Interrupt signals initiated by programs are called software interrupts. A software interrupt is also called a trap or anexception. A signal informing a program that an event has occurred. When a program receives an interrupt signal, it takes a specified action (which can be to ignore the signal). Interrupt signals can cause a program to suspend itself temporarily to service the interrupt. Interrupt signals can come from a variety of sources. For example, every keystroke generates an interrupt signal. Interrupts can also be generated by other devices, such as a printer , to indicate that some event has occurred. PCs support 256 types of software interrupts and 15 hardware interrupts. Each type of software interrupt is associated with an interrupt handler -- a routine that takes control when the interrupt occurs. For example, when you press a key on your keyboard, this triggers a specific interrupt handler. The complete list of interrupts and associated interrupt handlers is stored in a table called the interrupt vector table , which resides in the first 1 K of addressable memory.


What is the key difference between a liquid a gas?

intermolecular attractions


What is a key difference between a liquid and a gas?

intermolecular attractions


What is the key difference between a gas and liquid?

intermolecular attractions


What is the key difference between a liquid and a gas answer?

A is expanded in a container.


What is the difference between a key deer and a deer?

key deer are smaller than regular deer


What is irq use for computer?

IRQ stands for Interrupt ReQuest. It allows other hardware in your computer to interrupt what the CPU is doing, because there is something else that needs to be done. For example, when you press a key on your key board, an IRQ is generated that says a key has been pressed. If there were no IRQs, then the CPU would have to check the keyboard over and over again to see if a key has been pressed, which wastes time.


What is the difference between a dichotomous key and a taxonomic key?

A dichotomous key helps you figure out what your thing is, a taxonimic key helps you figure out the properties.


What is the difference between formating with the format painter and with the F4 key?

gfgfgfg


Difference between the delete key an the back space?

The backspace key deletes to the left of the cursor, and the delete key deletes to the right of the cursor.