Assignment 2: The Basic UNIX System Calls
Deadline: Final Code Due Tuesday, September 10, at 11:59 PM.
Before we get into assignments that modify OS/161 itself, it's a good idea to brush up on our C coding skills (in a more forgiving environment than an operating system kernel) and remember some of the basics of UNIX system calls that (in theory) you saw in CS 105 but perhaps have forgotten.
Phew!
Aww, I was hoping for some kernel hacking.
Note: Later on, you will be able to run this code on OS/161, once it works well enough.
We recommend that you run this code on the CS 134 server, but you can also run it on your own machine if you have a UNIX-like environment. If you are using Windows, you can use the Windows Subsystem for Linux (WSL) or a virtual machine.
Getting Started
The outline for what to do in the assignment is below, but before you begin work you need to set up your repository by accepting the starter code on GitHub Classroom.
Remember, this assignment is done in pairs. As usual, you should divide work equally between both members of the pair and understand all the code written by your pair. You are not required to use CS-70–style pair programming, but pair programming (or a looser style where you are both working together at the same time) may be useful for this assignment, because the units of work are small and overlap somewhat. If you're unfamiliar with UNIX at the system-call level, being able to confer will be very useful.
Before You Accept the Starter Code
Decide on a name for your pair. Although GitHub Classroom gives you the flexibility to choose any name, it's best to just use your first names separated by a hyphen to make it easier for course staff to find your repository if we need to. So, for example, if Sidney Smith and Chipahua Xocoyotzin are working together, they might call their pair
sidney-chipahua, or,chipahua-sidney.
Accepting the Starter Code
Both team members should click the button below to accept the assignment:
- The first person will create the new group for your pair and accept the starter code.
- The second person will find the newly created group in the list of groups and join it to accept the starter code.
- The second person needs to be logged into GitHub as themselves (not as the first person) to do this. It may be easiest to do this on a different device, browser, or in a private browsing window.
Click the button below to get started:
Outline
For both these parts, as in CS 70, the elegance and simplicity of your code matters—your code should never produce warnings when compiled. Unlike CS 70, your code is C, not C++.
A Makefile is provided, and you can type make (or bmake) to build the code (which is currently mostly stubs). You can also type make clean to remove the compiled files.
(When logged in, completion status appears here.)