#define TRUE 1
#define FALSE 0
#define INVALID -1
#define NULL 0
#define total_instruction 320 /*指令流长*/
#define total_vp 32 /*虚页长*/
#define clear_period 50 /* 清零周期*/
typedef struct /* 页面结构*/
{
int pn,pfn,counter,time;
}pl_type;
pl_type pl[total_vp];
struct pfc_struct{
int pn,pfn;
struct pfc_struct *next;
};
typedef struct pfc_struct pfc_type;
pfc_ type pfc[total_vp],*freepf_head,*busypf_head,*busypf_tail;
int diseffect,a[total_instruction];
int page[total_instruction],offset[total_instruction];
int initialize(int);
int FIFO(int);
int main(){
int s,i,j;
srand(10*getpid());
s=(float)319*rand()/32767/32767/2+1;
for(i=0;i<to
#define FALSE 0
#define INVALID -1
#define NULL 0
#define total_instruction 320 /*指令流长*/
#define total_vp 32 /*虚页长*/
#define clear_period 50 /* 清零周期*/
typedef struct /* 页面结构*/
{
int pn,pfn,counter,time;
}pl_type;
pl_type pl[total_vp];
struct pfc_struct{
int pn,pfn;
struct pfc_struct *next;
};
typedef struct pfc_struct pfc_type;
pfc_ type pfc[total_vp],*freepf_head,*busypf_head,*busypf_tail;
int diseffect,a[total_instruction];
int page[total_instruction],offset[total_instruction];
int initialize(int);
int FIFO(int);
int main(){
int s,i,j;
srand(10*getpid());
s=(float)319*rand()/32767/32767/2+1;
for(i=0;i<to