資源簡(jiǎn)介
進(jìn)程調(diào)度模擬算法(osexperiment完整版)
代碼片段和文件信息
#include
#include
using?namespace?std;
struct?Process//定義進(jìn)程控制塊
{
char?name[10];//?進(jìn)程名
int?priority;?//進(jìn)程優(yōu)先級(jí)
float?arive;?//進(jìn)程到達(dá)時(shí)間
float?run;?//進(jìn)程運(yùn)行時(shí)間
float?start;//進(jìn)程開始時(shí)間
float?finish;?//進(jìn)程完成時(shí)間
float?zz;?//進(jìn)程周轉(zhuǎn)時(shí)間
float?dqzz;?//進(jìn)程帶權(quán)周轉(zhuǎn)時(shí)間
bool?IsRun;?//進(jìn)程是否運(yùn)行標(biāo)志
};
?
float?finish?=?0.0f;
int?count=0;
void?print(Process?pro[]int?n)//顯示進(jìn)程
{???
cout<<“原輸入進(jìn)程信息:“< cout< for(int?i=0;i<=n-1;i++)
{
cout< < }
}
void?fcfs(Process?pro[]int?n1)//先來(lái)先服務(wù)法
{
????
//先按照提交時(shí)間從小到大排列
for(int?i
評(píng)論
共有 條評(píng)論