博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[水]用vb写了个PCB
阅读量:5757 次
发布时间:2019-06-18

本文共 2471 字,大约阅读时间需要 8 分钟。

这学期我们学操作系统,所以得写个PCB。

于是我借鉴了一下windows的PCB,写了这个

Imports System.Runtime.InteropServices''' ''' 这就是传说中的PCB ''' Structure KPROCESS    Dim Header As DispatcherHeader    Dim ProfileListHead As LinkedList(Of ProcessProfileSimulator)    Dim DirectoryTableBase As UInteger    Dim LdtDescriptor As KernelGlobalDescriptorTableEntry    Dim Int21Descriptor As KernelInterruptDescriptorTableEntry    Dim IopmOffset As Short    Dim Iopl As Byte    Dim ActiveProcessors As UInteger    Dim KernelTime As UInteger    Dim UserTime As UInteger    Dim ReadyListHead As LinkedList(Of ProcessSimulator)    Dim SwapListEntry As SingleLinkedList(Of ProcessSimulator)    Dim VdmTrapcHandler As IntPtr    Dim ThreadListHead As LinkedList(Of ThreadSimulator)    Dim ProcessLock As UInteger    Dim Affinity As UInteger    Dim ProcessFlags As ProcessFlag    Dim BasePriority As SByte    Dim QuantumReset As SByte    Dim State As Byte    Dim ThreadSeed As Byte    Dim PowerState As Byte    Dim IdealNode As Byte    Dim Visited As Byte    Dim ExecuteOptions As Byte    Dim StackCount As UInteger    Dim ProcessListEntry As LinkedList(Of ProcessSimulator)    Dim CycleTime As ULongEnd StructureEnum ProcessFlag    None    AutoAlignment    DisableBoost    DisableQuantum = 4End EnumStructure DispatcherHeader    Dim UnionType As Byte    Dim UnionData As UnionA    
Structure UnionA
Dim Abandoned As Byte
Dim Absolute As Byte
Dim NpxIrql As Byte
Dim Signalling As Byte
Dim Size As Byte
Dim Hand As Byte
Dim Inserted As Byte
Dim DebugActive As Byte
Dim DpcActive As Byte End Structure Dim Lock As Integer Dim SignalState As Integer Dim WaitListHead As LinkedList(Of ProcessSimulator)End StructureStructure KernelGlobalDescriptorTableEntry Dim LimitLow As Short Dim BaseLow As Short Dim HighWord As UIntegerEnd StructureStructure KernelInterruptDescriptorTableEntry Dim Offset As Short Dim Selector As Short Dim Access As Short Dim ExtendedOffset As ShortEnd StructureEnum KernelExecuteOptions As Byte None ExecuteDisable ExecuteEnable DisableThunkEmulation = 4 Permanent = 8 ExecuteDispatchEnable = 16 ImageDispatchEnable = 32End Enum

那个SingleLinkedList是我自定义的

Public Class SingleLinkedList(Of T)    Public Property [Next] As SingleLinkedList(Of T) Public Property Value As TEnd Class

 

转载于:https://www.cnblogs.com/Nukepayload2/p/os_pcbmodel_vb.html

你可能感兴趣的文章
极光推送(一)集成
查看>>
Android项目实战(三十九):Android集成Unity3D项目(图文详解)
查看>>
MySQL 8.0 压缩包版安装方法
查看>>
TensorFlow系列专题(六):实战项目Mnist手写数据集识别
查看>>
JS中this的4种绑定规则
查看>>
Netty Pipeline源码分析(2)
查看>>
@Transient注解输出空间位置属性
查看>>
Ansible-playbook 条件判断when、pause(学习笔记二十三)
查看>>
敏捷战网获千万级天使轮融资,布局未来智慧警务
查看>>
4_2 最大公约数和最小公倍数
查看>>
开发者报 | Github造假产业链曝光,花钱就能买Star;黑客又多一个可以偷你密码的方法了...
查看>>
git 相关开发常用
查看>>
编码服务正在步入云端
查看>>
我的青春在路上—启程
查看>>
MySQL双主互备模式架构
查看>>
ProxmoxVE 之 使用thinstation利旧安装瘦客户端
查看>>
Android异步处理一:使用Thread+Handler实现非UI线程更新UI界面
查看>>
MySQL简单的用户管理
查看>>
(二)lnmp环境的搭建:php
查看>>
Oracle Data Concurrency and Consistency二之Oracle锁机制
查看>>