Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.01 KB

README.md

File metadata and controls

30 lines (25 loc) · 1.01 KB

DSA-HK213-Cache-implement

My 2 assignments in DSA semester 213

Student Outcomes

After completing this assignment, students will be able to

  • Assignment 1: explain how a cache works and apply BST tree to search in a simple cache
  • Assignment 2: get familiar with hash techniques, select and manipulate data structures suitable to desired needs.

Cache replacement Policies

As the size of a cache is limited, when the cache is full and a new data is inserted into the cache for future requests, an existing data in the cache must be selected by the cache replacement policy and it is removed to have place for the new data. There are many cache replacement policies, all the below policies will be used in 2 assignments:

  • FIFO (First In First Out)
  • LIFO (Last In First Out)
  • MFU (Most Frequently Used)
  • LFU (Least Frequently Used)
  • MFRU (Most Frequently Recently Used)
  • LFRU (Least Frequently Recently Used)

The results

  • Assignment 1: 100/100
  • Assignment 2: 95/100

Run testcase

To run testcase

make all