文件名称:CX
-
所属分类:
- 标签属性:
- 上传时间:2013-12-05
-
文件大小:1.26kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
设计一个按优先数调度算法实现处理器调度的程序
提示:
(1)假定系统有5个进程,每个进程用一个PCB来代表。PCB的格式为:
进程名、指针、要求运行时间、优先数、状态。
进程名——P1~P5。
指针——按优先数的大小把5个进程连成队列,用指针指出下一个进程PCB的首地址。
要求运行时间——假设进程需要运行的单位时间数。
优先数——赋予进程的优先数,调度时总是选取优先数大的进程先执行。
状态——假设两种状态,就绪,用R表示,和结束,用E表示。初始状态都为就绪状态。
(2) 每次运行之前,为每个进程任意确定它的“优先数”和“要求运行时间”。
(3) 处理器总是选队首进程运行。采用动态改变优先数的办法,进程每运行1次,优先数减1,要求运行时间减1。
(4) 进程运行一次后,若要求运行时间不等于0,则将它加入队列,否则,将状态改为“结束”,退出队列。
(5) 若就绪队列为空,结束,否则,重复(3)。
-Design a number of priority scheduling algorithm processor scheduling program
  Tip :
( 1 ) The system has five processes, each represented by a PCB . PCB format:
Process name , pointer, run-time requirements , priority number , status.
Process name- P1 ~ P5.
Pointer- according to the size of the five priority number into程连成queue pointer pointed to the next process PCB first address .
The time required to run- assuming unit time required to run several processes .
Priority number- the number of priority given to the process , always select a large number of priority scheduling process executed first .
State- assuming two states , Ready, represented by R , and end with E said . The initial state are ready state.
( 2 ) Before each run , for each process arbitrarily determine its " priority number " and " run-time requirements ."
( 3 ) the processor is always selected first team processes running . Change the priority number of dynamic way to run a process every time , prior
提示:
(1)假定系统有5个进程,每个进程用一个PCB来代表。PCB的格式为:
进程名、指针、要求运行时间、优先数、状态。
进程名——P1~P5。
指针——按优先数的大小把5个进程连成队列,用指针指出下一个进程PCB的首地址。
要求运行时间——假设进程需要运行的单位时间数。
优先数——赋予进程的优先数,调度时总是选取优先数大的进程先执行。
状态——假设两种状态,就绪,用R表示,和结束,用E表示。初始状态都为就绪状态。
(2) 每次运行之前,为每个进程任意确定它的“优先数”和“要求运行时间”。
(3) 处理器总是选队首进程运行。采用动态改变优先数的办法,进程每运行1次,优先数减1,要求运行时间减1。
(4) 进程运行一次后,若要求运行时间不等于0,则将它加入队列,否则,将状态改为“结束”,退出队列。
(5) 若就绪队列为空,结束,否则,重复(3)。
-Design a number of priority scheduling algorithm processor scheduling program
  Tip :
( 1 ) The system has five processes, each represented by a PCB . PCB format:
Process name , pointer, run-time requirements , priority number , status.
Process name- P1 ~ P5.
Pointer- according to the size of the five priority number into程连成queue pointer pointed to the next process PCB first address .
The time required to run- assuming unit time required to run several processes .
Priority number- the number of priority given to the process , always select a large number of priority scheduling process executed first .
State- assuming two states , Ready, represented by R , and end with E said . The initial state are ready state.
( 2 ) Before each run , for each process arbitrarily determine its " priority number " and " run-time requirements ."
( 3 ) the processor is always selected first team processes running . Change the priority number of dynamic way to run a process every time , prior
(系统自动生成,下载前可以参看下载内容)
下载文件列表
CX.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.