xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 0.01M
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發布日期: 2021-03-27
  • 語言: 其他
  • 標簽: 其他??

資源簡介


操作系統進程調度源代碼,實現先來先服務調度、最短時間調度、最短剩余時間調度、優先級調度算法,此文件為.cpp文件,直接下載可執行

資源截圖

代碼片段和文件信息

#include
#include
#include??
#include???
#include?
using?namespace?std;?
const?int?INF?=?0x7fffffff;??

struct?node?{
int?num;
int?atime;
int?wtime;
int?youxian;
int?timechip;
}
pcb;
int?n;
struct?node?pro[100];
bool?vis[100];?

struct?yunxing{
int?xu;//調度序號
int?num;
int?stime;?
int?etime;??
int?youxian;??
}process;

node?qu[100];//就緒隊列??
int?he;//就緒隊列頭部???
int?ta;//就緒隊列尾部?

void?FCFS();//先來先服務調度算法??
void?SPF_N();//不可剝奪的短作業優先調度算法??
void?SPF_P();//可剝奪的短作業優先調度算法??
void?RR();//時間片輪轉調度算法??
void?PRI();//動態優先級調度算法??

bool?fcfscmp(node?a?node?b);??
//先來先服務算法進程排序規則,先按照到達時間升序,再按照進程號升序排列??
bool?spfcmp(node?a?node?b);??
//短作業優先算法進程排序規則,先按照到達時間升序,再按照運行時間升序,再按進程號升序排列
bool?rrcmp(node?a?node?b);??
//時間片輪轉算法進程排序規則,先按照到達時間升序,再按照進程號升序排列??
bool?pricmp(node?a?node?b);??
//動態優先級算法進程排序規則,先按照進程優先數升序,再按到達時間升序,再按進程號升序排列??

int?main()
{
n=0;
int?suanfa=0;
scanf(“%d“?&suanfa);
while?(scanf(“%d/%d/%d

評論

共有 條評論