文件名称:jincheng
- 所属分类:
- 其他小程序
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.62mb
- 下载次数:
- 0次
- 提 供 者:
- 金**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
模拟高优先权优先的进程调度算法
采用最高优先数优先的调度算法(即把处理机分配给优先数最高的进程),每个进程有一个进程控制块(PCB)表示。进程控制块可以包含如下信息:进程名、优先数、需要运行时间、已用CPU时间、进程状态等等。每个进程的状态可以是就绪W(Wait)、运行R(Run)、或完成F(Finish)三种状态之一。
进程的优先数及需要的运行时间可以事先人为地指定,进程的运行时间以时间片为单位进行计算。 就绪进程获得CPU后都只能运行一个时间片。用已占用CPU时间加1来表示。
如果运行一个时间片后,进程的已占用 CPU时间已达到所需要的运行时间,则撤消该进程,如果运行一个时间片后进程的已占用CPU时间还未达所需要的运行时间,也就是进程还需要继续运行,此时应将进程的优先数减1(即降低一级),然后把它插入就绪队列等待CPU。
每进行一次调度程序都打印一次运行进程、就绪队列、以及各个进程的 PCB,以便进行检查。
重复以上过程,直到所有进程都完成为止。
-Simulation of high-priority process scheduling priority
The highest priority by the number of priority scheduling algorithm (ie the number of processors allocated to the highest priority process), each process has a process control block (PCB) said. Process control block can contain the following information: process name, priority number, need to run time, CPU time has been used, the process of state and so on. The state of each process can be ready W (Wait), run the R (Run), or the completion of F (Finish) one of three states.
Process priority number and needs of the running time can be specified in advance artificially, the process of running time to calculate the time-piece. Ready access to CPU process can only run one time after the film. CPU time has been occupied with a plus 1 to that.
If you run a time slice, the process has been CPU-time has reached the required running time, then undo the process, if a time slice to run after the process has yet to take up CPU time to r
采用最高优先数优先的调度算法(即把处理机分配给优先数最高的进程),每个进程有一个进程控制块(PCB)表示。进程控制块可以包含如下信息:进程名、优先数、需要运行时间、已用CPU时间、进程状态等等。每个进程的状态可以是就绪W(Wait)、运行R(Run)、或完成F(Finish)三种状态之一。
进程的优先数及需要的运行时间可以事先人为地指定,进程的运行时间以时间片为单位进行计算。 就绪进程获得CPU后都只能运行一个时间片。用已占用CPU时间加1来表示。
如果运行一个时间片后,进程的已占用 CPU时间已达到所需要的运行时间,则撤消该进程,如果运行一个时间片后进程的已占用CPU时间还未达所需要的运行时间,也就是进程还需要继续运行,此时应将进程的优先数减1(即降低一级),然后把它插入就绪队列等待CPU。
每进行一次调度程序都打印一次运行进程、就绪队列、以及各个进程的 PCB,以便进行检查。
重复以上过程,直到所有进程都完成为止。
-Simulation of high-priority process scheduling priority
The highest priority by the number of priority scheduling algorithm (ie the number of processors allocated to the highest priority process), each process has a process control block (PCB) said. Process control block can contain the following information: process name, priority number, need to run time, CPU time has been used, the process of state and so on. The state of each process can be ready W (Wait), run the R (Run), or the completion of F (Finish) one of three states.
Process priority number and needs of the running time can be specified in advance artificially, the process of running time to calculate the time-piece. Ready access to CPU process can only run one time after the film. CPU time has been occupied with a plus 1 to that.
If you run a time slice, the process has been CPU-time has reached the required running time, then undo the process, if a time slice to run after the process has yet to take up CPU time to r
(系统自动生成,下载前可以参看下载内容)
下载文件列表
jincheng\jincheng.dsp
........\jincheng.dsw
........\jincheng.ncb
........\Debug\vc60.idb
........\.....\vc60.pdb
........\.....\jincheng.pch
........\.....\jincheng.exe
........\.....\jincheng.pdb
........\.....\jincheng.ilk
........\.....\jin.pch
........\.....\jin.exe
........\.....\jin.pdb
........\.....\jin.obj
........\.....\jin.ilk
........\jincheng.plg
........\jin.ncb
........\jin.plg
........\jin.cpp
........\jin.dsp
........\jin.opt
........\jin.dsw
........\Debug
jincheng
........\jincheng.dsw
........\jincheng.ncb
........\Debug\vc60.idb
........\.....\vc60.pdb
........\.....\jincheng.pch
........\.....\jincheng.exe
........\.....\jincheng.pdb
........\.....\jincheng.ilk
........\.....\jin.pch
........\.....\jin.exe
........\.....\jin.pdb
........\.....\jin.obj
........\.....\jin.ilk
........\jincheng.plg
........\jin.ncb
........\jin.plg
........\jin.cpp
........\jin.dsp
........\jin.opt
........\jin.dsw
........\Debug
jincheng