电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

操作系统调度算法C实现

操作系统调度算法C实现_第1页
1/34
操作系统调度算法C实现_第2页
2/34
操作系统调度算法C实现_第3页
3/34
复制粘贴即可运行 注意对应好名称 开始界面 公共方法类 using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.Data; namespace OS { class Method { public static void AddColumnRow(int n, DataGridView dg, string name,DataSet ds) { DataTable dt = new DataTable(name);//建立个数据表 DataRow dr; //行 for (int i = 1; i <= 20; i++) { dr = dt.NewRow(); dt.Rows.Add(dr); //在表的对象的行里添加此行 } ds.Tables.Add(dt); dg.DataSource = ds.Tables[name]; } } } 进程对象类 using System; using System.Collections.Generic; using System.Text; using System.Collections; namespace OS { /// /// 进程类 /// class exector :IComparable { int servicetime = 0; //服务时间 int starttime = 0; //开始时间 int haveexected = 0; //已执行时间 int type = 0; //表示实例对象是生产者或消费者 int num = 0; //产品数 string name = ""; //进程名 int priority = 0; //优先级队列选择 float ratiopriority = 1; //最高响应比优先级 int waittime = 0; public exector(int servicetime, int starttime, int type, string name) { this.servicetime = servicetime; this.starttime = starttime; this.type = type; this.name = name; } public int Priority { get { return priority; } set { priority = value; } } public void setpriority() { ratiopriority = (this.Waittime + this.ServiceTime - this.Haveexected) / ((this.ServiceTime - this.Haveexected) * 1f); } public int Waittime { get { return waittime; } set { waittime = value; } } public float RatioPriority { get { return ratiopriority; } set { ratiopriority = value; } } public int Num { get { return num; } set { num = value; } } public string Name { get { return name; } } public int ServiceTime { get { return servicetime; } set { servicetime = value; } } public int Hav...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

操作系统调度算法C实现

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部