Reputation: 1213
Which of the following involves context switch?
A. System Call
B. Privileged Instruction
C. Both A & B
D. None Of These
Upvotes: 1
Views: 3441
Reputation: 7762
D. None of these
A system call involves a mode switch (user mode to kernel mode) but does not necessarily mean a context switch (this depends on OS): http://en.wikipedia.org/wiki/Context_switch
Since A isn't true, D is the only remaining option
(My intuition would tell me that a privileged instruction would require you to already be in kernel mode)
Upvotes: 1
Reputation: 206636
Both A and B.
When a system call is executed a context switch between user space to kernel space has to take place.
When a priority task is executed the thread or process context needs to switch to perform the priority task by switching from the task that was currently being executed.
Upvotes: 0