-
用C语言模拟操作系统中的进程管理
资源介绍
简单模拟
void CreateProgress() /*创建进程*/
{
int pname;
pnode *apcd;
if(count <= n)
{
printf("input a progress name(int)\n");
scanf("%d",&pname);
apcd = (struct node*)malloc(sizeof(pnode));
apcd->name = pname;
//apcd->status = already;
if(phead == NULL)
{
phead = apcd;
rp = phead;
phead->next=NULL;
}
else
{ rp->next = apcd;
rp = apcd;
rp->next = NULL;
}
count ++;
printf("successed to create a progress!\n");
AutoSheduling();
}
else
{
printf("progresses are more than ");
printf("%d",n);
printf("\n");
printf("System overload!\n");
}
}
- 上一篇: 操作系统课程设计文件管理系统
- 下一篇: 操作系统课程设计 文件系统程序设计