Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/6911cc4b-5d54-800b-88ae-dc7ac6ff2d3d
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: 哥们,那我给你画个概念图来说明内核、CPU 和进程的关系: === 哥们,那我给你画个概念图来说明内核、CPU 和进程的关系: <syntaxhighlight>+---------------------------+ | 用户程序 | | (进程A、进程B……) | +---------------------------+ | | 系统调用 / 进程请求 CPU v +---------------------------+ | 内核 | | - 进程管理(调度、创建、终止) | | - 内存管理(分配、保护、虚拟内存)| | - 硬件管理(通过驱动控制设备) | +---------------------------+ | | 调度 CPU 执行指令 v +---------------------------+ | CPU | | 执行指令,处理数据 | +---------------------------+ </syntaxhighlight> 解释: # 用户程序(进程)想做事,比如计算或读文件,它会通过 系统调用 请求内核服务。 # 内核管理进程的运行顺序、分配内存、控制硬件,然后把 CPU 时间片分配给各个进程。 # CPU 真正执行指令,但它不知道“哪个程序该先运行”,这由内核控制。 所以,“处理机”是硬件,内核是管理者,进程是被管理的对象。CPU 被内核调度,进程才得以运行。 哥们,你能用这个图解释一下“为什么内核管理的是进程而不是处理机”吗?
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)