
操作系统
husky105
这个作者很懒,什么都没留下…
展开
-
页面置换算法
#include <iostream> #define M 3 #define N 20 using namespace std; struct block { int iPageNum; //物理块里存储的页面号 int iBlockFlag; //在三种算法中用到的标记。例如在FIFO中为在内存中的时间 }; //算法模拟移位寄存器原理 void FIFO(int iTempPage[N],int flag[N],block myBlock[M]); voi原创 2020-11-09 14:10:11 · 354 阅读 · 1 评论 -
银行家算法
#include <iostream> #include <string> #define M 3 //资源的种类数 #define N 5 //进程的个数 using namespace std; void output(int iMax[N][M], int iAllocation[N][M], int iNeed[N][M], int iAvailable[M], char cName[N]); // 输出打印 bool safety(int iAllocati原创 2020-11-03 20:03:09 · 251 阅读 · 0 评论