欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    (完整word版)时间片轮转算法和优先级调度算法C语言模拟实现收藏.pdf

    • 资源ID:55058601       资源大小:88.30KB        全文页数:13页
    • 资源格式: PDF        下载积分:4.3金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要4.3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    (完整word版)时间片轮转算法和优先级调度算法C语言模拟实现收藏.pdf

    实用标准文案精彩文档时间片轮转算法和优先级调度算法 C 语言模拟实现收藏一、目的和要求进程调度是处理机管理的核心内容。本实验要求用高级语言编写模拟进程调度程序,以便加深理解有关进程控制快、进程队列等概念,并体会和了解优先数算法和时间片轮转算法的具体实施办法。二、实验内容1.设计进程控制块PCB的结构,通常应包括如下信息:进程名、进程优先数(或轮转时间片数)、进程已占用的CPU 时间、进程到完成还需要的时间、进程的状态、当前队列指针等。2.编写两种调度算法程序:优先数调度算法程序循环轮转调度算法程序3.按要求输出结果。三、提示和说明分别用两种调度算法对伍个进程进行调度。每个进程可有三种状态;执行状态(RUN)、就绪状态(READY,包括等待状态)和完成状态(FINISH),并假定初始状态为就绪状态。(一)进程控制块结构如下:NAME 进程标示符PRIO/ROUND进程优先数/进程每次轮转的时间片数(设为常数2)CPUTIME 进程累计占用CPU 的时间片数NEEDTIME进程到完成还需要的时间片数STATE 进程状态NEXT 链指针注:1.为了便于处理,程序中进程的的运行时间以时间片为单位进行计算;2.各进程的优先数或轮转时间片数,以及进程运行时间片数的初值,均由用户在程序运行时给定。实用标准文案精彩文档(二)进程的就绪态和等待态均为链表结构,共有四个指针如下:RUN 当前运行进程指针READY 就需队列头指针TAIL就需队列尾指针FINISH完成队列头指针(三)程序说明1.在优先数算法中,进程优先数的初值设为:50-NEEDTIME每执行一次,优先数减1,CPU 时间片数加 1,进程还需要的时间片数减1。在轮转法中,采用固定时间片单位(两个时间片为一个单位),进程每轮转一次,CPU 时间片数加 2,进程还需要的时间片数减2,并退出 CPU,排到就绪队列尾,等待下一次调度。2.程序的模块结构提示如下:整个程序可由主程序和如下7 个过程组成:(1)INSERT1 在优先数算法中,将尚未完成的 PCB 按优先数顺序插入到就绪队列中;(2)INSERT2 在轮转法中,将执行了一个时间片单位(为2),但尚未完成的进程的 PCB,插到就绪队列的队尾;(3)FIRSTIN调度就绪队列的第一个进程投入运行;(4)PRINT 显示每执行一次后所有进程的状态及有关信息。(5)CREATE创建新进程,并将它的PCB插入就绪队列;(6)PRISCH 按优先数算法调度进程;(7)ROUNDSCH按时间片轮转法调度进程。主程序定义 PCB结构和其他有关变量。(四)运行和显示程序开始运行后,首先提示:请用户选择算法,输入进程名和相应的NEEDTIME值。每次显示结果均为如下5 个字段:name cputime needtime priority state文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W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3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4实用标准文案精彩文档注:1在 state字段中,R代表执行态,W代表就绪(等待)态,F代表完成态。2应先显示 R态的,再显示 W态的,再显示 F 态的。3在W态中,以优先数高低或轮转顺序排队;在F 态中,以完成先后顺序排队。view plaincopy to clipboardprint?1./*2.操作系统实验之时间片轮转算法和优先级调度算法3.By Visual C+6.0 4.*/#include#include#include typedef struct node charname20;/*进程的名字*/intprio;/*进程的优先级*/intround;/*分配 CPU的时间片*/intcputime;/*CPU 执行时间*/intneedtime;/*进程执行所需要的时间*/charstate;/*进程的状态,W 就绪态,R执行态,F完成态*/intcount;/*记录执行的次数*/struct node*next;/*链表指针*/PCB;PCB*ready=NULL,*run=NULL,*finish=NULL;/*定义三个队列,就绪队列,执行队列和完成队列*/intnum;文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4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4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4实用标准文案精彩文档void GetFirst();/*从就绪队列取得第一个节点*/void Output();/*输出队列信息*/void InsertPrio(PCB*in);/*创建优先级队列,规定优先数越小,优先级越高*/void InsertTime(PCB*in);/*时间片队列*/void InsertFinish(PCB*in);/*时间片队列*/void PrioCreate();/*优先级输入函数*/void TimeCreate();/*时间片输入函数*/void Priority();/*按照优先级调度*/void RoundRun();/*时间片轮转调度*/intmain(void)charchose;printf(请输入要创建的进程数目:n);scanf(%d,&num);getchar();printf(输入进程的调度方法:(P/R)n);scanf(%c,&chose);switch(chose)case P:case p:PrioCreate();Priority();break;case R:case r:TimeCreate();RoundRun();break;文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3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5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4实用标准文案精彩文档default:break;Output();return 0;void GetFirst()/*取得第一个就绪队列节点*/run=ready;if(ready!=NULL)run-state=R;ready=ready-next;run-next=NULL;void Output()/*输出队列信息*/PCB*p;p=ready;printf(进程名 t 优先级 t 轮数 tcpu时间 t 需要时间 t 进程状态 t 计数器n);while(p!=NULL)printf(%st%dt%dt%dt%dtt%ctt%dn,p-name,p-prio,p-round,p-cputime,p-needtime,p-state,p-count);p=p-next;p=finish;while(p!=NULL)文档编码:CB3L6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3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4实用标准文案精彩文档 printf(%st%dt%dt%dt%dtt%ctt%dn,p-name,p-prio,p-round,p-cputime,p-needtime,p-state,p-count);p=p-next;p=run;while(p!=NULL)printf(%st%dt%dt%dt%dtt%ctt%dn,p-name,p-prio,p-round,p-cputime,p-needtime,p-state,p-count);p=p-next;void InsertPrio(PCB*in)/*创建优先级队列,规定优先数越小,优先级越低*/PCB*fst,*nxt;fst=nxt=ready;if(ready=NULL)/*如果队列为空,则为第一个元素*/in-next=ready;ready=in;else/*查到合适的位置进行插入*/if(in-prio=fst-prio)/*比第一个还要大,则插入到队头*/in-next=ready;文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文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O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4实用标准文案精彩文档ready=in;else while(fst-next!=NULL)/*移动指针查找第一个别它小的元素的位置进行插入*/nxt=fst;fst=fst-next;if(fst-next=NULL)/*已经搜索到队尾,则其优先级数最小,将其插入到队尾即可*/in-next=fst-next;fst-next=in;else/*插入到队列中*/nxt=in;in-next=fst;void InsertTime(PCB*in)/*将进程插入到就绪队列尾部*/PCB*fst;fst=ready;文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编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G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4文档编码:CB3L6Q4O4G6 HY5I7E3Z7E8 ZE3Z7W4M8K4实用标准文案精彩文档if(ready=NULL)in-next=ready;ready=in;else while(fst-next!=NULL)fst=fst-next;in-next=fst-next;fst-next=in;void InsertFinish(PCB*in)/*将进程插入到完成队列尾部*/PCB*fst;fst=finish;if(finish=NULL)in-next=finish;finish=in;else while(fst

    注意事项

    本文((完整word版)时间片轮转算法和优先级调度算法C语言模拟实现收藏.pdf)为本站会员(Q****o)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开