Embedded Systems Questions and Answers – RISC Exceptions

This set of Embedded Systems Multiple Choice Questions & Answers (MCQs) focuses on “RISC Exceptions”.

1. What does MSR stand for?
a) machine state register
b) machine software register
c) minimum state register
d) maximum state register
View Answer

Answer: a
Explanation: The MSR is a machine state register. When the exception is recognised, the address of the instruction and the MSR are stored in the supervisor registers while handling an exception.

2. How many supervisor registers are associated with the exception mode?
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: a
Explanation: When the exception is recognised, the address of the instruction and the machine state register(MSR) are stored in the supervisor registers in the exception mode. There are two supervisor registers SRR0 and SRR1.

3. What happens when an exception is completed?
a) TRAP instruction executes
b) SWI instruction executes
c) RFI instruction executes
d) terminal count increases
View Answer

Answer: c
Explanation: When an exception is recognised, the address of the instruction and the MSR are stored in the supervisor registers and the processor moves to the supervisor mode and starts to execute the handler which is associated with the vector table. The handler examines the DSISR and FPSCR registers and carries out the required function. When it gets completed the RFI or return-from-interrupt instruction is executed.
advertisement
advertisement

4. How many general types of exceptions are there?
a) 2
b) 3
c) 6
d) 4
View Answer

Answer: d
Explanation: There are four general types of exceptions. They are synchronous precise, asynchronous precise, synchronous imprecise and asynchronous imprecise.

5. In which of the exceptions does the external event causes the exception?
a) synchronous exception
b) asynchronous exception
c) precise
d) imprecise
View Answer

Answer: b
Explanation: The asynchronous exception is the one in which an external event causes an exception and is independent of the instruction flow. On the other hand, the synchronous exceptions are synchronised, that is, it is caused by the instruction flow.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Which of the exceptions are usually a catastrophic failure?
a) imprecise exception
b) precise exception
c) synchronous exception
d) asynchronous exception
View Answer

Answer: a
Explanation: An imprecise exception is a catastrophic failure in which the processor cannot continue processing or allow a particular task or program to continue.

7. Which of the exceptions allows the system reset or memory fault?
a) imprecise exception
b) precise exception
c) synchronous exception
d) asynchronous exception
View Answer

Answer: a
Explanation: The system reset or memory fault falls into the category of imprecise exceptions while accessing the vector table.
advertisement

8. Which registers are used to determine the completion status?
a) MSR
b) flag register
c) DSISR
d) index register
View Answer

Answer: c
Explanation: The completion status can be determined by the information bits in the DSISR and FPSCR registers.

9. Which of the following does not support PowerPC architecture?
a) synchronous precise
b) asynchronous precise
c) synchronous imprecise
d) asynchronous imprecise
View Answer

Answer: c
Explanation: The synchronous imprecise is usually not supported on the PowerPC architecture and also in the MPC601, MPC603 etc.
advertisement

10. Which exceptions are used in the PowerPC for floating point?
a) synchronous imprecise
b) asynchronous imprecise
c) synchronous precise
d) synchronous imprecise
View Answer

Answer: a
Explanation: The PowerPC can handle the floating point exception by making use of the synchronous imprecise mode.

11. Which exception is used in the external interrupts and decrementer-caused exceptions?
a) synchronous precise
b) asynchronous precise
c) synchronous imprecise
d) asynchronous imprecise
View Answer

Answer: b
Explanation: The asynchronous precise type exception is used to handle the external interrupts and decrementer-caused exceptions. Both these can occur at any time within the instruction flow.

12. Which exception can be masked by clearing the EE bit to zero in the MSR?
a) synchronous imprecise
b) synchronous precise
c) asynchronous imprecise
d) asynchronous precise
View Answer

Answer: d
Explanation: The asynchronous precise type exceptions can be masked by clearing the EE bits in the MSR. This bit is automatically cleared to zero in the MSR in order to prevent this interrupt causing an exception while other exceptions are being processed.

Sanfoundry Global Education & Learning Series – Embedded System.

To practice all areas of Embedded System, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.