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

正文內(nèi)容

[it計算機]操作系統(tǒng)實驗進程管理存儲器管理設(shè)備管理實驗代碼報告-全文預(yù)覽

2024-12-10 15:23 上一頁面

下一頁面
  

【正文】 { fp1size=fp1size+jplength+fpsize。 fp1next=fp2。 if(fpback!=NULL) fp1next=fp2。 fp2address=jpaddress。amp。 } if(fp!=NULL) { if((fpnext!=NULL)amp。 while((fp!=NULL)amp。 freepsize=jpaddress。 if(jp!=NULL) { 計算機操作系統(tǒng)實驗指導(dǎo)書 18 jobnumber=jobnumber1。 jp=jobp。 } } printf(\nthe total left is %d bytes:,totalfree)。 else { printf(name\t\tlength\t\taddress\n)。 } return(2)。 else freep=fpnext。 else jobp=jp2。 if(jp==NULL) { jp2back=jp1。amp。 jp2back=NULL。 jp2name=jn。 fp=freep。 } /******分配模塊 *******/ fengpei(int jl,char jn) {freeptr fp。 totalfree=TOTAL。 freepsize=TOTAL。 char jobnumber。 struct mat *back。 typedef struct mat { char name。 int size。區(qū)頭信息包括: size 空閑區(qū)大小(以字節(jié)計),包括區(qū)頭所占空間; next 前向鏈指針,指向下一個空閑區(qū); back 反向鏈指針,指向上一個空閑區(qū); address 本空閑區(qū)首地址。內(nèi)存空閑區(qū)采用自由鏈結(jié)構(gòu)。 本系統(tǒng)的主要程序模塊包括:分配模塊 ffallocation,回收模塊 ffcolection,緊湊模塊coalesce 及命令處理模塊 menu。若該分區(qū)有前鄰或后鄰空閑分區(qū),則將他們拼接成一塊加大的空閑區(qū)。 算法 存儲分配算法采用首次適應(yīng)( FF)法。 五、范例 采用可變分區(qū)存儲器管理方案的模擬系統(tǒng)。 畫出算法流程圖和設(shè)置的數(shù)據(jù)結(jié)構(gòu)。 二、 題目 存儲器管理 三、要求及提示 要求采用一種常用的存儲器分配算法,設(shè)計一個存儲器管理模擬系統(tǒng)。 經(jīng)過本次試驗加深了對于進程管理的理解和認識,對于它的執(zhí)行過程和整體的結(jié)構(gòu)有了一定的了解, 熟悉了進程管理中主要數(shù)據(jù)結(jié)構(gòu)的設(shè)計及進程調(diào)度算法,進程控制機構(gòu),同步機構(gòu),通訊機構(gòu)的實施。本程序完成后對于進程管理有了整體的定義和 理解。為了模擬時間片中斷,在進程模塊中安排了訪問時間片中斷處理程序 timeint 的語句。 } 程序運行結(jié)果 * * * * process management * * * * process1 priority ?1 process2 priority ?2 process3 priority ?3 計算機操作系統(tǒng)實驗指導(dǎo)書 11 s1=0,s2=0 process1,process2,process3 are all in ready! process1 is executing . process1 calls P on the semaphore 1. process1 is executing in the cretical section 1. s1=1 process1 calls V on semaphore and quit cretical section 1. process1 calls P on semaphore2. process1 is execting cretical section2. Times slice interrupt! process1 enter into ready. process2 is executing. process2 calls P on scmaphore2. process2 is blocked. process3 is executing. process3 calls P on semaphore2. process3 is blocked. process1 is executing. s2=1 process1 calls V on semaphore2 and quit cretical section2. process2 is waken up. process1 cycle count=1 . . . process3 is executing on its critical section. process3 calls V on semaphore2 and quit cretical section process1 is waken up process3 is enter into ready process1 is executing . . . process2 calls V on semaphore2 add quit cretical section2. process3 is waken up precess2 calls P on semaphore 1. process2 is execting cretical section1. 計算機操作系統(tǒng)實驗指導(dǎo)書 12 Time slice interrupt! process2 enter into ready. process3 is executing. . . . process3 cycle count=5 process3 is pleted! . . . process1 cycle count=5 process1 is pleted! process2 is executing. process2 is executing on the cretical section2. s2=15 process2 calls V on semaphore2 and quit critical section2. process2 calls P on semaphore1. process2 is execting cretical section1. s1=10 process2 calls V on semaphore1 and quit cretical section1. process2 cycle count=5 process2 is pleted! s1=10,s2=5 * * * * END * * * * 該程序啟動后將在屏幕上提示: process1 priority? process2 priority? process3 priority? 要求分別鍵入 3 個進程的執(zhí)行優(yōu)先數(shù)。 break。 break。 。 init()。 printf(process%d is pleted !\n,n+1)。 eexit(2)。c39。)) break。)) break。i6。 if(addr==39。)goto a3。 } if(i6) return。 if(v(0,39。e39。d39。c39。)) break。)) break。i6。 if(addr==39。)goto d2。c39。 if(addr==39。 eexit(0)。f39。)) break。)) break。)) break。 b1: printf(s1%d\n,++s1)。 /* process 1 is blocked*/ a1: printf(process1 is executing in the cretical section 1\n)。i++) { printf(process1 calls P on the semaphore 1\n)。f39。 if(addr==39。)goto c1。b39。 } } process1() { if(addr==39。 if(w!=NIL){ sem[se].firstwr=pcb[w].nextwr。 return (TRUE)。 { if(++sem[se].value0) return(FALSE)。 else{ while(pcb[w].nextwr!=NIL) w=pcb[w].nextwr。 pcb[exe].status=39。 return(TRUE)。 block(se)。 } return (pd)。j++) if(pcb[j].status==39。) if (pcb[j].priorityw){ w=pcb[j].priority。 for (j=0。 } } i=savearea[exe][0]。 pcb[pd].status=39。 printf(process%d is executing.\n,exe+1)。exe==NIL) return(NIL)。 return(TRUE)。t39。(exe==2))return(FALSE)。amp。 if((x)amp。 return(m/)。 } float random() {int m。i++) for(j=0。 sem[1].value=1。i)。r39。 計算機操作系統(tǒng)實驗指導(dǎo)書 5 for (j=0。 }sem[2]。 int priority。此外,系統(tǒng)中還用到下列主要全程變量: exe 執(zhí)行進程指針,其值為進程標識數(shù); i 用來模擬一個通用寄存器; addr 用來模擬程序計數(shù)器; s1, s2 兩個公用變量,與來共享臨界資源。 priorty 進程優(yōu)先數(shù); Y N N Y Y N N Y Y N Y 有 r 態(tài)就 緒進程? 有 t 態(tài)就 緒進程? 選取優(yōu)先數(shù)最小 pd 有無執(zhí)行者 ( exe≠ NIL) ? pd 優(yōu)先數(shù) exe 優(yōu)先數(shù)? 置 exe 進 程狀態(tài)為“ r” 置 pd 進程狀態(tài)為“ e” 恢復(fù)進程 pd 的現(xiàn)場 有無執(zhí)行 進 程? exe← pd return(N
點擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1