1,192 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

0 votes
0 votes
0 answers
1
harsh yadav asked Dec 4, 2018
385 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 int...
2 votes
2 votes
1 answer
3
resilientknight asked Sep 1, 2016
1,090 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?
1 votes
1 votes
1 answer
4