操作系统磁盘调度

磁盘调度 (Disk Scheduling)

One of the major duties of the operating is that, to use the hardware orderly and accurately. For disk drives, it has a duty of having a fast access time and disk bandwidth. Generally, bandwidth is the total number of bytes, which need to be transferred, and then divided by the total time between the first service and the last transfer. In the case of disk structure, we have to improve both access time and the bandwidth with the help of scheduling the service of disk I/O requests in good order. By this there are many techniques comes for disk scheduling which is prescribed below.

操作的主要职责之一是有序,准确地使用硬件。 对于磁盘驱动器,它具有快速访问时间和磁盘带宽的职责。 通常,带宽是需要传输的总字节数,然后除以第一次服务和最后一次传输之间的总时间。 在磁盘结构的情况下,我们必须通过合理安排磁盘I / O请求的服务来改善访问时间和带宽。 通过这种方式,有许多用于磁盘调度的技术,如下所述。

1. FCFS调度 (1. FCFS Scheduling)

This is a simple scheduling algorithm which means first come first serve form of an algorithm. This kind of algorithm generally not provides the fastest service.

这是一种简单的调度算法,这意味着算法的先到先得形式。 这种算法通常不会提供最快的服务。

Consider the example: a disk queue with a request for I/O to blocks on cylinder 97, 182, 37, 128, and 15 in that order. If the disk head is initially at cylinder 52, so it will first move from 52 to 97, then 182, 37, 128, 15. There is a drastic change in the moment like 37 to 128 and then back to 15, it can generate the problem with this schedule.

请考虑以下示例:一个磁盘队列,该请求按顺序依次请求柱面97、182、37、128和15上的块的I / O。 如果磁盘头最初位于圆柱体52上,那么它将首先从52移至97,然后从182、37、128、15移动。此刻会发生剧烈变化,例如从37变为128,然后又回到15,则可以生成这个时间表的问题。

2. SSTF调度 (2. SSTF scheduling)

This is an algorithm which is termed as shortest seek time first algorithm. This type of algorithm selects the request with the minimum seek time from the current head position, as seek time is a time in which the arm has to move the head to the cylinder containing the desired sector. Seek time will be increased if the number of the head will be traversed by the head, as SSTF choose the request closest to the head position.

这是被称为最短寻道时间优先算法的算法。 这种类型的算法从当前磁头位置中选择具有最小寻道时间的请求,因为寻道时间是手臂必须将磁头移动到包含所需扇区的圆柱的时间。 如果SSTF选择最接近磁头位置的请求,那么如果磁头遍历磁头的数量,则搜索时间将会增加。

3.扫描计划 (3. SCAN Scheduling)

SCAN scheduling algorithm is also called the elevator algorithm because in such kind of algorithm arm behaves just like an elevator for building the way. In the SCAN algorithm, the arm will start at the one end of the disk and then move towards another end of the disk. At the last end, the head of the arm will be reversed and then this process continues.

SCAN调度算法也称为电梯算法,因为在这种算法中,手臂的行为就像电梯一样。 在SCAN算法中,机械臂将从磁盘的一端开始,然后朝磁盘的另一端移动。 最后,手臂的头部将反转,然后继续此过程。

4. C-SCAN调度 (4. C-SCAN Scheduling)

This kind of algorithm is termed as circular scan scheduling algorithm. This is designed to provide a uniform wait time. The C-SCAN algorithm treats the cylinder as the circular lists which will wrap the final cylinder to the first one. Although it is same as SCAN, in this also the head will move from one end to the another, when the head reaches the end it immediately return at a position of the beginning of the disk, without any request.

这种算法称为循环扫描调度算法。 这旨在提供统一的等待时间。 C-SCAN算法将圆柱体视为循环列表,它将最终圆柱体包装到第一个圆柱体中。 尽管与SCAN相同,但磁头也将从一端移动到另一端,当磁头到达一端时,它会立即返回磁盘起始位置,而无需任何请求。

5.查找计划 (5. LOOK scheduling)

This is the same as a SCAN algorithm, this algorithm kindly check the LOOKS to see whether there is any request which is pending in the direction of a head moment. Generally, according to the LOOK algorithm, the arm goes only as far as possible in each direction and then reverse direction without going to the end. The variant like scan is called LOOK scheduling because at last, they will look for a request before to move in a given direction.

这与SCAN算法相同,该算法请检查LOOKS,以查看是否有任何在头部力矩方向上待处理的请求。 通常,根据LOOK算法,机械臂只会在各个方向上尽可能远地移动,然后在不移动的情况下反向移动。 像scan这样的变量称为LOOK调度,因为最后,它们将在向给定方向移动之前先查找请求。

Selection of a Disk-Scheduling Algorithms

磁盘调度算法的选择

SSTF is a common algorithm which will increase the performance over the FCFS. SCAN and C-SCAN perform better for the system which places a heavy load on the disk because there is no such kind of a starvation problem. For any kind of the algorithm, the performance is basically dependent upon the number and the type of the requests. Disk scheduling algorithm should be written separately so that it can be replaced by a different algorithm if necessary. In this case, SSTF or LOOK is the best choice for the shortcoming algorithm.

