文件名称:1_1
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个按时间片轮转法实现处理器调度的程序
[提示]:
(1)假定系统有5个进程,每个进程用一个PCB来代表。PCB的结构为:
• 进程名——如Q1~Q5。
• 指针——把5个进程连成队列,用指针指出下一个进程PCB的首地址。
• 要求运行时间——假设进程需要运行的单位时间数。
• 已运行时间——进程已运行的单位时间数,初始值为0。
• 状态——假设两种状态,就绪和结束,用R表示就绪,用E表示结束。初始状态都为就绪状态。
(2) 每次运行之前,为每个进程任意确定它的“要求运行时间”。
(3) 把5个进程按顺序排成循环队列,用指针指出队列连接情况。用一个标志单元记录轮到运行的进程。处理器调度总是选择标志单元指示的进程运行,对所指的进程,将其“已运行时间”加1。
(4) 进程运行一次后,若“要求运行时间”等于“已运行时间”,则将状态改为“结束”,退出队列,否则将继续轮转。
(5) 若就绪队列为空,结束,否则转到(3)重复。
-design of a time-Web Method processor activation procedures [Note] : (1) The system has five processes, with each process on behalf of a PCB. PCB structure : # 8226 from the process -- as Q1 ~ Q5. Pointer # 8226 -- put five linked queue process, with a target that the process of PCB under the first address. # 8226 requested the running time -- the assumption that the process needs to run the unit time. # 8226 has been in operation for the time -- the process has been in operation for the number of time units, the initial value of 0. # 8226 state -- two hypothetical state, and end in place, ready with R, E said an end. For the initial state of readiness. (2) Before each operation, for each process arbitrarily defined its "run-time requirements." (3) the five sequential process que
[提示]:
(1)假定系统有5个进程,每个进程用一个PCB来代表。PCB的结构为:
• 进程名——如Q1~Q5。
• 指针——把5个进程连成队列,用指针指出下一个进程PCB的首地址。
• 要求运行时间——假设进程需要运行的单位时间数。
• 已运行时间——进程已运行的单位时间数,初始值为0。
• 状态——假设两种状态,就绪和结束,用R表示就绪,用E表示结束。初始状态都为就绪状态。
(2) 每次运行之前,为每个进程任意确定它的“要求运行时间”。
(3) 把5个进程按顺序排成循环队列,用指针指出队列连接情况。用一个标志单元记录轮到运行的进程。处理器调度总是选择标志单元指示的进程运行,对所指的进程,将其“已运行时间”加1。
(4) 进程运行一次后,若“要求运行时间”等于“已运行时间”,则将状态改为“结束”,退出队列,否则将继续轮转。
(5) 若就绪队列为空,结束,否则转到(3)重复。
-design of a time-Web Method processor activation procedures [Note] : (1) The system has five processes, with each process on behalf of a PCB. PCB structure : # 8226 from the process -- as Q1 ~ Q5. Pointer # 8226 -- put five linked queue process, with a target that the process of PCB under the first address. # 8226 requested the running time -- the assumption that the process needs to run the unit time. # 8226 has been in operation for the time -- the process has been in operation for the number of time units, the initial value of 0. # 8226 state -- two hypothetical state, and end in place, ready with R, E said an end. For the initial state of readiness. (2) Before each operation, for each process arbitrarily defined its "run-time requirements." (3) the five sequential process que
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 675062801_1.rar 列表 1_1.cpp