
操作系统
文章平均质量分 68
凝视深空
静心,精进
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
进程状态转换及其PCB的变化
代码实现了模拟进程状态转换及其相应PCB内容、组织结构的变化。#includeusing namespace std;typedef struct pcb{ int id; struct pcb *next;}pcb;pcb *ready,*run,*block;pcb* cre()//创建带头结点的ready队列{ pcb *head=new pcb原创 2017-04-23 15:48:31 · 5492 阅读 · 0 评论 -
操作系统页面置换算法之FIFO,LRU
#include#include#include#include#include#include#include#includeusing namespace std;const int total_i = 10;const int mf1 = 3;const int mf2 = 4;vector access_series(total_i);int firstE原创 2017-07-20 16:20:35 · 1580 阅读 · 0 评论 -
东北大学操作系统实验:进程同步和通信(生产者消费者问题模拟)
//producer_consumer.cc#include#include#includeusing namespace std;const int bufferSize = 8;vector buffer(bufferSize);queue waitQueue;int id;int writeptr, readptr;int consumer, producer;v原创 2018-02-06 13:48:29 · 3316 阅读 · 0 评论 -
Linux文件寻址算法:逻辑地址到物理地址的转换
题目描述: 编写一个函数实现Linux文件寻址的算法,即读取文件当前位置到物理存储位置的转换函数,需要给出运行的测试数据,可以假设和模拟需要的数据和结构。即编写一个函数unsigned long ltop(unsigned long logblkNum). 计算逻辑块号logblkNum所对应的物理块的块号。#include<stdio.h>#include<st...原创 2018-02-06 13:56:19 · 1921 阅读 · 0 评论