<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Computer Fundamentals on Chen Kai Blog</title><link>https://www.chenk.top/zh/tags/computer-fundamentals/</link><description>Recent content in Computer Fundamentals on Chen Kai Blog</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Thu, 07 Apr 2022 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/zh/tags/computer-fundamentals/index.xml" rel="self" type="application/rss+xml"/><item><title>操作系统基础深度解析</title><link>https://www.chenk.top/zh/standalone/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%9F%BA%E7%A1%80%E6%B7%B1%E5%BA%A6%E8%A7%A3%E6%9E%90/</link><pubDate>Thu, 07 Apr 2022 09:00:00 +0000</pubDate><guid>https://www.chenk.top/zh/standalone/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%9F%BA%E7%A1%80%E6%B7%B1%E5%BA%A6%E8%A7%A3%E6%9E%90/</guid><description>&lt;p>打开一个终端，敲下 &lt;code>cat hello.txt&lt;/code>。在你按下回车的那一瞬间，发生了至少七层下钻： bash 解析命令 -&amp;gt; fork+execve 启动 cat 进程 -&amp;gt; 进程的内存被分配虚拟地址空间 -&amp;gt; cat 调用 &lt;code>read()&lt;/code> 触发 syscall -&amp;gt; CPU 切到内核态 -&amp;gt; VFS 转发到 ext4 -&amp;gt; 块层给 NVMe 排好请求 -&amp;gt; 硬件通过 DMA 把字节送回 -&amp;gt; 中断把控制权交还给 cat -&amp;gt; 字节经过页缓存复制到用户缓冲区 -&amp;gt; 屏幕上出现内容。&lt;/p></description></item></channel></rss>