文件名称:diaodu
-
所属分类:
- 标签属性:
- 上传时间:2016-05-26
-
文件大小:1.69kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1)在Linux下用C语言编程模拟优先级程调度算法。为了清楚地观察每个进程的调度过程,程序将每个时间片内的进程情况显示出来。2)进程控制块是进程存在的唯一标志,因此,在模拟算法中每一个进程用一个进程控制块PCB来代表,PCB用一结构体表示。3)进程在运行过程中其状态将在就绪、执行、完成几种状态之间转换,同时进程可能处于不同的队列中,如就绪队列。在优先级调度算法中,选择单向队列,入队既是将进程控制块插入队尾,出队既是按优先级重新排列的队,删除队头元素。4)为了便于处理,程序中的某进程运行时间以时间片为单位计算。各进程的优先级认为输入,运行所需时间随机产生。5)优先权调度算法采用动态优先权,进程每运行一个时间片,优先数减1;进程在就绪队列等待一个时间单位,优先数加1。6)对于遇到优先权一致的情况,采用FCFS策略解决。7)由于是模拟进程调度,所以,对被选中的进程并不实际启动运行,而是修改进程控制块的相关信息来模拟进程的一次运行。-1) Linux emulation priority process scheduling algorithm using C language programming. In order to clearly observe the scheduling process for each process, the program will process each time slice is displayed inside the case. 2) process control block is the only sign of the existence of the process, therefore, in the simulation algorithm each process with a process control block PCB to represent, PCB represented by a structure. 3) processes in operation status will be ready to perform, to complete the conversion between several states, while the process may be in different queues, such as the ready queue. In priority scheduling algorithm, choose unidirectional queue, the team is not only a process control block into the tail, the team both teams prioritized rearrange, remove the head elements. 4) In order to facilitate processing, the program run time of a process to calculate the time-piece. The priority of each process that the desired input, run-time generated randomly. 5) priority
(系统自动生成,下载前可以参看下载内容)
下载文件列表
diaodu.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.