GATE / CS ARCHIVE

GATE CSE 1992 / QUESTION 5(b)

Masked interrupt priority logic

Computer Organization & Architecture · Input/Output, DMA & Interrupts · Full GATE CSE 1992 paper

GATE 1992, Q5(b) Descriptive
Report issue

Input/Output, DMA & Interrupts

Question 5(b), GATE 1992: Three devices A,B,C use interrupt request lines INTR1>INTR2>INTR3. Draw priority logic with an interrupt mask register so A>B>C.
Tap to enlarge
Answer & solution

Answer: Gate each request with its mask enable and assign A to INTR1, B to INTR2, C to INTR3; optional explicit priority gating suppresses lower requests. (no official key was published)

Define mask-register bits MA,MB,MC with 1 meaning masked (disabled). Let RA,RB,RC be pending request signals. Form eligible requests a=RA∧¬MA, b=RB∧¬MB, c=RC∧¬MC.

Schematic using the processor’s specified priority mechanism:
RA ──AND(¬MA)──> INTR1 [highest]
RB ──AND(¬MB)──> INTR2
RC ──AND(¬MC)──> INTR3 [lowest]
       ↑ three-bit interrupt mask register

Because the processor already prioritizes the three lines, this wiring suffices. If an explicit one-hot external priority network is desired, use instead:

INTR1=a
INTR2=b∧¬a
INTR3=c∧¬a∧¬b.

These equations are also a gate-level schematic: invert a and b as needed and AND the shown eligible inputs. They ensure that only the highest-priority eligible device is presented at a time.

Priority must depend on eligible requests, not raw requests: a masked A must not suppress an unmasked B or C. With all requests asserted and masks 000, A wins; with MA=1 and others 0, B wins; with MA=MB=1, C wins. With every mask bit set, no interrupt is raised.

Assume a device holds its request until acknowledged, or use pending-request latches before these gates, so a lower request survives service of a higher one. Service clears only the acknowledged source’s pending request. Mask-register writes are controlled by the processor. If the hardware convention defines 1 as enabled, replace each ¬M by M; the priority relation itself is unchanged.

Original paper, page 5