资源简介

操作系统的编程作业例子 1.模拟页式存储过程地址变换过程模拟 2.可用于学习理解页式存储过程中逻辑地址到物理地址的转换过程 3.带有界面,仅供参考。水平有限,如有错误欢迎指正。

资源截图

代码片段和文件信息

# -*- coding: utf-8 -*-
#作者:LUH(DanHun_HaoJun)
#日期:2018.11.11
import sys
import random
from PyQt5 import QtCore QtGui QtWidgets
from PyQt5.QtWidgets import QTableWidgetItem
#窗口设计
class Ui_Form(object):
    yebiao = list(range(11001))#用于随机产生物理块号(最大可生成长度为1000行的页表)
    def setupUi(self Form):
        Form.setobjectName(“Form“)
        Form.resize(1017 480)
        self.label = QtWidgets.QLabel(Form)
        self.label.setGeometry(QtCore.QRect(40 20 271 41))
        font = QtGui.QFont()
        font.setFamily(“Adobe Arabic“)
        font.setPointSize(16)
        self.label.setFont(font)
        self.label.setobjectName(“label“)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setGeometry(QtCore.QRect(40 70 161 41))
        font = QtGui.QFont()
        font.setFamily(“Adobe Arabic“)
        font.setPointSize(16)
        self.label_2.setFont(font)
        self.label_2.setobjectName(“label_2“)
        self.tableWidget = QtWidgets.QTableWidget(Form)
        self.tableWidget.setGeometry(QtCore.QRect(40 120 256 161))
        self.tableWidget.setobjectName(“tableWidget“)
        self.tableWidget.setColumnCount(2)
        self.tableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0 item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1 item)
        self.tableWidget.verticalHeader().setVisible(False)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setGeometry(QtCore.QRect(40 340 161 41))
        font = QtGui.QFont()
        font.setFamily(“Adobe Arabic“)
        font.setPointSize(16)
        self.label_3.setFont(font)
        self.label_3.setobjectName(“label_3“)
        self.lineEdit = QtWidgets.QLineEdit(Form)
        self.lineEdit.setGeometry(QtCore.QRect(200 340 91 31))
        self.lineEdit.setobjectName(“lineEdit“)
        self.pushButton = QtWidgets.QPushButton(Form)
        self.pushButton.setGeometry(QtCore.QRect(50 410 93 28))
        self.pushButton.setobjectName(“pushButton“)
        self.textBrowser = QtWidgets.QTextBrowser(Form)
        self.textBrowser.setGeometry(QtCore.QRect(330 20 661 441))
        font = QtGui.QFont()
        font.setFamily(“Adobe Arabic“)
        font.setPointSize(24)
        self.textBrowser.setFont(font)
        self.textBrowser.setobjectName(“textBrowser“)
        self.pushButton_2 = QtWidgets.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(180 410 93 28))
        self.pushButton_2.setobjectName(“pushButton_2“)
        self.lineEdit_2 = QtWidgets.QLineEdit(Form)
        self.lineEdit_2.setGeometry(QtCore.QRect(170 20 71 31))
        font = QtGui.QFont()
        font.setFamily(“Adobe Arabic“)
        font.setPointSize(16)
        self.lineEdit_2.setFont(font)
        self.lineEdit_2.setobjectName(“lineEdit_2“)
        self.label_4 = QtWidgets.QLabel(Form

评论

共有 条评论