Interpretation of the first version of the Linux kernel (v0.01) open source code

" Exploring the internals of Linux v0.01 " is an article explaining the first version of the open source code of the Linux kernel. This post is trending today on both Reddit and Hacker News .

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

According to the article, the first open source version of the Linux kernel (v0.01) is very small, containing only 10,239 lines of code. If comments and blank lines are removed, only 8,670 lines remain. Because it's small enough to understand, it's a good starting point for understanding the internals of a UNIX-like operating system kernel.

Some key points & interesting tidbits:

  • v0.01 contains a total of 66 system calls , as follows:
    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
  • Deep hardcoded for i386
  • The original name of the Linux kernel was "FREAX"
    # Makefile for the FREAX-kernel.
  • 5 lines of code to implement Kernel panic
    volatile void panic(const char * s)
    {
    	printk("Kernel panic: %s\n\r",s);
    	for(;;);
    }
  • Linus did not have a machine with 8MB RAM at the time
     * 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 source code download: https://cdn.kernel.org/pub/linux/kernel/Historic/linux-0.01.tar.gz

Guess you like

Origin www.oschina.net/news/253678/reading-linux-v0-01