Here I'll document my favorite projects from the CS classes I've taken at USF.
CS 315 — Computer Architecture
I'll let you know after Fall 2023 :)
CS 326 — Operating Systems
Spring 2023
I've gotta admit, this class was not easy for me. I don't know how systems wizards write code with conventions in place that were conceived at a time when we wrote on 80px screens. I'd like my variable names to be longer than 5 characters, thank you.
Nevertheless, these were some of the most compelling projects at school to date, enough to pique my interest, and certainly challenging me beyond my web development and GitHub Copilot safety net.
All of these projects were built on and added to the functionality of xv6, a Unix-like teaching operating system written in C.
Heap Allocator
We implemented our own versions of the malloc()
and free()
memory management functions. The current implementation uses a singly-linked list for keeping track of free blocks of memory, whereas we used a doubly-linked list and embedded custom block headers in the heap. We also made it easier to visualize used and free blocks through a set of helper debug functions.
Shell History
Pretty much exactly what it sounds like: we added the Unix history
command to xv6, including the !<text search>
and !<number>
syntax.
Queue-Based Scheduling
xv6 uses an array-based scheduler, which in certain edge cases can lead to an unfair selection of the next process to run (an unequal time allotted to each process for running). We implemented a queue-based scheduler to address this, as well as shipped a fix to prevent excessive CPU utilization when xv6 is idle.
CS 221 — C and Systems Programming
Fall 2022
Even a year later, my classmates and I all fondly look back on how cool it was to be taught by the perspicacious Phil Peterson, who worked at Apple, Mozilla, and Netscape on foundational software that defined their products.
As an aside, I'm delighted to have Phil as the club advisor for my computer science club on campus, compsigh. :)
As challenging and new as C was, and had us appreciating Java more, this was equally one of my favorite classes to have taken.
Minimax Tic-Tac-Toe
Minimax is a popular algorithm for adversarial games — games in which two players play for two diametrically opposed outcomes. In maximizing one player's potential winning endgame, it seeks to minimize the other's.
We enhanced Minimax for Tic-Tac-Toe by applying a depth
factor: the faster the winning endgame is attainable, the better-fit a given move is.
I'm tangentially interested in game design, so this was a fun introduction to algorithms that are seen in singleplayer games.
Evaltree
For a basic introduction to compilers, we developed an abstract syntax tree (AST) to evaluate mathematical expressions. We built a tokenizer, parser, and an evaluator to break down symbols into a hierarchical structure to reflect PEMDAS, the mathematical order of operations. We utilized an EBNF (Extended Backus-Naur Form) grammar table for applying meaning to symbols. For example, distinguishing between a binary +
operand, and a unary -
operand.
ChatTCP (this is not what the project was called but it'd be way cooler if it was)
For the final project of the semester, we were tasked with building a LAN chat app in C. From polling for keyboard input, to broadcasting presence messages over UDP, to sending 1:1 messages over TCP, this project had us ready for Winter break. 😅