實驗 請求調(diào)頁存儲管理方式的模擬

1、實驗目的

通過對頁面滤灯、頁表、地址轉(zhuǎn)換和頁面置換過程的模擬,加深對請求調(diào)頁系統(tǒng)的原理和實現(xiàn)過程的理解鳞骤。

2窒百、實驗內(nèi)容

  1. 假設(shè)每個頁面中可存放10條指令,分配給一作業(yè)的內(nèi)存塊數(shù)為4豫尽。
  2. 用C語言模擬一作業(yè)的執(zhí)行過程篙梢。該作業(yè)共有320條指令,即它的地址空間為32頁美旧,目前它的所有頁都還未調(diào)入內(nèi)存渤滞。在模擬過程中,如果所訪問的指令已經(jīng)在內(nèi)存中榴嗅,則顯示其物理地址妄呕,并轉(zhuǎn)下一條指令。如果所訪問的指令還未裝入內(nèi)存嗽测,則發(fā)生缺頁绪励,此時需記錄缺頁的次數(shù),并將相應頁調(diào)入內(nèi)存论咏。如果4個內(nèi)存塊中均已裝入該作業(yè)优炬,則需進行頁面置換。最后顯示其物理地址厅贪,并轉(zhuǎn)下一條指令蠢护。在所有320條指令執(zhí)行完畢后,請計算并顯示作業(yè)運行過程中發(fā)生的缺頁率养涮。
  3. 置換算法:請分別考慮OPT葵硕、FIFO和LRU算法。
  4. 作業(yè)中指令的訪問次序按下述原則生成:

? 50%的指令是順序執(zhí)行的贯吓。
? 25%的指令是均勻分布在前地址部分懈凹。
? 25%的指令時均勻分布在后地址部分。

具體的實施辦法是:

① 在[0悄谐,319]之間隨機選取一條起始執(zhí)行指令介评,其序號為m;
② 順序執(zhí)行下一條指令爬舰,即序號為m+1的指令们陆;
③ 通過隨機數(shù),跳轉(zhuǎn)到前地址部分[0情屹,m-1]中的某條指令處坪仇,其序號為m1;
④ 順序執(zhí)行下一條指令垃你,即序號為m1+1的指令椅文;
⑤ 通過隨機數(shù)喂很,跳轉(zhuǎn)到后地址部分[m1+2,319]中的某條指令處皆刺,其序號為m2少辣;
⑥ 順序執(zhí)行下一條指令,即序號為m2+1的指令芹橡;
⑦ 重復跳轉(zhuǎn)到前地址部分毒坛、順序執(zhí)行望伦、跳轉(zhuǎn)到后地址部分林说、順序執(zhí)行的過程,直至執(zhí)行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;
        //設(shè)置opt=從clock開始腿箩,某個塊兒第一次出現(xiàn)的位置
    }
    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;
            // 需要的塊兒已經(jīng)在里面了,停止
            break;
        }// 如果不在里面劣摇,分支不會執(zhí)行珠移,可以找到最遠被訪問的最佳替換
        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;
    }
    //執(zhí)行過的塊兒置為最大值末融,意為再也不用(可能)
#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;
}

運行結(jié)果

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      |
-------------------------------------------------

