双重模式_操作系统双重模式

双重模式

操作系统模式 (Modes of Operating System)

There are two modes in which an Operating System works. These are:

操作系统有两种工作模式。 这些是:

  1. The User Mode

    用户模式

  2. The Kernel Mode

    内核模式

Let us study each of them in detail...

让我们详细研究它们中的每一个...

1)操作系统的用户模式 (1) User Mode of Operating System)

When the computer system runs user applications like file creation or using any other application program, then the system is in the User Mode. This mode does not have direct access to the hardware of the Computer. For performing hardware related tasks, like when the user application requests for a service from the Operating System or some interrupt occurs, in these cases the System must switch to the Kernel Mode. The mode bit of the user mode is 1. This means that if the mode bit of the processor of the system is 1, then the system will be in the User Mode.

当计算机系统运行用户应用程序(如文件创建或使用任何其他应用程序)时,系统处于用户模式。 此模式不能直接访问计算机的硬件。 为了执行与硬件相关的任务,例如当用户应用程序从操作系统请求服务或发生某些中断时,在这些情况下,系统必须切换到内核模式。 用户模式的模式位为1。这意味着,如果系统处理器的模式位为1,则系统将处于用户模式。

2)操作系统的内核模式 (2) Kernel Mode of Operating System)

All the bottom level tasks of the Operating system are performed in the Kernel Mode. As the Kernel space has direct access to the hardware of the system, so the kernel mode handles all the processes which require hardware support. Apart from this, the main functionality of the Kernel Mode is to execute privileged instructions. These privileged instructions are not provided the user access, and that's why these instructions cannot be processed in the User mode. So, all the processes and instructions that the user is restricted to interfere with are executed in the Kernel Mode of the Operating System. The mode bit for the Kernel Mode is 0. So, for the system to function in the Kernel Mode, the Mode bit of the processor must be equal to 0.

操作系统的所有底层任务均在内核模式下执行。 由于内核空间可以直接访问系统的硬件,因此内核模式可以处理所有需要硬件支持的进程。 除此之外,内核模式的主要功能是执行特权指令。 这些特权指令没有提供给用户访问权限,这就是为什么这些指令无法在用户模式下进行处理。 因此,限制用户干扰的所有过程和指令都在操作系统的内核模式下执行。 内核模式的模式位为0。因此,要使系统在内核模式下运行,处理器的模式位必须等于0。

Need for Dual Mode of Operating System

需要操作系统双重模式

There are certain types of processes which are to be made hidden from the user, and certain tasks which do not require any type of hardware support. Using the Dual Mode of the OS, these tasks can be dealt with separately.

某些类型的过程将对用户隐藏,某些任务不需要任何类型的硬件支持。 使用操作系统双模式,可以分别处理这些任务。

Also, it is important for the Operating System to function in the dual mode because the Kernel Level programs perform all the bottom level functions of the OS like process management, Memory management, etc., and if these are altered by the user, then this can cause an entire system failure. So, for specifying the access to the users only to the tasks which are of their use, Dual Mode is necessary for an Operating system.

同样,操作系统以双模式运行也很重要,因为内核级程序执行操作系统的所有底层功能,例如进程管理,内存管理等,如果用户更改了这些功能,则这可能会导致整个系统故障。 因此,为了仅指定用户对他们使用的任务的访问权限,操作系统需要双重模式

So, whenever the system works on the user applications, it is in the User mode. Whenever the user requests for some hardware services, a transition from User mode to Kernel mode takes place and this is done by changing the mode bit from 1 to 0. And for returning again into the User mode, the mode bit is again changed to 1.

因此,只要系统在用户应用程序上运行,便处于用户模式。 每当用户请求某些硬件服务时,都会从用户模式转换为内核模式,这是通过将模式位从1更改为0来完成的。为了再次返回用户模式,模式位将再次更改为1 。

翻译自: https://www.includehelp.com/operating-systems/dual-mode-of-operating-systems.aspx

双重模式

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值