操作系统优先级和时间片调度+内存管理(6)

2020-04-17 04:10

本域(用于现实程序每一步的操作和影响,不可编辑)

private JTextArea CPUTextArea, statuesTextArea; //后备队列PCB数组,就绪、挂起,——内存(可分分区表) PCBRecords backupPCB, readyPCB, suspendedPCB; private MemoryRecords memoryItems; private boolean flag = false; /** * 主函数 * @param args

* @throws IOException */

public static void main(String[] args) throws IOException {

new CPUScheduling().initFrame(); }

//初始化Frame

public void initFrame() {

backupList = new JList();

backupList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

backupList.setVisibleRowCount(BackupBAK_LIST_ROWS);

backupList.setFixedCellWidth(BackupBAK_CELL_SIZE);

suspendList = new JList();

suspendList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

suspendList.setVisibleRowCount(Suspend_LIST_ROWS);

suspendList.setFixedCellWidth(Suspend_CELL_SIZE);

readyList = new JList();

readyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

readyList.setVisibleRowCount(Ready_LIST_ROWS);

readyList.setFixedCellWidth(Ready_CELL_SIZE);

memoryList = new JList();

memoryList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

memoryList.setVisibleRowCount(Memory_LIST_ROWS);

memoryList.setFixedCellWidth(Memory_CELL_SIZE);

suspendButton = new JButton(\挂起(3)\ addToBAKButton = new JButton(\加入后备(1)\ addToReadyButton = new JButton(\加入就绪(2)\ resetButton = new JButton(\重置(0)\ umountButton = new JButton(\解挂(4)\ removeButton = new JButton(\移除(5)\ startButton = new JButton(\调度开始(Enter)\ pauseButton = new JButton(\暂停(Pause)\ resetSyatemButton = new JButton(\重置系统

(Backspace)\

helpButton = new JButton(\帮助(H)\

priorityJRB = new JRadioButton(\优先级(Page Up)\

timesliceJRB = new JRadioButton(\时间片(Page Down)\

suspendButton.setToolTipText(\双击进程可以直接挂起!\

umountButton.setToolTipText(\双击解挂按钮的正上方的进程,可以直接解挂!\

removeButton.setToolTipText(\双击移除按钮的正上方的进程,可以直接移除!\

startButton.setBackground(Color.GREEN); pauseButton.setBackground(new Color(0,150,255));

resetSyatemButton.setBackground(Color.RED); backupTotalLabel = new JLabel(\总计:\ backupTotalTextField = new JTextField(\TOTAL__TEXTFIELD_SIZE);

backupTotalTextField.setEditable(false);

suspendTotalLabel = new JLabel(\总计:\ suspendTotalTextField = new JTextField(\TOTAL__TEXTFIELD_SIZE);

suspendTotalTextField.setEditable(false); timesliceSizeLabel = new JLabel(\时间片:\ timesliceJtf = new JTextField(\ timesliceJtf.setEditable(true);

CPUTextArea CPU_COLS);

CPUTextArea.setEditable(false);

statuesTextArea = new JTextArea(STATUS_ROWS, STATUS_COLS);

statuesTextArea.setEditable(false);

/* north panel*/

JPanel northPanel = new JPanel(new GridLayout(1, 3));

PCBItemPanel = new JPanel(new FlowLayout()); PCBItemPanel.setBorder(

BorderFactory.createTitledBorder(\项目信息\

= new JTextArea(CPU_ROWS,


操作系统优先级和时间片调度+内存管理(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:认识色阶和曲线 - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: