⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcb.h

📁 CPU调度算法---模拟OS所使用的所有调度算法,包括创建一个kernel,PCB,队列
💻 H
字号:
# if !defined(__PCB_H)
	# define __PCB_H
# endif

# if !defined(__STDIO_H)
	# include <stdio.h>
# endif

# if !defined(__STRING_H)
	# include <string.h>
# endif

class PCB
{
public:
	long PC;
	int index;
	unsigned short Priority;
	PCB *next;
	FILE *fp;
	char * file;
	long BurstTime;

	PCB()
	{
		next=NULL;
		PC = 0;
		index = 0;
		Priority = 5;
		/*filename="";
		BurstTime = 0;
		fp = NULL;*/
	}

	PCB(char * filename)
	{
		next=NULL;
		PC = 0;
		index = 0;
		Priority = 5;
		file = filename;
		fp = fopen(filename,"rb");
		long curpos = ftell(fp);
		fseek(fp, 0L, SEEK_END);
		BurstTime = ftell(fp);
		fseek(fp, curpos, SEEK_SET);
	}

	PCB(char * filename,unsigned short p)
	{
		next=NULL;
		PC = 0;
		index = 0;
		Priority = p;
		file = filename;
		fp = fopen(filename,"rb");
		long curpos = ftell(fp);
		fseek(fp, 0L, SEEK_END);
		BurstTime = ftell(fp);
		fseek(fp, curpos, SEEK_SET);
	}
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -