This repository contains a list of selected code from different projects I have completed at CMU Unless otherwise noted, I contributed the majority of the code for each of these files. Most files were given to me as an outline, with key functionality either missing or naively implemented
csim.c is a simulator for a cache that implements write through and least recently used (LRU) replacement It runs a simulation when given a trace and counts the number of cache misses and hits There is also the option to specify the number of sets, blocks, and bits per block I wrote this file from scratch
mm.c implements malloc, free, calloc and realloc in C Mini-blocks, block coalescing, and free block lists are all implemented to make these functions more efficient This program was given to me as a naive implementation of malloc that just extends the heap every time malloc is called
proxy.c creates a proxy server which sends and recieves requests. Also handle concurrent requests using POSIX threads (pthreads)
sfs-disk.c is a filesystem where I implemented mutex locks in order to support safe parallel opening of files These locks are implemented to prevent race conditions, avoid deadlocks, and still run efficiently. I only implemented a a few of the functions in this file