1,214 views
1 votes
1 votes
Talk about the correctness of following claims.

1) The instruction to switch to kernel mode is an example of a privileged instruction.

2) The instruction to switch to user mode is an example of a privileged instruction.

Detailed explanation is needed.

1 Answer

0 votes
0 votes
There are basically 2 modes in which a modern OS works.

User mode and kernel mode.

Whenever the the system boots ,OS transfers control to kernel mode , where kernel runs all the necessary routines and then kernel switches to user mode.

User mode allows users to run any programs of their choice .

However if there are any instructions that could alter some parts of OS or any of your resources ,IO systems ,they are marked “PRIVILEGED”

These instructions are allowed to be run only in kernel mode

Kernel then executes such instructions and returns control to User (Depends on the type of the privilege instruction)

Related questions

404
views
0 answers
0 votes
harsh yadav asked Dec 4, 2018
404 views
A CPU has 2 modes, privileged and non-privileged. In order to change the mode from non-privileged to privileged normally software interrupt is used but can a hardware interrupt can change the mode from non-privileged to privileged?
1.6k
views
0 answers
1 votes
Pawan Kumar 2 asked May 30, 2018
1,554 views
Switching from privileged to non-privileged mode requires a non-privileged instruction according to this linkhttps://gateoverflow.in/706/gate2001-1-13But below has been quoted in ... this ... Any sort of help is appreciated ... Thanks :)
1.1k
views
1 answers
2 votes
resilientknight asked Sep 1, 2016
1,128 views
can a non privileged instruction be executed in privileged mode?(like when returning from kernel to user mode) or is it necessary to make it a privileged instruction?
634
views
1 answers
1 votes
sh!va asked Jul 9, 2016
634 views
The x86 MOV class of instructions is used to copy data from one location to another. Which of the following statements is false?Integers can ... .Integers can be moved conditionally.There are several conditions governing a conditional move