![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
计算机操作系统原理
素年不过锦时
这个作者很懒,什么都没留下…
展开
-
SCAN 磁盘调度模拟实现
#include <stdio.h> #include <math.h> #include <iostream> #include <string> #include <iomanip> using namespace::std; struct track{ int tracknum; bool time;//计数器 }; void Sort(int *a,int n) { for (int i = 0; i < n原创 2021-01-07 23:31:52 · 193 阅读 · 0 评论 -
改进型 Clock 页面置换算法实现
#include <iostream> #include<string.h> using namespace::std; struct page{ int pagenum; int A; int M; }; int run(page *a,int num){ page b[5]; int count=0; for (int i=0; i<5; i++) { b[i].pagenum=0; b[i]原创 2021-01-07 23:31:00 · 1584 阅读 · 0 评论 -
银行家算法实现
#include <iostream> #include<string.h> using namespace::std; struct pcb1{ int pid; int a_max; int b_max; int c_max; int a_allocation; int b_allocation; int c_allocation; int a_need; int b_need; int c_need原创 2021-01-07 23:30:08 · 82 阅读 · 0 评论 -
进程撤销模拟实现
进程撤销模拟实现 main.cpp #include <iostream> #include"basic.h" pnode *proot; pnode *plink; int createpc(int *para){ pnode *p,*p1,*pp; int pflag; pflag=0; for(p=plink;p;p=p->next){ if(p->node->pid==para[0]){ prin原创 2021-01-07 23:25:15 · 1200 阅读 · 2 评论 -
FCFS进程调度模拟实现
main.cpp #include <iostream> #include<stdio.h> #include<string.h> using namespace std; struct pcb{ int pid; int arrivetime; int servicetime; int starttime; }; void sortpcb(pcb *p,int pidnum) { for(int i=0; i < pidnum-1; i++)原创 2021-01-07 23:29:07 · 316 阅读 · 0 评论