
操作系统实验
qq_45911550
蚓无爪牙筋骨,唯用心也。
展开
-
操作系统实验--优先权算法 and 时间片轮转法--python实现
import randomclass PCB: # 进程的优先权 pro_pri = [] # 进程名,定义为一个列表 progress_name = [] # 进程 pro_ser = [] def __init__(self,N): self.pro_na(N) def pro_na(self,N): # N表示的是进程的数量 # 优先权列表 self.pro_pri=ran原创 2020-12-05 20:47:12 · 987 阅读 · 0 评论 -
操作系统实验--进程调度--银行家算法 C++实现
#include <iostream>#include<string>using namespace std;//n is the number of process, m is the number of resourceint n = 5, m = 4;int k = 0;//用于记住用户输入的进程顺序int rember[20];int re = 0;class Banker {public: Banker(int n, int m); void Ord原创 2020-12-05 20:27:29 · 799 阅读 · 0 评论 -
操作系统实验--存储管理--页面置换算法--FIFO and LRU c++实现
#include<iostream>#include <stdio.h>#include <stdlib.h>#include <time.h>//宏定义,生成指定范围[a,b]之间的随机数#define Random(a,b) (rand()%(b-0+1)+0)using namespace std;class Page_Replace {public: double precent(double h);// 求命中率 int Inst原创 2020-12-05 20:19:04 · 770 阅读 · 0 评论