首页 > 试题广场 >

What is the purpose of interru

[问答题]
What is the purpose of interrupts?What are the differences between a trap and an interrupt?Can traps be generated intentionally by a user program?If so,for wha tpurpose?
推荐
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.
发表于 2018-05-05 21:19:52 回复(0)