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

正文內(nèi)容

操作系統(tǒng)課程設計進程調度模擬設計-先來先服務-資料下載頁

2025-07-07 15:45本頁面
  

【正文】 meendl。 temp=tempnext。 } cout平均周轉時間turn/countendl平均帶權周轉時間turnw/countendl。 //清空鏈表 while(headnext!=NULL) //回收空間 { process *t=new process。 t=headnext。 headnext=tnext。 delete t。 } head=NULL。 } void createPRIO() { process *q1=new process。 cout請輸入進程總數(shù)目。 cincount。 coutendl。 int number=1。 while(number=count) { q1=new process。 q1no=number。 cout進程序號numberendl。 cout進程名稱。 cinq1name。 cout優(yōu)先級。 cinq1priority。 cout進程到達時間。 cinq1arriveTime。 cout進程運行時間。 cinq1needTime。 q1next=NULL。 insert(q1)。 number++。 coutendlendl。 } }void changePRIO(double systime) { //把最先到達的放到鏈頭 然后后面的結點按照優(yōu)先級來排序 //排序的前提是結點數(shù)至少是3個 從第二個開始和后面的比較 if(count2) { process *n0=head。 process *n1=n0next。 process *n2=n1next。 for(int i=0。icount1。i++) { while(n1!=NULL amp。amp。 n2!=NULL amp。amp。 n1arrivetime = systime amp。amp。 n2arrivetime = systime) { //如果前面的優(yōu)先級大于后面的優(yōu)先級,則交換 if(n1priority n2priority) { n1next=n2next。 n0next=n2。 n2next=n1。 n1=n0next。 n2=n0nextnext。 } n0=n1。 n1=n2。 n2=n2next。 } } } }void printPRIO() { process *p=new process。 double sysTime=0。 //記錄系統(tǒng)時間 double turn=0。 //平均周轉時間 double turnw=0。 //平均帶權周轉時間 if(head==NULL) cout沒有進程調度!endl。 else { //先把最先到達的輸出,然后再根據(jù)系統(tǒng)時間和優(yōu)先級判斷后續(xù)的進程 headstarttime=headarrivetime。 headendtime=headarrivetime+headneedtime。 headstate=1。 systime=headendtime。 turn=turn+(headendtime headarrivetime)。 turnw=turnw+(headendtime headarrivetime) / headneedtime。 //判斷后面的 for(int i=0。icount1。i++) { p=headnext。 while(p!=NULL) { changePRIO(double systime)。 //如果優(yōu)先級最大的進程已經(jīng)到達,則執(zhí)行 if(parrivetime = systime amp。amp。 pstate==0) { pstarttime=systime。 pendtime=parrivetime+pneedtime。 systime=pendtime。 pstate=1。 turn=turn+(pendtimeparrivetime)。 turnw=turnw+(pendtimeparrivetime)/pneedtime。 p=pnext。 } else p=pnext。 } } } process *temp=head。 (ios::left)。 coutsetw(10)進程序號setw(10)進程名setw(10)優(yōu)先級setw(10)到達時間setw(10)開始時間setw(10)執(zhí)行時間setw(10)結束時間endl。 while(temp!=NULL) { coutsetw(10)tempnosetw(10)tempnamesetw(10)tempprioritysetw(10)temparriveTimesetw(10)tempstartTimesetw(10)tempneedTimesetw(10)tempendTimeendl。 temp=tempnext。 } cout平均周轉時間:turn/countendl平均帶權周轉時間:turnw/countendl。 while(headnext!=NULL) { process *t=new process。 t=headnext。 headnext=tnext。 delete t。 } head=NULL。 } 本科生課程設計成績評定表班級:  姓名:  學號:序號評分項目滿分實得分1學習態(tài)度認真、遵守紀律102設計分析合理性103設計方案正確性、可行性、創(chuàng)造性204設計結果正確性405設計報告的規(guī)范性106設計驗收10總得分/等級評語:注:最終成績以五級分制記。優(yōu)(90100分)、良(8089分)、中(7079分)、及格(6069分)、60分以下為不及格                      指導教師簽名:                  2014年 月 日28 /
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1