retagged by
1,838 views
1 votes
1 votes

The essential difference between traps and interrupts is

  1. traps are asynchronous and interrupts are synchronous with the program.
  2. traps are synchronous and interrupts are asynchronous with the program.
  3. traps are synchronous and interrupts are asynchronous with the I/O devices.
  4. None of these
retagged by

2 Answers

Best answer
3 votes
3 votes
Answer (B)

Trap is a software interrupt or synchronous interrupt

Interrupt is hardware generated or asynchronous interrupt

http://tech.queryhome.com/15406/difference-between-synchronous-and-asynchronous-interrupt
selected by
2 votes
2 votes

trap is an exception in a user process. It's caused by division by zero or invalid memory access. It's also 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 to happen and relies on this fact.

An interrupt is something generated by the hardware (devices like the hard disk, graphics card, I/O ports, etc). These are asynchronous (i.e. they don't happen at predictable places in the user code) or "passive" since the interrupt handler has to wait for them to happen eventually.

Answer:

Related questions

5 votes
5 votes
1 answer
1
4 votes
4 votes
1 answer
2
go_editor asked Jul 29, 2016
1,864 views
Match the following:$\begin{array}{} {} & {\textbf{List -I}} & {} & {\textbf{List-II}} \\ \text{a.} & \text{Indexed addressing} & \text{i.} & \text{is not used when ...
1 votes
1 votes
2 answers
3
Sanjay Sharma asked May 11, 2016
1,770 views
Serial access memories are useful in applications whereData consists of numbersShort access time is requiredEach stored word is processed differently.None of these
3 votes
3 votes
2 answers
4