黑龙江大学“操作系统课程设计”总结报告内容摘要:
i)。 if(i!=0){ printf(name:)。 scanf(%s,name)。 } switch(i){ 12 case 1: removeNode(name,DCTs)。 break。 case 2: tmp=findByName(name,COCTs)。 if(tmp==NULL) printf(%cError:can39。 t find %s!\n,BEEP,name)。 else if(get_child_count(tmp,DCTs)0) //子节点个数 printf(%cError:can39。 t remove %s!\n,BEEP,name)。 else removeNode(name,COCTs)。 break。 case 3: tmp=findByName(name,CHCTs)。 if(tmp==NULL) printf(%cError:can39。 t find %s!\n,BEEP,name)。 else if(get_child_count(tmp,COCTs)0) printf(%cError:can39。 t remove %s!\n,BEEP,name)。 else removeNode(name,CHCTs)。 break。 case 0: return。 } }} void allocate_channel(struct Node *node,struct PCB *p){ if(p==NULL) return。 if(nodeprocess==NULL){ 13 nodeprocess=p。 block(blocked,p)。 } else block(nodeready,p)。 } void allocate_controller(struct Node *node,struct PCB *p){ if(p==NULL) return。 if(nodeprocess==NULL){ nodeprocess=p。 allocate_channel(nodeparent,p)。 } else block(nodeready,p)。 } void allocate_device(struct Node *node,struct PCB *p){ if(p==NULL) return。 if(nodeprocess==NULL){ nodeprocess=p。 allocate_controller(nodeparent,p)。 } else block(nodeready,p)。 } void allocate(){ char name[10]。 struct Node *node。 14 if(running==NULL) return。 printf(device name:)。 scanf(%s,name)。 node=findByName(name,DCTs)。 if(node==NULL){ printf(Can39。 t find %s!\n,name)。 return。 } allocate_device(node,running)。 } void release_channel(struct Node *node,struct PCB *p){ if(nodeprocess==p){ nodeprocess=NULL。 allocate_channel(node,removeFirst(nodeready))。 add(ready,remove_process(blocked,p))。 if(running==NULL) running=removeFirst(ready)。 } else{ add(ready,remove_process(nodeready,p))。 if(running==NULL) running=removeFirst(ready)。 } } 15 void release_controller(struct Node *node,struct PCB *p){ if(nodeprocess==p){ nodeprocess=NULL。 allocate_controller(node,removeFirst(nodeready))。 release_channel(nodeparent,p)。 } else{ add(ready,remove_process(nodeready,p))。 if(running==NULL) running=removeFirst(ready)。 } } void release(){ char name[10]。 struct Node *node。 struct PCB *p。 printf(device name:)。 scanf(%s,name)。 node=findByName(name,DCTs)。 if(node==NULL || nodeprocess==NULL) return。 p=nodeprocess。 nodeprocess=NULL。 allocate_device(node,removeFirst(nodeready))。 release_controller(nodeparent,p)。 } void display_process_status(struct Node *node){//显示节点的占用进 16 程以及等待进程信息 struct PCB *p=nodereadynext。 if(nodeprocess!=NULL) printf(%s,nodeprocessname)。 while(p!=NULL){ printf(%s,pname)。 p=pnext。 } printf(\n)。 } void display_status(){//显示设备状态 struct Node *chct=CHCTsnext,*coct,*dct。 while(chct!=NULL){ printf(%s,chctname)。 display_process_status(chct)。 coct=COCTsnext。 while(coct!=NULL){ if(coctparent==chct){ printf(\t%s,coctname)。 display_process_status(coct)。 dct=DCTsnext。 while(dct!=NULL){ if(dctparent==coct){ printf(\t\t%s,dctname)。 display_process_status(dct)。 } dct=dctnext。 } } 17 coct=coctnext。 } chct=chctnext。 } } 小结 四、 文件管理 目的 通过 利用磁盘文件 ,完成 操作系统的文件管理功能 ,掌握 包括目录结构的管理、外存空间的分配与释放以及空闲空间管理三部分。 完成的内容 通过初始化操作建立一个 模拟外存空间的虚拟磁盘文件,在该文件中保存目录和文件内容。 创建该文件时应创建初始的根目录内容、文件分配表。 文件目录项(可以采用 FCB 格式)应包括类型(目录 or 文件)、创建日期、大小、第一个磁盘块块号。 显示命令提示符“ $”,并根据输入命令完成相应的文件操作: MD(创建子目录):创建目录文件,并在父目录文件中增加目录项。 C。黑龙江大学“操作系统课程设计”总结报告
相关推荐
回收率增加 %,但对粗精矿的品位影响不大,且最后一次 2 分钟的粗选铜矿物的上浮量明显减少,因此粗选浮选时间定为 6分钟较合适。 经过两次扫选后,再进行第三次扫选,铜的回收率只是提高了 %,且品位较低,因此选定两次扫选,每次的扫选的浮选时间为 4 分钟。 图 55 浮选时间试验流程图 1+1+2+2 66% 原矿 混 精 1~4 丁黄: 80 2油: 50 2+2 中矿 1~2 中矿 3~4
记录人 : 复核人: 日期: 年 月 日 9安装确认 : 确认内容、方法和可接受标准、记录、结果 : 安装确认先决 条件确认: 确认方案是已批准; 确认一切准备工作已到位。 确认结果记录在“测试记录 1”。 测试记录 1 项目 可接受标准 确认方法 确认结果 是 /否 /不适应 附件 序号 旋转式多用切药机( QZ120) 操作 规程 已得到批准 ,并培训 查看签名和培训记录
的前提下,要注意土壤水分的情况,一般土壤含水量占土壤持水量的 60~70%时最易翻 4 耕,粘质土壤要注意选择适当时期翻耕。 翻耕深度不宜太深, 翻耕 深应在 20cm左右。 翻耕后的耕地,应无大土块,松碎,平整均匀。 翻耕可以疏松土壤,增加土壤透气性,有利于根系发育,而且还能提高根系吸收肥水能力。 土壤 翻耕一般在春秋季进行,翻耕深度为 15~ 20cm。 无深松深翻基础的地块
SeqList::~SeqList() { delete[]list。 } //返回长度 int SeqList::list_size() { return size。 } //插入函数 int SeqList::list_insert(int i,int item) { if(isize+1||i0||size==maxsize)return error。 if(i==size+1) {