| In Interlaced Magnetic Recording(IMR)disk,the top(narrower)and bottom(wider)tracks are interleaved,so each bottom track partially overlaps two adjacent top tracks.The top track can be updated in place without write amplification,but if the top track already contains valid data,updating the data on the bottom track requires first copying the data on two adjacent top tracks,and then updating the bottom track,and finally write back the data.This phenomenon of requiring additional write operations is called write amplification and can seriously deplete the overall performance of the disk.So how to effectively alleviate the write amplification problem in the IMR disk is still an urgent technical problem to be solved.Firstly,the impact of cache replacement algorithm on write amplification of IMR disk is studied in depth,and the relationship between cache replacement algorithm and IMR disk performance is explored.Based on the traditional Least Recently Used(LRU)algorithm,an LRU cache replacement algorithm based on write amplification weight and an LRU replacement algorithm based on probability culling are designed and implemented,to relieve the underlying write amplification problem of IMR disks when they are updated.On this basis,further considering the data access time interval,access frequency and write amplification characteristics,based on the classic Adjustable Replacement Cache(ARC)algorithm,a ARC cache replacement algorithm based on write amplification weight is designed and implemented.A write amplification flag is added to data in the cache.When the data is replaced,data with a smaller value of the write amplification flag will be eliminated first,and the length of the linked list will be adjusted adaptively.The relevant experimental verification is carried out by using the simulation simulator,and the experimental results show that the comprehensive performance of the three algorithms designed and implemented is better than the traditional LRU algorithm,the ARC algorithm and the newer Top Buffer algorithm.The write amplification overhead of the PBLRU algorithm is reduced by an average of 25.49%,and the write amplification overhead of the WA-ARC algorithm is reduced by an average of 27.95%,while the hit rate of the WAARC algorithm is increased by an average of 18.03%,and the optimization effect is obvious. |