Open In App

GATE | GATE-CS-2001 | Question 12

Like Article
Like
Save
Share
Report

A processor needs software interrupt to
(A) test the interrupt system of the processor
(B) implement co-routines
(C) obtain system services which need execution of privileged instructions
(D) return from subroutine


Answer: (C)

Explanation: Software interrupts are required by CPU to obtain System services which need execution of privileged instructions. A software interrupt is caused either by an exceptional condition in the processor itself, or a special instruction in the instruction set which causes an interrupt when it is executed. The former is often called a trap or exception and is used for errors or events occurring during program execution that are exceptional enough that they cannot be handled within the program itself.. An interrupt alerts the processor to a high-priority condition requiring the interruption of the current code the processor is executing. The processor responds by suspending its current activities, saving its state, and executing a function called an interrupt handler (or an interrupt service routine, ISR) to deal with the event. This interruption is temporary, and, after the interrupt handler finishes, the processor resumes normal activities.

So (C) is correct option

Quiz of this Question


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads