请求页式存储管理模拟实验源代码及实验报告.docVIP

  • 7
  • 0
  • 约7.1千字
  • 约 14页
  • 2019-07-03 发布于浙江
  • 举报

请求页式存储管理模拟实验源代码及实验报告.doc

//请求页式存储管理模拟实验源代码及实验报告 //自己写的,程序写得比较简单,只为方便学弟学妹们 呵呵^ ^ //dlnu. #includeiostream #includeprocess.h #includestdlib.h #include ctime #include cstdlib using namespace std; int yemianliu[32]={0};//全局变量数组,地址流 int p; //全局变量p是一共有多少地址流 void chushihua()//初始化函数 { int t; srand(time(0));//随机产生指令序列 p=12+rand()%32; cout地址流序列:; for(int i=0;ip;i++) { t=1+rand()%9; yemianliu[i]=t;//将随机产生的指令数存入页面流 coutt ; } coutendl; } void FIFO(int n) //FIFO算法,n是M的值 { int i; int q=p; int e; int queye=0; int flag; int fifo[32]={0}; while(q--) { flag=0; e=q; for(i=0;in;i++) {

文档评论(0)

1亿VIP精品文档

相关文档