Skip to content

Commit 18e0fb6

Browse files
qimcisclaude
andcommitted
Add CS537 Spring 2018 xv6 threads lab
Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent a1780ed commit 18e0fb6

File tree

8 files changed

+1031
-0
lines changed

8 files changed

+1031
-0
lines changed

benchmarks/courselab_bench/data/courses.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
"institution": "Demo University",
77
"year": 2024,
88
"num_tasks": 1
9+
},
10+
{
11+
"course_id": "cs537-projects-spring-2018",
12+
"name": "UW-Madison CS537: Operating Systems",
13+
"institution": "UW-Madison",
14+
"year": 2018,
15+
"num_tasks": 1
916
}
1017
]
1118
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM ubuntu:20.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt-get update && \
6+
apt-get install -y git make gawk expect qemu-system-x86 gcc-multilib libc6-dev-i386 && \
7+
rm -rf /var/lib/apt/lists/*
8+
9+
WORKDIR /workspace
10+
11+
RUN git clone https://github.com/remzi-arpacidusseau/ostep-projects.git && \
12+
cd ostep-projects && \
13+
git checkout 76cff3f89f4bf337af6e02e53a831b7eeb1396df && \
14+
rm -rf .git && \
15+
cd concurrency-xv6-threads && \
16+
git clone https://github.com/mit-pdos/xv6-public.git src && \
17+
cd src && \
18+
git checkout eeb7b415dbcb12cc362d0783e41c3d1f44066b17 && \
19+
rm -rf .git
20+
21+
# Remove any reference-solution directories
22+
RUN rm -rf /workspace/ostep-projects/concurrency-xv6-threads/xv6-src-clean \
23+
/workspace/ostep-projects/concurrency-xv6-threads/xv6-src-mod \
24+
/workspace/ostep-projects/concurrency-xv6-threads/src/xv6-src-clean \
25+
/workspace/ostep-projects/concurrency-xv6-threads/src/xv6-src-mod
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
default:
3+
image: ghcr.io/qimcis/courselab-cs537-xv6-threads:latest
4+
command: sleep infinity
5+
working_dir: /workspace
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"instance_id": "cs537-projects-spring-2018__concurrency_xv6_threads",
3+
"course_id": "cs537-projects-spring-2018",
4+
"timeout_minutes": 45,
5+
"tags": ["operating-systems", "xv6", "threads", "concurrency", "kernel"],
6+
"artifacts": [
7+
"ostep-projects/concurrency-xv6-threads/src/proc.c",
8+
"ostep-projects/concurrency-xv6-threads/src/sysproc.c",
9+
"ostep-projects/concurrency-xv6-threads/src/syscall.c",
10+
"ostep-projects/concurrency-xv6-threads/src/syscall.h",
11+
"ostep-projects/concurrency-xv6-threads/src/usys.S",
12+
"ostep-projects/concurrency-xv6-threads/src/user.h",
13+
"ostep-projects/concurrency-xv6-threads/src/ulib.c"
14+
]
15+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
echo "=== Evaluation ==="
5+
6+
cd /workspace/ostep-projects/concurrency-xv6-threads
7+
8+
echo "Verifying protected files were not modified"
9+
if [ -f /tmp/checksums/protected.sha256 ]; then
10+
sha256sum -c /tmp/checksums/protected.sha256 || {
11+
echo "FAIL: Protected files were modified"
12+
exit 1
13+
}
14+
fi
15+
echo "All protected files unchanged"
16+
17+
echo "Running xv6 tests"
18+
if ! timeout 1200 ../tester/run-tests.sh; then
19+
echo "FAIL: xv6 tests failed"
20+
exit 1
21+
fi
22+
23+
echo "PASS: All tests passed"
24+
exit 0

0 commit comments

Comments
 (0)