发布时间 : 星期一 文章操作系统实验题目及实验报告要求 - 图文更新完毕开始阅读a671c7375a8102d276a22f1e
{
finihead->next=finish2; status++; }
finish1->next=finish2; finish1=finish2; } }
finish2->next=NULL; /*Initialization compleated*/ status=0; processtest=0;
for(temp=0;temp alloctemp=allochead; needtemp=needhead; finishtemp=finihead; worktemp=workhead; for(i=0;i worktemp1=worktemp; if(finishtemp->stat==0) { for(j=0;j for(j=0;j worktemp1->value+=alloctemp->value; worktemp1=worktemp1->next; alloctemp=alloctemp->next; } if(status==0) { pathhead=path1=path2=(struct path*)malloc(pathlen); path1->next=path2->next=NULL; path1->value=i; status++; } else { path2=(struct path*)malloc(pathlen); path2->value=i; if(status==1) { pathhead->next=path2; status++; } path1->next=path2; path1=path2; } finishtemp->stat=1; } else { for(t=0;t for(t=0;t needtemp=needtemp->next; alloctemp=alloctemp->next; } processtest=0; worktemp=workhead; finishtemp=finishtemp->next; } } path2->next=NULL; finishtemp=finihead; for(temp=0;temp if(finishtemp->stat==0) { printf(\系统处于非安全状态!\\n\ exit(0); } finishtemp=finishtemp->next; } printf(\系统处于安全状态.\\n\ printf(\安全序列为: \\n\ do { printf(\ } while(pathhead=pathhead->next); printf(\ return 0; } 五;实验数据集处理结果 ; 六、实验体会或对改进实验的建议 七、参考资料 南昌大学实验报告 ---(4)进程调度算法的实现 学生姓名: 余长华 学 号: 6100509114 专业班级:管理科学与工程类093班 实验类型:□ 验证 □ 综合 ■ 设计 □ 创新 实验日期: 实验成绩: 一、实验目的 通过实验加强对进程调度算法的理解和掌握。 二、实验内容 编写程序实现进程调度算法,具体可以编写程序实现先来先服务算法或优先度高者调度算法。 三、实验要求 1、需写出设计说明; 2、设计实现代码及说明 3、运行结果; 四、主要实验步骤 #include fcfs a[100]; void input(fcfs *p,int N) { int i; printf(\for(i=0;i<=N-1;i++) { printf(\ scanf(\ }