实验 请求调页存储管理方式的模拟

1、实验目的

通过对页面、页表、地址转换和页面置换过程的模拟,加深对请求调页系统的原理和实现过程的理解。

2、实验内容

  1. 假设每个页面中可存放10条指令,分配给一作业的内存块数为4。
  2. 用C语言模拟一作业的执行过程。该作业共有320条指令,即它的地址空间为32页,目前它的所有页都还未调入内存。在模拟过程中,如果所访问的指令已经在内存中,则显示其物理地址,并转下一条指令。如果所访问的指令还未装入内存,则发生缺页,此时需记录缺页的次数,并将相应页调入内存。如果4个内存块中均已装入该作业,则需进行页面置换。最后显示其物理地址,并转下一条指令。在所有320条指令执行完毕后,请计算并显示作业运行过程中发生的缺页率。
  3. 置换算法:请分别考虑OPT、FIFO和LRU算法。
  4. 作业中指令的访问次序按下述原则生成:

• 50%的指令是顺序执行的。
• 25%的指令是均匀分布在前地址部分。
• 25%的指令时均匀分布在后地址部分。

具体的实施办法是:

① 在[0,319]之间随机选取一条起始执行指令,其序号为m;
② 顺序执行下一条指令,即序号为m+1的指令;
③ 通过随机数,跳转到前地址部分[0,m-1]中的某条指令处,其序号为m1;
④ 顺序执行下一条指令,即序号为m1+1的指令;
⑤ 通过随机数,跳转到后地址部分[m1+2,319]中的某条指令处,其序号为m2;
⑥ 顺序执行下一条指令,即序号为m2+1的指令;
⑦ 重复跳转到前地址部分、顺序执行、跳转到后地址部分、顺序执行的过程,直至执行320条指令。

实验代码

#include <iostream>
#include <vector>
#include <map>
#include <random>
#include <ctime>
#include <iomanip>
#include <queue>
#include <stack>
using std::cout;
using std::endl;
#define show_progress
const int max_ins_num = 320;
const int ins_per_mb = 10;
const int mem_max_mb = 4;

int cur_clock = 0;
const int total_mb = max_ins_num/ins_per_mb;

int get_inst_i(int min, int max) {
    static std::default_random_engine engine(time(nullptr));
    //std::uniform_int_distribution<int>distribution(min, max);
    return engine() %(max - min + 1) + min;
}
#define chart_head std::left << std::setw(len+1) << std::setfill('-') << ""
#define chart_cell "|" << std::left << std::setw(len) << std::setfill(' ')
void show_chart(std::queue<int> fifo, std::stack<int> lru, const std::vector<int>& opt, int ins, int block) {
    std::cout << "cur_ins = " << ins << "\ncur_block = " << block << std::endl;
    int len = 5;
    std::cout
            << chart_head << "" << chart_head << "" << chart_head << "-" << std::endl
            << chart_cell << "fifo"
            << chart_cell<< "lru"
            << chart_cell << "opt" << "|" << std::endl
            << chart_head << "" << chart_head << "" << chart_head << "-" << std::endl;
    for (int i = 0; i < mem_max_mb; ++i) {
        int lru_cout = -1;
        int fifo_cout = -1;
        if (!fifo.empty()) {
            fifo_cout = fifo.front();
            fifo.pop();
        }
        if (!lru.empty()) {
            lru_cout = lru.top();
            lru.pop();
        }
        std::cout
            << chart_cell << fifo_cout
            << chart_cell << lru_cout
            << chart_cell << opt[i] << "|" << std::endl;
    }
    std::cout << chart_head << "" << chart_head << "" << chart_head << "-" << std::endl;
}
int fifo_exchange = 0;
int lru_exchange = 0;
int opt_exchange = 0;

void exe_inst_i(int ins, const std::vector<int>& ins_arr) {

    static std::queue<int> fifo_mem_blocks;
    static std::vector<bool> fifo_map(total_mb, false);

    static std::stack<int> lru_mem_blocks;
    static std::vector<bool> lru_map(total_mb, false);

    static std::vector<int> opt_mem_blocks(mem_max_mb, -1);
    static std::vector<int> opt_map(total_mb, max_ins_num);

    int cur_ins = ins;
    int cur_block = ins/ins_per_mb;
    //fifo
    if(!fifo_map[cur_block]) {
        if (fifo_mem_blocks.size() >= mem_max_mb) {
            fifo_map[fifo_mem_blocks.front()] = false;
            fifo_mem_blocks.pop();
            fifo_exchange++;
        }
        fifo_mem_blocks.push(cur_block);
        fifo_map[cur_block] = true;
    } else {
    }
    // lru
    std::stack<int> lru_temp;
    if (!lru_map[cur_block]) {
        while (!lru_mem_blocks.empty()) {
            lru_temp.push(lru_mem_blocks.top());
            lru_mem_blocks.pop();
        }
        if (lru_temp.size() >= mem_max_mb) {
            lru_map[lru_temp.top()] = false;
            lru_temp.pop();
            lru_exchange++;
        }
        lru_map[cur_block] = true;
        while (!lru_temp.empty()) {
            lru_mem_blocks.push(lru_temp.top());
            lru_temp.pop();
        }
        lru_mem_blocks.push(cur_block);
    } else {
        while (lru_mem_blocks.top() != cur_block) {
            lru_temp.push(lru_mem_blocks.top());
            lru_mem_blocks.pop();
        }
        lru_mem_blocks.pop();
        while (!lru_temp.empty()) {
            lru_mem_blocks.push(lru_temp.top());
            lru_temp.pop();
        }
        lru_mem_blocks.push(cur_block);
    }
    //opt
    for (int i = cur_clock; i < max_ins_num; i++) {
        int block_i = ins_arr[i]/ins_per_mb;
        opt_map[block_i] = opt_map[block_i] < i ? opt_map[block_i] : i;
        //设置opt=从clock开始,某个块儿第一次出现的位置
    }
    static int opt_num = 0;
    int opt_exchange_i = 0;
    for (int i = 0; i < mem_max_mb; ++i) {
        if (opt_mem_blocks[i] == cur_block || opt_mem_blocks[i] == -1) {
            opt_exchange_i = i;
            // 需要的块儿已经在里面了,停止
            break;
        }// 如果不在里面,分支不会执行,可以找到最远被访问的最佳替换
        if (opt_map[opt_mem_blocks[i]] > opt_map[opt_mem_blocks[opt_exchange_i]]) { //这里opt_exchange_i 和 i等价的,少套用了一层
            opt_exchange_i = i;
        }
    }
    if (opt_mem_blocks[opt_exchange_i] == -1) {
        opt_mem_blocks[opt_num] = cur_block;
        opt_num++;
    } else if (opt_mem_blocks[opt_exchange_i] != cur_block) {
        opt_mem_blocks[opt_exchange_i] = cur_block;
        opt_exchange++;
    }
    //opt_map[cur_block] = max_ins_num;
    for (int i = 0; i < total_mb; i++) {
        opt_map[i] = max_ins_num;
    }
    //执行过的块儿置为最大值,意为再也不用(可能)
#ifdef show_progress
    show_chart(fifo_mem_blocks, lru_mem_blocks, opt_mem_blocks, cur_ins, cur_block);
#endif
}

