1

Which of the following involves context switch?

A. System Call

B. Privileged Instruction

C. Both A & B

D. None Of These

4
  • 1
    Are you taking a test on Stack Overflow? Dec 30, 2011 at 10:13
  • In my opinion answer should be C. But here system call does not necessarily involves context switch. Dec 30, 2011 at 10:15
  • I'm not taking any test. I want to just discuss this question with others. Dec 30, 2011 at 10:22
  • Care to provide some context for this question?
    – Karlson
    Dec 30, 2011 at 17:02

2 Answers 2

1

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)

0

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.

2
  • But here it is given that system call does not necessarily involves context switch. Dec 30, 2011 at 10:21
  • You can find an exception to every rule. Dec 30, 2011 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.