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

正文內(nèi)容

操作系統(tǒng)課程設(shè)計進(jìn)程調(diào)度模擬設(shè)計-先來先服務(wù)-閱讀頁

2025-07-22 15:45本頁面
  

【正文】 先服務(wù)算法 case 2:PRIO()。 //調(diào)用優(yōu)先計算法 case 3:cout退出endl。break。break。return 0。 printFCFS()。 //changePRIO()。 } //使用鏈表結(jié)構(gòu) 按達(dá)到時間的順序?qū)⑦M(jìn)程進(jìn)行排序void insert(process *current) { if (head!=Null) { if(headnext==Null) //如果只有一個節(jié)點 { if(currentarrivetimeheadarrivetime) //如果比鏈頭到達(dá)時間早,則插入鏈頭 { currentnext=head。 } else { currentnext=Null。 } } else //如果至少兩個節(jié)點 { process *p1=head。 head=current。 while(p1next!=Null) //當(dāng)head后面不為空時一直做 { //如果在兩個節(jié)點間 if(p1arrivetime currentarrivetime amp。 p1nextarrivetime currentarrivetime) { currentnext=p1next。 flag=0。 } else p1=p1next。 currentnext=Null。}void createFCFS() { process *q1=new process 。 cincount。 int number=1。 q1no=number。 cout進(jìn)程名稱。 cout進(jìn)程到達(dá)時間。 cout進(jìn)程運行時間。 q1next=NULL。 number++。 } }void printFCFS() { process *p=new process。 //記錄系統(tǒng)時間 double turn=0。 //平均帶權(quán)周轉(zhuǎn)時間 if(head==NULL) cout沒有進(jìn)程調(diào)度endl。 headendtime=headarrivetime+headneedtime。 turn=turn+(headendtime headarrivetime)。 p=headnext。 pendtime=pstarttime+pneedtime。 turn=turn+(pendtimeparrivetime)。 p=pnext。 pendtime=pstarttime+pneedtime。 turn=turn+(pendtimeparrivetime)。 p=pnext。 //設(shè)置對齊方式為left coutsetw(10)進(jìn)程序號setw(10)進(jìn)程名setw(10)到達(dá)時間setw(10)開始時間setw(10)執(zhí)行時間setw(10)結(jié)束時間endl。 while(temp!=NULL) { (ios::left)。 temp=tempnext。 //清空鏈表 while(headnext!=NULL) //回收空間 { process *t=new process。 headnext=tnext。 } head=NULL。 cout請輸入進(jìn)程總數(shù)目。 coutendl。 while(number=count) { q1=new process。 cout進(jìn)程序號numberendl。 cinq1name。 cinq1priority。 cinq1arriveTime。 cinq1needTime。 insert(q1)。 coutendlendl。 process *n1=n0next。 for(int i=0。i++) { while(n1!=NULL amp。 n2!=NULL amp。 n1arrivetime = systime amp。 n2arrivetime = systime) { //如果前面的優(yōu)先級大于后面的優(yōu)先級,則交換 if(n1priority n2priority) { n1next=n2next。 n2next=n1。 n2=n0nextnext。 n1=n2。 } } } }void printPRIO() { process *p=new process。 //記錄系統(tǒng)時間 double turn=0。 //平均帶權(quán)周轉(zhuǎn)時間 if(head==NULL) cout沒有進(jìn)程調(diào)度!endl。 headendtime=headarrivetime+headneedtime。 systime=headendtime。 turnw=turnw+(headendtime headarrivetime) / headneedtime。icount1。 while(p!=NULL) { changePRIO(double systime)。amp。 pendtime=parrivetime+pneedtime。 pstate=1。 turnw=turnw+(pendtimeparrivetime)/pneedtime。 } else p=pnext。 (ios::left)。 while(temp!=NULL) { coutsetw(10)tempnosetw(10)tempnamesetw(10)tempprioritysetw(10)temparriveTimesetw(10)tempstartTimesetw(10)tempneedTimesetw(10)tempendTimeendl。 } cout平均周轉(zhuǎn)時間:turn/countendl平均帶權(quán)周轉(zhuǎn)時間:turnw/countendl。 t=headnext。 delete t。 } 本科生課程設(shè)計成績評定表班級:  姓名:  學(xué)號:序號評分項目滿分實得分1學(xué)習(xí)態(tài)度認(rèn)真、遵守紀(jì)律102設(shè)計分析合理性103設(shè)計方案正確性、可行性、創(chuàng)造性204設(shè)計結(jié)果正確性405設(shè)計報告的規(guī)范性106設(shè)計驗收10總得分/等級評語:注:最終成績以五
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1