Skip to content

Commit c66b1df

Browse files
authored
Replace OSTEP-projects with projects from the UW-Madison GitLab (#33)
* Introduce UW-Madison GitLab and replace filesystem project * Introduce trial projects Remove legacy projects from the project table. Move project details to project directory section. * Massive rework of projects * Fix path * Path to STCF-scheduler page does not include xv6 * Fill out mmap url in xv6 vm intro page * Replace broken anchors with urls * What the hell lol
1 parent 7551fe2 commit c66b1df

File tree

11 files changed

+141
-48
lines changed

11 files changed

+141
-48
lines changed

docs/computer-science/systems/ostep/Project-1B-initial-xv6.md renamed to docs/computer-science/systems/ostep/Initial-xv6.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# Project 1B
1+
# Intro to xv6
22

33
### all thanks to [palladian](https://github.com/palladian1)
44

5+
- [Project details](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/initial-xv6)
6+
- [Discussion](https://www.youtube.com/watch?v=vR6z2QGcoo8)
7+
58
### Linux Installation
69

710
* Make sure you have a compatible compiler toolchain; if you're on Linux, gcc should work perfectly.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Kernel Threads xv6
2+
**Note:** This project does not include any tests, and as a result we have decided to mark it as *optional*. We still believe it to be highly educational to complete this project, so we have provided instructions on how one might test their own implementation in the hints section.
3+
4+
- [Project details](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/concurrency-xv6-threads)
5+
- [Discussion](https://www.youtube.com/watch?v=G9nW9UbkT7s)
6+
7+
8+
## Hints
9+
The discussion provides some critical information about x86 calling conventions and how to manipulate the stack that you *will* need in order to complete this project.
10+
11+
The kernel stack referred to in the project description does not refer to the user stack that gets allocated on the heap. It refers to the special stack managed by the kernel to save and load the process context. What changes need to be made here in order to run the thread?
12+
13+
When a newly created process runs for the first time, it first returns to a special routine called "forkret" which releases the lock held on the process table before finally returning to the user program. The allocproc-routine takes care of setting up the process to do this. If your process does not enter forkret, then you will cause a kernel panic.
14+
15+
Remember that the user stack grows from top to bottom, and that the pointer you get from malloc points to the bottom. Make sure the sp-register points to the top.
16+
17+
As of December 2025 this project does not have any tests to verify your work, so you will have to create that yourself. We suggest the creating verification steps for the following:
18+
1. Thread implementation
19+
- Verify that the cloned actually runs the supplied function.
20+
- Verify that it shares memory with its parent
21+
- Verify that the supplied stack-address gets returned by the subsequent join
22+
- Verify that if a thread doesn't call exit, it returns to 0xffffffff, causing a kernel trap, as opposed to the function that created the thread.
23+
2. Lock
24+
- Create a race condition and verify that it actually triggers
25+
- Verify that the lock protects against the race condition
26+
27+
The thread implementation itself should be straightforward to verify as it can be done by simply setting some variables and comparing them after a join. The tricky part is the race condition. You might be tempted to recreate the multi-threaded loop-counting example from the book, however, it turns out that it can be very difficult to make that race condition trigger at all. We believe this is a quirk of running xv6 inside QEMU.
28+
29+
Instead, we recommend having a critical section of code that invokes multiple system calls. This guarantees interrupts, increasing the likelyhood of race conditions causing problems. A good candidate is printf. The xv6 implementation of printf invokes a write-syscall of a single byte for each printed character. Thus, if you use printf concurrently across multiple threads, there is a high chance that the terminal output gets garbled, unless you hold a working mutex lock for the duration of the printf-call.

docs/computer-science/systems/ostep/Scheduling-xv6-lottery.md renamed to docs/computer-science/systems/ostep/Lottery-Scheduler-xv6.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
# Scheduling xv6 Lottery
1+
# Lottery Scheduler xv6
2+
**Legacy Project:** this project has been replaced by the [STCF Scheduler](../STCF-Scheduler) project.
23

3-
## all thanks to [palladian](https://github.com/palladian1)
44

5-
### General Tips
5+
- [Project details](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/scheduling-xv6-lottery)
6+
- [Discussion](https://www.youtube.com/watch?v=eYfeOT1QYmg)
7+
8+
all thanks to [palladian](https://github.com/palladian1)
9+
10+
## General Tips
611

712
* Read chapter 9 in the OSTEP book and watch the video for discussion 5. Lottery ticket schedulers aren't discussed in the lectures, so you really do have to read the book for this one.
813

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# MapReduce
2+
**Note:** This project currently does not contain any tests. A ZIP-file containing several test cases and a makefile + example C-program to run them has been uploaded to the Discord server. At some point in the future we will get it refined and published on GitHub.
3+
- [Project details](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/concurrency-mapreduce)
4+
- [Discussion](https://youtu.be/tSiJ_oBSOZE?t=34)
5+
- [Q/A](https://www.youtube.com/watch?v=jVmWrr8y0Uw)
6+
7+
## Hints
8+
- This project is quite challenging, so don't get discouraged if you're struggling. If you find that the difficulty curve gets too steep, consider doing the [Parallel Zip](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/concurrency-pzip) project first. Use the test-files in the initial utilities zip project to check your work.
9+
- For this project it is highly advantageous to work in small increments: focus on making a correct sequential implementation first, and then think about how you can parallelize it.
10+
- The producer-consumer queue using locks and condition variables is your central data structure for parallelizing work. It is described in detail in the chapter on **Condition Variables**.
11+
- Remember to make copies of the keys and values passed to your `MR_Emit` implementation, otherwise you'll end up with a heap of garbage.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Memory Mapping xv6
2+
**Trial project**: This project is currently being tried as a replacement for the xv6 virtual memory project. If you wish to do the old project instead, click [here](../Virtual-Memory-Intro-xv6).
3+
4+
- [Project repository](https://git.doit.wisc.edu/cdis/cs/courses/cs537/fall24/public/p5)
5+
6+
## Instructions
7+
1. Git clone the project repository.
8+
2. Read the instructions provided in the README.md file.
9+
3. Implement your solution in the `solution`-directory.
10+
4. Run the `runtests.py` script located in the `tests` directory to evaluate your work.
11+
12+
### Hints
13+
- For this project you will need to have finished the **Virtual Memory** chapters of the OSTEP textbook.
14+
- Pay particular attention to the chapters on **Address Translation**, **Segmentation**, and **Paging**.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Mini-WFS
2+
3+
- [Project repository](https://git.doit.wisc.edu/cdis/cs/courses/cs537/fall25/p6/p6-base)
4+
5+
In this project you will implement a basic filesystem in userspace (FUSE) not unlike the Very Simple Filesystem described in the book.
6+
7+
## Instructions
8+
- Git clone the project repository
9+
- Follow the instructions in the README.md file.
10+
- Implement your solution in the solution directory.
11+
- Run the `run-tests.sh` script located in the `tests`-directory to check your work.
12+
13+
#### Hints
14+
- This may be the most substantial project in the entire course. It is a lot of work, but in the process you will learn not just about file systems but about the FUSE framework as well, which is used in a lot of places.
15+
- Part 1 represents roughly 90% of the work, so don't get discouraged if you've been at it for a week and you're still "only at part 1". Part 1 is "working filesystem", and that is a big deal in its own right.
16+
- Work in increments. Start with the `wfs_getattr` callback and work your way down from there. If you're in doubt about what to do next, run the tests and start with the first test-failure you encounter.
17+
- The starter files include a bunch of useful helpers that you should use:
18+
- `allocate_block`: takes a bitmap array and an array length, flips the next free bit, and returns its number. This works for both the inode and data bitmaps.
19+
- `fillin_inode`: initializes the provided inode. Use this for any newly allocated inodes.
20+
- `wfs_color_from_code`: returns a color name and ansi-espace sequences for the provided color code.
21+
- `parse_color_name`: takes a color name string and sets the `out_code` parameter to the parsed color code. BEWARE: this function returns `1` on success and ` 0` on failure. Check the return value.
22+
- The VSFS described in the Filesystem Implementation chapter has directory entries for `.` and `..` in the data blocks for each directory inode. **You should not do this. You will get test failures**. Only start allocating data blocks for the directory inode when you start adding files and directories to it.
23+
- Think about how to handle direct versus indirect blocks. How do you determine when to use one over the other. What information do you have available to determine that. Do you need some sort of transition case?
24+
- Directory inodes need certain mode bits to be set on creation, and these will not be set by the `mode` argument passed to the callback. You can set them by setting the mode field on the inode to `mode | S_IFDIR`.
25+
- The "Read test for prebuilt image" test (test 25) is likely to fail due to incompatibilities between your memory layout and theirs. Feel free to skip this test in particular.
26+
- The timestamp tests appear to be buggy and pass no matter what. You should still implement the timestamp updates.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# STCF-Scheduler xv6
2+
3+
**Trial project**: This project is currently being tried as a replacement for the xv6 lottery scheduler project. If you wish to do the old project instead, click [here](../Lottery-Scheduler-xv6).
4+
- [Project repository](https://git.doit.wisc.edu/cdis/cs/courses/cs537/fall25/p3/p3-base)
5+
6+
## Instructions
7+
- Git clone the project repository
8+
- Follow the instructions in the README.md file.
9+
- Implement your solution in the solution directory.
10+
- Run the `run-tests.sh` script located in the `tests`-directory to check your work.
11+
12+
## Hints
13+
- This project is very similar to the old [Lottery Scheduler](../Lottery-Scheduler-xv6) project.
14+
- Read the hints and watch the discussion video for that project to get an idea of how to implement this project.

docs/computer-science/systems/ostep/Project-2A-processes-shell.md renamed to docs/computer-science/systems/ostep/Unix-Shell.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# Project 2A
1+
# Unix Shell
22

33
### all thanks to [Palladian](https://github.com/palladian1/)
44

5-
- [x] Interactive mode
6-
- [x] Batch mode
7-
- [x] exit
8-
- [x] cd
9-
- [x] path
10-
- [x] Redirection
11-
- [x] Parallel commands
5+
- [Project Details](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/processes-shell)
6+
- [Discussion](https://youtu.be/76PfvXTwF04)
127

138
### Tips
149

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Unix Utilities
2+
3+
- [Project description](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/initial-utilities)
4+
- [Discussion](https://youtu.be/rgcq9x8LtGQ)
5+
6+
## Instructions
7+
1. Git clone the ostep-projects repository if you haven't already.
8+
2. Navigate to the initial-utilities directory.
9+
3. Follow the instructions in the README.md file.
10+
11+
### Hints
12+
- This project is meant as a litmus-test for your proficiency at programming in C. It covers the very basics of being able to write useful programs. If you're struggling with this assignment, it may be a sign for you to take a step back, and get some more experience with C, as things will only get harder from here on out.
13+
- If you still feel you need more C practice after completing this project, we recommend doing the [intial reverse](https://github.com/luccaflower/ostep-projects/tree/master/initial-reverse) project. But be mindful: The error messages that are needed to pass the tests are wrong! The provided text say `"error: ..."` but the tests expect `"reverse: ..."` so make sure to match the tests' expectations in your code.

docs/computer-science/systems/ostep/vm-xv6-intro.md renamed to docs/computer-science/systems/ostep/Virtual-Memory-Intro-xv6.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
2-
# Intro To xv6 Virtual Memory
1+
# Virtual Memory Intro xv6
2+
**This is a legacy project which has been replaced by the [Memory Mapping xv6 Project](../Memory-Mapping-xv6).**
33

44
Credit goes to [palladian](https://github.com/palladian1)
55

6+
- [Project details](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/vm-xv6-intro)
7+
- [Discussion 1](https://youtu.be/z6dqk6iBBRY?t=1305)
8+
- [Discussion 2](https://www.youtube.com/watch?v=WVHRaqom0y)
9+
610
### WARNING:
711

12+
813
***The project doesn't match the currently available xv6 source code, which already has this project implemented in it!***
914

1015
[palladian](https://github.com/palladian1) tracked down a different xv6 source from the Github page of a U of Wisconsin student. We had to edit the `Makefile` to find the QEMU executable correctly. We added `null.c` to the `user` folder (also edited `makefile.mk` there), which demonstrates the lack of memory safety.

0 commit comments

Comments
 (0)