文件名称:Scheduling
- 所属分类:
- 操作系统开发
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2013-11-14
- 文件大小:
- 1mb
- 下载次数:
- 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 procedures
Hint:
( 1 ) assumes that the system has five processes, each with a PCB to represent . PCB in the format:
Process name , pointer, required running time, priority number , status.
Process Name- P1 ~ P5.
Pointer- the size of the number of priority 5 into Cheng Liancheng queue , using a pointer that the next process, the first address of the PCB .
The time required to run- assuming unit time required to run the process number .
Priority number- number of priority given to the process , always select a priority when scheduling a large number of processes executed first .
State- assuming two states , Ready, represented by R , and the end , with the E said . The initial state is the ready state .
( 2 ) Before each run , for each process arbitrarily determined its " priority number " and " run-time requirements ."
( 3 ) processor always choose the first team to run the process . Dynamic way to change th
提示:
(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 procedures
Hint:
( 1 ) assumes that the system has five processes, each with a PCB to represent . PCB in the format:
Process name , pointer, required running time, priority number , status.
Process Name- P1 ~ P5.
Pointer- the size of the number of priority 5 into Cheng Liancheng queue , using a pointer that the next process, the first address of the PCB .
The time required to run- assuming unit time required to run the process number .
Priority number- number of priority given to the process , always select a priority when scheduling a large number of processes executed first .
State- assuming two states , Ready, represented by R , and the end , with the E said . The initial state is the ready state .
( 2 ) Before each run , for each process arbitrarily determined its " priority number " and " run-time requirements ."
( 3 ) processor always choose the first team to run the process . Dynamic way to change th
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Scheduling\Debug\Scheduling.exe
..........\.....\Scheduling.ilk
..........\.....\Scheduling.pdb
..........\Scheduling\Debug\BuildLog.htm
..........\..........\.....\mt.dep
..........\..........\.....\Scheduling.exe.embed.manifest
..........\..........\.....\Scheduling.exe.embed.manifest.res
..........\..........\.....\Scheduling.exe.intermediate.manifest
..........\..........\.....\Scheduling.obj
..........\..........\.....\Scheduling.pch
..........\..........\.....\stdafx.obj
..........\..........\.....\vc90.idb
..........\..........\.....\vc90.pdb
..........\..........\ReadMe.txt
..........\..........\Scheduling.cpp
..........\..........\Scheduling.vcproj
..........\..........\Scheduling.vcproj.RecluseGu-PC.RecluseGu.user
..........\..........\stdafx.cpp
..........\..........\stdafx.h
..........\..........\targetver.h
..........\Scheduling.ncb
..........\Scheduling.sln
..........\Scheduling.suo
..........\..........\Debug
..........\Debug
..........\Scheduling
Scheduling