TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Heavily-Commented Linux Kernel Source Code [pdf]

739 pointsby turingbookabout 6 years ago

18 comments

rstabout 6 years ago
Of possible (mostly historical) interest at this point, a similar commentary on a fairly early version of the original Unix kernel, by an Australian cs prof named John Lions -- which was very widely circulated among CS students in the &#x27;80s, despite this being technically in violation of AT&amp;T&#x27;s copyright on the book.<p>It&#x27;s availble online here: <a href="http:&#x2F;&#x2F;www.lemis.com&#x2F;grog&#x2F;Documentation&#x2F;Lions&#x2F;index.php" rel="nofollow">http:&#x2F;&#x2F;www.lemis.com&#x2F;grog&#x2F;Documentation&#x2F;Lions&#x2F;index.php</a><p>Note that the code is written in a very archaic dialect of C, and for hardware that didn&#x27;t support paging in any form (just swapping). Nevertheless, it was an important introduction for a lot of people at the time, not just to the basics of OS implementation details, but also, how to find your way around a nontrivial sized codebase.
评论 #19231297 未加载
评论 #19228818 未加载
wgerardabout 6 years ago
Hah, this is amazing! This reminds me of how I used to (and still do, sometimes) read third-party code.<p>For an OS class in college, we had to modify fork (and re-build the kernel) to track how many times a particular process had been forked (and probably some other statistics I&#x27;m forgetting at the moment).<p>I remember going through a very similar process for the first time - injecting white space below chunks of code, writing out my own comments, and then using that to figure out how to modify fork. Looking at the author&#x27;s fork.c comments gave me a feeling of nostalgia.<p>The useful part of course is going through yourself and writing your own comments, but it can be really helpful to start with something like this (and then write your own version of the comments).
Etheryteabout 6 years ago
To briefly understand just how thorough this book is with providing all of the necessary background information and context, the chapter that actually matches the book title (Kernel Code), is chapter 8 and starts on page 319.
iiccabout 6 years ago
KernelVersion 0.12<p>1117 pages<p>11.1 MB<p>&gt; The main goal of this book is to use a minimal amount of space or within a limited space to dissect the complete Linux kernel source code in order to obtain a full understanding of the basic functions and actual implementation of the operating system. To achieve a complete and profound understanding of the Linux kernel, a true understanding and introduction of the basic operating principles of the Linux operating system. This book&#x27;s readership is positioned to know the general use of Linux systems or has a certain programming basis, but it lacks the basic knowledge to read the current new kernel code and is eager to understand the working principle and actual code of the UNIX operating system kernel as soon as possible. Realize the lovers.
评论 #19227256 未加载
halfelfabout 6 years ago
Chinese reader here. When I was in college about 11 or 12 years ago, a previous version of it is considered as one of our textbooks for the Operating System course. Most assignment and homework is about to add or modify some modules into kernel 0.11.
评论 #19231545 未加载
ziroshimaabout 6 years ago
The title of the book doesn&#x27;t seem to do the content justice.
评论 #19227332 未加载
评论 #19226065 未加载
Jachabout 6 years ago
Great work. In the preface the author states<p>&gt; At present, people in China are already organizing human annotations to publish books similar to this article.<p>Maybe Chinese programmers will herald an increase in literate programming? Seems like a lot of effort could be saved in back-annotating by just starting the program as a literate one in the first place...
评论 #19228813 未加载
entelia09about 6 years ago
This is a really dumb observation, but my apartment is in the cover photo! (Vancouver BC, Canada)<p>Sorry, I got super excited!
评论 #19227480 未加载
评论 #19228788 未加载
评论 #19229924 未加载
wuxbabout 6 years ago
Many of my friend read the Chinese&#x2F;original version of it more than a decade ago. It&#x27;s a dictionary-style book. Unfortunately I never had the patient to read it.
alexitosrvabout 6 years ago
As other commenters pointed out, this seems like an excellent piece! Is not too often than a one thousands pages book catches my attention, and then after a while I notice I been reading intensely the first few pages wanting for more, and so far only has been some paragraphs about the people involved at the very beginning of Linux!.<p>It seems heavy, but rewarding.
leommooreabout 6 years ago
Super piece of work. A great way for people to see how Linux works up close. Thanks for sharing.
efiechoabout 6 years ago
I just wanted to read a few pages and save the book for later, but I ended up reading for 10 hours straight, I could not stop. Amazing.<p>You can tell the author has put so much work into this, I&#x27;m really grateful that he has released this for everyone to read.
xerxexabout 6 years ago
Unrelated: I am from Vancouver, BC and it is so coool to open a totally unrelated PDF and see a picture of your neighbourhood.
4j4yabout 6 years ago
Can someone redirect me to the section of the book where they explain how exactly kernel manages sockets, binds the port and keep tracks of bound&#x2F;allocated ports.
评论 #19233454 未加载
评论 #19229145 未加载
black-teaabout 6 years ago
I&#x27;d really like to contribute to the kernel one day. Is this work worth reading for someone like me, or is it more for historical interest?
qwsfgabout 6 years ago
Appreciate the effort but I’m sorry to say the writing is so not the best I can barely understand some of the sentence
AnyTimeTravelerabout 6 years ago
I wish there was an epub version, so I can read it on an ereader. PDF&#x27;s aren&#x27;t nice to read on mine.
评论 #19233695 未加载
linkmotifabout 6 years ago
This book looks amazing.