Labs are designed to improve your computer science skills and knowledge. The labs are a learn by doing component of our course and involve significant programming.
We have two types of labs. The majority of our labs are Xv6-based Labs. These labs are completed by adding code to Xv6, building, running, and testing your Xv6 code. We have a few Linux-based Labs. These labs are completed by creating standalone C programs that run on Linux.
Lab Questions
Most of our labs have questions that you must answer. Questions are in boxes (like this) with a light orange background.
$ echo > answers-util.txt $ echo 8 > time.txt
Each lab has two Canvas assignments in which you submit your lab material.
The Zip file contains the source code, Makefile, etc., of your lab. The Zip file is submitted in the lab's Zip File Assignment on Canvas.
The following image shows Ken Thompson (sitting) and Dennis Ritchie using a PDP-11 computer. They began Unix development on a PDP-7, which had 8K, 18-bit words of memory. After a few years, they continued development of Unix on a PDP-11. The orange lines encircle tapes that would have been used to backup code in an archive.
The text file contains your reflections and a copy/paste of you building, running, and testing the programming problems associated with the lab. The text file name shall be for example, lab-util-handin.txt, where util is the name of the lab. The text file is the same for both Xv6 and Linux labs. The text file is submitted in the lab's Text File Assignment on Canvas. The text file shall be neatly organized items in the following order.
I have completed 100% of the problems.
Name: Gusty Cooper Hours Spent: 7 Questions: I have handwritten 100% of the questions and answers in my notebook. Assessment: I have completed 100% of the problems. 1. I understand the Xv6 API. 2. I learned that fork() creates child process that is an identical copy of the parent. 3. I learned that exec() runs a program located on the disk. 4. I learned that exec() overwrites the calling process with the program that is executed. 5. I learned that pipe() returns two file descriptors. 6. I learned that a file descriptor is a small integer that can be used with read() and write(). 7. ... more if you learned more ... Collaboration: I worked with Susan and Bobby to answer the questions. Susan was especially helpful. I help Matilda with her programming problems. I easily completed mine and Matilda needed some help. ecooper@cpsc:~/xv6-labs$ make clean rm -f *.tex *.dvi *.idx *.aux *.log *.ind *.ilg xv6.out* \ */*.o */*.d */*.asm */*.sym \ user/initcode user/initcode.out kernel/kernel fs.img \ mkfs/mkfs .gdbinit \ user/usys.S \ user/_cat user/_echo user/_forktest user/_grep user/_init user/_kill user/_ln user/_ls user/_mkdir user/_rm user/_sh user/_stressfs user/_usertests user/_grind user/_wc user/_zombie user/_hashprog \ ph barrier ecooper@cpsc:~/xv6-labs$ make qemu riscv64-linux-gnu-gcc -c -o kernel/entry.o kernel/entry.S riscv64-linux-gnu-gcc -Wall -Werror -O -fno-omit-frame-pointer -ggdb -gdwarf-2 -DSOL_RISCV -DLAB_RISCV -MD -mcmodel=medany -ffreestanding -fno-common -nostdlib -mno-relax -I. -fno-stack-protector -fno-pie -no-pie -c -o kernel/kalloc.o kernel/kalloc.c riscv64-linux-gnu-gcc -Wall -Werror -O -fno-omit-frame-pointer -ggdb -gdwarf-2 -DSOL_RISCV -DLAB_RISCV -MD -mcmodel=medany -ffreestanding -fno-common -nostdlib -mno-relax -I. -fno-stack-protector -fno-pie -no-pie -c -o kernel/string.o kernel/string.c ... more printout ... riscv64-linux-gnu-ld -z max-page-size=4096 -T user/user.ld -o user/_hashprog user/hashprog.o user/ulib.o user/usys.o user/printf.o user/umalloc.o riscv64-linux-gnu-objdump -S user/_hashprog > user/hashprog.asm riscv64-linux-gnu-objdump -t user/_hashprog | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$/d' > user/hashprog.sym mkfs/mkfs fs.img README user/_cat user/_echo user/_forktest user/_grep user/_init user/_kill user/_ln user/_ls user/_mkdir user/_rm user/_sh user/_stressfs user/_usertests user/_grind user/_wc user/_zombie user/_hashprog nmeta 46 (boot, super, log blocks 30 inode blocks 13, bitmap blocks 1) blocks 1954 total 2000 balloc: first 784 blocks have been allocated balloc: write bitmap block at sector 45 qemu-system-riscv64 -machine virt -bios none -kernel kernel/kernel -m 128M -smp 3 -nographic -global virtio-mmio.force-legacy=false -drive file=fs.img,if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 xv6 kernel is booting hart 2 starting hart 1 starting init: starting sh $ show your running and testing here ... more ... more ... more ... ... more ... more ... more ... ... more ... more ... more ...
Questions or comments regarding CPSC 405? Send e-mail to Gusty at ecooper@umw.edu.
Top // CPSC 405 home // Last updated 8-Aug-2024 13:30 EST