页面调度算法
代码说明:
fifo lru opt 页面置换调度算法 void LRU(int pagenum, int treq) { int i,j, count = 0; int effect = 0; pageInit(); for (i = 0; i < treq; i++){ if (vp[req[i]].mp == INVALID) { if (count < pagenum) { vp[req[i]].mp = count; mp[count] = req[i]; count++; for (j = 0; j < count; j++) { vp[mp[j]].dura++; } } else { int maxtime = 0, maxtimevpNum = 0; for (j = 0; j < pagenum; j++) { if (vp[mp[j]].dura > maxtime){ maxtime = vp[mp
下载说明:请别用迅雷下载,失败请重下,重下不扣分!