answersLogoWhite

0


Best Answer

Trap is actually a software generated interrupt caused either by an error (for example division by zero, invalid memory access etc.), or by an specific request by an operating system service generated by a user program. Trap is sometimes called Exception. The hardware or software can generate these interrupts. When the interrupt or trap occurs, the hardware therefore, transfer control to the operating system which first preserves the current state of the system by saving the current CPU registers contents and program counter's value. after this, the focus shifts to the determination of which type of interrupt has occured. For each type of interrupt, separate segmants of code in the operating system determine what action should be taken and thus the system keeps on functioning by executing coputational instruction, I/O instruction, torage instruction etc.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the differences between a trap and an interrupt?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which is the highest priority interrupt for 8051?

The highest priority interrupt in the 8085 is the TRAP interrupt.


What peripheral has the highest interrupt?

The peripheral with the highest interrupt priority depends on the hardware and software design of the particular system. In the 8085, the TRAP interrupt has the highest priority. The peripheral connected to TRAP is your choice.


IS Trap is non-maskable interrupt?

yes.


Is trap is maskable or nonmaskable?

The TRAP interrupt is non-maskable.


Which type of interrupt can not be masked by software?

The TRAP interrupt can not be masked by software, unless there is hardware in place to allow that, perhaps by anding an output bit with the TRAP request line.


What are the differences between a fishpond and a fish trap?

A fish Trap is something you would use in a fish Pond to catch the fish.


What is a TrapHandler?

A trap handler, also called an interrupt handler or interrupt service routine (ISR) is a program that executes when predefined events occur in a computer. There are software and hardware interrupts. An interrupt causes the computer's processor to stop running its current task and immediately run the trap handler to service the interrupt.


What is key difference between a trap and interrupt?

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.


Which is the highest priority interrupt 1 rst5.5 2 rst6.5 3 TRAP 4 HLD?

Which is the highest priority interrupt . 1. rst5.5 2. rst6.5 3. TRAP 4. HLD


Trap in micro processer?

It is an interrupt having highest priority in 8085


What is a non-maskable?

A non-maskable interrupt is an interrupt that cannot be blocked, or masked, by the processor. In the 8085, TRAP is such an interrupt. If TRAP goes high and stays high, an interrupt vector sequence at address 24H will occur, and there is nothing the processor can do to prevent that.However, external hardware can accomplish the same thing. In a project that I designed, I needed a fourth single pin interrupt beyond RST5.5, RST6.5, and RST7.5, but I needed it to be maskable, so I built a flip flop in hardware that I could set or reset which would be AND'ed with the interrupt request to generate a maskable TRAP.


What is the purpose of interrupts in Operating System?

Answer: An interrupt is a hardware-generated change-of-flow within the system. An interrupt handler is summoned to deal with the cause of the interrupt; control is then returned to the interrupted context and instruction. A trap is a software-generated interrupt. An interrupt can be used to signal the completion of an I/O to obviate the need for device polling. A trap can be used to call operating system routines or to catch arithmetic errors.Type your answer here...