retagged by
18,108 views
52 52 votes

Which of the following is true?

  1. Unless enabled, a CPU will not be able to process interrupts.

  2. Loop instructions cannot be interrupted till they complete.

  3. A processor checks for interrupts before executing a new instruction.

  4. Only level triggered interrupts are possible on microprocessors.

3 Answers

Best answer
61 61 votes

Answer is (A).

Options (B) and (D) are obviously false.

A processor checks for the interrupt before FETCHING an instruction, so option (C) is also false.

edited by
10 10 votes
  • “Unless enabled, a CPU will not be able to process interrupts.”

    • Typically, CPUs have an Interrupt Enable (IE) bit or similar mechanism (e.g., IF flag in x86). Agar yeh disabled hai, toh CPU interrupts ko service nahi karega.
    • Verdict: True 
  • “Loop instructions cannot be interrupted till they complete.”

    • Koi bhi instruction (chahe loop ho ya koi doosra) interrupt ho sakta hai; CPU pipeline can be broken if an interrupt is recognized and enabled. “Loop instruction” aisi koi special cheez nahi hai jo interrupt se bach jaye.
    • Verdict: False.
  • “A processor checks for interrupts before executing a new instruction.”

    • Commonly, interrupts are checked at instruction boundaries (har nayi instruction fetch/execute se pehle). Agar koi interrupt pending hai aur enable bhi hai, toh CPU control interrupt handler pe jaata hai.
    • Verdict: Trueon most typical CPU designs.
  • “Only level triggered interrupts are possible on microprocessors.”

    • Yeh galat hai, kyunki bahut se processors edge‐triggered interrupts bhi support karte hain (for example, Intel 8086 me INTR is level‐triggered, lekin NMI ya kuch external interrupts kabhi edge‐triggered bhi ho sakte hain; modern controllers can support both).
    • Verdict: False.

CPU har instruction ki completion par check karta hai ki koi interrupt pending to nahin. Agar interrupt enable hai aur pending hai, toh next instruction normal flow se fetch/execute karne ke bajay, CPU interrupt service routine (ISR) ki taraf branch kar deta hai.

  • Issi ko kai jagah bola jaata hai “processor checks for interrupts at instruction boundaries”.
  • A practical way of saying the same thing is “before fetching the next instruction,”
  • Agar aap pipeline stages ko dekho (Fetch → Decode → Execute → Memory → Writeback, etc.), toh “checking interrupts before fetching the next instruction” often means the CPU ensures the previous instruction has completed, and then it decides: “Am I going to fetch from the normal PC, or jump to the interrupt vector?”
  • In a pipelined CPU, the exact stage jahan interrupt detect hota hai hardware design pe depend karta hai, par conceptually hum kehte hain:

    CPU completes the current instruction, checks interrupts, then either continues normal fetch or fetches the ISR start address.

  • “A processor checks for the interrupt before fetching an instruction” generally aligns with the typical textbook explanation:“Interrupts are recognized at instruction boundaries, so the next fetch may go to the interrupt routine.”

2 2 votes

are both option (a) and (c)  TRUE .... explain ???
Option (c) “Polling is like picking up your phone every few seconds to see if you have a call. Interrupts are like waiting for the phone to ring.”

CPU senses (checks) interrupt request line after every instruction; if raised,.... correct me

http://www.cs.toronto.edu/~demke/469F.06/Lectures/Lecture6.pdf or archive

edited by
Answer:
Position:
Show:

Related questions

34 34 votes
4 answers 4 answers
18.7k
18.7k views
Kathleen asked Sep 25, 2014
18,741 views
Which of the following devices should get higher priority in assigning interrupts?Hard diskPrinterKeyboardFloppy disk
49 49 votes
4 answers 4 answers
12.5k
12.5k views
Kathleen asked Sep 25, 2014
12,505 views
Suppose the domain set of an attribute consists of signed four digit numbers. What is the percentage of reduction in storage space of this attribute if it is stored as an...
60 60 votes
6 answers 6 answers
19.9k
19.9k views
Kathleen asked Sep 25, 2014
19,873 views
Which of the following addressing modes permits relocation without any change whatsoever in the code?Indirect addressingIndexed addressingBase register addressingPC relat...
32 32 votes
7 answers 7 answers
12.5k
12.5k views
Kathleen asked Sep 25, 2014
12,544 views
The rank of the matrix given below is:$$\begin{bmatrix} 1 &4 &8 &7\\ 0 &0& 3 &0\\ 4 &2& 3 &1\\ 3 &12 &24 &21 \end{bmatrix}$$$3$$1$$2$$4$