linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)

linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)

ID:14335296

大?。?21.50 KB

頁數(shù):10頁

時(shí)間:2018-07-28

linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)_第1頁
linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)_第2頁
linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)_第3頁
linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)_第4頁
linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)_第5頁
資源描述:

《linux操作系統(tǒng)實(shí)驗(yàn)報(bào)告 存儲管理試驗(yàn)》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫。

1、電子信息學(xué)院實(shí)驗(yàn)報(bào)告書課程名:《Linux操作系統(tǒng)實(shí)驗(yàn)》題目:實(shí)驗(yàn)三存儲管理試驗(yàn)實(shí)驗(yàn)類別【驗(yàn)證】班級:BX0907學(xué)號:09姓名:吳沛儒評語:實(shí)驗(yàn)態(tài)度:認(rèn)真()一般()差()實(shí)驗(yàn)結(jié)果:正確()部分正確()錯(cuò)()實(shí)驗(yàn)理論:掌握()熟悉()了解()不懂()操作技能:強(qiáng)()一般()差()實(shí)驗(yàn)報(bào)告:好()一般()差()成績:指導(dǎo)教師:胡靜批閱時(shí)間:年月日成績:指導(dǎo)教師:寧建紅批閱時(shí)間:年月日《Linux操作系統(tǒng)》實(shí)驗(yàn)報(bào)告-9-1、實(shí)驗(yàn)內(nèi)容或題目(1)模擬初始內(nèi)存頁面分配(數(shù)組、結(jié)構(gòu)體均可)(2)實(shí)現(xiàn)Buddyheap算法(3)通過鍵盤輸入隨機(jī)產(chǎn)生申請和釋放操作·請求:r8代表申請8個(gè)頁面?!め尫牛篺

2、4代表釋放4個(gè)頁面。(4)每個(gè)申請或釋放操作,都在屏幕上顯示操作前與操作后的內(nèi)存分配的對比圖。(5)實(shí)驗(yàn)假設(shè)申請和釋放的頁數(shù)都是2的整次冪。(1)建立工作集頁面模型。(2)利用隨機(jī)函數(shù)動態(tài)生成進(jìn)程訪問頁面的序列號。(3)實(shí)現(xiàn)FIFO頁面淘汰算法。(4)實(shí)現(xiàn)頁故障率反饋模型。2、實(shí)驗(yàn)?zāi)康呐c要求①(1)用C語言是實(shí)現(xiàn)模擬Linux系統(tǒng)中連續(xù)內(nèi)存分配用到的伙伴對算法。(2)通過鏈表的形式輸出在內(nèi)存申請和釋放過程中內(nèi)存狀態(tài)的對比圖。②(1)了解工作集模型的原理及其特點(diǎn)。(2)實(shí)現(xiàn)頁故障率反饋模型。3、實(shí)驗(yàn)步驟與源程序1.Buddyheap算法模擬源程序;《Linux操作系統(tǒng)》實(shí)驗(yàn)報(bào)告-9-#incl

3、ude#includetypedefstructblock{intsize;intstart;intloc;structblock*next;structblock*prior;}block;《Linux操作系統(tǒng)》實(shí)驗(yàn)報(bào)告-9-intmaxsize=512;block*note;block*id[10];voidprintmem(){inti;for(i=9;i>=0;i--){printf("%d->",i);block*temp=(structblock*)malloc(sizeof(structblock));temp=id[i]->next;wh

4、ile(temp!=NULL){printf("%d(%s)(%d)->",temp->size,temp->loc==1?"占用":"空閑",temp->start);temp=temp->next;}printf("");}}voidinit(){inti;for(i=0;i<9;i++){id[i]=(structblock*)malloc(sizeof(structblock));id[i]->prior=id[i];id[i]->next=NULL;}note=(structblock*)malloc(sizeof(structblock));note->size=maxsiz

5、e;note->start=0;note->loc=0;note->next=NULL;id[9]=(structblock*)malloc(sizeof(structblock));id[9]->next=note;id[9]->prior=id[9];note->prior=id[9];printmem();}intpower(intx,inty){intk=0,tmp=1;for(;k

6、count++;}returncount;}intsplit(inttempId){block*pend=(structblock*)malloc(sizeof(structblock));block*cend=(structblock*)malloc(sizeof(structblock));block*newf=(structblock*)malloc(sizeof(structblock));block*newu=(structblock*)malloc(sizeof(structblock));pend=id[tempId]->next;intflag=0,isFirst=0;《Li

7、nux操作系統(tǒng)》實(shí)驗(yàn)報(bào)告-9-while(pend!=NULL){if(pend->loc==0){if(isFirst==0){id[tempId]->next=pend->next;}else{pend->prior->next=pend->next;}intsize=(pend->size)/2;intstart=pend->start;newu->size=size;newu->start=start

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動畫的文件,查看預(yù)覽時(shí)可能會顯示錯(cuò)亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負(fù)責(zé)整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時(shí)聯(lián)系客服。
3. 下載前請仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時(shí)可能由于網(wǎng)絡(luò)波動等原因無法下載或下載錯(cuò)誤,付費(fèi)完成后未能成功下載的用戶請聯(lián)系客服處理。