employer cover photo

Bascom-Turner Instruments

Is this your company?

Bascom-Turner Instruments interview question

Q: How did you implement LFRU Algorithm in your cache replacement policy project?

Interview Answer

Anonymous

Jun 18, 2024

C programming was used for this project. I divided the cache into two partitions: privileged and unprivileged. The privileged partition is protected and, if content is popular, it is pushed into the privileged partition. In replacing the privileged partition, LFRU evicts content from the unprivileged partition; pushes content from the privileged to the unprivileged partition, and inserts new content into the privileged partition. LRU is used for the privileged partition and an approximated LFU (ALFU) algorithm for the unprivileged partition.