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

正文內(nèi)容

操作系統(tǒng)處理機(jī)調(diào)度實(shí)驗(yàn)報(bào)告-文庫吧

2025-07-30 23:12 本頁面


【正文】 }void priority_cal(){ pcb *p。 p = get_process()。 int cpu = 0。 while(!process_finish(p)){ cpu++。 printf(cputime:%d\n,cpu)。 cpuexe(p)。 display(p)。 sleep(2)。 } free_process(p)。 printf(All processes have finished\n)。}pcb *get_process_round(){ pcb *q。 pcb *p。 pcb *t。 int i = 0。 printf(input name and time\n)。 while (iP_NUM){ q=(pcb *)malloc(sizeof(pcb))。 scanf(%s,qname)。 scanf(%d,amp。qneedtime)。 qcputime = 0。 qcount = 0。 qprocess = ready。 qnext = NULL。 if(i==0){ p = q。 t = q。 } else{ tnext = q。 t = q。 } i++。 } return p。}void cpu_round(pcb *q){ if(qneedtime==1) qcputime++。 else qcputime +=2。 qneedtime =2。 if(qneedtime0){ qneedtime = 0。 } qcount++。 qprocess = execute。}pcb *get_next(pcb *k,pcb *head){ pcb *t。 t = k。 do{ t =tnext。 }while ( t amp。amp。 tprocess == finish)。 if(t == NULL){ t = head。 while(tnext!=k amp。amp。 tprocess == finish){ t = tnext。 } } return t。}void set_state(pcb *p){ while(p){ if(pneedtime == 0){ pprocess = finish。 } if(pprocess == execute){ pprocess = ready。 } p = pnext。 }}void display_round(pcb *p){ printf(name cputime needtime count state\n)。 while(p){ printf(%s,pname)。 printf( )。 printf(%d,pcputime)。 printf( )。 printf(%d,pneedtime)。 printf( )。 printf(%d,pcount)。 printf( )。 switch(pprocess){ case ready:printf(ready\n)。break。 case execute:printf(execute\n)。 break。 case block:printf(block\n)。 break。 case finish:printf(finish\n)。 break。 } p = pnext。 }}void round_cal(){ pcb *p。 pcb *r。 p = get_process_round()。 int cpu = 0。 r=p。 while(!process_finish(p)){ if(rneedtime==1) cpu+=1。 else cpu+=2。 cpu_round(r)。 r = get_next(r,p)。 printf(cputime:%d\n,cpu)。 display_round(p)。 set_state(p)。 sleep(2)。 } free_process(p)。 }main(){ display_menu()。 int k。 scanf(%d,amp。k)。 switch(k){ case 1:priorit
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1