void show_info(int fifo, int lru, int opt) {
    int len = int(std::string("miss_ratio").length()+1);
    std::cout
            << chart_head << "" << chart_head << "" << chart_head << "" << chart_head << "-" << std::endl
            << chart_cell << "item"
            << chart_cell << "fifo"
            << chart_cell<< "lru"
            << chart_cell << "opt" << "|" << std::endl
            << chart_head << "" << chart_head << "" << chart_head << "" << chart_head << "-" << std::endl
            << chart_cell << "hit"
            << chart_cell << max_ins_num-fifo
            << chart_cell << max_ins_num-lru
            << chart_cell << max_ins_num-opt << "|" << std::endl
            << chart_cell << "hit_ratio"
            << chart_cell << (1-fifo/(double)max_ins_num)*100
            << chart_cell << (1-lru/(double)max_ins_num)*100
            << chart_cell << (1-opt/(double)max_ins_num)*100 << "|" << std::endl
            << chart_cell << "miss"
            << chart_cell << fifo
            << chart_cell << lru
            << chart_cell << opt << "|" << std::endl
            << chart_cell << "miss_ratio"
            << chart_cell << fifo/(double)max_ins_num*100
            << chart_cell << lru/(double)max_ins_num*100
            << chart_cell << opt/(double)max_ins_num*100 << "|" << std::endl
            << chart_head << "" << chart_head << "" << chart_head << "" << chart_head << "-" << std::endl;
}

int main() {

    std::vector<int> ins_arr(max_ins_num,0);
    int ins;
    for(int i = 0; i < max_ins_num; i++) {
        if (i%6 == 0) {
            ins = get_inst_i(0,max_ins_num-1);
            ins_arr[i] = ins;
        } else if (i%6 == 1 || i%6 == 3 || i%6 == 5) {
            ins_arr[i] = ins_arr[i-1] + 1 < max_ins_num ? ins_arr[i-1] + 1 : max_ins_num-1;
        } else if (i%6 == 2){
            ins = get_inst_i(0, ins - 1 > 0 ? ins - 1 : 1);
            ins_arr[i] = ins;
        } else if (i%6 == 4) {
            ins =  get_inst_i(ins + 2 > max_ins_num-2 ? max_ins_num-2 : ins+2, max_ins_num-1);
            ins_arr[i] = ins;
        }
    }
    for (cur_clock = 0; cur_clock < max_ins_num; ++cur_clock) {
        exe_inst_i(ins_arr[cur_clock], ins_arr);
    }
    show_info(fifo_exchange, lru_exchange, opt_exchange);
    return 0;
}

运行结果

