Homework #2 Solution

$30.00 $24.90


If your system does not have qemu, then type: `sudo apt-get install qemu`


+ Compile XV6 (should have been done the first week)
+ Run XV6 (should have been done the first week)
+ Gain basic understandings of how XV6 works
+ Create a user program that runs on XV6 and calls system calls
+ Document how system calls are created

Your assignment is to do the following:
1. Create a user program in XV6
2. Document how system calls are created

Create a User Program called `hw2.c` that meets the following requirements:

1. When it runs it prints out your name
2. Using the necessary system calls, the program creates a file called `tom.txt` and writes the values `1 2 3 4`

Document how system calls are created. Create a text file, called `SYSTEM_CALLS`, and save it in your Xv6 folder before you zip the folder up and post it to Canvas.

Your file must contain the following:
1. Your name
2. Your section number and the date
3. An explanation of the purpose of system calls.
4. Identification of the data structure(s) associated with system calls.
5. Identification of the files associated with system calls in XV6.
6. An explanation of how you might go about creating a System Call.

What to turn in:
– Your Xv6 folder compressed into a zip file into Canvas