- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
电梯调度算法 磁盘驱动调度(Elevator scheduling algorithm, disk drive scheduling)
电梯调度算法 磁盘驱动调度(Elevator scheduling algorithm, disk drive scheduling)
# includes stdio.h
# includes stdlib.h
# includes string.h
# includes math.h
typedef struct _ proc
{
char name [20]; / * 定义进程名称 * /
int team 定义柱面号; / * * /
int i; / * 定义磁道面号 * /
int rec 定义记录号; / * * /
struct _ proc * prior;
struct _ proc * next;
} per;
pro * g _ head = null, * g _ curr = null, * local;
int record = 0; / / 初始柱面号
int i = 1; / / 初始方向
int rec0 = 0; / / 初始记录号
void init ()
{
pro * p; / * 初始化链表 (初始i / o表) * /
g _ head = (pro) malloc (sizeof (pro));
g _ head - next = null;
g _ head - prior = null;
p = (pro) malloc (sizeof (pro));
strcpy (p - name, p1);
p - team = 100;
p - i = 10;
p - rec = 1;
p - next = null;
p - prior = g _ head;
g _ head - next = p;
g = g _ curr _ head - next;
p = (pro) malloc (sizeof (pro));
strcpy (p - name, p2);
p - team = 30;
p - i = 5;
p - rec = 5;
p - next = null;
p - prior = g _ curr;
g _ curr - next = p;
g _ curr = p;
p = (pro) malloc (sizeof (pro));
strcpy (p - name, p3);
p - team = 40.
p - i = 2;
p - rec = 4;
p - next = null;
p - prior = g _ curr;
g _ curr - next = p;
g _ curr = p;
p = (pro) malloc (sizeof (pro));
strcpy (p - name, p4);
p - team = 85;
p - i = 7;
p - rec = 3;
p - next = null;
p - prior = g _ curr;
g _ curr - next = p;
g _ curr = p;
p = (pro) malloc (sizeof (pro));
strcpy (p - name, p5);
p - team = 60;
p - i = 8;
p - rec = 4;
p - next = null;
p - prior = g _ curr;
g _ curr - next = p;
g = g _ curr _ head - next;
local = (pro) malloc (sizeof (pro)); / * 选中进程 * /
strcpy (local - name, pn);
local - team = 0;
local - i = 0;
local - rec = 0;
local - next = null;
local - prior = null;
}
void printinit () / * 打印i / o表 * /
{
pro * t = g _ head - next;
printf (------------------------------------- \ n);
printf (请求i / o表 \ n);
printf (进程名 柱面号 磁道号 记录号 \ n);
while (t! = = null)
{
printf (% 48% 8d% 8d% 5d \ n, t - name, t - team, t - , t chr);
t = t - next;
}
printf (current process is: \ n);
printf (进程
您可能关注的文档
- 北五年语文期中试卷(Northern five year language midterm paper).doc
- 北京nike折扣店,工厂店详解(Beijing Nike discount shop, factory shop detailed explanation).doc
- 北京农学院-构建都市型高等农业人才培养体系(Beijing University of Agriculture - Construction of urban higher agricultural talents training system).doc
- 北京到安庆回程车运输公司(Beijing to Anqing return car transportation company).doc
- 北京好吃的馆子(A good restaurant in Beijing).doc
- 北京市丙、丁级测绘资质分级标准(Beijing grade C and D level classification standards).doc
- 北京华联成都店风云再起策划(Beijing Hualian Chengdu shop storm resurgence planning).doc
- 北京市西城区2004年抽样测试(Sampling test in Beijing, Xicheng District in 2004).doc
- 北京师大二附中◆初一(Beijing Normal University School of two - day).doc
- 北京率先实现城乡管理养老保险全覆盖(Beijing takes the lead in achieving urban and rural management, full coverage of pension insurance).doc
- 电池知识(Battery knowledge).doc
- 电烙铁的基本使用技巧mod工具教程(The basic use of electric iron skills, mod tools tutorial).doc
- 电磁兼容及其检测技术(Electromagnetic compatibility and its detection technology).doc
- 电流的算法(Current algorithm).doc
- 电瓶规格(Battery Specification).doc
- 电缆电线符号表示1(Cables, wires, symbols, indicating 1).doc
- 电磁炉知识(Knowledge of electromagnetic oven).doc
- 电缆电流(Cable current).doc
- 电缆载流量口决(Cable ampacity).doc
- 电容品牌介绍及常识(Capacitor brand introduction and common sense).doc
最近下载
- 家居装饰行业大数据精准营销策略分析报告.docx
- SH217_03ERP项目_MM物资组关键方案介绍_收货_v1.1-.pptx VIP
- 格物入门. 第1-7卷 丁韪良 著 同治7年 北京 同文馆1.pdf VIP
- 电磁场的对称性分析.pdf VIP
- 传感器基础教科书原理和特点讲解.pdf VIP
- TCBDA51-2021 住宅装饰装修工程施工技术规程.pdf VIP
- 最新人教版九年级数学下册 全册教学课件全集(858张).ppt VIP
- TCBDA 55-2021 住宅室内装饰装修工程质量验收标准.docx VIP
- SH217_03ERP-2_详细业务蓝图及解决方案_3.1-神朔修改后.docx VIP
- 2025年重庆市中考数学试卷(含标准答案)原卷.pdf
文档评论(0)