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

正文內(nèi)容

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

2025-09-01 08:44 本頁面
 

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