TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A small trail through the Linux kernel (2001)

61 点作者 mmorearty大约 6 年前

2 条评论

andyjpb大约 6 年前
That&#x27;s great!<p>If you&#x27;re interested in more detail about how a VFS (Virtual File System; the bit where it finds the file and then finds the data in the file) works, Chapter 17 (Another Level of Indirection) in Beautiful Code (<a href="http:&#x2F;&#x2F;shop.oreilly.com&#x2F;product&#x2F;9780596510046.do" rel="nofollow">http:&#x2F;&#x2F;shop.oreilly.com&#x2F;product&#x2F;9780596510046.do</a> ) is well worth a read.<p>It explains how the VFS in FreeBSD works. How disks, partitions, volumes, filesystems, offsets, etc all get orchestrated together so that the Unix &quot;single directory hierarchy&quot; abstraction works as intended even tho&#x27; the actual data may be spread around a number of locations (both local and remote).<p>The concepts and ideas are largely applicable to other Unixes and Unix-like operating systems.<p>It&#x27;s also a great example of how elegantly one can express polymorphic code, even in plain C.
mmorearty大约 6 年前
I stumbled across this, and it&#x27;s nice. It&#x27;s a very straightforward walkthrough of what happens when a small program calls open() and then read().<p>If you look up today&#x27;s Linux source code, the code has of course evolved and is a bit more complex, but not a lot more. The nice thing about the 2001 code is that it&#x27;s still dead-simple.