页面置换算法实现

LRU置换算法(最近最久未使用) 利用两个map,将页面和位置对应起来。 在缺页的状况下对map中的页面与对应位置进行调整便可。 #include<iostream> #include<map> #include<vector> #include<string> using namespace std; int calc(const vector<int>& vec) { map<in
相关文章
相关标签/搜索