操作系统实验指导书 操作系统实验指导书(新)

操作系统实验指导书 操作系统实验指导书(新)

ID:15105153

大小:32.50 KB

页数:11页

时间:2018-08-01

操作系统实验指导书 操作系统实验指导书(新)_第1页
操作系统实验指导书 操作系统实验指导书(新)_第2页
操作系统实验指导书 操作系统实验指导书(新)_第3页
操作系统实验指导书 操作系统实验指导书(新)_第4页
操作系统实验指导书 操作系统实验指导书(新)_第5页
资源描述:

《操作系统实验指导书 操作系统实验指导书(新)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、操作系统实验指导书操作系统实验指导书(新)导读:就爱阅读网友为您分享以下“操作系统实验指导书(新)”的资讯,希望对您有所帮助,感谢您对92to.com的支持!p2->next=null;return(head);}voidFIFO(array,n)intarray[],n;{11int*p;structpage*cp,*dp,*head,*new;intcount=0;head=create(n);p=array;while(*p!=-1){cp=dp=head;for(;cp->num!=*p&&cp->next!=null;

2、)cp=cp->next;if(cp->num==*p)printf("!");else11{count++;cp=head;for(;cp->tag!=-1&&cp->next!=null;)cp=cp->next;if(cp->tag==-1){cp->num=*p;cp->tag=0;printf("*");}else11{new=(structpage*)malloc(len);new->num=*p;new->tag=0;new->

3、next=null;cp->next=new;head=head->next;printf("%d",dp->num);free(dp);}}11p++;}printf("QueyeZongshu:%d",count);}voidLRU(array,n)intarray[],n;{intcount=0,*p=array;structpage*head,*cp,*dp,*rp,*new,*endp;head=create(n);while(*p!=-1){11cp=dp=rp=endp=head;f

4、or(;endp->next!=null;)endp=endp->next;for(;cp->num!=*p&&cp->next!=null;){rp=cp;cp=cp->next;}if(cp->num==*p){printf("!");if(cp->next!=null){if(cp!=head)rp->next=cp->next;11elsehead=head->next;}endp->next=cp;cp->next=null;}else{coun

5、t++;cp=rp=head;for(;cp->tag!=-1&&cp->next!=null;)cp=cp->next;if(cp->tag==-1)11{printf("*");cp->num=*p;cp->tag=0;}else{new=(structpage*)malloc(len);new->num=*p;new->tag=0;new->next=null;11cp->next=new;dp=head;head=head->next;printf(&q

6、uot;%d",dp->num);free(dp);}}p++;}printf("QueyeZongshu:%d",count);}OPT(array,n)11intarray[],n;{int*p,*q,count=0,i;structpage*head,*cp,*dp,*new;p=array;head=create(n);while(*p!=-1){cp=head;for(;cp->num!=*p&&cp->next!=null;)cp=cp->next;if(cp->nu

7、m!=*p)11{count++;cp=head;for(;cp->tag!=-1&&cp->next!=null;)cp=cp->next;if(cp->tag==-1){printf("*");cp->num=*p;cp->tag=0;}11

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。