文件名称:操作系统C语言模拟进程管理
文件大小:5KB
文件格式:CPP
更新时间:2012-05-11 13:34:58
进程管理
简单模拟 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"); } }