Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


This repository records the code I wrote while reading the book Operating System Principles, Implementation and Practice (ISBN: 978-7-04-049245-3).

The textbook designs eight small labs, which are code assignments in the operating system course for undergraduates at HIT. Topics include booting process; interrupts; peripherals and drivers; file system; system calls; context switches; process scheduling; virtual memory and memory management; inter-process communication, etc.

Linux 0.11, a free minix-like kernel for 386-AT written by Linus Torvalds, is used to illustrate these topics.

Directory Structure (oslab/): Linux 0.11 code and tools we needed to set up the development environment, such as Bochs 2.3.7 and GCC 3.4.

tmp/: Temporary files (mostly files about threads) which are not relevant to the labs.

Lab 6.Ext. Print paging status/: An interesting lab I designed.

The other eight directories correspond to the labs, each containing changed files and a markdown document which illustrates the lab.

You can use tools like rsync and cp to modify the original oslab . For example, on my computer, I start the hacked Linux 0.11 of Lab6.Ext on Bochs with following bash commands:

qiuhaoli@VM:~/tmp/oslab$ rsync -a ../Hack-Linux-0.11/Lab\ 6.Ext.\ Print\ paging\ status/linux-0.11/ ./linux-0.11/

qiuhaoli@VM:~/tmp/oslab$ sudo ./mount-hdc 

qiuhaoli@VM:~/tmp/oslab$ cd ./hdc/usr/include/

qiuhaoli@VM:~/tmp/oslab/hdc/usr/include$ sudo cp ../../../../Hack-Linux-0.11/Lab\ 6.Ext.\ Print\ paging\ status/hdc/usr/include/* .

qiuhaoli@VM:~/tmp/oslab/hdc/usr/include$ cd ../../..

qiuhaoli@VM:~/tmp/oslab$ cd linux-0.11/

qiuhaoli@VM:~/tmp/oslab/linux-0.11$ make && ../run


Sunner and students at HIT provided most of the resources to set up the development environment, especially the guides to code and debug. You can get them on and (written in Chinese). has provided many helpful materials related to the ancient Linux.

The Linux 0.11 kernel is supported by system software and libraries, many of which are provided by the GNU Project and the MINIX operating system.


Ancient OS labs.







No releases published


No packages published