突然想到這個實驗后天才要上钧惧,結(jié)果我今天就發(fā)出來了,這會不會算我抄襲啊hhhhhhhhh

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末勾习,一起剝皮案震驚了整個濱河市浓瞪,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌巧婶,老刑警劉巖乾颁,帶你破解...
    沈念sama閱讀 211,194評論 6 490
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異艺栈,居然都是意外死亡英岭,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,058評論 2 385
  • 文/潘曉璐 我一進店門湿右,熙熙樓的掌柜王于貴愁眉苦臉地迎上來诅妹,“玉大人,你說我怎么就攤上這事毅人】越疲” “怎么了?”我有些...
    開封第一講書人閱讀 156,780評論 0 346
  • 文/不壞的土叔 我叫張陵堰塌,是天一觀的道長赵刑。 經(jīng)常有香客問我,道長场刑,這世上最難降的妖魔是什么般此? 我笑而不...
    開封第一講書人閱讀 56,388評論 1 283
  • 正文 為了忘掉前任蚪战,我火速辦了婚禮,結(jié)果婚禮上铐懊,老公的妹妹穿的比我還像新娘邀桑。我一直安慰自己,他們只是感情好科乎,可當我...
    茶點故事閱讀 65,430評論 5 384
  • 文/花漫 我一把揭開白布壁畸。 她就那樣靜靜地躺著,像睡著了一般茅茂。 火紅的嫁衣襯著肌膚如雪捏萍。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,764評論 1 290
  • 那天空闲,我揣著相機與錄音令杈,去河邊找鬼。 笑死碴倾,一個胖子當著我的面吹牛逗噩,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播跌榔,決...
    沈念sama閱讀 38,907評論 3 406
  • 文/蒼蘭香墨 我猛地睜開眼异雁,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了僧须?” 一聲冷哼從身側(cè)響起纲刀,我...
    開封第一講書人閱讀 37,679評論 0 266
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎皆辽,沒想到半個月后柑蛇,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 44,122評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡驱闷,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,459評論 2 325
  • 正文 我和宋清朗相戀三年耻台,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片空另。...
    茶點故事閱讀 38,605評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡盆耽,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出扼菠,到底是詐尸還是另有隱情摄杂,我是刑警寧澤,帶...
    沈念sama閱讀 34,270評論 4 329
  • 正文 年R本政府宣布循榆,位于F島的核電站析恢,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏秧饮。R本人自食惡果不足惜映挂,卻給世界環(huán)境...
    茶點故事閱讀 39,867評論 3 312
  • 文/蒙蒙 一泽篮、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧柑船,春花似錦帽撑、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,734評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至逆巍,卻和暖如春及塘,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背蒸苇。 一陣腳步聲響...
    開封第一講書人閱讀 31,961評論 1 265
  • 我被黑心中介騙來泰國打工磷蛹, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人溪烤。 一個月前我還...
    沈念sama閱讀 46,297評論 2 360
  • 正文 我出身青樓,卻偏偏與公主長得像庇勃,于是被迫代替她去往敵國和親檬嘀。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 43,472評論 2 348

推薦閱讀更多精彩內(nèi)容

  • 本質(zhì)上是一種內(nèi)存的劃分方法 分頁存儲管理 這種方式中责嚷,將用戶程序的地址空間鸳兽,注意,是用戶程序的地址空間分為若干個固...
    VictorHong閱讀 1,369評論 0 0
  • 2.1 主存儲器 主存儲器是計算機系統(tǒng)中的一個主要部件罕拂,用于保存進程運行時的程序和數(shù)據(jù)揍异,CPU的控制部件只能從主存...
    溪的風閱讀 1,279評論 0 0
  • 假設(shè)是按字節(jié)編址 連續(xù)分配方式的缺點 考慮支持多道程序的兩種連續(xù)分配方式 固定分區(qū)分配:缺乏靈活性,會產(chǎn)生大量的內(nèi)...
    幺姨母閱讀 782評論 0 0
  • 前言 閱讀前請先閱讀內(nèi)存管理基礎(chǔ)爆班。從本文開始就介紹不連續(xù)分配的幾種方式衷掷,本文主要介紹基本分頁存儲管理。 1 將連續(xù)...
    HRADPX閱讀 11,812評論 6 15
  • 久違的晴天柿菩,家長會戚嗅。 家長大會開好到教室時,離放學已經(jīng)沒多少時間了枢舶。班主任說已經(jīng)安排了三個家長分享經(jīng)驗懦胞。 放學鈴聲...
    飄雪兒5閱讀 7,513評論 16 22