SSTF是一种通用算法,它将提高FCFS的性能。 SCAN和C-SCAN在磁盘上负载较重的系统上表现更好,因为不存在此类饥饿问题。 对于任何一种算法,性能基本上都取决于请求的数量和类型。 磁盘调度算法应单独编写,以便在必要时可以用其他算法替换。 在这种情况下,SSTF或LOOK是该缺点算法的最佳选择。

翻译自: https://www.includehelp.com/operating-systems/disk-scheduling.aspx

操作系统磁盘调度

操作系统磁盘调度_磁盘调度| 操作系统相关推荐

  1. 取消挂载点可以节省磁盘么_磁盘克隆、磁盘镜像还有复制粘贴有什么不一样?...

    最近在倒腾新SSD和用了三四年的老操作系统,期间在磁盘上创建个新的分区,并且安装了一个全新的Windows10,结果,一不小心覆盖了老系统的引导,系统丢了.然后,用各种引导工具进行了修复,好在几次有惊 ...

  2. 操作系统文件系统实验_现代电脑操作系统原理课程,案例:Apple 操作系统技术演进...

    实验环境 ChCore 课程实验代码及说明.zip 大纲.txt 1.1 操作系统的定义.mp4 1.2 为什么学习操作系统.mp4 1.3 操作系统面临的挑战.mp4 1.4 案例:Apple 操作 ...

  3. centos一键清理磁盘空间_磁盘空间不够用?教你一键清理电脑重复文件

    当你电脑磁盘空间不够用的时候你会怎么办?使用一些清理垃圾工具清理缓存,删除大文件?这些只是我们腾出电脑磁盘空间的手段之一,今天小帮教你另外一种方法,查找磁盘中的"重复文件"并对重复 ...

  4. web操作系统开发的_哪种操作系统更适合Web开发

    web操作系统开发的 If you're new to web development and are in the market for a new laptop, you might be won ...

  5. linux mysql 磁盘空间_磁盘空间满了之后MySQL会怎样

    导读 当磁盘空间爆满后,MySQL会发生什么事呢?又应该怎么应对? 会发生什么事 当磁盘空间写满了之后,MySQL是无法再写入任何数据的,包括对表数据的写入,以及binlog.binlog-index ...

  6. idea 报系统分区磁盘不足_磁盘空间不足—win7系统磁盘空间不足巧妙解决

    很多朋友经常使用电脑的时候会遇到磁盘空间不足的问题,这就意味着该磁盘空间已容纳不下您所需存放的资料.在不知情下,使用迅雷下载.U盘拷贝到空间不足的系统磁盘中,均会提示关于当前磁盘空间不足的问题. 现如 ...

  7. 滴滴如何调度_滴滴调度小助手和热力图是司机的陷阱还是馅饼?

    滴滴智能调度小助手上线的目的是激活闲置资源.中心调度.高效匹配交通出行的相关数据,然后做出最优的决策,从而提高出行效率. 与Uber强制派单模式不同的是滴滴采取的是抢单模式.Uber模式的优势是用户体 ...

  8. idea 报系统分区磁盘不足_磁盘空间不足,添加新的磁盘,扩充根分区

    一.磁盘空间不足,添加新的磁盘 ECS赠送的系统盘20G,明显不够使用.购买一块500G的数据盘,作为应用服务及数据存储使用. 一.检查目前磁盘情况 1.看现在磁盘情况 2.查看磁盘个数以及分区情况 ...

  9. Java——程序的调度_分时调度模型和抢占式调度模型

    在计算机中,线程调度有两种模型,分别是分时调度模型和抢占式调度模型. 分时调度模型是指让所有的线程轮流获得CPU的使用权,并且平均分配每个线程占用的CPU时间片. 抢占式调度模型是指让可运行池中优先级 ...

最新文章

  1. 面试必备:Java线程池解析
  2. 202. Happy Number
  3. openresty开发系列27--openresty中封装redis操作
  4. nginx配置vue项目500_一个Nginx部署多个vue前端项目总结
  5. ui li 菜单 点击添加下级_【Qt开发】实现系统托盘,托盘菜单,托盘消息
  6. Android开机动画过程
  7. 年轻人的第一个自定义Springboot starter
  8. 明华M1读卡器操作基本方法
  9. php录音功能,h5做出网页录音功能
  10. 物联网毕业设计 车牌识别系统 stm32
  11. MPFC++ wrapper by Pavel
  12. Word修改默认英文字体为Times New Roman
  13. 【论文笔记】D2A U-Net: Automatic segmentation of COVID-19 CT slices based on dual attention and hybrid di
  14. 联想笔记本更换固态硬盘和重装系统
  15. 如何理解类与对象、继承
  16. CTF-实验吧-FALSE
  17. 微信支付apiV3编程实例php,PHP 微信小程序 微信支付 v3
  18. JavaScript视频处理库
  19. 综合案例 跳转到主页面(index)
  20. JavaScript中如何正确的获取字符串长度

热门文章

  1. (网页)js每隔5分钟执行一次ajax请求的实现方法(转)
  2. table 设置边框
  3. vue中使用codemirror
  4. ulli*3 实现翻书动画效果
  5. 如何在 vue-cli v3.0 中使用 SCSS/SASS
  6. web前端学习之ruby标记和rt/rp标记
  7. 数据库如何进行索引优化
  8. Cisco TrustSec(理解)
  9. 010 pandas的DataFrame
  10. Android,监控ContentProvider的数据改变