freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

操作系統(tǒng)課程設(shè)計(jì)報(bào)告-資料下載頁(yè)

2025-03-23 08:34本頁(yè)面
  

【正文】 已被使用的頁(yè)數(shù) int count2=0。 //定義缺頁(yè)次數(shù) int current=0。 //定義當(dāng)前工作位置 int equal=0。 //定義判斷如果當(dāng)前頁(yè)數(shù)與比較的頁(yè)數(shù),如果相等則為1,否則為0 int place=0。 //定義要替換的位置 for (int i=0。iMaxpage。i++) { page3[i][0]=1。page3[i][1]=0。 } while (p) { //cout1111endl。 if (count1Maxpage) { for (int i=0。iMaxpage。i++) { if (page3[i][0]==1) { page3[i][0]=pvirtualpage。 page3[i][1]=search(p,current)。 count2++。 break。 } else if (page3[i][0]==pvirtualpage) { page3[i][1]=search(p,current)。 } } count1++。 } else { for (int i=0。iMaxpage。i++) { if (page3[i][0]==pvirtualpage) {equal=1。place=i。break。} } if (equal==1) { page3[place][1] =search(p,current)。 equal=0。 } else { place = max(page3,Maxpage)。 page3[place][1]=search(p,current)。 page3[place][0]=pvirtualpage。 count2 +=1。 } } p=pnext。 current +=1。 } coutOPT調(diào)度算法缺頁(yè)次數(shù) 缺頁(yè)率 命中率endl。 coutcount2setw(25)double(count2)/MAX_LENGTHsetw(10)1double(count2)/MAX_LENGTHendl。}int search(struct produce*place,int position){ struct produce*p=placenext。 int current=placevirtualpage。 int position1=position+1。 while(p) { if (current==pvirtualpage) { return position1。 } position1++。 p=pnext。 } return position1。}endif主函數(shù) includeinclude include include include void main(){ int S。 //定義變量記錄用戶選擇 char again。 //定義變量用戶選擇繼續(xù)還是退出 cout開(kāi)始產(chǎn)生內(nèi)存指令endl。 struct produce *first=creatlist()。//產(chǎn)生隨機(jī)指令 cout打印產(chǎn)生的指令信息endl。 print(first)。//打印產(chǎn)生的指令信息 while (1) { int Maxpage=3。//定義內(nèi)存最大頁(yè)面數(shù) cout輸入你的選擇endl。 cout1:FIFO(先進(jìn)先出)調(diào)度算法\n2:LRU(最近最少使用算法)\n3:OPT(最佳淘汰算法)\n4:清屏endl。 cinS。 while(S4||S1) { cout輸入錯(cuò)誤重新輸入endl。 cinS。 } if (S!=4) { while(Maxpage=32) { switch(S) { case 1:fifo(first,Maxpage)。break。 case 2:lru(first,Maxpage)。break。 case 3:opt(first,Maxpage)。break。 default:break。 } Maxpage++。 } cout是否繼續(xù)調(diào)用其他算法?是請(qǐng)按y/Y,否請(qǐng)按其它鍵endl。 cinagain。 if(again==39。y39。||again==39。Y39。) { continue。 } else break。 } else system(cls)。 }}課程設(shè)計(jì)感受通過(guò)這次的課程設(shè)計(jì),發(fā)現(xiàn)了自己很多的不足,正因?yàn)檫@樣才去努力的完善自己,通過(guò)和同學(xué)們的交流以及自己上網(wǎng)搜索,才逐步的理清思路,完成了課程的設(shè)計(jì)。我相信,一定還有很多需要改善的地方,希望在以后的學(xué)習(xí)中,不斷的充實(shí)自己,盡力學(xué)習(xí)好操作系統(tǒng)的相關(guān)知識(shí)17
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1