jincheng.cs

来自「os 课程设计不含文档 123456789」· CS 代码 · 共 31 行

CS
31
字号
using System;
using System.Collections;
using System.Text;

namespace os
{
    public class jincheng
    {
        public enum tstate { free, used };                  //定义pcb块状态
        public enum tprostate { runing, steady, block };    //进程运行状态定义
        public struct pcb                                   //pcb 进程控制块 
        {
            public int id;                                  //pcb的id
            public int register;                            //寄存器内容
            public int ip;                                  //指令指针,目前执行的指令
            public int size;                                //进程使用内存的大小,即进程的大小
            public int usepagecount;                        //进程使用的内存页数
            public int[] protabaddr;                        //进程页表首地址 page table address
            public char wantdev;                            //进程请求的设备
            public int wanttime;                            //请求的时间
            public string name;                             //进程名
            public string fullpath;                         //全路径
            public tstate state;                            //pcb的使用情况
            public tprostate prostate;                      //进程的状态
            public int youxianji;                           //进程的优先级1-5,5 is the highest

        };
        public pcb NULL;                                    //当前进程为空标志
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?