用户和内核模式在操作系统中有什么区别? [英] What is the difference between user and kernel modes in operating systems?

查看:243
本文介绍了用户和内核模式在操作系统中有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户模式"和内核模式"之间有什么区别?为什么以及如何激活它们中的任何一个?它们的用例是什么?

What are the differences between User Mode and Kernel Mode, why and how do you activate either of them, and what are their use cases?

推荐答案

  1. 内核模式

  1. Kernel Mode

在内核模式下,执行代码完整且不受限制 访问底层硬件.它 可以执行任何CPU指令,并且 引用任何内存地址.核心 模式通常为 最低级别,最受信任的功能 操作系统.崩溃 内核模式是灾难性的;他们 将停止整个PC.

In Kernel mode, the executing code has complete and unrestricted access to the underlying hardware. It can execute any CPU instruction and reference any memory address. Kernel mode is generally reserved for the lowest-level, most trusted functions of the operating system. Crashes in kernel mode are catastrophic; they will halt the entire PC.

用户模式

在用户模式下,执行代码无法直接访问 硬件或参考存储器.代码 在用户模式下运行必须委托给 系统API来访问硬件或 记忆.由于提供了保护 通过这种隔离,当机 用户模式始终是可恢复的.最多 在计算机上运行的代码 将在用户模式下执行.

In User mode, the executing code has no ability to directly access hardware or reference memory. Code running in user mode must delegate to system APIs to access hardware or memory. Due to the protection afforded by this sort of isolation, crashes in user mode are always recoverable. Most of the code running on your computer will execute in user mode.

了解更多

了解用户和内核模式

这篇关于用户和内核模式在操作系统中有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