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

正文內(nèi)容

操作系統(tǒng)課程設(shè)計(jì)(小型的操作系統(tǒng))(編輯修改稿)

2025-09-01 08:44 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 urse[i]。 } //apply end tempnext=NULL。 //coutcopy is right!endl。 if(head1==NULL){ head1=temp。 }else{ Process *k=head1。 while(knext){//尋找到最后一個(gè)節(jié)點(diǎn) 不斷的循環(huán)退不出去 k=knext。 } knext=temp。 } // coutcopy is right!endl。 temp2=temp2next。 }//while if(head1==NULL) coutLinkCopy() is out!endl。 system(pause)。}void JOB::MemToDiskMem(){ system(cls)。 CirQueueint q(16)。 //一共定義的16個(gè)頁(yè)面 (e)。 int *Mem。 int count=0。 //記錄下進(jìn)程的數(shù)目 Process *temp_head1=head1。 while(temp_head1){ count++。 temp_head1=temp_head1next。 } temp_head1=head1。 Mem=new int[count]。 int temp_count=0。 while(temp_head1){ int Begin=0。 coutProcess: temp_head1ProcessName memery use situation:endl。 Begin+=temp_head1NeedMem。 int k=0。 //所需的頁(yè)面數(shù)目 if(Begin%YE==0){ k=Begin/YE。 }else{ k=Begin/YE+1。 } Mem[temp_count++]=k。 coutk頁(yè)被占用!endl。 temp_head1=temp_head1next。 }//end while coutendl。 temp_head1=head1。 coutWant to see 缺頁(yè)調(diào)度過程 Y/N. endl。 char option。 int total=0,AllTotal=0。 cinoption。 if(option==39。y39。||option==39。Y39。){ for(int i=0。icount。i++){ AllTotal+=Mem[i]。 for(int j=0。jMem[i]。j++){ if((true)){ temp_count=0。 while(temp_counti){ temp_head1=temp_head1next。 temp_count++。 } coutProcess :temp_head1ProcessName need mem is endl。 temp_head1=head1。 }else{ temp_count=0。 while(temp_counti){ temp_head1=temp_head1next。 temp_count++。 } coutProcess :temp_head1ProcessName need mem is loading error 缺頁(yè)調(diào)度endl。 temp_head1=head1。 total++。 bool flag=()。 if((true)){ coutProcess :temp_head1ProcessName need mem is loading ok 缺頁(yè)調(diào)度endl。 } } }//for2 coutendl。 }//for1 } cout一共產(chǎn)生了:total 次缺頁(yè)中斷. \n缺頁(yè)中斷率為:(float)total/AllTotal%endl。 system(pause)。}void JOB::LookCpu_ShowRunningProcess(){ system(cls)。 int NowTime=0。 Process *run=head1。//臨時(shí)試用一下 最終需要?dú)w還為NULL Process *wait=head1。// dsvrfgvregrefswgvregegsdgre int count=0。 while(run){//計(jì)算等待運(yùn)行的進(jìn)程的個(gè)數(shù) count++。 run=runnext。 } run=head1。//還原運(yùn)行鏈表 //建立一個(gè)映射表 char **Run_Process_Name=new char*[count]。//申請(qǐng)一個(gè)動(dòng)態(tài)的二維表 for(int i=0。icount。i++){//響應(yīng)的二維空間申請(qǐng)完畢 Run_Process_Name[i]=new char[10]。 strcpy(Run_Process_Name[i],runProcessName)。 run=runnext。 } run=NULL。 int *Run_Process_CpuNeed=new int[count]。 //映射表建立完畢 //計(jì)算各個(gè)進(jìn)程中所需的cpu時(shí)間 ShowRunningProcess_CalculateCpuNeed(Run_Process_CpuNeed,count)。 Process *priorNode=NULL。 //Process *tail=head。 while(true){ //int time11=waitArriveTime。 if(waitamp。amp。NowTime=waitArriveTime){ if(run==NULL){ run=wait。 priorNode=run。 }else{//連接到尾部 Process *temp=run。 while(tempnext!=priorNode){//尋找到前驅(qū)節(jié)點(diǎn) temp=tempnext。 } tempnext=wait。//將結(jié)點(diǎn)連接上鏈表 priorNode=wait。 //waitnext=run。 } wait=waitnext。//釋放一個(gè)結(jié)點(diǎn) priorNodenext=run。//連接上頭部形成 循環(huán)鏈表 } if(run){ run=runnext。 //重新調(diào)度 coutNowTimeNowTime+RR Process :runProcessName is Runningendl。 coutcpu 調(diào)度下一個(gè)運(yùn)行的進(jìn)程。endl。 NowTime+=RR。 //依據(jù)上面建設(shè)的映射 按名取出所需運(yùn)行的時(shí)間 int ALLNeedCpu。 for(int i=0。icount。i++){ if(strcmp(Run_Process_Name[i],runProcessName)==0) break。 } ALLNeedCpu=Run_Process_CpuNeed[i]。 ALLNeedCpu=RR。//減去本次運(yùn)行的時(shí)間 if(ALLNeedCpu0){ Run_Process_CpuNeed[i]=ALLNeedCpu。//重新寫回到數(shù)組中 保持一致性 }else{ //此節(jié)點(diǎn)已經(jīng)做完了 請(qǐng)直接釋放 if(runnext==run){ run=NULL。 }else{ Process *k=run。 while(knext!=run){//尋找當(dāng)前運(yùn)行節(jié)點(diǎn)的前一個(gè)結(jié)點(diǎn) k=knext。 } knext=knextnext。 run=k。 } } }// end if(run) if(wait==NULLamp。amp。run==NULL)//沒有等待CPU的進(jìn)程了 和 沒有正在運(yùn)行的進(jìn)程 滿足退出的要求 退出 break。 NowTime++。 }//while system(paus
點(diǎn)擊復(fù)制文檔內(nèi)容
規(guī)章制度相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1