Secondary-Storage 二级存储幻灯片

上传人:爱****1 文档编号:929070 上传时间:2017-05-22 格式:PPT 页数:32 大小:336.50KB
返回 下载 相关 举报
Secondary-Storage 二级存储幻灯片_第1页
第1页 / 共32页
Secondary-Storage 二级存储幻灯片_第2页
第2页 / 共32页
Secondary-Storage 二级存储幻灯片_第3页
第3页 / 共32页
Secondary-Storage 二级存储幻灯片_第4页
第4页 / 共32页
Secondary-Storage 二级存储幻灯片_第5页
第5页 / 共32页
点击查看更多>>
资源描述

《Secondary-Storage 二级存储幻灯片》由会员分享,可在线阅读,更多相关《Secondary-Storage 二级存储幻灯片(32页珍藏版)》请在金锄头文库上搜索。

1、Applied Operating System Concepts,Module 13: Secondary-Storage 二级存储,Disk Structure磁盘结构Disk Scheduling磁盘调度Disk Management磁盘管理Swap-Space Management交换空间管理Disk Reliability磁盘可靠性Stable-Storage Implementation稳定存储实现Tertiary Storage Devices三级存储设备Operating System Issues有关操作系统的问题Performance Issues有关性能的问题,Appli

2、ed Operating System Concepts,Disk Structure 磁盘结构,Disk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer. 磁盘设备是以一种逻辑块的一维大数组的形式编址的,这里的逻辑块是传输的最小单位。The 1-dimensional array of logical blocks is mapped into the sectors of the dis

3、k sequentially. 逻辑块的一维数组映射到磁盘上一些相连的扇区。Sector 0 is the first sector of the first track on the outermost cylinder. 0扇区是最外边柱面的第一个磁道的第一个扇区。Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost. 数

4、据首先都映射到一个磁道,其余的数据映射到同一柱面的其他磁道,然后按照从外向里的顺序映射到其余的柱面。,Applied Operating System Concepts,Disk Scheduling 磁盘调度,The operating system is responsible for using hardware efficiently for the disk drives, this means having a fast access time and disk bandwidth. 操作系统有责任高效地使用硬件对于磁盘设备,这意味着很短的访问时间和磁盘带宽。Access time

5、 has two major components 访问时间包括两个主要部分Seek time is the time for the disk are to move the heads to the cylinder containing the desired sector. 寻道时间是指把磁头移到所需柱面的时间。Rotational latency is the additional time waiting for the disk to rotate the desired sector to the disk head. 旋转延迟是指等待磁盘上所需要的扇区旋转到磁头下面的时间。M

6、inimize seek time 最小寻道时间Seek time seek distance 寻道时间 寻道距离Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer. 磁盘带宽,是用传输的总位数,除以第一个服务请求与最后传输完成之间的总时间。,Applied Operating System Concepts,Disk Sche

7、duling (Cont.) 磁盘调度(续),Several algorithms exist to schedule the servicing of disk I/O requests. 有几种磁盘I/O请求的服务调度算法We illustrate them with a request queue (0-199). 我们假设一个请求序列。98, 183, 37, 122, 14, 124, 65, 67Head pointer 53 磁头当前的位置在53。,Applied Operating System Concepts,FCFS 先来先服务,Illustration shows to

8、tal head movement of 640 cylinders. 如下图所示,磁头总共移动了640个柱面的距离。,Applied Operating System Concepts,SSTF 最短寻道时间优先,Selects the request with the minimum seek time from the current head position. 选择从当前磁头位置所需寻道时间最短的请求。SSTF scheduling is a form of SJF scheduling; may cause starvation of some requests. SSTF是SJF

9、调度的一种形式;有可能引起某些请求的饥饿。Illustration shows total head movement of 236 cylinders. 如图所示,磁头移动的总距离是236柱面。,Applied Operating System Concepts,SSTF (Cont.),Applied Operating System Concepts,SCAN 扫描算法,The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets t

10、o the other end of the disk, where the head movement is reversed and servicing continues. 磁头从磁盘的一端开始向另一端移动,沿途响应访问请求,直到到达了磁盘的另一端,此时磁头反向移动并继续响应服务请求。Sometimes called the elevator algorithm. 有时也称为电梯算法。Illustration shows total head movement of 208 cylinders. 如图所示,磁头移动的总距离是208柱面。,Applied Operating System

11、Concepts,SCAN (Cont.),Applied Operating System Concepts,C-SCAN,Provides a more uniform wait time than SCAN. 提供比扫描算法更均衡的等待时间。The head moves from one end of the disk to the other. servicing requests as it goes. When it reaches the other end, however, it immediately returns to the beginning of the disk

12、, without servicing any requests on the return trip. 磁头从磁盘的一段向另一端移动,沿途响应请求。当它到了另一端,就立即回到磁盘的开始处,在返回的途中不响应任何请求。Treats the cylinders as a circular list that wraps around from the last cylinder to the first one. 把所有柱面看成一个循环的序列,最后一个柱面接续第一个柱面。,Applied Operating System Concepts,C-SCAN (Cont.),Applied Opera

13、ting System Concepts,C-LOOK,Version of C-SCAN C-SCAN算法的一种形式。Arm only goes as far as the last request in each direction, then reverses direction immediately, without first going all the way to the end of the disk. 磁臂在每个方向上仅仅移动到最远的请求位置,然后立即反向移动,而不需要移动到磁盘的一端。,Applied Operating System Concepts,C-LOOK (C

14、ont.),Applied Operating System Concepts,Selecting a Disk-Scheduling Algorithm选择一种磁盘调度算法,SSTF is common and has a natural appeal SSTF比较通用,性能一般。SCAN and C-SCAN perform better for systems that place a heavy load on the disk. SCAN和C-SCAN在重磁盘负载的系统中性能较好。Performance depends on the number and types of reque

15、sts. 性能依赖于请求的数量和类型。Requests for disk service can be influenced by the file-allocation method. 磁盘服务请求受到文件定位方式的影响。The disk-scheduling algorithm should be written as a separate module of the operating system, allowing it to be replaced with a different algorithm if necessary. 磁盘调度算法应该写成操作系统中的一个独立模块,在必要

16、的时候允许用不同的算法来替换。Either SSTF or LOOK is a reasonable choice for the default algorithm. SSTF和LOOK都是缺省算法的合理选择。,Applied Operating System Concepts,Disk Management 磁盘管理,Low-level formatting, or physical formatting Dividing a disk into sectors that the disk controller can read and write. 低级格式化,或物理格式化把磁盘划分成扇

17、区,以便磁盘控制器可以进行读写。To use a disk to hold files, the operating system still needs to record its own data structures on the disk. 为了使用磁盘保存文件,操作系统还需要在磁盘上保存它自身的数据结构。Partition the disk into one or more groups of cylinders. 把磁盘划分成一组或多组柱面。Logical formatting or “making a file system”. 逻辑格式化或“创建文件系统”。Boot block initializes system. 启动块初始化系统The bootstrap is stored in ROM. 引导程序存储在ROM中Bootstrap loader program. 引导程序装载程序。Methods such as sector sparing used to handle bad blocks. 一些方法,例如节省扇区,可以用来处理坏块。,

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > PPT模板库 > 教育/培训/课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号