edited by
21,746 views
67 votes
67 votes

A CPU has two modes -- privileged and non-privileged. In order to change the mode from privileged to non-privileged

  1. a hardware interrupt is needed
  2. a software interrupt is needed
  3. a privileged instruction (which does not generate an interrupt) is needed
  4. a non-privileged instruction (which does not generate an interrupt) is needed
edited by

5 Answers

75 votes
75 votes

Answer should be (D). Changing from privileged to non-privileged doesn't require an interrupt unlike from non-privileged to privileged. Also, to loose a privilege we don't need a privileged instruction though a privileged instruction does no harm. 

http://web.cse.ohio-state.edu/~teodores/download/teaching/cse675.au08/CSE675.02_MIPS-ISA_part3.pdf

edited by
2 votes
2 votes

Answer is (c)

Transitions from kernel to user mode are performed explicitly by the
operating system, generally at the end of an interrupt handler or
kernel call, using a privileged RFE (return from exception) instruction.

Ref- http://www.cs.rochester.edu/courses/252/spring2014/notes/08_exceptions

reshown by
1 votes
1 votes

To change from non privileged to privileged we require an interrupt known as software interrupt which is generated by a system call which gets translated into a privileged instruction. Option C would be apt.

Also The instructions that get executed in privileged mode will be privileged and never non-privileged. (The earlier answer which is supporting option D is having an absolutely wrong explanation)

reshown by
0 votes
0 votes

option c

it is puerlly decision of the operating system in which particular mode instruction is executed . and operating system is always executed in kernal mode(privileged mode).

Answer:

Related questions

25 votes
25 votes
2 answers
1
Kathleen asked Sep 23, 2014
11,932 views
System calls are usually invoked by usinga software interruptpollingan indirect jumpa privileged instruction