登录
首页 » c++ » 用c++实现的先来先服务算法、最短进程优先调度算法

用c++实现的先来先服务算法、最短进程优先调度算法

于 2022-03-07 发布 文件大小:1.26 kB
0 86
下载积分: 2 下载次数: 1

代码说明:

 先来先服务,短作业优先,最高响应比优先调度进程调度算法 将每个进程抽象成一个控制块PCB,PCB用一个结构体描述。 构建一个进程调度类。将进程调度的各种算法分装在一个类中。类中存在三个容器,一个保存正在或未进入就绪队列的进程,一个保存就绪的进程,另一个保存已完成的进程。还有一个PCB实例。主要保存正在运行的进程。类中其他方法都是围绕这三个容器可以这个运行中的PCB展开。 主要用到的技术是STL中的vector以维护和保存进程容器、就绪容器、完成容器。 当程序启动时,用户可以选择不同的调度算法。然后用户从控制台输入各个进程的信息,这些信息保存到进程容器中。进程信息输入完毕后,就开始了进程调度,每调度一次判断就绪队列是否为空,若为空则系统时间加一个时间片。判断进程容器中是否有新的进程可以加入就绪队列。  

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • SerialPortToolV1.0
    说明:  文件为上位机开发实例,用C#进行编程实现。(The file is an example of the development of the host computer, and is implemented by programming in C#.)
    2020-06-21 11:40:02下载
    积分:1
  • Cplusplus.tar
    Some of the codeforces problems i ve solved
    2014-11-20 20:52:09下载
    积分:1
  • filter
    用CCS编的FIR滤波器,滤波系数用matlab计算(FIR filter。)
    2009-04-03 19:23:39下载
    积分:1
  • anli
    JAVA教程普通案例。交流学习专用。谢谢大家(。)
    2010-09-13 21:56:41下载
    积分:1
  • 3dfdtd
    fdtd 电磁计算 三维电磁仿真技术 电磁场计算 fdtd 算法(fdtd Em compute em field calculation )
    2014-02-09 17:16:19下载
    积分:1
  • int*base int*top int stacksize }sqstack inistack(sqstack s) { s.base=(int*)mal...
    int *base int *top int stacksize }sqstack inistack(sqstack &s) { s.base=(int*)malloc(stackintsize*sizeof(int)) if(!s.base) exit(-2) s.top=s.base s.stacksize=stackintsize return 1 }- int*base int*top int stacksize }sqstack inistack(sqstack s) { s.base=(int*)malloc(stackintsize*sizeof(int)) if(!s.base) exit(-2) s.top=s.base s.stacksize=stackintsize return 1 }
    2022-01-26 06:23:32下载
    积分:1
  • home
    An opengl project of designing a room with texture.
    2020-09-14 14:37:57下载
    积分:1
  • USART-RS232
    这是基于STM32的USART转232的应用程序(This is based on the STM32 USART 232 applications)
    2016-04-18 14:53:57下载
    积分:1
  • tms320c6678
    tms320c6678 主要介绍了c66x的芯片功能,端口、控制器,封装,存储空间分布等(TI’s KeyStone Multicore Architecture provides a high-performance structure for integrating RISC and DSP cores with application-specific coprocessors and I/O. KeyStone is the first of its kind that provides adequate internal bandwidth for nonblocking access to all processing cores, peripherals, coprocessors, and I/O. This is achieved with four main hardware elements: Multicore Navigator, TeraNet, Multicore Shared Memory Controller, and)
    2016-03-03 18:41:56下载
    积分:1
  • delta-master
    非圆形离散元程序,通过采用非圆形颗粒实现康转动性能(Non-circular discrete element program, through the use of non-spherical particles achieve Kang rotation capability)
    2016-05-18 11:10:53下载
    积分:1
  • 696518资源总数
  • 105908会员总数
  • 30今日下载