Learn and practice Aptitude questions and answers with explanation for interview, competitive exam (Pariksha Corner )

Thursday, January 23, 2020

The CPU is expected to handle the interrupt ( by executing

The CPU is expected to handle the interrupt ( by executing the ISR )
Aas and when the interrupt is raised
Bat pre fixed time intervals
Cat the end of the current fetch cycle
Dat the end of the current execution cycle.

Answer : at the end of the current execution cycle.

Explanation:

After completing the current instruction(s), the CPU begins the interrupt respons

The general sequence for an interrupt is as follows:
-> Foreground code is running, interrupts are enabled
-> Interrupt event sends an interrupt request to the CPU
-> After completing the current instruction(s), the CPU begins the interrupt response
automatically saves current program counter
-> automatically saves some status (depending on CPU)
-> jump to correct interrupt service routine for this request
-> ISR code saves any registers and flags it will modify
-> ISR services the interrupt and re-arms it if necessary
-> ISR code restores any saved registers and flags
-> ISR executes a return-from-interrupt instruction or sequence
-> return-from-interrupt instruction restores automatically-saved status
-> return-from-interrupt instruction recovers saved program counter
-> Foreground code continues to run from the point it responded to the interrupt
Reference:http://www.scriptoriumdesigns.com/embedded/interrupts.php

Akilesh Kharvi
answered Dec 8 '2016 at 20:27

All Comments

Post your answers here:

Post

Post your comments here:

Post

Categories