您现在的位置是:首页 > 文章详情

Linux 内核第一版 (v0.01) 开源代码解读

日期:2023-08-14点击:236

Exploring the internals of Linux v0.01》是一篇解读 Linux 内核第一版开源代码的文章。此文今天在 Reddit Hacker News 都冲上了热门。

原文:https://seiya.me/blog/reading-linux-v0.01

文章介绍道,Linux 内核首个开源版本 (v0.01) 的体积非常小,仅包含 10,239 行代码。如果除去注释和空行,只剩下 8,670 行。正因它足够小,所以方便理解,是了解类 UNIX 操作系统内核内部结构的良好起点。

部分要点 & 有趣的冷知识:

  • v0.01 总共包含 66 个 system call,如下:
     access acct alarm break brk chdir chmod chown chroot close creat dup dup2 execve exit fcntl fork fstat ftime getegid geteuid getgid getpgrp setsid getpid getppid getuid gtty ioctl kill link lock lseek mkdir mknod mount mpx nice open pause phys pipe prof ptrace read rename rmdir setgid setpgid setuid setup signal stat stime stty sync time times ulimit umask umount uname unlink ustat utime waitpid write
  • 针对 i386 进行了深度硬编码
  • Linux 内核最初的名字为"FREAX"
     # Makefile for the FREAX-kernel.
  • 5 行代码实现 Kernel panic
     volatile void panic(const char * s) { printk("Kernel panic: %s\n\r",s); for(;;); }
  • Linus 当时没有 8MB RAM 的机器
      * For those with more memory than 8 Mb - tough luck. I've * not got it, why should you :-) The source is here. Change * it. (Seriously - it shouldn't be too difficult. ...

Linux v0.01 源代码下载:https://cdn.kernel.org/pub/linux/kernel/Historic/linux-0.01.tar.gz

原文链接:https://www.oschina.net/news/253678/reading-linux-v0-01
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章