免费预览已结束,剩余5页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper 石家庄经济学院石家庄经济学院 实习报告实习报告 学 院 系 信息工程学院 专 业 计算机科学与技术 姓 名 江丹 班 级 专接本 2 班 学 号 1 指导教师 张有华 2012 年年 6 月月 22 日日 ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper 操作系统课程实习报告 学号 1 姓名 江丹 起迄日期 2012 6 11 2012 6 16 指导教师 张有华 实习地点 206 室 实习题目 采用先来先服务算法和运行时间最短者优先算法模拟设计作业调度程 序 1 实习内容实习内容 模拟批处理多道操作系统的作业调度 2 实习目的实习目的 每个用户请求计算机计算的一个计算任务叫做一个作业 一个作业从输入初始数据 到得到计算结果 要经过若干个步骤的相继执行 例如 编辑 编译 运行等 其中每 一个步骤称作一个作业步 用户向系统提出作业加工步骤的方式称作业控制方式 作业 控制方式有两种 终端控制方式 又称直接控制方式或联机控制方式 和批处理控制方 式 又称自动控制方式或脱机控制方式 在批处理控制方式下 用户采用系统提供的作业控制语言 JCL 写好作业说明书 说明作业加工的步骤 操作员把一批作业组织成输入流 通过 预输入 手段使每个作 业的信息 包括作业说明书 源程序 初始数据等 暂存在辅助存储器的 输入井 中 批处理多道操作系统的作业管理有两个任务 作业调度和作业控制 采用多道程序 设计方法的操作系统 在系统中要经常保留多个运行的作业 以提高系统效率 作业调 度从系统已接纳的暂存在输入井中的一批作业中挑选出若干个可运行的作业 并为这些 被选中的作业分配所需的系统资源 对被选中运行的作业必须按照它们各自的作业说明 书规定的步骤进行控制 本实习要求学生模拟作业调度的实现 了解作业调度在操作系统中的作用 3 实习步骤实习步骤 第一步 首先对整个题目进行分析 包括对作业 主存的定义类型 ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper 第二步 对流程图进行分析 分析一些细节代码 第三步 根据程序流程图写代码并调节一些细节错误 第四步 运行看结果 这里主要看内存根据作业的要求对分配情况 3 1 需求分析需求分析 本次实验是在预输入五道作业的基础上初始化 并通过作业的需求更改主存的输出 显示情况 首先是输入 5 道作业 分别使用先来先服务算法和最短时间优先算法分配内 存 最后进行内存的回收 3 2 数据结构设计与说明数据结构设计与说明 定义作业中的变量 资源需求 typedef struct source int size 资源要求大小 int tape count 资源要求磁带数 src 定义作业 typedef struct jobwork char username 10 用户名 char jobname 10 作业名 char state 5 运行状态 int runtime 运行时间 src source 资源需求 结构体类型见上 struct jobwork next 下一个指针 job 定义内存 typedef struct memory int size 内存大小 int tape count 内存磁带数 char jobname 10 内存中存在的作业名 首次为空 char username 10 内存中作业的用户名 char state 5 内存中作业的状态 int job count 内存中作业个数 struct memory next 内存下一个指针 ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper mem 3 3 算法设计算法设计 第一部分 初始化作业表第一部分 初始化作业表 while iusername p jobname p state p next NULL if head NULL head p else q next p q p i 第二部分 统计合适的作业的个数第二部分 统计合适的作业的个数 while p NULL 第三部分 执行先来先服务算法 为作业分配内存 最短作业优先算法采用的是一第三部分 执行先来先服务算法 为作业分配内存 最短作业优先算法采用的是一 样的原理 链表指针由头往后指下去 只不过先前部分运用了冒泡方法 把时间由短到样的原理 链表指针由头往后指下去 只不过先前部分运用了冒泡方法 把时间由短到 长拍了下顺序 长拍了下顺序 while p NULL 分配主存空间 mem1 tape count mem1 tape count p source tape count 分配磁带数 printf d t d n mem1 size mem1 tape count strcpy p state 执行 将选到的作业状态改为执行 printf s t s n n p jobname p username 第四部分 回收内存第四部分 回收内存 while p1 NULL mem1 tape count mem1 tape count p source tape count printf d t d t n mem1 size mem1 tape count mem1 job count p p next p1 p1 next 本程序主要用 C 语言实现 中间只调用了一次冒泡函数 其余均在主函数中利用 if 和 else 以及循环语句实现 每次循环都把 p 指针指向头指针 head 依次循环下去 每次 函数传进去的值也都是 jobwork 类型的头指针 head 或 p 下面是本程序流程图 ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper 开始 初始化 输入在 0 1 之 间的随机数 随机数大于0 5是 作业表中有尚未被 选中的作业 否 主存中有作业 否 显示 请操作 员输入作业 结束 主存中还能装 作业 是 按调度算法查 作业表选择一 个 收容 状 态的作业 否 显示 主存作 业满载 是 是 选到 是 为该资源分配 作业 用修改 资源分配表代 替 否 显示 等待作 业执行结束后 归还资源 置该作业在作 业表中的状态 为执行 将该作业的作 业说明书读入 主存 用显示 被选中的用户 名 作业名来 代替 主存中作业数 加1 是 控制作业执行 用显示XX 作业正在执行 代替 输入用户名 作业名 用来 模拟该作业已 经执行结束 置该作业在作 业表中的状态 为 完成 归还该作业占 用的资源 用 修改资源分配 表表示 在已存的主存 作业表中减1 否 显示 主存中 无作业 这里要说明的是 主存最多能 同时执行两道作业 即为两道 作业先分配内存空间 错误 链接无效 错误 链接无效 ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper 程序流程图 在此给各模块的功能 入口参数 出口参数及模块之间的调用关系 算法如果使用 程序流程图描述 图要求用 VISIO 画 图中的文字用 5 号 以下同样要求 4 程序实现及运行结果分析程序实现及运行结果分析 先来先服务算法调度作业 本程序暂时采用了三道作业 运行结果如下 先来先调度算法结果图 ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper 结果分析 起初程序输入 3 道作业 用户名 作业名 状态 运行时间 资源需求 主 存 磁带数 输入大于 0 5 的数 让程序首先进行作业查找 查找到合适的作业 然后对 其中的两道作业分配内存空间 这里截取的是先来先服务算法程序的结果图 可以看 到 100 内存空间 磁带数为 5 的主存储器中 先对第一道作业分配了空间 后又对 第二道作业分配了空间 并显示主存分配空间后的大小以及每道作业运行的情况 本 实验题目 先来先服务算法调度作业 采用了链表的方式 先输入的作业即为先来到 的作业的方法 下面开始查找内存表 输入一个小于 0 5 的数 查找处于执行状态的作业 并输入该作业的作业名和用户名 手动结束该作业的进程 置为完成态 回收该道作 业的内存大小和磁带数 最短时间优先算法调度作业 最短时间优先调度结果图 结果分析 起初程序输入 3 道作业 用户名 作业名 状态 运行时间 资源需求 主 存 磁带数 输入大于 0 5 的数 让程序首先进行作业查找 查找到合适的作业 然后对 其中的两道作业分配内存空间 这里截取的是先来先服务算法程序的结果图 可以看 ached andon timecontrolproblems severitygreaterrisk accordingtotherequiredtroubleshooting registrationform andsignedbythoseresponsibleforthesecurityoftheunitforthefirstafterescalation Thirdarticleopenminemanageroncoalmineproductionjobdistrictwithinofsecurityhiddentroubleshooting andgovernanceandreportfullisresponsiblefor securityDeputyManagertieManagerwork theparagraphconstructionteamheadandthebusinessdepartmentheadMember andrunmaintenancepersonnel areshouldaccordingtotheirofdutiesrange onproductionequipment andfacilities andsiteenvironment aspectsofsecurityhiddenforcheckandreport andbyhiddenrectificationprogrammeforhiddengovernance Fourthopen pitminesafetysectionisresponsibleforthesupervisionandinspectionintheproductionareatroubleshooting managementandreportingofcomprehensivework Articlescopeandfocusoftheinspectionpersonnelatvariouslevels 1 operatingpersonnelbeforetakingoverandshiftbeforethejurisdictionareatoconductacomprehensiveinspectionofequipment runningthesquadlea derondutyduringmajorequipmentoverhaul beforeandaftertheshifttodesignatedstafftounderstandtheoperationofequipmentintheequipmentandcheckonfocus 2 equipmentrepairequipmenttoselectmaintenancecheckatleasttwiceaweektokeyequipmentanddefectivedevicestoincreasethefrequencyofinspection Teamleaderdedicatedtothedeviceeverydayoperationofalldeviceswithinthescopeofmaintenancepersonnelunderstandthemaintenanceandinspectionofkeyequipment Paragraph3 theownerandprofessionalandtechnicalpersonnelshouldbecarriedoutdailyafterworksitevisitinspection Evening Controlroom focusedoncoalseamspontaneouscombustionundertroubleshooting help landslide coalfire earth moving roadcarwallsitesafetysupervision andconscientiouslyimplementtheminerectificationmeasures Productiontechnologysection isresponsiblefortroubleshootingwhetherexistsSupercapacity andSuper 到 100 内存空间 磁带数为 5 的主存储器中 首先对时间最短的作业分配内存 执 行调度 然后一次按时间长短进行分配 下面开始查找内存表 输入一个小于 0 5 的数 查找处于执行状态的作业 并输入该作业的作业名和用户名 手动结束该作业的进程 置为完成态 回收该道作 业的内存大小和磁带数 4 1 程序源代码程序源代码 先来先服务调度 代码 参见文件夹 LAB01 1 源代码所在的文件夹链接 最短
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论