#include<stdio.h>
#include<stdlib.h>
#include<time.h>
struct pcb
{
int id;
int status;
int firstaddr;
int length;
int outbufword;
}*PCB[3];
FILE *f;
struct req
{
int reqname;
int length;
int addr;
}reqblock[10];
int buffer[2][100],C3=10;
int l1=1,l2=1;
int head=0,tail=0;
int t1,t2;
void request(int i)
{
int j,length=0,m;
struct req *run;
if(i==1)
{
t1--;
}
else
{
t2--;
}
run=&reqblock[tail%10];
run->reqname=i;
run->length=0;
if(tail==0)
{
run->addr=0;
}
else
评论1