CS 61 & CS 1240
Systems programming and algorithms in C and C++.
2025 — 2026CS 61 course site
In my freshman year, I took CS61: Systems and CS1240 Data Structures and Algorithms, both courses generally taken by sophomores/juniors. Here I describe some of the projects made for the two courses.
For course security purposes, I won't be sharing the source code, but if you'd like to hear more about any of the projects feel free to reach out!
- C++
- C
- x86-64
- GDB
- QEMU
CS 61: Systems
- Memory allocator: implemented a custom memory allocator (malloc/kalloc/kfree) using C++. Includes memory coalescing and detects invalid frees, double frees and leaks, with file and line reports.
- Binary bomb: reverse-engineered an x86-64 executable in GDB.
- WeensyOS: implemented a kernel, including process isolation, page tables, fork and exit. Added additional features such as copy-on-write fork, shared/private memory allocation and sleep.
- io61: created an I/O library with caching for sequential, reverse and strided access.
- sh61: implemented a Unix shell with pipelines, redirection, conditionals, background jobs, cd and Ctrl-C.
- ftx: built a multithreaded bank database with byte-range locks for safe, deadlock-free transfers, and shared read locks.
CS 1240: Algorithms
- Minimum spanning trees: implemented Kruskal’s algorithm with union-find for random complete graphs across several distance metrics. Pruned edges above a threshold so larger graphs fit in memory.
- Matrix multiplication: implemented Strassen’s algorithm and experimentally tuned when to switch to conventional multiplication. Used the hybrid algorithm to count triangles in random graphs.
- Number partitioning: implemented heap-based Karmarkar-Karp and compared it with repeated random search, hill climbing and simulated annealing. Tested the search methods with both direct partitions and prepartitioning, which groups numbers before applying Karmarkar-Karp.