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

正文內(nèi)容

使用動(dòng)態(tài)優(yōu)先權(quán)的進(jìn)程調(diào)度算法的模擬實(shí)驗(yàn)-在線瀏覽

2025-06-03 22:01本頁面
  

【正文】 LL amp。 temp3priority=temp1priority) //實(shí)現(xiàn)查找的功能 { temp2=temp3。 } temp2next=temp1。 } return head。 //temp1和temp2分別為比較結(jié)點(diǎn)的前驅(qū)和比較結(jié)點(diǎn) if(head==NULL) //如果就緒隊(duì)列為空 { head=run。 } else if(headpriority runpriority) //如果插入結(jié)點(diǎn)中所保存的數(shù)比頭結(jié)點(diǎn)所保存的數(shù)要大,則直接把該結(jié)點(diǎn)插入到頭結(jié)點(diǎn)之前 { runnext=head。 } else { temp1=head。 //temp2為比較的結(jié)點(diǎn) while(temp2!=NULL amp。 temp2priority=runpriority) //實(shí)現(xiàn)查找的功能 { temp1=temp2。 } temp1next=run。 } return head。 //num為進(jìn)程的個(gè)數(shù) int alltime=0。 //head為就緒隊(duì)列的頭指針 PCB *run=NULL。 //block為阻塞進(jìn)程的結(jié)點(diǎn) PCB *temp。 scanf(%d,amp。 head=CreatQueue(num)。 temp=head。 temp=tempnext。 //把就緒隊(duì)列中的第一個(gè)進(jìn)程取出來執(zhí)行 head=headnext。 //狀態(tài)改為執(zhí)行 runnext=NULL。 //顯示執(zhí)行進(jìn)程 printf(READY_QUEUE:)。 while(temp!=NULL) { printf(%d,tempid)。 } printf(\n)。 //顯示阻塞進(jìn)程 if(block!=NULL) { printf(%d,blockid)。 printf(============================================================================\n)。 printf(%d %d %d %d %d %d %s\n,runid,runpriority,runcputime,runalltime,runstartblock,runblocktime,runstate)。 while(temp!=NULL) { printf(%d %d %d %d %d %d %s\n,tempid,temppriority,tempcputime,tempalltime,tempstartblock,tempblocktime,tempstate)。 } if(block!=NULL) { printf(%d %d %d %d %d %d %s,blockid,blockpriority,blockcputime,blockalltime,blockstartblock,blockblocktime,blockstate)。 printf(============================================================================\n)。 //執(zhí)行進(jìn)程的優(yōu)先數(shù)減3 temp=head。 temp=tempnext。 //執(zhí)行進(jìn)程的已占用CPU時(shí)間加1 runalltime=1。 //執(zhí)行完一個(gè)時(shí)間片后,開始阻塞的時(shí)間減1
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1