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

正文內(nèi)容

操作系統(tǒng)課程設計進程調(diào)度模擬設計-先來先服務(參考版)

2025-07-10 15:45本頁面
  

【正文】 優(yōu)(90100分)、良(8089分)、中(7079分)、及格(6069分)、60分以下為不及格                      指導教師簽名:                  2014年 月 日28 / 29。 } head=NULL。 headnext=tnext。 while(headnext!=NULL) { process *t=new process。 temp=tempnext。 coutsetw(10)進程序號setw(10)進程名setw(10)優(yōu)先級setw(10)到達時間setw(10)開始時間setw(10)執(zhí)行時間setw(10)結(jié)束時間endl。 } } } process *temp=head。 p=pnext。 turn=turn+(pendtimeparrivetime)。 systime=pendtime。 pstate==0) { pstarttime=systime。 //如果優(yōu)先級最大的進程已經(jīng)到達,則執(zhí)行 if(parrivetime = systime amp。i++) { p=headnext。 //判斷后面的 for(int i=0。 turn=turn+(headendtime headarrivetime)。 headstate=1。 else { //先把最先到達的輸出,然后再根據(jù)系統(tǒng)時間和優(yōu)先級判斷后續(xù)的進程 headstarttime=headarrivetime。 //平均周轉(zhuǎn)時間 double turnw=0。 double sysTime=0。 n2=n2next。 } n0=n1。 n1=n0next。 n0next=n2。amp。amp。amp。icount1。 process *n2=n1next。 } }void changePRIO(double systime) { //把最先到達的放到鏈頭 然后后面的結(jié)點按照優(yōu)先級來排序 //排序的前提是結(jié)點數(shù)至少是3個 從第二個開始和后面的比較 if(count2) { process *n0=head。 number++。 q1next=NULL。 cout進程運行時間。 cout進程到達時間。 cout優(yōu)先級。 cout進程名稱。 q1no=number。 int number=1。 cincount。 } void createPRIO() { process *q1=new process。 delete t。 t=headnext。 } cout平均周轉(zhuǎn)時間turn/countendl平均帶權周轉(zhuǎn)時間turnw/countendl。 coutsetw(10)tempnosetw(10)tempnamesetw(10)temparriveTimesetw(10)tempstartTimesetw(10)tempneedTimesetw(10)tempendTimeendl。 process *temp=head。 } } } (ios::left)。 turnw=turnw+(pendtimeparrivetime)/pneedtime。 systime=pendtime。 } else //如果前一個未結(jié)束時后一個已經(jīng)到達 { pstarttime=systime。 turnw=turnw+(pendtimeparrivetime)/pneedtime。 systime=pendTime。 while(p!=NULL) { if(parrivetimesystime) //如果前一個結(jié)束后一個還沒到達 { pstarttime=parrivetime。 turnw=turnw+(headendtime headarrivetime) / headneedtime。 systime=headendtime。 //處理第一個 else if(head!=NULL) { headstarttime=headarriveTime。 //平均周轉(zhuǎn)時間 double turnw=0。 double systime=0。 coutendlendl。 insert(q1)。 cinq1needtime。 cinq1arrivetime。 cinq1name。 cout進程序號numberendl。 while(number=count) { q1=new process。 coutendl。 cout請輸入進程總數(shù)目。 } } } } else head=current。 } //如果到達時間最大,則插到鏈尾 if (flag=1) { p1next=current。 break。 p1next=current。amp。 } else { int flag=1。 if(headarrivetime currentarrivetime ) { currentnext=head。 headnext=current。 head=current。 printPRIO()。 } void PRIO() { createPRIO()。}void FCFS() { createFCFS()。 } }system(pause)。 //退出,返回首頁 default:cout選擇有誤,請重新輸入選擇!endl。 go=0。break。break。 cout請選擇:。 while (go) { coutendlendl進程調(diào)度模擬設計endlendl。//程序主要部分int main(){ int choice。void changePRIO(double systime)。 void printFCFS()。void createFCFS()。 };void FCFS()。 process *head=Null。 //進程狀態(tài) int priority。 //進程開始時間 double endtime。 //進程達到時間 double needtime。 //進程名 int no。不可否認這種好習慣讓我受益無限,我也必須擁有它,以致我獲
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1