recategorized by
16,179 views
26 votes
26 votes

A CPU generally handles an interrupt by executing an interrupt service routine:

  1. As soon as an interrupt is raised.

  2. By checking the interrupt register at the end of fetch cycle.

  3. By checking the interrupt register after finishing the execution of the current instruction.

  4. By checking the interrupt register at fixed time intervals.

recategorized by

4 Answers

Best answer
38 votes
38 votes

It will be (C).

After finishing the execution of each instruction the CPU reads the interrupt pins to recognize the interrupts.

INTR $= 1 =$ Interrupt is present.(Service the Interrupt)

         $= 0 =$ Interrupt is not present.(Goto next Instruction fetch from user program)

edited by
1 votes
1 votes
Answer: (C)

Explanation: Hardware detects interrupt immediately, but CPU acts only after its current instruction. This is followed to ensure integrity of instructions.
0 votes
0 votes
I think it will act differently for hardware and software interrupts for hardware interrupts are the urgent or given the higher priority but we're as the software interrupts are given less priority so it d pends on the interrupt if it is hardware it is immediately addressed but we're as the software interrupts it can wait  

 

According to me if it is an hardware interrupt option a is correct

Software interrupts remaining three are applicable na all the 3 are methods to address the the interrupts irrespective of there performance and feasibility

 if I take for software interrupts ABC all options are ways to handle an interrupt request how are u chooseing that one of the option is best but if we look all options are ways to handle a request

 Integrity is maintained in every option (except option a because it may lead to error as it executes only half instruction it may lead to errors

: I wanted to know why did you think that option c is more appropriate (Iam not able to figure out how to answer this question because every option seems to be valid for me and how what is generally mean in the question it depends on the type of interrupt as I said hardware and software )
0 votes
0 votes
CPU after completing the execution of a instruction checks the status of interrupt if there is a interrupt then CPU executes the interrupt service routine to service it else CPU stats executing next instruction.
Answer:

Related questions

27.1k
views
6 answers
66 votes
Rucha Shelke asked Sep 26, 2014
27,116 views
A computer system supports $32$-bit virtual addresses as well as $32$-bit physical addresses. Since the virtual address space is of the same size as ... for memory management is no longer neededCPU scheduling can be made more efficient now
12.6k
views
3 answers
13 votes
Kathleen asked Sep 22, 2014
12,564 views
A common property of logic programming languages and functional languages is:both are procedural languages both are based on $\lambda$-calculusboth are declarativeboth use Horn-clauses
11.6k
views
7 answers
43 votes
Ishrat Jahan asked Nov 3, 2014
11,550 views
A user level process in Unix traps the signal sent on a Ctrl-C input, and has a signal handling routine that saves appropriate files ... mode in which the signal handling routine executes?User modeKernel modeSuperuser modePrivileged mode
6.4k
views
3 answers
5 votes
Ishrat Jahan asked Oct 30, 2014
6,367 views
Consider the following pseudo-code:IF ((A > B) AND (C > D)) THEN A = A + 1 B = B + 1 ENDIFThe cyclomatic complexity of the pseudo-code is2345