java OS时间片轮转调度基本算法实例源码讲解。
public class OSprocess{
private String name; //进程名
private OSprocess next;//指向下一个进程
private int run_time; //要求运行时间
private int allo_time;//已运行时间
private int req_time;//还需要运行时间
private char state;//状态
private int pri;//优先数
//构造方法2 时间片轮转方法
public OSprocess(String name, int run_time, char state, int allo_time) {
this.name = name;
this.run_time = run_time;
this.allo_time = allo_time;
this.state = state;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public OSprocess getNext() {
return next;
}
public void setNext(OSprocess next) {
this.next = next;
}
public int