About this question

Userfaultfd Lazy Page Loading

Hard · systems · Quant Developer interview question · systems, lru-cache, c++, memory-management

Quantitative backtesting engines often process terabytes of historical tick data where loading the entire dataset into memory is computationally infeasible. Modern systems utilize memory-mapped files and mechanisms like userfaultfd to lazily load data pages on demand, evicting stale pages when memory limits are reached. Task Implement a simulator for a lazy page loader using a Least Recently Used (LRU) eviction policy. You must complete the LazyDataLoader class, which is initialized with p_size