Language(s): C, x86 assembly
A multi-threaded uniprocessor kernel written from scratch for x86 architecture. The implementation includes drivers for timer, keyboard and CRTC console. Also includes synchronization primitives like mutexes, conditional variables and semaphores. Supports 25 system calls including the core - fork, thread_fork, exec, wait and vanish. The virtual memory implementation supports zero-fill-on-demand (ZFOD) for performance. Extended to support hosting guest kernels using paravirtualization. Tested and debugged using Intel Simics simulator.
Language(s): Rust
A compiler for C0, an unambiguous and memory-safe subset of the C language designed at Carnegie Mellon University. The implementation involves lexing, parsing and elaboration, type and scope checking, intermediate representations, instruction selection and conversion to x86 assembly and LLVM IR, with various compiler optimizations. Used Rust to architect and implement the entire project.
Language(s): CUDA C++
This project includes the implementation of three versions of a smoothed-particle hydrodynamics (SPH) fluid simulation in CUDA, each using a different spatial data structure to accelerate the neighbor search step. The project includes various CUDA-specific optimizations on top of some of these base implementations, utilizing shared memory and precomputed values in constant memory for additional performance. The fastest version is able to render one million particles at approximately 66 frames per second. The simulator can be run with an OpenGL visualizer which renders the position of every particle at each timestep.
For more information on this project, including implementation details of the versions and results, click here.
Language(s): C, ARMv7 assembly
A full-fledged kernel on Cortex M4 microprocessor using ARMv7 assembly and C, capable of multi-threading and context-switching, task scheduling and synchronization using Original Priority Ceiling Protocol ([O]PCP).
More details on implemented components:
Language(s): C++, WebAssembly (WASM), x86 assembly
A virtual machine runtime for WebAssembly, supporting interpretation of a subset of WASM opcodes. Devised a custom ABI for Just-in-time (JIT) compilation of WASM bytecode and native x86-64 assembly execution. Also supported dynamic profiling for the runtime using probes (cache, memory and instruction profiling).
Language(s): C
Implemented reliability and in-order byte stream abstraction over UDP sockets. Implemented 3-way handshake, windowing, and Reno-based congestion control, supporting fast recovery and out-of-order packet handling from scratch. Ran experiments under varying network conditions (bandwidth and delay) to transfer files of varying sizes, and observed sawtooth graph for the congestion window.
Language(s): Go
RAFT is a consensus algorithm used for log consistency and fault tolerance in a distributed system of a given size. The project implements the algorithm as discussed in the extended research paper, “In search of an Understandable Consensus Algorithm”. The project implements leader elections, log consistency, and handles various failure scenarios - which include, but are not limited to, faulty or failed leaders, network partitions and delays, and node recovery after failure. Uses a generic RPC library under-the-hood (remote
), which was also implemented from scratch using go reflection.
Language(s): C
Implemented Multi-Threaded web proxy server that handles concurrent clients and services HTTP/1.0 requests for static web pages. Added LRU caching to handle repeated requests to web objects faster.
Language(s): C
Implemented a likeness of C’s dynamic memory allocator (malloc), managing free blocks using segregated lists and supporting coalescing, block splitting and encoded mini blocks for efficient memory utilization, and greater throughput.
Language(s): C
Implemented a shell capable of foreground and background job handling using Signal handlers and process system calls (fork(), execve() etc.).
Signals: SIGCHLD, SIGINT, SIGSTP
Language: C
Implemented HTTP 1.1 text-based protocol with pipe-lining and persistent connections.
Language: C
Implemented packet mixer with Spanning tree protocol (STP) and link state algorithm using Dijkstra’s shortest path algorithm, supporting route randomization.