761 views
0 votes
0 votes
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 priviledge instructions

(d) return from subroutine

2 Answers

3 votes
3 votes
Option C

obtain system services which need execution of priviledge instructions
1 votes
1 votes
Software interrupts are Instruction itself  i suppose !

So for option  a :- Not just software inteerupts , but also interrupt by I/o devices  are used to test the interrupt system of the processor

for option b -- It is not related to co routine in any way .

A coroutine is similar to a thread (in the sense of multithreading): it is a line of execution, with its own stack, its own local variables, and its own instruction pointer; but it shares global variables and mostly anything else with other coroutines. The main difference between threads and coroutines is that, conceptually (or literally, in a multiprocessor machine), a program with threads runs several threads in parallel. Coroutines, on the other hand, are collaborative: at any given time, a program with coroutines is running only one of its coroutines, and this running coroutine suspends its execution only when it explicitly requests to be suspended.

 

option d: whver you encounter IRET in Interrupt service routine you return back , but for this there is not xternal interrupt required for this so option d wrong

For option c : is the right answer

Since i said software inteerupts are instrcution in progarm . so in a program if i have print or sacnf statements . then these statements must be need servce from OS . so hence we required interrupt when we need to excuted privileged instruction

hence option c - right

Related questions

33 votes
33 votes
2 answers
4
Kathleen asked Sep 14, 2014
7,380 views
Which is the most appropriate match for the items in the first column with the items in the second column:$$\begin{array}{|cl|cl|} \hline \text{X.} &\text{Indirect Addres...