A processor needs software interrupt to
2001
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
Attempted by 121 students.
Show answer & explanation
Correct answer: C
The correct answer is Option C. A software interrupt, also called a trap in many architectures, is a controlled way for a user program to enter the operating system. When a program needs a service that involves privileged instructions, such as I/O or other protected operations, it executes a software interrupt/system-call instruction. The CPU switches to privileged mode and transfers control to the OS service routine. This is different from testing interrupt hardware, implementing co-routines, or returning from a subroutine.