资源简介

这是我花了很长时间写的一个实验,界面非常美观,完成了进程调度的各个状态包括,就绪,运行,阻塞,挂起,并用画图来表示内存的分配情况,自我感觉还是不错的

资源截图

代码片段和文件信息

import java.awt.*;
import javax.swing.*;

public class BlockThread extends Thread{
private JList jlBlockjlWait;
private PcbList pcbBlockListpcbWaitList;
private PCB pcb;

public BlockThread(JList jlBlockJList jlWaitPcbList pcbBlockListPcbList pcbWaitListPCB pcb){
this.jlBlock = jlBlock;
this.jlWait = jlWait;
this.pcbBlockList = pcbBlockList;
this.pcbWaitList = pcbWaitList;
this.pcb = pcb;

public void run(){
synchronized(this){
pcb.setStatusment(3);
pcbBlockList.addItem(pcb);
    jlBlock.setListData(pcbBlockList.getItems());
}
    try {
Thread.sleep(pcb.getIoLast()*1000);
} catch (InterruptedException e) {
//e.printStackTrace();
}
pcb.setGoTime(pcb.getGoTime()+pcb.getIoLast());
    pcb.setRunTime(pcb.getRunTime()-pcb.getIoLast());
    pcb.setIoLast(0);
pcb.setIoTime();
pcbBlockList.removeItem(pcb);
jlBlock.setListData(pcbBlockList.getItems());
pcbWaitList.addItem(pcb);
jlWait.setListData(pcbWaitList.getItems());

}


}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        286  2010-04-24 17:30  OperationException2\.classpath

     文件        395  2010-04-19 15:43  OperationException2\.project

     文件       1444  2010-05-08 14:40  OperationException2\bin\BlockThread.class

     文件       1239  2010-05-08 14:40  OperationException2\bin\GridBagHelper.class

     文件       1301  2010-05-08 20:29  OperationException2\bin\JCB.class

     文件       1766  2010-05-08 14:40  OperationException2\bin\JcbList.class

     文件       2109  2010-05-08 14:40  OperationException2\bin\Jobframe$BtListen.class

     文件       2586  2010-05-08 14:40  OperationException2\bin\Jobframe.class

     文件       2407  2010-05-08 23:49  OperationException2\bin\MemoryManager.class

     文件       1108  2010-05-08 23:24  OperationException2\bin\MemoryPanel.class

     文件       2811  2010-05-08 22:44  OperationException2\bin\PCB.class

     文件       1734  2010-05-08 14:40  OperationException2\bin\PcbList.class

     文件       1467  2010-05-14 16:02  OperationException2\bin\Psframe$BtListener.class

     文件       2308  2010-05-14 16:02  OperationException2\bin\Psframe$BtStartListener.class

     文件       7609  2010-05-14 16:02  OperationException2\bin\Psframe.class

     文件       2439  2010-05-08 22:29  OperationException2\bin\PsThread$SuspendListener.class

     文件       5950  2010-05-08 22:29  OperationException2\bin\PsThread.class

     文件        920  2010-05-08 15:45  OperationException2\bin\TableItem.class

     文件     615003  2010-03-29 19:34  OperationException2\lib\JTattoo.jar

     文件       1037  2010-04-25 20:51  OperationException2\src\BlockThread.java

     文件        444  2010-04-20 17:19  OperationException2\src\GridBagHelper.java

     文件        717  2010-05-08 20:29  OperationException2\src\JCB.java

     文件       1210  2010-04-25 20:41  OperationException2\src\JcbList.java

     文件       2670  2010-04-24 18:32  OperationException2\src\Jobframe.java

     文件       2791  2010-05-08 23:49  OperationException2\src\MemoryManager.java

     文件        583  2010-05-08 23:24  OperationException2\src\MemoryPanel.java

     文件       1970  2010-05-08 22:44  OperationException2\src\PCB.java

     文件       1154  2010-04-25 20:40  OperationException2\src\PcbList.java

     文件       7800  2010-05-14 16:02  OperationException2\src\Psframe.java

     文件       6685  2010-05-08 22:29  OperationException2\src\PsThread.java

............此处省略8个文件信息

评论

共有 条评论

相关资源