操作系统课程里 用C语言实现银行家算法。
pathhead->next=path2; status++;
}
path1->next=path2;
path1=path2;
}
finishtemp->stat=1;
}
else
{
for(t=0;t<colum;t++)
alloctemp=alloctemp->next; finishtemp->stat=0;
}
}
else
for(t=0;t<colum;t++)
{
needtemp=needtemp->next; alloctemp=alloctemp->next; }
processtest=0;
worktemp=workhead;
finishtemp=finishtemp->next; }
}
path2->next=NULL;
finishtemp=finihead;
for(temp=0;temp<row;temp++) {
if(finishtemp->stat==0)
{
printf("\n系统处于非安全状态!\n"); exit(0);
}
finishtemp=finishtemp->next; }
printf("\n系统处于安全状态.\n"); printf("\n安全序列为: \n"); do
{
百度搜索“70edu”或“70教育网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,70教育网,提供经典教育范文c实现银行家算法(8)在线全文阅读。
相关推荐: