Link Search Menu Expand Document

Pintos source tree

The Pintos source code in is organized into the following subdirectories:

threads/

The base Pintos kernel, including the bootloader, kernel entrypoint, base interrupt handler, page allocator, subpage memory allocator, and CPU scheduler. Most of your code for Project Threads will be in this directory. You will also have to make some modifications in this directory for Project Userprog.

userprog/

Pintos user program support, including management of page/segment tables, handlers for system calls, page faults, and other traps, and the program loader. Most of your code for Project Userprog will be in this directory.

vm/

We will not use this directory.

filesys/

The Pintos file system. You will use this file system in Project Userprog and modify it in Project Filesys.

devices/

Source code for I/O device interfacing: keyboard, timer, disk, etc. You will modify the timer implementation in Project Threads.

lib/

An implementation of a subset of the C standard library. The code in this directory is compiled into both the Pintos kernel and user programs that run inside it. You can include header files from this directory using the #include <...> notation. You should not have to modify this code.

lib/kernel/

Library functions that are only included in the Pintos kernel (not the user programs). It contains implementations of some data types that you can 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/

Library functions that are included only in Pintos user programs (not the kernel). In user programs, headers in this directory can be included using the #include <...> notation.

tests/

Tests for each project. You can add extra tests, but do not modify the given tests.

examples/

Example user programs that can run on Pintos. Once you complete Project Userprog, some of these programs can run on Pintos.

misc/, utils/

These files help you run Pintos. You should not need to interact with them directly.

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.