milad@sys:~/projects$ ls -la --sort=time
Academic & Systems Projects
A selection of systems software, operating systems kernel extensions, microarchitectural benchmarks, and scientific simulation engines built with C, Rust, x86 Assembly, and Python.
Engineered an in-kernel dynamic deadlock detection subsystem for multi-threaded processes in MIT's xv6 operating system kernel, preventing circular wait deadlocks before they freeze system execution.
Key Architectural Highlights
- Active Resource Allocation Graph (RAG): Mapped and maintained an active RAG directly inside dedicated kernel memory pages, tracking both thread-to-resource acquisition (assignment edges) and pending acquisition attempts (request edges).
- Custom System Calls: Implemented
requestresource, releaseresource, and granular read/writeresource syscalls with sleep-lock synchronization channels.
- Preemptive DFS Cycle Detection: Integrated a Depth-First Search cycle-detection algorithm with recursion stack state tracking and spinlock protection. Before a thread transitions into an unrunnable wait state, the kernel checks for potential circular waits and immediately aborts hazardous acquisitions with an error code (
EDEADLK).
Comprehensive microarchitectural benchmark analyzing memory subsystem latency, cache hierarchy hit rates, and CPU execution bottlenecks under hardware virtualization vs cross-architecture dynamic binary translation.
Key Architectural Highlights
- Execution Model Comparison: Evaluated host microarchitectural behavior comparing hardware-assisted virtualization (Linux KVM on Intel VT-x) against dynamic binary translation (QEMU Tiny Code Generator: x86_64 to aarch64).
- Workload Isolation: Bound isolated vCPUs to physical CPU cores using
taskset across diverse memory-bound workloads, including non-sequential pointer chasing, cache-blocked GEMM matrix multiplication, and sysbench.
- Hardware Counter Diagnostics & FlameGraphs: Instrumented PMU performance counters via Linux
perf stat, perf record, and perf mem, generating detailed FlameGraphs to isolate SoftMMU compilation hotspots and translation block lookup bottlenecks.
A high-performance, real-time 2D Eulerian fluid simulation engine built from scratch in Rust, solving the incompressible Navier-Stokes equations with GPU-accelerated rendering and an interactive parameter debugger.
Key Architectural Highlights
- Navier-Stokes Solver: Implemented velocity advection, diffusion, and numerical pressure Poisson projection using vectorized Jacobi relaxation algorithms to enforce divergence-free velocity fields and mass conservation.
- High Frame Rates: Sustained 60+ FPS on interactive grids through memory layout optimizations and contiguous grid buffer allocation in Rust.
- Decoupled UI & Rendering: Constructed an interactive parameter tuning interface (fluid density, viscosity, vorticity confinement, color palettes) using Dear ImGui cleanly decoupled from GPU-accelerated Raylib rendering pipelines.
A vectorized simulation environment developed at the Distributed and Scalable Computation Systems Lab to model joint radio and computational resource allocation for multi-cell mobile edge computing.
Key Architectural Highlights
- Algorithmic Replication: Replicated and benchmarked edge task offloading optimization policies formulated in recent IEEE literature (Hu et al.).
- Channel & Queueing Modeling: Simulated multi-user wireless transmission interference, Rayleigh fading channels, and computation queue dynamics across heterogeneous mobile devices and edge server nodes.
- Pareto Optimization: Quantified global average task latency reduction under variable computational workloads, generating structured statistical evaluations and Pareto-optimal trade-off curves.
Three upstream pull requests authored and merged into the official uftrace runtime tracing toolkit used widely across Linux systems performance engineering.
Merged Contributions
- Sub-64-bit Argument Normalization: Fixed sign-extension normalization for sub-64-bit signed arguments in
uftrace_eval_cond(), ensuring accurate evaluation of filter predicates on 64-bit architectures.
- Negative Integer Filter Test Suite: Created automated test
t306_arg_cond3 covering negative signed argument comparisons across all conditional operators.
- Shared Memory Leak Fix: Resolved memory leak in POSIX/Android shared memory segment handling during tracing termination.