Switching from user mode to kernel mode

前端 未结 4 1271
南笙
南笙 2020-12-24 03:06

In my operating systems class, I\'m asked whether switching from user to kernel mode is privileged. This is not OS-specific. At first I thought yes, but it seems like a big

4条回答
  •  隐瞒了意图╮
    2020-12-24 03:47

    There are usually as set of instructions that are not really to switch to kernel mode in s general way, but to request system services. So these switch to kernel mode, but only in the context of calling some piece of functionality which was set up by the operation system for the purpose of being called by user code.

    In most modern systems, even this is hidden by an API layer that implements a specific function part of which may be doing an operating system call as above.

    But in general it is true that user code cannot do the equivalent of saying "from this point on, I want to be running in kernel mode".

提交回复
热议问题