代码25700.docVIP

  • 5
  • 0
  • 约 7页
  • 2016-11-21 发布于江西
  • 举报
代码25700.doc

#include stdafx.h #include stdio.h #include stdlib.h #includeiostream using namespace std; #define NULL 0 #define false 0 #define true 1 bool _state=0; struct PCB { int ID; int priority; int CPUtime; int ALLtime; int State; PCB* next; }; void init();/*产生idle进程,输入用户进程数目,调用insert()*/ void print(PCB *pcb);/*输出进程属性信息*/ void print_init(PCB *pcb);/*输出所有PCB的初始值*/ void insert();/*生成进程属性信息,插入进程就绪队列*/ void Run_priority(PCB *pcb);/*运行进程,随机阻塞进程、产生新进程,插入就绪队列,唤醒阻塞进程*/ void block(PCB *pcb);/*调用destroy()将进程插入阻塞队列*/ void wakeup();/*唤醒进程,插入就绪队列*/ void proc_priority();/*优先权调度算法模拟*/ void update(PCB *pc

文档评论(0)

1亿VIP精品文档

相关文档