cur_ins = 222
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|22   |22   |22   |
|-1   |-1   |-1   |
|-1   |-1   |-1   |
|-1   |-1   |-1   |
-------------------
cur_ins = 223
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|22   |22   |22   |
|-1   |-1   |-1   |
|-1   |-1   |-1   |
|-1   |-1   |-1   |
-------------------
cur_ins = 179
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|22   |17   |22   |
|17   |22   |17   |
|-1   |-1   |-1   |
|-1   |-1   |-1   |
-------------------
cur_ins = 180
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|22   |18   |22   |
|17   |17   |17   |
|18   |22   |18   |
|-1   |-1   |-1   |
-------------------
cur_ins = 255
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|22   |25   |22   |
|17   |18   |17   |
|18   |17   |18   |
|25   |22   |25   |
-------------------
cur_ins = 256
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|22   |25   |22   |
|17   |18   |17   |
|18   |17   |18   |
|25   |22   |25   |
-------------------
cur_ins = 312
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|17   |31   |22   |
|18   |25   |31   |
|25   |18   |18   |
|31   |17   |25   |
-------------------
cur_ins = 313
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|17   |31   |22   |
|18   |25   |31   |
|25   |18   |18   |
|31   |17   |25   |
-------------------
cur_ins = 17
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|18   |1    |22   |
|25   |31   |1    |
|31   |25   |18   |
|1    |18   |25   |
-------------------
cur_ins = 18
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|18   |1    |22   |
|25   |31   |1    |
|31   |25   |18   |
|1    |18   |25   |
-------------------
cur_ins = 232
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|25   |23   |22   |
|31   |1    |1    |
|1    |31   |23   |
|23   |25   |25   |
-------------------
cur_ins = 233
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|25   |23   |22   |
|31   |1    |1    |
|1    |31   |23   |
|23   |25   |25   |
-------------------
cur_ins = 83
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|31   |8    |22   |
|1    |23   |1    |
|23   |1    |8    |
|8    |31   |25   |
-------------------
cur_ins = 84
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|31   |8    |22   |
|1    |23   |1    |
|23   |1    |8    |
|8    |31   |25   |
-------------------
cur_ins = 23
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|1    |2    |22   |
|23   |8    |1    |
|8    |23   |2    |
|2    |1    |25   |
-------------------
cur_ins = 24
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|1    |2    |22   |
|23   |8    |1    |
|8    |23   |2    |
|2    |1    |25   |
-------------------
cur_ins = 196
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|23   |19   |22   |
|8    |2    |1    |
|2    |8    |2    |
|19   |23   |19   |
-------------------
cur_ins = 197
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|23   |19   |22   |
|8    |2    |1    |
|2    |8    |2    |
|19   |23   |19   |
-------------------
cur_ins = 212
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|8    |21   |21   |
|2    |19   |1    |
|19   |2    |2    |
|21   |8    |19   |
-------------------
cur_ins = 213
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|8    |21   |21   |
|2    |19   |1    |
|19   |2    |2    |
|21   |8    |19   |
-------------------
cur_ins = 45
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|2    |4    |4    |
|19   |21   |1    |
|21   |19   |2    |
|4    |2    |19   |
-------------------
cur_ins = 46
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|2    |4    |4    |
|19   |21   |1    |
|21   |19   |2    |
|4    |2    |19   |
-------------------
cur_ins = 193
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|2    |19   |4    |
|19   |4    |1    |
|21   |21   |2    |
|4    |2    |19   |
-------------------
cur_ins = 194
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|2    |19   |4    |
|19   |4    |1    |
|21   |21   |2    |
|4    |2    |19   |
-------------------
cur_ins = 157
cur_block = 15
-------------------
|fifo |lru  |opt  |
-------------------
|19   |15   |15   |
|21   |19   |1    |
|4    |4    |2    |
|15   |21   |19   |
-------------------
cur_ins = 158
cur_block = 15
-------------------
|fifo |lru  |opt  |
-------------------
|19   |15   |15   |
|21   |19   |1    |
|4    |4    |2    |
|15   |21   |19   |
-------------------
cur_ins = 31
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|21   |3    |3    |
|4    |15   |1    |
|15   |19   |2    |
|3    |4    |19   |
-------------------
cur_ins = 32
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|21   |3    |3    |
|4    |15   |1    |
|15   |19   |2    |
|3    |4    |19   |
-------------------
cur_ins = 142
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|4    |14   |14   |
|15   |3    |1    |
|3    |15   |2    |
|14   |19   |19   |
-------------------
cur_ins = 143
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|4    |14   |14   |
|15   |3    |1    |
|3    |15   |2    |
|14   |19   |19   |
-------------------
cur_ins = 190
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|15   |19   |14   |
|3    |14   |1    |
|14   |3    |2    |
|19   |15   |19   |
-------------------
cur_ins = 191
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|15   |19   |14   |
|3    |14   |1    |
|14   |3    |2    |
|19   |15   |19   |
-------------------
cur_ins = 115
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|3    |11   |11   |
|14   |19   |1    |
|19   |14   |2    |
|11   |3    |19   |
-------------------
cur_ins = 116
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|3    |11   |11   |
|14   |19   |1    |
|19   |14   |2    |
|11   |3    |19   |
-------------------
cur_ins = 192
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|3    |19   |11   |
|14   |11   |1    |
|19   |14   |2    |
|11   |3    |19   |
-------------------
cur_ins = 193
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|3    |19   |11   |
|14   |11   |1    |
|19   |14   |2    |
|11   |3    |19   |
-------------------
cur_ins = 271
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|14   |27   |11   |
|19   |19   |1    |
|11   |11   |2    |
|27   |14   |27   |
-------------------
cur_ins = 272
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|14   |27   |11   |
|19   |19   |1    |
|11   |11   |2    |
|27   |14   |27   |
-------------------
cur_ins = 27
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|19   |2    |11   |
|11   |27   |1    |
|27   |19   |2    |
|2    |11   |27   |
-------------------
cur_ins = 28
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|19   |2    |11   |
|11   |27   |1    |
|27   |19   |2    |
|2    |11   |27   |
-------------------
cur_ins = 264
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|11   |26   |11   |
|27   |2    |1    |
|2    |27   |2    |
|26   |19   |26   |
-------------------
cur_ins = 265
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|11   |26   |11   |
|27   |2    |1    |
|2    |27   |2    |
|26   |19   |26   |
-------------------
cur_ins = 9
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|27   |0    |11   |
|2    |26   |1    |
|26   |2    |0    |
|0    |27   |26   |
-------------------
cur_ins = 10
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|2    |1    |11   |
|26   |0    |1    |
|0    |26   |0    |
|1    |2    |26   |
-------------------
cur_ins = 4
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|2    |0    |11   |
|26   |1    |1    |
|0    |26   |0    |
|1    |2    |26   |
-------------------
cur_ins = 5
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|2    |0    |11   |
|26   |1    |1    |
|0    |26   |0    |
|1    |2    |26   |
-------------------
cur_ins = 219
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|26   |21   |11   |
|0    |0    |1    |
|1    |1    |21   |
|21   |26   |26   |
-------------------
cur_ins = 220
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|0    |22   |11   |
|1    |21   |1    |
|21   |0    |22   |
|22   |1    |26   |
-------------------
cur_ins = 122
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|1    |12   |11   |
|21   |22   |1    |
|22   |21   |12   |
|12   |0    |26   |
-------------------
cur_ins = 123
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|1    |12   |11   |
|21   |22   |1    |
|22   |21   |12   |
|12   |0    |26   |
-------------------
cur_ins = 121
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|1    |12   |11   |
|21   |22   |1    |
|22   |21   |12   |
|12   |0    |26   |
-------------------
cur_ins = 122
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|1    |12   |11   |
|21   |22   |1    |
|22   |21   |12   |
|12   |0    |26   |
-------------------
cur_ins = 295
cur_block = 29
-------------------
|fifo |lru  |opt  |
-------------------
|21   |29   |11   |
|22   |12   |1    |
|12   |22   |29   |
|29   |21   |26   |
-------------------
cur_ins = 296
cur_block = 29
-------------------
|fifo |lru  |opt  |
-------------------
|21   |29   |11   |
|22   |12   |1    |
|12   |22   |29   |
|29   |21   |26   |
-------------------
cur_ins = 158
cur_block = 15
-------------------
|fifo |lru  |opt  |
-------------------
|22   |15   |11   |
|12   |29   |1    |
|29   |12   |15   |
|15   |22   |26   |
-------------------
cur_ins = 159
cur_block = 15
-------------------
|fifo |lru  |opt  |
-------------------
|22   |15   |11   |
|12   |29   |1    |
|29   |12   |15   |
|15   |22   |26   |
-------------------
cur_ins = 15
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|12   |1    |11   |
|29   |15   |1    |
|15   |29   |15   |
|1    |12   |26   |
-------------------
cur_ins = 16
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|12   |1    |11   |
|29   |15   |1    |
|15   |29   |15   |
|1    |12   |26   |
-------------------
cur_ins = 53
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|29   |5    |11   |
|15   |1    |1    |
|1    |15   |5    |
|5    |29   |26   |
-------------------
cur_ins = 54
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|29   |5    |11   |
|15   |1    |1    |
|1    |15   |5    |
|5    |29   |26   |
-------------------
cur_ins = 161
cur_block = 16
-------------------
|fifo |lru  |opt  |
-------------------
|15   |16   |11   |
|1    |5    |16   |
|5    |1    |5    |
|16   |15   |26   |
-------------------
cur_ins = 162
cur_block = 16
-------------------
|fifo |lru  |opt  |
-------------------
|15   |16   |11   |
|1    |5    |16   |
|5    |1    |5    |
|16   |15   |26   |
-------------------
cur_ins = 97
cur_block = 9
-------------------
|fifo |lru  |opt  |
-------------------
|1    |9    |11   |
|5    |16   |9    |
|16   |5    |5    |
|9    |1    |26   |
-------------------
cur_ins = 98
cur_block = 9
-------------------
|fifo |lru  |opt  |
-------------------
|1    |9    |11   |
|5    |16   |9    |
|16   |5    |5    |
|9    |1    |26   |
-------------------
cur_ins = 131
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|5    |13   |11   |
|16   |9    |13   |
|9    |16   |5    |
|13   |5    |26   |
-------------------
cur_ins = 132
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|5    |13   |11   |
|16   |9    |13   |
|9    |16   |5    |
|13   |5    |26   |
-------------------
cur_ins = 259
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|16   |25   |11   |
|9    |13   |25   |
|13   |9    |5    |
|25   |16   |26   |
-------------------
cur_ins = 260
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|9    |26   |11   |
|13   |25   |25   |
|25   |13   |5    |
|26   |9    |26   |
-------------------
cur_ins = 241
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|13   |24   |11   |
|25   |26   |25   |
|26   |25   |5    |
|24   |13   |24   |
-------------------
cur_ins = 242
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|13   |24   |11   |
|25   |26   |25   |
|26   |25   |5    |
|24   |13   |24   |
-------------------
cur_ins = 256
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|13   |25   |11   |
|25   |24   |25   |
|26   |26   |5    |
|24   |13   |24   |
-------------------
cur_ins = 257
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|13   |25   |11   |
|25   |24   |25   |
|26   |26   |5    |
|24   |13   |24   |
-------------------
cur_ins = 114
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|25   |11   |11   |
|26   |25   |25   |
|24   |24   |5    |
|11   |26   |24   |
-------------------
cur_ins = 115
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|25   |11   |11   |
|26   |25   |25   |
|24   |24   |5    |
|11   |26   |24   |
-------------------
cur_ins = 35
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|26   |3    |3    |
|24   |11   |25   |
|11   |25   |5    |
|3    |24   |24   |
-------------------
cur_ins = 36
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|26   |3    |3    |
|24   |11   |25   |
|11   |25   |5    |
|3    |24   |24   |
-------------------
cur_ins = 124
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|24   |12   |3    |
|11   |3    |12   |
|3    |11   |5    |
|12   |25   |24   |
-------------------
cur_ins = 125
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|24   |12   |3    |
|11   |3    |12   |
|3    |11   |5    |
|12   |25   |24   |
-------------------
cur_ins = 53
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|11   |5    |3    |
|3    |12   |12   |
|12   |3    |5    |
|5    |11   |24   |
-------------------
cur_ins = 54
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|11   |5    |3    |
|3    |12   |12   |
|12   |3    |5    |
|5    |11   |24   |
-------------------
cur_ins = 8
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|3    |0    |3    |
|12   |5    |0    |
|5    |12   |5    |
|0    |3    |24   |
-------------------
cur_ins = 9
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|3    |0    |3    |
|12   |5    |0    |
|5    |12   |5    |
|0    |3    |24   |
-------------------
cur_ins = 184
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|12   |18   |3    |
|5    |0    |18   |
|0    |5    |5    |
|18   |12   |24   |
-------------------
cur_ins = 185
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|12   |18   |3    |
|5    |0    |18   |
|0    |5    |5    |
|18   |12   |24   |
-------------------
cur_ins = 240
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|5    |24   |3    |
|0    |18   |18   |
|18   |0    |5    |
|24   |5    |24   |
-------------------
cur_ins = 241
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|5    |24   |3    |
|0    |18   |18   |
|18   |0    |5    |
|24   |5    |24   |
-------------------
cur_ins = 28
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|0    |2    |3    |
|18   |24   |2    |
|24   |18   |5    |
|2    |0    |24   |
-------------------
cur_ins = 29
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|0    |2    |3    |
|18   |24   |2    |
|24   |18   |5    |
|2    |0    |24   |
-------------------
cur_ins = 224
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|18   |22   |3    |
|24   |2    |2    |
|2    |24   |5    |
|22   |18   |22   |
-------------------
cur_ins = 225
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|18   |22   |3    |
|24   |2    |2    |
|2    |24   |5    |
|22   |18   |22   |
-------------------
cur_ins = 92
cur_block = 9
-------------------
|fifo |lru  |opt  |
-------------------
|24   |9    |3    |
|2    |22   |2    |
|22   |2    |5    |
|9    |24   |9    |
-------------------
cur_ins = 93
cur_block = 9
-------------------
|fifo |lru  |opt  |
-------------------
|24   |9    |3    |
|2    |22   |2    |
|22   |2    |5    |
|9    |24   |9    |
-------------------
cur_ins = 49
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|2    |4    |3    |
|22   |9    |2    |
|9    |22   |5    |
|4    |2    |4    |
-------------------
cur_ins = 50
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|22   |5    |3    |
|9    |4    |2    |
|4    |9    |5    |
|5    |22   |4    |
-------------------
cur_ins = 279
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|9    |27   |3    |
|4    |5    |2    |
|5    |4    |5    |
|27   |9    |27   |
-------------------
cur_ins = 280
cur_block = 28
-------------------
|fifo |lru  |opt  |
-------------------
|4    |28   |3    |
|5    |27   |2    |
|27   |5    |28   |
|28   |4    |27   |
-------------------
cur_ins = 34
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|5    |3    |3    |
|27   |28   |2    |
|28   |27   |28   |
|3    |5    |27   |
-------------------
cur_ins = 35
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|5    |3    |3    |
|27   |28   |2    |
|28   |27   |28   |
|3    |5    |27   |
-------------------
cur_ins = 26
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|27   |2    |3    |
|28   |3    |2    |
|3    |28   |28   |
|2    |27   |27   |
-------------------
cur_ins = 27
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|27   |2    |3    |
|28   |3    |2    |
|3    |28   |28   |
|2    |27   |27   |
-------------------
cur_ins = 239
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|28   |23   |3    |
|3    |2    |2    |
|2    |3    |23   |
|23   |28   |27   |
-------------------
cur_ins = 240
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|3    |24   |24   |
|2    |23   |2    |
|23   |2    |23   |
|24   |3    |27   |
-------------------
cur_ins = 270
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|2    |27   |24   |
|23   |24   |2    |
|24   |23   |23   |
|27   |2    |27   |
-------------------
cur_ins = 271
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|2    |27   |24   |
|23   |24   |2    |
|24   |23   |23   |
|27   |2    |27   |
-------------------
cur_ins = 229
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|23   |22   |24   |
|24   |27   |2    |
|27   |24   |23   |
|22   |23   |22   |
-------------------
cur_ins = 230
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|23   |23   |24   |
|24   |22   |2    |
|27   |27   |23   |
|22   |24   |22   |
-------------------
cur_ins = 315
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|24   |31   |24   |
|27   |23   |2    |
|22   |22   |23   |
|31   |27   |31   |
-------------------
cur_ins = 316
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|24   |31   |24   |
|27   |23   |2    |
|22   |22   |23   |
|31   |27   |31   |
-------------------
cur_ins = 160
cur_block = 16
-------------------
|fifo |lru  |opt  |
-------------------
|27   |16   |24   |
|22   |31   |2    |
|31   |23   |16   |
|16   |22   |31   |
-------------------
cur_ins = 161
cur_block = 16
-------------------
|fifo |lru  |opt  |
-------------------
|27   |16   |24   |
|22   |31   |2    |
|31   |23   |16   |
|16   |22   |31   |
-------------------
cur_ins = 8
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|22   |0    |24   |
|31   |16   |2    |
|16   |31   |0    |
|0    |23   |31   |
-------------------
cur_ins = 9
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|22   |0    |24   |
|31   |16   |2    |
|16   |31   |0    |
|0    |23   |31   |
-------------------
cur_ins = 242
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|31   |24   |24   |
|16   |0    |2    |
|0    |16   |0    |
|24   |31   |31   |
-------------------
cur_ins = 243
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|31   |24   |24   |
|16   |0    |2    |
|0    |16   |0    |
|24   |31   |31   |
-------------------
cur_ins = 216
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|16   |21   |24   |
|0    |24   |21   |
|24   |0    |0    |
|21   |16   |31   |
-------------------
cur_ins = 217
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|16   |21   |24   |
|0    |24   |21   |
|24   |0    |0    |
|21   |16   |31   |
-------------------
cur_ins = 2
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|16   |0    |24   |
|0    |21   |21   |
|24   |24   |0    |
|21   |16   |31   |
-------------------
cur_ins = 3
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|16   |0    |24   |
|0    |21   |21   |
|24   |24   |0    |
|21   |16   |31   |
-------------------
cur_ins = 268
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|0    |26   |24   |
|24   |0    |21   |
|21   |21   |26   |
|26   |24   |31   |
-------------------
cur_ins = 269
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|0    |26   |24   |
|24   |0    |21   |
|21   |21   |26   |
|26   |24   |31   |
-------------------
cur_ins = 250
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|24   |25   |24   |
|21   |26   |21   |
|26   |0    |25   |
|25   |21   |31   |
-------------------
cur_ins = 251
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|24   |25   |24   |
|21   |26   |21   |
|26   |0    |25   |
|25   |21   |31   |
-------------------
cur_ins = 132
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|21   |13   |24   |
|26   |25   |21   |
|25   |26   |13   |
|13   |0    |31   |
-------------------
cur_ins = 133
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|21   |13   |24   |
|26   |25   |21   |
|25   |26   |13   |
|13   |0    |31   |
-------------------
cur_ins = 144
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|26   |14   |24   |
|25   |13   |21   |
|13   |25   |14   |
|14   |26   |31   |
-------------------
cur_ins = 145
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|26   |14   |24   |
|25   |13   |21   |
|13   |25   |14   |
|14   |26   |31   |
-------------------
cur_ins = 243
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|25   |24   |24   |
|13   |14   |21   |
|14   |13   |14   |
|24   |25   |31   |
-------------------
cur_ins = 244
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|25   |24   |24   |
|13   |14   |21   |
|14   |13   |14   |
|24   |25   |31   |
-------------------
cur_ins = 173
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|13   |17   |24   |
|14   |24   |21   |
|24   |14   |17   |
|17   |13   |31   |
-------------------
cur_ins = 174
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|13   |17   |24   |
|14   |24   |21   |
|24   |14   |17   |
|17   |13   |31   |
-------------------
cur_ins = 178
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|13   |17   |24   |
|14   |24   |21   |
|24   |14   |17   |
|17   |13   |31   |
-------------------
cur_ins = 179
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|13   |17   |24   |
|14   |24   |21   |
|24   |14   |17   |
|17   |13   |31   |
-------------------
cur_ins = 185
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|14   |18   |24   |
|24   |17   |21   |
|17   |24   |18   |
|18   |14   |31   |
-------------------
cur_ins = 186
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|14   |18   |24   |
|24   |17   |21   |
|17   |24   |18   |
|18   |14   |31   |
-------------------
cur_ins = 181
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|14   |18   |24   |
|24   |17   |21   |
|17   |24   |18   |
|18   |14   |31   |
-------------------
cur_ins = 182
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|14   |18   |24   |
|24   |17   |21   |
|17   |24   |18   |
|18   |14   |31   |
-------------------
cur_ins = 296
cur_block = 29
-------------------
|fifo |lru  |opt  |
-------------------
|24   |29   |24   |
|17   |18   |21   |
|18   |17   |29   |
|29   |24   |31   |
-------------------
cur_ins = 297
cur_block = 29
-------------------
|fifo |lru  |opt  |
-------------------
|24   |29   |24   |
|17   |18   |21   |
|18   |17   |29   |
|29   |24   |31   |
-------------------
cur_ins = 319
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|17   |31   |24   |
|18   |29   |21   |
|29   |18   |29   |
|31   |17   |31   |
-------------------
cur_ins = 319
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|17   |31   |24   |
|18   |29   |21   |
|29   |18   |29   |
|31   |17   |31   |
-------------------
cur_ins = 191
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|18   |19   |24   |
|29   |31   |21   |
|31   |29   |19   |
|19   |18   |31   |
-------------------
cur_ins = 192
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|18   |19   |24   |
|29   |31   |21   |
|31   |29   |19   |
|19   |18   |31   |
-------------------
cur_ins = 212
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|29   |21   |24   |
|31   |19   |21   |
|19   |31   |19   |
|21   |29   |31   |
-------------------
cur_ins = 213
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|29   |21   |24   |
|31   |19   |21   |
|19   |31   |19   |
|21   |29   |31   |
-------------------
cur_ins = 52
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|31   |5    |24   |
|19   |21   |5    |
|21   |19   |19   |
|5    |31   |31   |
-------------------
cur_ins = 53
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|31   |5    |24   |
|19   |21   |5    |
|21   |19   |19   |
|5    |31   |31   |
-------------------
cur_ins = 12
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|19   |1    |1    |
|21   |5    |5    |
|5    |21   |19   |
|1    |19   |31   |
-------------------
cur_ins = 13
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|19   |1    |1    |
|21   |5    |5    |
|5    |21   |19   |
|1    |19   |31   |
-------------------
cur_ins = 312
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|21   |31   |1    |
|5    |1    |5    |
|1    |5    |19   |
|31   |21   |31   |
-------------------
cur_ins = 313
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|21   |31   |1    |
|5    |1    |5    |
|1    |5    |19   |
|31   |21   |31   |
-------------------
cur_ins = 313
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|21   |31   |1    |
|5    |1    |5    |
|1    |5    |19   |
|31   |21   |31   |
-------------------
cur_ins = 314
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|21   |31   |1    |
|5    |1    |5    |
|1    |5    |19   |
|31   |21   |31   |
-------------------
cur_ins = 73
cur_block = 7
-------------------
|fifo |lru  |opt  |
-------------------
|5    |7    |1    |
|1    |31   |5    |
|31   |1    |19   |
|7    |5    |7    |
-------------------
cur_ins = 74
cur_block = 7
-------------------
|fifo |lru  |opt  |
-------------------
|5    |7    |1    |
|1    |31   |5    |
|31   |1    |19   |
|7    |5    |7    |
-------------------
cur_ins = 195
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|1    |19   |1    |
|31   |7    |5    |
|7    |31   |19   |
|19   |1    |7    |
-------------------
cur_ins = 196
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|1    |19   |1    |
|31   |7    |5    |
|7    |31   |19   |
|19   |1    |7    |
-------------------
cur_ins = 73
cur_block = 7
-------------------
|fifo |lru  |opt  |
-------------------
|1    |7    |1    |
|31   |19   |5    |
|7    |31   |19   |
|19   |1    |7    |
-------------------
cur_ins = 74
cur_block = 7
-------------------
|fifo |lru  |opt  |
-------------------
|1    |7    |1    |
|31   |19   |5    |
|7    |31   |19   |
|19   |1    |7    |
-------------------
cur_ins = 17
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|1    |1    |1    |
|31   |7    |5    |
|7    |19   |19   |
|19   |31   |7    |
-------------------
cur_ins = 18
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|1    |1    |1    |
|31   |7    |5    |
|7    |19   |19   |
|19   |31   |7    |
-------------------
cur_ins = 27
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|31   |2    |1    |
|7    |1    |5    |
|19   |7    |19   |
|2    |19   |2    |
-------------------
cur_ins = 28
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|31   |2    |1    |
|7    |1    |5    |
|19   |7    |19   |
|2    |19   |2    |
-------------------
cur_ins = 237
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|7    |23   |1    |
|19   |2    |5    |
|2    |1    |23   |
|23   |7    |2    |
-------------------
cur_ins = 238
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|7    |23   |1    |
|19   |2    |5    |
|2    |1    |23   |
|23   |7    |2    |
-------------------
cur_ins = 89
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|19   |8    |1    |
|2    |23   |5    |
|23   |2    |8    |
|8    |1    |2    |
-------------------
cur_ins = 90
cur_block = 9
-------------------
|fifo |lru  |opt  |
-------------------
|2    |9    |1    |
|23   |8    |5    |
|8    |23   |9    |
|9    |2    |2    |
-------------------
cur_ins = 277
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|23   |27   |1    |
|8    |9    |5    |
|9    |8    |27   |
|27   |23   |2    |
-------------------
cur_ins = 278
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|23   |27   |1    |
|8    |9    |5    |
|9    |8    |27   |
|27   |23   |2    |
-------------------
cur_ins = 130
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|8    |13   |1    |
|9    |27   |5    |
|27   |9    |27   |
|13   |8    |13   |
-------------------
cur_ins = 131
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|8    |13   |1    |
|9    |27   |5    |
|27   |9    |27   |
|13   |8    |13   |
-------------------
cur_ins = 11
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|9    |1    |1    |
|27   |13   |5    |
|13   |27   |27   |
|1    |9    |13   |
-------------------
cur_ins = 12
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|9    |1    |1    |
|27   |13   |5    |
|13   |27   |27   |
|1    |9    |13   |
-------------------
cur_ins = 57
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|27   |5    |1    |
|13   |1    |5    |
|1    |13   |27   |
|5    |27   |13   |
-------------------
cur_ins = 58
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|27   |5    |1    |
|13   |1    |5    |
|1    |13   |27   |
|5    |27   |13   |
-------------------
cur_ins = 267
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|13   |26   |1    |
|1    |5    |5    |
|5    |1    |27   |
|26   |13   |26   |
-------------------
cur_ins = 268
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|13   |26   |1    |
|1    |5    |5    |
|5    |1    |27   |
|26   |13   |26   |
-------------------
cur_ins = 242
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|1    |24   |24   |
|5    |26   |5    |
|26   |5    |27   |
|24   |1    |26   |
-------------------
cur_ins = 243
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|1    |24   |24   |
|5    |26   |5    |
|26   |5    |27   |
|24   |1    |26   |
-------------------
cur_ins = 276
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|5    |27   |24   |
|26   |24   |5    |
|24   |26   |27   |
|27   |5    |26   |
-------------------
cur_ins = 277
cur_block = 27
-------------------
|fifo |lru  |opt  |
-------------------
|5    |27   |24   |
|26   |24   |5    |
|24   |26   |27   |
|27   |5    |26   |
-------------------
cur_ins = 43
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|26   |4    |24   |
|24   |27   |5    |
|27   |24   |4    |
|4    |26   |26   |
-------------------
cur_ins = 44
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|26   |4    |24   |
|24   |27   |5    |
|27   |24   |4    |
|4    |26   |26   |
-------------------
cur_ins = 31
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|24   |3    |3    |
|27   |4    |5    |
|4    |27   |4    |
|3    |24   |26   |
-------------------
cur_ins = 32
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|24   |3    |3    |
|27   |4    |5    |
|4    |27   |4    |
|3    |24   |26   |
-------------------
cur_ins = 140
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|27   |14   |3    |
|4    |3    |14   |
|3    |4    |4    |
|14   |27   |26   |
-------------------
cur_ins = 141
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|27   |14   |3    |
|4    |3    |14   |
|3    |4    |4    |
|14   |27   |26   |
-------------------
cur_ins = 315
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|4    |31   |3    |
|3    |14   |14   |
|14   |3    |31   |
|31   |4    |26   |
-------------------
cur_ins = 316
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|4    |31   |3    |
|3    |14   |14   |
|14   |3    |31   |
|31   |4    |26   |
-------------------
cur_ins = 187
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|3    |18   |3    |
|14   |31   |14   |
|31   |14   |18   |
|18   |3    |26   |
-------------------
cur_ins = 188
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|3    |18   |3    |
|14   |31   |14   |
|31   |14   |18   |
|18   |3    |26   |
-------------------
cur_ins = 221
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|14   |22   |3    |
|31   |18   |14   |
|18   |31   |22   |
|22   |14   |26   |
-------------------
cur_ins = 222
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|14   |22   |3    |
|31   |18   |14   |
|18   |31   |22   |
|22   |14   |26   |
-------------------
cur_ins = 301
cur_block = 30
-------------------
|fifo |lru  |opt  |
-------------------
|31   |30   |3    |
|18   |22   |30   |
|22   |18   |22   |
|30   |31   |26   |
-------------------
cur_ins = 302
cur_block = 30
-------------------
|fifo |lru  |opt  |
-------------------
|31   |30   |3    |
|18   |22   |30   |
|22   |18   |22   |
|30   |31   |26   |
-------------------
cur_ins = 28
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|18   |2    |3    |
|22   |30   |2    |
|30   |22   |22   |
|2    |18   |26   |
-------------------
cur_ins = 29
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|18   |2    |3    |
|22   |30   |2    |
|30   |22   |22   |
|2    |18   |26   |
-------------------
cur_ins = 198
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|22   |19   |3    |
|30   |2    |19   |
|2    |30   |22   |
|19   |22   |26   |
-------------------
cur_ins = 199
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|22   |19   |3    |
|30   |2    |19   |
|2    |30   |22   |
|19   |22   |26   |
-------------------
cur_ins = 128
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|30   |12   |3    |
|2    |19   |12   |
|19   |2    |22   |
|12   |30   |26   |
-------------------
cur_ins = 129
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|30   |12   |3    |
|2    |19   |12   |
|19   |2    |22   |
|12   |30   |26   |
-------------------
cur_ins = 117
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|2    |11   |3    |
|19   |12   |11   |
|12   |19   |22   |
|11   |2    |26   |
-------------------
cur_ins = 118
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|2    |11   |3    |
|19   |12   |11   |
|12   |19   |22   |
|11   |2    |26   |
-------------------
cur_ins = 262
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|19   |26   |3    |
|12   |11   |11   |
|11   |12   |22   |
|26   |19   |26   |
-------------------
cur_ins = 263
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|19   |26   |3    |
|12   |11   |11   |
|11   |12   |22   |
|26   |19   |26   |
-------------------
cur_ins = 223
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|12   |22   |3    |
|11   |26   |11   |
|26   |11   |22   |
|22   |12   |26   |
-------------------
cur_ins = 224
cur_block = 22
-------------------
|fifo |lru  |opt  |
-------------------
|12   |22   |3    |
|11   |26   |11   |
|26   |11   |22   |
|22   |12   |26   |
-------------------
cur_ins = 35
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|11   |3    |3    |
|26   |22   |11   |
|22   |26   |22   |
|3    |11   |26   |
-------------------
cur_ins = 36
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|11   |3    |3    |
|26   |22   |11   |
|22   |26   |22   |
|3    |11   |26   |
-------------------
cur_ins = 140
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|26   |14   |3    |
|22   |3    |11   |
|3    |22   |14   |
|14   |26   |26   |
-------------------
cur_ins = 141
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|26   |14   |3    |
|22   |3    |11   |
|3    |22   |14   |
|14   |26   |26   |
-------------------
cur_ins = 210
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|22   |21   |21   |
|3    |14   |11   |
|14   |3    |14   |
|21   |22   |26   |
-------------------
cur_ins = 211
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|22   |21   |21   |
|3    |14   |11   |
|14   |3    |14   |
|21   |22   |26   |
-------------------
cur_ins = 40
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|3    |4    |21   |
|14   |21   |11   |
|21   |14   |14   |
|4    |3    |4    |
-------------------
cur_ins = 41
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|3    |4    |21   |
|14   |21   |11   |
|21   |14   |14   |
|4    |3    |4    |
-------------------
cur_ins = 128
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|14   |12   |12   |
|21   |4    |11   |
|4    |21   |14   |
|12   |14   |4    |
-------------------
cur_ins = 129
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|14   |12   |12   |
|21   |4    |11   |
|4    |21   |14   |
|12   |14   |4    |
-------------------
cur_ins = 86
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|21   |8    |8    |
|4    |12   |11   |
|12   |4    |14   |
|8    |21   |4    |
-------------------
cur_ins = 87
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|21   |8    |8    |
|4    |12   |11   |
|12   |4    |14   |
|8    |21   |4    |
-------------------
cur_ins = 40
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|21   |4    |8    |
|4    |8    |11   |
|12   |12   |14   |
|8    |21   |4    |
-------------------
cur_ins = 41
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|21   |4    |8    |
|4    |8    |11   |
|12   |12   |14   |
|8    |21   |4    |
-------------------
cur_ins = 101
cur_block = 10
-------------------
|fifo |lru  |opt  |
-------------------
|4    |10   |10   |
|12   |4    |11   |
|8    |8    |14   |
|10   |12   |4    |
-------------------
cur_ins = 102
cur_block = 10
-------------------
|fifo |lru  |opt  |
-------------------
|4    |10   |10   |
|12   |4    |11   |
|8    |8    |14   |
|10   |12   |4    |
-------------------
cur_ins = 109
cur_block = 10
-------------------
|fifo |lru  |opt  |
-------------------
|4    |10   |10   |
|12   |4    |11   |
|8    |8    |14   |
|10   |12   |4    |
-------------------
cur_ins = 110
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|12   |11   |10   |
|8    |10   |11   |
|10   |4    |14   |
|11   |8    |4    |
-------------------
cur_ins = 51
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|8    |5    |5    |
|10   |11   |11   |
|11   |10   |14   |
|5    |4    |4    |
-------------------
cur_ins = 52
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|8    |5    |5    |
|10   |11   |11   |
|11   |10   |14   |
|5    |4    |4    |
-------------------
cur_ins = 146
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|10   |14   |5    |
|11   |5    |11   |
|5    |11   |14   |
|14   |10   |4    |
-------------------
cur_ins = 147
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|10   |14   |5    |
|11   |5    |11   |
|5    |11   |14   |
|14   |10   |4    |
-------------------
cur_ins = 42
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|11   |4    |5    |
|5    |14   |11   |
|14   |5    |14   |
|4    |11   |4    |
-------------------
cur_ins = 43
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|11   |4    |5    |
|5    |14   |11   |
|14   |5    |14   |
|4    |11   |4    |
-------------------
cur_ins = 14
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|5    |1    |5    |
|14   |4    |11   |
|4    |14   |1    |
|1    |5    |4    |
-------------------
cur_ins = 15
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|5    |1    |5    |
|14   |4    |11   |
|4    |14   |1    |
|1    |5    |4    |
-------------------
cur_ins = 216
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|14   |21   |5    |
|4    |1    |11   |
|1    |4    |21   |
|21   |14   |4    |
-------------------
cur_ins = 217
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|14   |21   |5    |
|4    |1    |11   |
|1    |4    |21   |
|21   |14   |4    |
-------------------
cur_ins = 177
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|4    |17   |5    |
|1    |21   |11   |
|21   |1    |17   |
|17   |4    |4    |
-------------------
cur_ins = 178
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|4    |17   |5    |
|1    |21   |11   |
|21   |1    |17   |
|17   |4    |4    |
-------------------
cur_ins = 49
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|4    |4    |5    |
|1    |17   |11   |
|21   |21   |17   |
|17   |1    |4    |
-------------------
cur_ins = 50
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|1    |5    |5    |
|21   |4    |11   |
|17   |17   |17   |
|5    |21   |4    |
-------------------
cur_ins = 110
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|21   |11   |5    |
|17   |5    |11   |
|5    |4    |17   |
|11   |17   |4    |
-------------------
cur_ins = 111
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|21   |11   |5    |
|17   |5    |11   |
|5    |4    |17   |
|11   |17   |4    |
-------------------
cur_ins = 300
cur_block = 30
-------------------
|fifo |lru  |opt  |
-------------------
|17   |30   |5    |
|5    |11   |11   |
|11   |5    |30   |
|30   |4    |4    |
-------------------
cur_ins = 301
cur_block = 30
-------------------
|fifo |lru  |opt  |
-------------------
|17   |30   |5    |
|5    |11   |11   |
|11   |5    |30   |
|30   |4    |4    |
-------------------
cur_ins = 49
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|5    |4    |5    |
|11   |30   |11   |
|30   |11   |30   |
|4    |5    |4    |
-------------------
cur_ins = 50
cur_block = 5
-------------------
|fifo |lru  |opt  |
-------------------
|5    |5    |5    |
|11   |4    |11   |
|30   |30   |30   |
|4    |11   |4    |
-------------------
cur_ins = 263
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|11   |26   |26   |
|30   |5    |11   |
|4    |4    |30   |
|26   |30   |4    |
-------------------
cur_ins = 264
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|11   |26   |26   |
|30   |5    |11   |
|4    |4    |30   |
|26   |30   |4    |
-------------------
cur_ins = 21
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|30   |2    |26   |
|4    |26   |11   |
|26   |5    |2    |
|2    |4    |4    |
-------------------
cur_ins = 22
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|30   |2    |26   |
|4    |26   |11   |
|26   |5    |2    |
|2    |4    |4    |
-------------------
cur_ins = 9
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|4    |0    |26   |
|26   |2    |11   |
|2    |26   |0    |
|0    |5    |4    |
-------------------
cur_ins = 10
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|26   |1    |26   |
|2    |0    |11   |
|0    |2    |0    |
|1    |26   |1    |
-------------------
cur_ins = 194
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|2    |19   |26   |
|0    |1    |11   |
|1    |0    |0    |
|19   |2    |19   |
-------------------
cur_ins = 195
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|2    |19   |26   |
|0    |1    |11   |
|1    |0    |0    |
|19   |2    |19   |
-------------------
cur_ins = 192
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|2    |19   |26   |
|0    |1    |11   |
|1    |0    |0    |
|19   |2    |19   |
-------------------
cur_ins = 193
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|2    |19   |26   |
|0    |1    |11   |
|1    |0    |0    |
|19   |2    |19   |
-------------------
cur_ins = 159
cur_block = 15
-------------------
|fifo |lru  |opt  |
-------------------
|0    |15   |26   |
|1    |19   |11   |
|19   |1    |0    |
|15   |0    |15   |
-------------------
cur_ins = 160
cur_block = 16
-------------------
|fifo |lru  |opt  |
-------------------
|1    |16   |26   |
|19   |15   |11   |
|15   |19   |0    |
|16   |1    |16   |
-------------------
cur_ins = 244
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|19   |24   |26   |
|15   |16   |11   |
|16   |15   |0    |
|24   |19   |24   |
-------------------
cur_ins = 245
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|19   |24   |26   |
|15   |16   |11   |
|16   |15   |0    |
|24   |19   |24   |
-------------------
cur_ins = 128
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|15   |12   |26   |
|16   |24   |11   |
|24   |16   |0    |
|12   |15   |12   |
-------------------
cur_ins = 129
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|15   |12   |26   |
|16   |24   |11   |
|24   |16   |0    |
|12   |15   |12   |
-------------------
cur_ins = 35
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|16   |3    |26   |
|24   |12   |11   |
|12   |24   |0    |
|3    |16   |3    |
-------------------
cur_ins = 36
cur_block = 3
-------------------
|fifo |lru  |opt  |
-------------------
|16   |3    |26   |
|24   |12   |11   |
|12   |24   |0    |
|3    |16   |3    |
-------------------
cur_ins = 114
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|24   |11   |26   |
|12   |3    |11   |
|3    |12   |0    |
|11   |24   |3    |
-------------------
cur_ins = 115
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|24   |11   |26   |
|12   |3    |11   |
|3    |12   |0    |
|11   |24   |3    |
-------------------
cur_ins = 237
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|12   |23   |26   |
|3    |11   |11   |
|11   |3    |0    |
|23   |12   |23   |
-------------------
cur_ins = 238
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|12   |23   |26   |
|3    |11   |11   |
|11   |3    |0    |
|23   |12   |23   |
-------------------
cur_ins = 74
cur_block = 7
-------------------
|fifo |lru  |opt  |
-------------------
|3    |7    |26   |
|11   |23   |11   |
|23   |11   |0    |
|7    |3    |7    |
-------------------
cur_ins = 75
cur_block = 7
-------------------
|fifo |lru  |opt  |
-------------------
|3    |7    |26   |
|11   |23   |11   |
|23   |11   |0    |
|7    |3    |7    |
-------------------
cur_ins = 264
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|11   |26   |26   |
|23   |7    |11   |
|7    |23   |0    |
|26   |11   |7    |
-------------------
cur_ins = 265
cur_block = 26
-------------------
|fifo |lru  |opt  |
-------------------
|11   |26   |26   |
|23   |7    |11   |
|7    |23   |0    |
|26   |11   |7    |
-------------------
cur_ins = 2
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|23   |0    |26   |
|7    |26   |11   |
|26   |7    |0    |
|0    |23   |7    |
-------------------
cur_ins = 3
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|23   |0    |26   |
|7    |26   |11   |
|26   |7    |0    |
|0    |23   |7    |
-------------------
cur_ins = 0
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|23   |0    |26   |
|7    |26   |11   |
|26   |7    |0    |
|0    |23   |7    |
-------------------
cur_ins = 1
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|23   |0    |26   |
|7    |26   |11   |
|26   |7    |0    |
|0    |23   |7    |
-------------------
cur_ins = 194
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|7    |19   |19   |
|26   |0    |11   |
|0    |26   |0    |
|19   |7    |7    |
-------------------
cur_ins = 195
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|7    |19   |19   |
|26   |0    |11   |
|0    |26   |0    |
|19   |7    |7    |
-------------------
cur_ins = 257
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|26   |25   |19   |
|0    |19   |11   |
|19   |0    |0    |
|25   |26   |25   |
-------------------
cur_ins = 258
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|26   |25   |19   |
|0    |19   |11   |
|19   |0    |0    |
|25   |26   |25   |
-------------------
cur_ins = 10
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|0    |1    |1    |
|19   |25   |11   |
|25   |19   |0    |
|1    |0    |25   |
-------------------
cur_ins = 11
cur_block = 1
-------------------
|fifo |lru  |opt  |
-------------------
|0    |1    |1    |
|19   |25   |11   |
|25   |19   |0    |
|1    |0    |25   |
-------------------
cur_ins = 64
cur_block = 6
-------------------
|fifo |lru  |opt  |
-------------------
|19   |6    |6    |
|25   |1    |11   |
|1    |25   |0    |
|6    |19   |25   |
-------------------
cur_ins = 65
cur_block = 6
-------------------
|fifo |lru  |opt  |
-------------------
|19   |6    |6    |
|25   |1    |11   |
|1    |25   |0    |
|6    |19   |25   |
-------------------
cur_ins = 84
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|25   |8    |8    |
|1    |6    |11   |
|6    |1    |0    |
|8    |25   |25   |
-------------------
cur_ins = 85
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|25   |8    |8    |
|1    |6    |11   |
|6    |1    |0    |
|8    |25   |25   |
-------------------
cur_ins = 48
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|1    |4    |8    |
|6    |8    |11   |
|8    |6    |0    |
|4    |1    |4    |
-------------------
cur_ins = 49
cur_block = 4
-------------------
|fifo |lru  |opt  |
-------------------
|1    |4    |8    |
|6    |8    |11   |
|8    |6    |0    |
|4    |1    |4    |
-------------------
cur_ins = 318
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|6    |31   |8    |
|8    |4    |11   |
|4    |8    |0    |
|31   |6    |31   |
-------------------
cur_ins = 319
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|6    |31   |8    |
|8    |4    |11   |
|4    |8    |0    |
|31   |6    |31   |
-------------------
cur_ins = 98
cur_block = 9
-------------------
|fifo |lru  |opt  |
-------------------
|8    |9    |8    |
|4    |31   |11   |
|31   |4    |0    |
|9    |8    |9    |
-------------------
cur_ins = 99
cur_block = 9
-------------------
|fifo |lru  |opt  |
-------------------
|8    |9    |8    |
|4    |31   |11   |
|31   |4    |0    |
|9    |8    |9    |
-------------------
cur_ins = 1
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|4    |0    |8    |
|31   |9    |11   |
|9    |31   |0    |
|0    |4    |9    |
-------------------
cur_ins = 2
cur_block = 0
-------------------
|fifo |lru  |opt  |
-------------------
|4    |0    |8    |
|31   |9    |11   |
|9    |31   |0    |
|0    |4    |9    |
-------------------
cur_ins = 215
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|31   |21   |8    |
|9    |0    |11   |
|0    |9    |21   |
|21   |31   |9    |
-------------------
cur_ins = 216
cur_block = 21
-------------------
|fifo |lru  |opt  |
-------------------
|31   |21   |8    |
|9    |0    |11   |
|0    |9    |21   |
|21   |31   |9    |
-------------------
cur_ins = 144
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|9    |14   |8    |
|0    |21   |11   |
|21   |0    |14   |
|14   |9    |9    |
-------------------
cur_ins = 145
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|9    |14   |8    |
|0    |21   |11   |
|21   |0    |14   |
|14   |9    |9    |
-------------------
cur_ins = 119
cur_block = 11
-------------------
|fifo |lru  |opt  |
-------------------
|0    |11   |8    |
|21   |14   |11   |
|14   |21   |14   |
|11   |0    |9    |
-------------------
cur_ins = 120
cur_block = 12
-------------------
|fifo |lru  |opt  |
-------------------
|21   |12   |8    |
|14   |11   |12   |
|11   |14   |14   |
|12   |21   |9    |
-------------------
cur_ins = 137
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|14   |13   |8    |
|11   |12   |13   |
|12   |11   |14   |
|13   |14   |9    |
-------------------
cur_ins = 138
cur_block = 13
-------------------
|fifo |lru  |opt  |
-------------------
|14   |13   |8    |
|11   |12   |13   |
|12   |11   |14   |
|13   |14   |9    |
-------------------
cur_ins = 188
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|11   |18   |8    |
|12   |13   |18   |
|13   |12   |14   |
|18   |11   |9    |
-------------------
cur_ins = 189
cur_block = 18
-------------------
|fifo |lru  |opt  |
-------------------
|11   |18   |8    |
|12   |13   |18   |
|13   |12   |14   |
|18   |11   |9    |
-------------------
cur_ins = 143
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|12   |14   |8    |
|13   |18   |18   |
|18   |13   |14   |
|14   |12   |9    |
-------------------
cur_ins = 144
cur_block = 14
-------------------
|fifo |lru  |opt  |
-------------------
|12   |14   |8    |
|13   |18   |18   |
|18   |13   |14   |
|14   |12   |9    |
-------------------
cur_ins = 237
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|13   |23   |8    |
|18   |14   |23   |
|14   |18   |14   |
|23   |13   |9    |
-------------------
cur_ins = 238
cur_block = 23
-------------------
|fifo |lru  |opt  |
-------------------
|13   |23   |8    |
|18   |14   |23   |
|14   |18   |14   |
|23   |13   |9    |
-------------------
cur_ins = 243
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|18   |24   |8    |
|14   |23   |24   |
|23   |14   |14   |
|24   |18   |9    |
-------------------
cur_ins = 244
cur_block = 24
-------------------
|fifo |lru  |opt  |
-------------------
|18   |24   |8    |
|14   |23   |24   |
|23   |14   |14   |
|24   |18   |9    |
-------------------
cur_ins = 84
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|14   |8    |8    |
|23   |24   |24   |
|24   |23   |14   |
|8    |14   |9    |
-------------------
cur_ins = 85
cur_block = 8
-------------------
|fifo |lru  |opt  |
-------------------
|14   |8    |8    |
|23   |24   |24   |
|24   |23   |14   |
|8    |14   |9    |
-------------------
cur_ins = 251
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|23   |25   |25   |
|24   |8    |24   |
|8    |24   |14   |
|25   |23   |9    |
-------------------
cur_ins = 252
cur_block = 25
-------------------
|fifo |lru  |opt  |
-------------------
|23   |25   |25   |
|24   |8    |24   |
|8    |24   |14   |
|25   |23   |9    |
-------------------
cur_ins = 195
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|24   |19   |19   |
|8    |25   |24   |
|25   |8    |14   |
|19   |24   |9    |
-------------------
cur_ins = 196
cur_block = 19
-------------------
|fifo |lru  |opt  |
-------------------
|24   |19   |19   |
|8    |25   |24   |
|25   |8    |14   |
|19   |24   |9    |
-------------------
cur_ins = 172
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|8    |17   |17   |
|25   |19   |24   |
|19   |25   |14   |
|17   |8    |9    |
-------------------
cur_ins = 173
cur_block = 17
-------------------
|fifo |lru  |opt  |
-------------------
|8    |17   |17   |
|25   |19   |24   |
|19   |25   |14   |
|17   |8    |9    |
-------------------
cur_ins = 311
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|25   |31   |31   |
|19   |17   |24   |
|17   |19   |14   |
|31   |25   |9    |
-------------------
cur_ins = 312
cur_block = 31
-------------------
|fifo |lru  |opt  |
-------------------
|25   |31   |31   |
|19   |17   |24   |
|17   |19   |14   |
|31   |25   |9    |
-------------------
cur_ins = 24
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|19   |2    |2    |
|17   |31   |24   |
|31   |17   |14   |
|2    |19   |9    |
-------------------
cur_ins = 25
cur_block = 2
-------------------
|fifo |lru  |opt  |
-------------------
|19   |2    |2    |
|17   |31   |24   |
|31   |17   |14   |
|2    |19   |9    |
-------------------
-------------------------------------------------
|item       |fifo       |lru        |opt        |
-------------------------------------------------
|hit        |167        |169        |204        |
|hit_ratio  |52.1875    |52.8125    |63.75      |
|miss       |153        |151        |116        |
|miss_ratio |47.8125    |47.1875    |36.25      |
-------------------------------------------------

