Machine-translated by Google. Questions are authored in English.
Top

Discussion

The essential difference between traps and interrupts is

  • A.traps are asynchronous and interrupts are synchronous with the program.
  • B.traps are synchronous and interrupts are asynchronous with the program.
  • C.traps are synchronous and interrupts are asynchronous with the I/O devices.
  • D.None of these.

Answer: B

The essential difference is that traps are synchronous and interrupts are asynchronous with the program. A trap is raised by the program itself, for example by an error such as division by zero or by a system call, and always happens at the same point when the program is run again. An interrupt comes from outside, for example from an I/O device, at an unpredictable moment.

Option A reverses the two, and option C ties interrupts to I/O devices only, which is not the defining contrast with the program.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.