# Lab2: User Programs

{% hint style="warning" %} <mark style="color:red;">**Code Due: Thursday 04/23 11:59 pm**</mark>

<mark style="color:red;">**Design Doc Due: Sunday 04/26 11:59 pm**</mark>
{% endhint %}

Now that you've worked with Pintos and are becoming familiar with its infrastructure and thread package, **it's time to start working on the parts of the system that allow running user programs.**

* **The base code already supports loading and running user programs, but no I/O or interactivity is possible.** In this project, you will enable programs to interact with the OS via system calls.
* You will be working out of the `userprog/` directory for this assignment, but you will also be interacting with almost every other part of Pintos. We will describe the relevant parts below.

**You can build project 2 on top of your project 1 submission** (dogfooding your own kernel changes like a product). Or **you can start fresh**.

<mark style="color:red;">**No code from project 1 is required for this assignment.**</mark> The "alarm clock" functionality may be useful in projects 3 and 4, but it is not strictly required.

You might find it useful to go back and reread how to run the tests (see section [Testing](https://pkuflyingpig.gitbook.io/pintos/getting-started/debug-and-test/testing)).

**Here are the sections in this chapter:**

{% content-ref url="lab2-user-programs/background" %}
[background](https://pkuflyingpig.gitbook.io/pintos/project-description/lab2-user-programs/background)
{% endcontent-ref %}

{% content-ref url="lab2-user-programs/suggestions" %}
[suggestions](https://pkuflyingpig.gitbook.io/pintos/project-description/lab2-user-programs/suggestions)
{% endcontent-ref %}

{% content-ref url="lab2-user-programs/your-tasks" %}
[your-tasks](https://pkuflyingpig.gitbook.io/pintos/project-description/lab2-user-programs/your-tasks)
{% endcontent-ref %}

{% content-ref url="lab2-user-programs/faq" %}
[faq](https://pkuflyingpig.gitbook.io/pintos/project-description/lab2-user-programs/faq)
{% endcontent-ref %}

{% content-ref url="lab2-user-programs/submission" %}
[submission](https://pkuflyingpig.gitbook.io/pintos/project-description/lab2-user-programs/submission)
{% endcontent-ref %}
