A processor needs software interrupt to

2001

A processor needs software interrupt to

  1. A.

    Test the interrupt system of the processor

  2. B.

    Implement co-routines

  3. C.

    Obtain system services which need execution of privileged instructions

  4. 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.

Explore the full course: Gate Guidance By Sanchit Sir