文件名称:first
介绍说明--下载内容均来自于网络,请自行研究使用
(1)用C语言来实现对N个进程采用动态优先权优先算法的进程调度;
(2)每个用来标识进程的进程控制块PCB用结构来描述,包括以下字段:
进程标识数id;
进程优先数priority,并规定优先数愈大的进程,其优先权越高;
进程已占用的CPU时间cputime
进程还需占用的CPU时间alltime,当进程运行完毕时,alltime变为0;
进程的阻塞时间startblock,表示当进程在运行startblock个时间片后,进程将进入阻塞状态;
进程被阻塞的时间blocktime,表示已阻塞的进程再等待blocktime个时间片后,将转换成就绪态;
进程状态state
队列指针next,用来将PCB排成队列。
(3)优先数改变的原则:
进程在就绪队列中呆一个时间片,优先数增加1.
进程每运行一个时间片,优先数减3.
(4)假设在调度前,系统中有5个继承,它们的厨师状态如下:
ID 0 1 2 3 4
PRIORITY 9 38 30 29 0
CPUTIME 0 0 0 0 0
ALLTIME 3 3 6 3 4
STARTBLOCK 2 -1 -1 -1 -1
BLOCKTIME 3 0 0 0 0
STATE READY READY READY READY READY
-(1) using C language to implement a process of N priority scheduling algorithm with dynamic priority of the process of scheduling
(2) Each of the process used to identify the process control block PCB used to describe the structure, including the following fields:
Process ID number id
The process priority number priority, and provides greater process priority number, the higher its priority
Process has occupied the CPU time, cputime
The process needs to take up the CPU time of alltime, when the process has finished running time, alltime becomes 0
The process of blocking time startblock, said that when the process is running startblock a time slice, the process will enter the blocked state
Processes are blocked time blocktime, indicated that they had blocked the process of time to wait blocktime films, will be converted into a ready state
Process status state
Queue pointer next, is used to PCB arranged in the queue.
(3) The change in the number of priority pr
(2)每个用来标识进程的进程控制块PCB用结构来描述,包括以下字段:
进程标识数id;
进程优先数priority,并规定优先数愈大的进程,其优先权越高;
进程已占用的CPU时间cputime
进程还需占用的CPU时间alltime,当进程运行完毕时,alltime变为0;
进程的阻塞时间startblock,表示当进程在运行startblock个时间片后,进程将进入阻塞状态;
进程被阻塞的时间blocktime,表示已阻塞的进程再等待blocktime个时间片后,将转换成就绪态;
进程状态state
队列指针next,用来将PCB排成队列。
(3)优先数改变的原则:
进程在就绪队列中呆一个时间片,优先数增加1.
进程每运行一个时间片,优先数减3.
(4)假设在调度前,系统中有5个继承,它们的厨师状态如下:
ID 0 1 2 3 4
PRIORITY 9 38 30 29 0
CPUTIME 0 0 0 0 0
ALLTIME 3 3 6 3 4
STARTBLOCK 2 -1 -1 -1 -1
BLOCKTIME 3 0 0 0 0
STATE READY READY READY READY READY
-(1) using C language to implement a process of N priority scheduling algorithm with dynamic priority of the process of scheduling
(2) Each of the process used to identify the process control block PCB used to describe the structure, including the following fields:
Process ID number id
The process priority number priority, and provides greater process priority number, the higher its priority
Process has occupied the CPU time, cputime
The process needs to take up the CPU time of alltime, when the process has finished running time, alltime becomes 0
The process of blocking time startblock, said that when the process is running startblock a time slice, the process will enter the blocked state
Processes are blocked time blocktime, indicated that they had blocked the process of time to wait blocktime films, will be converted into a ready state
Process status state
Queue pointer next, is used to PCB arranged in the queue.
(3) The change in the number of priority pr
(系统自动生成,下载前可以参看下载内容)
下载文件列表
first.cpp