Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

GATE | GATE CS 2008 | Question 34

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Which of the following must be true for the RFE (Return from Exception) instruction on a general purpose processor?

I.   It must be a trap instruction
II.  It must be a privileged instruction
III. An exception cannot be allowed to occur during 
     execution of an RFE instruction 

(A) I only
(B) II only
(C) I and II only
(D) I, II and III only

Answer: (D)

Explanation: RFE (Return From Exception) is a privileged trap instruction that is executed when exception occurs, so an exception is not allowed to execute.

In computer architecture for a general purpose processor, an exception can be defined as an abrupt transfer of control to the operating system. Exceptions are broadly classified into 3 main categories:
a. Interrupt: it is mainly caused due to I/O device.
b. Trap: It is caused by the program making a syscall.
c. Fault: It is accidentally caused by the program that is under execution such as( a divide by zero, or null pointer exception etc).

The processor’s fetch instruction unit makes a poll for the interrupts. If it finds something unusual happening in the machine operation it inserts an interrupt pseudo- instruction in the pipeline in place of the normal instruction. Then going through the pipeline it starts handling the interrupts. The operating system explicitly makes a transition from kernel mode to user mode, generally at the end of an interrupt handle pr kernel call by using a privileged instruction RFE( Return From Exception) instruction.

This solution is contributed by Namita Singh

Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 19 Nov, 2018
Like Article
Save Article
Similar Reads