PintOS Source Tree Overview
Once you have loaded the Docker image as described, you can inspect the source for PintOS in the directory named /src
:
Let’s take a look at what’s inside. Here’s the directory structure that you should see in /src
(do cd src; ls
to see these subdirectories and files):
threads/
Source code for the base kernel, which you will modify starting in project 1.
userprog/
Source code for the user program loader, which you will modify starting with project 2.
vm/
An almost empty directory. You will implement virtual memory here in a possible later project.
filesys/
Source code for a basic file system. You will use this file system starting with project 2, but you will not modify it until project 4.
devices/
Source code for I/O device interfacing: keyboard, timer, disk, etc. You will modify the timer implementation in project 1. Otherwise you should have no need to change this code.
lib/
An implementation of a subset of the standard C library. The code in this directory is compiled into both the PintOS kernel and, starting from project 2, user programs that run under it. In both kernel code and user programs, headers in this directory can be included using the
#include <...>
notation. You should have little need to modify this code.
lib/kernel/
Parts of the C library that are included only in the PintOS kernel. This also includes implementations of some data types that you are free to use in your kernel code: bitmaps, doubly linked lists, and hash tables. In the kernel, headers in this directory can be included using the
#include <...>
notation.
lib/user/
Parts of the C library that are included only in PintOS user programs. In user programs, headers in this directory can be included using the
#include <...>
notation.
tests/
Tests for each project. You can modify this code if it helps you test your submission, but we will replace it with the originals before we run the tests.
examples/
Example user programs for use starting with project 2.
misc/
utils/
These files may come in handy if you decide to try working with PintOS on your own machine. Otherwise, you can ignore them.
Makefile.build
Describes how to build the kernel. Modify this file if you would like to add source files. For more information, see the section on Adding Source Files.