CSE 451 Assignment 0

Due: Friday, April 10, 2015 11:59pm

The project is to be done in groups of 2-3. Everyone in the group should be able to answer the questions in this assignment. If you have not formed a group yet, please get started on the assignment anyway, and then compare answers and resolve any questions you may still have.

Overview

The purpose of this assignment is to introduce you to the code you will be using throughout the rest of the course. We will address significant portions of this assignment in the material in lectures and sections. Even if your answers come directly from that material, include them in what you hand in.

By the time you complete this assignment you should be able to:

What You Must Hand In

You must turn in the answers to the code-reading questions via Catalyst.

Where to Work
We officially support working on CSE Linux machines: attu and the lab Linux boxes. It is possible to work on other systems, though. One possibly attractive possibility is the CSE Linux VM, which should allow you to run in the standard environment on pretty much any physical system. Alternatively, you may be able to directly install the required software on your preferred machine, rather than using it to host a VM.

The instructions below explain how to obtain the os161 source base. You'll need the build environment as well. See Setting Up a Toolchain.

Getting Started
Setting up a Group Repository

Once you have a group, you should set up your own group repository on GitLab. If you or your groupmates have not used GitLab before, you will first need to log in so that your account is set up.

Only one of you needs to create the GitLab repository. This person should create an empty project on GitLab with an informative project name. To push the tag and the code you just pulled to this project, issue the following commands from the directory containing your os161 source code:

git remote rename origin distrib   # Rename the git repo you initially cloned from
git remote add origin git@gitlab.cs.washington.edu:yourCSID/yourProjectName.git    # The new repo you want to push to
git push -u origin master    # Push the initial commit to the GitLab repo

Then add the rest of your group members and the course instructional staff to the project. Make sure to give your fellow group members developer status and allow developers to push to the repository.

The other member(s) of each group should complete the following instructions:

Navigate to the directory containing your os161 source code and execute the following instructions:

git remote rename origin distrib   # Rename the git repo you initially cloned from
git remote add origin git@gitlab.cs.washington.edu:firstGroupMembersCSID/yourProjectName.git    # The new repo you want to use for your group
git fetch origin     # Fetch the data from the repo
git branch --set-upstream-to=origin/master    # Set group repo as the default.

Note: Setting up a group repository is not necessary for starting on the code reading questions. Start looking through the code as soon as possible.

Code Reading Questions (Hand Me In)

OS/161 is a simplified skeleton of a modern operating system. It comes with a configurable build system, code for some useful user-level utilities that can be run from within OS/161, and of course code for the operating system itself. To complete the assignments of this course, you will need to get your hands deep in the guts of the OS/161 codebase, and the sooner you become familiar with it, the better. To that end, you should look through the files and begin to internalize how the code is structured, what goes where, and how things work. This applies both to the build system and the codebase itself.

To guide you in this process, please write up and hand in answers to the questions below.

The questions are designed to encourage code exploration (we tried to avoid questions you could answer simply using grep). The goal is to help you understand key parts of the system. That said, you are not yet expected to understand everything you see (that's what the rest of the course is for!). But you should get the "gist," and your answers should reflect that. Please give function names and full pathnames in the source tree where appropriate. You don't need to explain what every last line of a function does, but your answers should be conceptually complete. Note that some questions may require longer answers than others.

Let's begin with some discussion questions:

Below is a brief overview of the organization of the source tree, and a description of what goes where.

Now that you've perused the source tree, here is the last question.

Discuss Me! Question 14: Refer to the document Using GDB and run gdb on your kernel. Experiment a bit and follow the execution from the start.S file through the main menu kmain and then to the code that executes some of the commands. Explain the control flow from start.S through the menu and on to other parts of the kernel.

Turn-in
Finally, upload a file with your answers to Catalyst. Normally we would ask you to upload a tar file of the entire directory, but we don't need that for this assignment.

Congratulations! You're done with assignment 0!