OPT更换政策 [英] OPT Replacement Policy
本文介绍了OPT更换政策的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
总而言之,我一直在试图找出如何实现示例OPT缓存替换策略算法的方法.
基于向前看,我只是想不出如何用代码实现它.
我应该从当前调用的项目中删除距离最远的项目.
Ideas?
TIA
此内容先前已发布在C ++论坛中,然后今天早上我意识到它在错误的位置.我很抱歉.我已删除了原始发布内容,以免重复发布.
To sum it up, I''m stuck trying to figure out how to implement a sample OPT cache replacement policy algorithm.
Its based on look ahead, I just can''t figure out how to implement it in code.
I''m supposed to remove the item that will be called the farthest away from the currently called item.
Ideas?
TIA
[edit]
This had been previously posted in the C++ forum and then this morning I realized it was in the wrong place. My apologies. I have removed the original posting so as not to double post.
推荐答案
^ ]列表可能会有所帮助.一种想法是将BST用作此的基础.
Something in this[^] list might help. One thought would be to implement a BST as a base for this.
这篇关于OPT更换政策的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文