in Operating System
1,719 views
0 votes
0 votes
when the interrupt occurs ,then

a: process switching may be there

b: context saving must be there

c: both a and b

d.None of these
in Operating System
1.7k views

4 Comments

Answer should be C??

Because wehn interrupt occurs first CPU will save ongoing process's context, and then switch to interrupt process,
0
0

Ashwin Kulkarni is it possible to have an interrupt request for thread switching??

0
0

 Red_devil

thread of different process required context switching but for same process threads need not request for interrupt...

bcoz threads for a single process run concurrently (parallel)....???

0
0

@hs_yadav "A context switch (also sometimes referred to as a process switch or a task switch) is the switching of the CPU (central processing unit) from one process or thread to another." ...so both thread and process have context switch time.

0
0

1 Answer

0 votes
0 votes
It must be C right? Because, the CPU will save the context of current executing process by saving the register values (b) and then jump to the execution of the Interrupt Service Routine for that interrupt (a).

4 Comments

Process switching my be there as it can stop current process and goto the interrupt process.But if that is a low priority interrupt,then  will it always jump? First statement has "MAY" but second has "MUST".
0
0
For maskable interrupts, it won't. For non-maskable it'll. That's why it's "may". The statement is true though.
0
0
But context saving is always?
0
0
I got this context saving doubt and I researched a lot. A possible explanation I found is when there is maskable interrupt, the CPU gives acknowledgment and requests for the address of the service routine. Even to do this task, it has to save the context. However, priority for such interrupt is not that high that it'll stop current process execution. I found no article that explicitly says this but I can conclude this from what I read.
0
0

Related questions