> For the complete documentation index, see [llms.txt](https://pkuflyingpig.gitbook.io/pintos/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pkuflyingpig.gitbook.io/pintos/project-description/lab2-user-programs.md).

# 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](/pintos/getting-started/debug-and-test/testing.md)).

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

{% content-ref url="/pages/DKhuX3lFcBoi8BlyHvjJ" %}
[Background](/pintos/project-description/lab2-user-programs/background.md)
{% endcontent-ref %}

{% content-ref url="/pages/saSfIsdmf7vR5BA6sLDS" %}
[Suggestions](/pintos/project-description/lab2-user-programs/suggestions.md)
{% endcontent-ref %}

{% content-ref url="/pages/RybsjZfOpDC7fKeXjH9H" %}
[Your Tasks](/pintos/project-description/lab2-user-programs/your-tasks.md)
{% endcontent-ref %}

{% content-ref url="/pages/Vgfo09fEfK1RTv3HAHcV" %}
[FAQ](/pintos/project-description/lab2-user-programs/faq.md)
{% endcontent-ref %}

{% content-ref url="/pages/kdGG8qvHpv6wVI3fydqm" %}
[Submission](/pintos/project-description/lab2-user-programs/submission.md)
{% endcontent-ref %}
