Computer Organization Questions and Answers – Exceptions

This set of Computer Organization and Architecture Multiple Choice Questions & Answers (MCQs) focuses on “Exceptions”.

1. If during the execution of an instruction an exception is raised then __________
a) The instruction is executed and the exception is handled
b) The instruction is halted and the exception is handled
c) The processor completes the execution and saves the data and then handle the exception
d) None of the mentioned
View Answer

Answer: b
Explanation: Since the interrupt was raised during the execution of the instruction, the instruction cannot be executed and the exception is served immediately.

2. _____ is/are types of exceptions.
a) Trap
b) Interrupt
c) System calls
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

3. The program used to find out errors is called __________
a) Debugger
b) Compiler
c) Assembler
d) Scanner
View Answer

Answer: a
Explanation: Debugger is a program used to detect and correct errors in the program.
advertisement
advertisement

4. The two facilities provided by the debugger is __________
a) Trace points
b) Break points
c) Compile
d) Both Trace and Break points
View Answer

Answer: d
Explanation: The debugger provides us with the two facilities to improve the checking of errors.

5. In trace mode of operation is ________
a) The program is interrupted after each detection
b) The program will not be stopped and the errors are sorted out after the complete program is scanned
c) There is no effect on the program, i.e the program is executed without rectification of errors
d) The program is halted only at specific points
View Answer

Answer: a
Explanation: In trace mode, the program is checked line by line and if errors are detected then exceptions are raised right away.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. What is the operation in Breakpoint mode?
a) The program is interrupted after each detection
b) The program will not be stopped and the errors are sorted out after the complete program is scanned
c) There is no effect on the program, i.e the program is executed without rectification of errors
d) The program is halted only at specific points
View Answer

Answer: d
Explanation: The Breakpoint mode of operation allows the program to be halted at only specific locations.

7. What are the different modes of operation of a computer?
a) User and System mode
b) User and Supervisor mode
c) Supervisor and Trace mode
d) Supervisor, User and Trace mode
View Answer

Answer: b
Explanation: The user programs are in the user mode and the system crucial programs are in the supervisor mode.
advertisement

8. The instructions which can be run only supervisor mode are?
a) Non-privileged instructions
b) System instructions
c) Privileged instructions
d) Exception instructions
View Answer

Answer: c
Explanation: These instructions are those which can are crucial for the system’s performance and hence cannot be adultered by user programs, so is run only in supervisor mode.

9. A privilege exception is raised __________
a) When a process tries to change the mode of the system
b) When a process tries to change the priority level of the other processes
c) When a process tries to access the memory allocated to other users
d) All of the mentioned
View Answer

Answer: d
Explanation: None.
advertisement

10. How is a privilege exception dealt with?
a) The program is halted and the system switches into supervisor mode and restarts the program execution
b) The Program is stopped and removed from the queue
c) The system switches the mode and starts the execution of a new process
d) The system switches mode and runs the debugger
View Answer

Answer: a
Explanation: None.

Sanfoundry Global Education & Learning Series – Computer Organization and Architecture.

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.