Abstract:Different from existing flash-aware buffer replacement policies that focus on the asymmetry of read and write operations, this paper addresses the “discrepancy” of the asymmetry for different flash disks which has existed for a long time. The study proposes an adaptive replacement policy (CBLRU), which assigns to each page a weighted value that combines the IO cost and the influence of pages staying in the buffer. When selecting a victim page, the one with the minimum weighted value will be selected as the victim page, thus, one can avoid the problem of occupying the valid buffer space by dirty pages that are not used for a long time. Moreover, as the cost of read and write operations will be adjusted according to different flash disks, CBLRU can wisely tune itself and adapt to different kinds of flash disks. Finally, a theorem is proposed addressing the stability of the relationship between pages, based on which CBLRU organizes all data pages into two LRU lists: one for clean pages and the other for dirty pages, and then the CPU complexity is reduced form O(klogk) to O(1). The experimental results show that compared with existing buffer-aware replacement algorithms, CBLRU is very efficient when being used for different kinds of flash disks.