存储管理实验报告程序
#include #include #define NULL 0 #define getjcb(type) (type*)malloc(sizeof(type)) #define getsub(type) (type*)malloc(sizeof(type)) int num,num2; //要调度的作业数和要回收的区域数int m=0; //已分配作业数int flag; //分配成功标志int isup,isdown; //回收区域存在上邻和下邻的标志int is=0; struct jcb{ char name[10]; char state; int ntime; //所需时间int size; //所需空间大小int addr; //所分配分区的首地址struct jcb *link; } *ready =NULL, *p,*q,*as=NULL;//作业队列ready,已分配作业队列as typedef struct jcb JCB; struct subarea{ //分区块char name[10];
10.44KB
文件大小:
评论区