突然想到这个实验后天才要上,结果我今天就发出来了,这会不会算我抄袭啊hhhhhhhhh

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,332评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,508评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 157,812评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,607评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,728评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,919评论 1 290
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,071评论 3 410
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,802评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,256评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,576评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,712评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,389评论 4 332
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,032评论 3 316
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,798评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,026评论 1 266
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,473评论 2 360
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,606评论 2 350

推荐阅读更多精彩内容

  • 本质上是一种内存的划分方法 分页存储管理 这种方式中,将用户程序的地址空间,注意,是用户程序的地址空间分为若干个固...
    VictorHong阅读 1,370评论 0 0
  • 2.1 主存储器 主存储器是计算机系统中的一个主要部件,用于保存进程运行时的程序和数据,CPU的控制部件只能从主存...
    溪的风阅读 1,283评论 0 0
  • 假设是按字节编址 连续分配方式的缺点 考虑支持多道程序的两种连续分配方式 固定分区分配:缺乏灵活性,会产生大量的内...
    幺姨母阅读 785评论 0 0
  • 前言 阅读前请先阅读内存管理基础。从本文开始就介绍不连续分配的几种方式,本文主要介绍基本分页存储管理。 1 将连续...
    HRADPX阅读 11,830评论 6 15
  • 久违的晴天,家长会。 家长大会开好到教室时,离放学已经没多少时间了。班主任说已经安排了三个家长分享经验。 放学铃声...
    飘雪儿5阅读 7,515评论 16 22