📄 pcb.java~9~
字号:
/**
* 进程控制块类,用来创建进程控制块
*
*/
/**
* @author 阿赞
*
*/
public class PCB {
private String id;//进程标识符
private int runtime_total;//进程运行所需的总时间
private int runtime_already;//进程已运行的时间
private String state;//进程的当前状态
private int address[];//进程在内存中的地址
public PCB() {//构造方法
}
public PCB(String id, int runtime_total,int address[]) {//构造方法
this.id = id;
this.address = address;
this.runtime_total = runtime_total;//进程运行的总时间
this.runtime_already = 0;
this.state = new String("Ready");
}
public String GetID() {//获取进程标识符
return id;
}
public int GetRuntime_total() {//获取进程运行所需的总时间
return runtime_total;
}
public int GetRuntime_already() {//获取进程已经运行的时间
return runtime_already;
}
public String GetState() {//获取进程的当前状态
return state;
}
public int[] GetAddress() {//获取进程在内存中的地址
return address;
}
public void SetRuntime_already(int runtime_already) {//保存当前进程已经运行的时间
this.runtime_already = runtime_already;
}
public void SetAddress(int address[]) {//保存当前进程已经运行的时间
this.address = address;
}
public void SetState(String state) {//设置进程的状态
this.state = state;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -