Skip to content

CS 61: Systems Programming and Machine Organization

Notifications You must be signed in to change notification settings

cfzimmerman/F23-CS61

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS 61: Systems Programming and Machine Organization

This is my repo for CS 61: Systems Programming and Machine Organization. It was an incredible class on every level, and I’m quite proud of my work in it.

CS 61 was taught by James Mickens in 2023, but I believe it's usually run by Eddie Kohler. In an effort to preserve the problem set directories as he intended (there’s a lot of high-quality handout code), I’ve included a description of each pset below with links to my work. They’re ordered by how cool my solution is. The numbers correspond to the order they came up in the course. Note that the header files often include some course-provided definitions as well. Usually my additions are the one or two key data structures featured in the implementation file.

4: Stdio cache

The challenge was to write a cache with the same read / write semantics as the C++ stdio cache but with better performance on at least some access patterns. Mine is an unaligned single slot cache with memory mapping where possible. It outperforms stdio by 61x on reverse piped IO, 25x on normal file 2-byte forward strides, 16x on large file reverse IO, and overall averages 6.1 times faster than stdio on the 40 representative test cases provided by the course.

5: Shell

I wrote a shell with Bash-like syntax and support for &&, ||, ;, arbitrarily-long pipelines, file redirection, and background processes. It also reaps zombie processes and is overall a fairly capable if limited tool.

6: Flockchain

In this Pset, I implemented file-range locking for multithreaded file IO. In doing so, I also wrote a threadsafe recursive shared mutex, generic queue, and lock manager. Note that the io61.cc file uses a course’s handout solution to Pset 4.

1: Memory allocator

I wrote a performant heap memory allocator with support for malloc, free, calloc, and sanitization.

3. WeensyOS

Eddie wrote an operating system for this class that I got to work with. Given the handout OS, the challenge was to add virtual memory to it (the handout code uses physical addresses). I did so, enforcing process isolation and adding a fork syscall along the way. Note that I worked within the kernel file below, but that work is not all mine:

2. Binary bomb

No code here. The challenge was to decode six passwords from an executable binary using objdump and GDB. I acquired a decent proficiency at x86 AT&T-syntax assembly in the process.

About

CS 61: Systems Programming and Machine Organization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published