文件名称:ProcessScheduling
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.31kb
-
已下载:2次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
设计一个有 N个进程并行的优先级调度程序:每个进程有一个进程控制块( PCB)表示。进程控制块可以包含如下信息:进程名、优先数、到达时间、需要运行时间、已用CPU时间、进程状态等等。
进程的优先数及需要的运行时间可以事先人为地指定(也可以由随机数产生)。进程的到达时间为进程输入的时间。
进程的运行时间以时间片为单位进行计算。
每个进程的状态可以是就绪 W(Wait)、运行R(Run)、或完成F(Finish)三种状态之一。
就绪进程获得 CPU后都只能运行一个时间片。用已占用CPU时间加1来表示。
如果运行一个时间片后,进程的已占用 CPU时间已达到所需要的运行时间,则撤消该进程,如果运行一个时间片后进程的已占用CPU时间还未达所需要的运行时间,也就是进程还需要继续运行,此时应将进程的优先数减1(即降低一级),然后把它插入就绪队列等待CPU。
每进行一次调度程序都打印一次运行进程、就绪队列、以及各个进程的 PCB,以便进行检查。
重复以上过程,直到所要进程都完成为止。-Design of a parallel to the process N one priority scheduling process: Each process has a process control block (PCB) said. Process control block may contain the following information: process name, priority number, arrival time, need to run time, has spent CPU time, the process of the state and so on.
The process priority number and needs of the running time can be artificially designated in advance (you can also by a random number generator). Process, the arrival time for the process input time.
The process of running time to time slices are calculated as a unit.
The state of each process can be ready W (Wait), run the R (Run), or the completion of F (Finish), one of three states.
Ready access to CPU after the process can only run one time slice. CPU time has been occupied with the plus one indication of this.
If you are running a time slice, after the process has been CPU-time has reached the required running time, then undo the process, if a time slice to run after the pr
进程的优先数及需要的运行时间可以事先人为地指定(也可以由随机数产生)。进程的到达时间为进程输入的时间。
进程的运行时间以时间片为单位进行计算。
每个进程的状态可以是就绪 W(Wait)、运行R(Run)、或完成F(Finish)三种状态之一。
就绪进程获得 CPU后都只能运行一个时间片。用已占用CPU时间加1来表示。
如果运行一个时间片后,进程的已占用 CPU时间已达到所需要的运行时间,则撤消该进程,如果运行一个时间片后进程的已占用CPU时间还未达所需要的运行时间,也就是进程还需要继续运行,此时应将进程的优先数减1(即降低一级),然后把它插入就绪队列等待CPU。
每进行一次调度程序都打印一次运行进程、就绪队列、以及各个进程的 PCB,以便进行检查。
重复以上过程,直到所要进程都完成为止。-Design of a parallel to the process N one priority scheduling process: Each process has a process control block (PCB) said. Process control block may contain the following information: process name, priority number, arrival time, need to run time, has spent CPU time, the process of the state and so on.
The process priority number and needs of the running time can be artificially designated in advance (you can also by a random number generator). Process, the arrival time for the process input time.
The process of running time to time slices are calculated as a unit.
The state of each process can be ready W (Wait), run the R (Run), or the completion of F (Finish), one of three states.
Ready access to CPU after the process can only run one time slice. CPU time has been occupied with the plus one indication of this.
If you are running a time slice, after the process has been CPU-time has reached the required running time, then undo the process, if a time slice to run after the pr
相关搜索: 优先级调度
ProcessScheduling
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ProcessScheduling.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.