操作系统--二级存储结构下篇知识详解
三级存储结构
n Low cost is the defining characteristic of tertiary
低成本是第三产业的决定性特征
storage.
存储。
n Generally, tertiary storage is built using removable media
一般来说,三级存储是使用可移动介质构建的
n Common examples of removable media are floppy disks
可移动媒体的常见例子是软盘
and CDROMs;other types are available.
和光盘;其他类型也有。
Removable Disks
可移动磁盘
n Floppy disk — thin flexible disk coated with magnetic
软盘——涂有磁性的薄软盘
material, enclosed in a protective plastic case.
包装在保护性塑料盒中的材料。
l Most floppies hold about 1 MB;similar technology is
大多数软盘容量约为1mb;类似的技术是
used for removable disks that hold more than 1 GB.
用于容量超过1 GB的可移动磁盘。
l Removable magnetic disks can be nearly as fast as
可移动磁盘的速度几乎可以达到
hard disks, but they are at a greater risk of damage
硬盘,但它们有更大的损坏风险
from exposure.
因为暴露。
Removable Disks (Cont.)
可移动磁盘(续。)
n A magnetooptic disk records data on a rigid platter coated with magnetic material.
磁光盘在涂有磁性材料的刚性盘上记录数据。
l Laser heat is used to amplify a large, weak magnetic
激光加热用于放大大而弱的磁场
field to record a bit.
字段来记录一位。
l Laser light is also used to read data (Kerr effect).
激光也用于读取数据(克尔效应)。
l The magnetooptic head flies much farther from the disk surface than a magnetic disk head, and the
磁光磁头比磁盘磁头飞得离磁盘表面更远,并且
magnetic material is covered with a protective layer of
磁性材料覆盖有保护层
plastic or glass;resistant to head crashes.
塑料或玻璃;抵抗头部撞击。
n Optical disks do not use magnetism;they employ special
光盘不使用磁性;他们雇用特殊的
materials that are altered by laser light.
被激光改变的材料。
WORM Disks
WORM磁盘
n The data on readwrite disks can be modified over and
读写磁盘上的数据可以反复修改
over.
完毕。
n WORM (“Write Once, Read Many Times”) disks can be
WORM(“一次写入,多次读取”)磁盘可以
written only once.
只写了一次。
n Thin aluminum film sandwiched between two glass or
夹在两块玻璃之间的薄铝膜或
plastic platters.
塑料盘。
n To write a bit, the drive uses a laser light to burn a small hole through the aluminum;information can be destroyed
要写一点,驱动器使用激光在铝上烧一个小孔;信息可以被销毁
by not altered.
没有被改变。
n Very durable and reliable.
非常耐用可靠。
n Read Only disks, such as CDROM and DVD, come from the
只读光盘,如光盘和数字视盘,来自
factory with the data prerecorded.
数据已预先录制的工厂。
n Compared to a disk, a tape is less expensive and holds
与磁盘相比,磁带更便宜,更耐用
more data, but random access is much slower.
更多的数据,但随机存取要慢得多。
n Tape is an economical medium for purposes that do not
磁带是一种经济的媒体,但不
require fast random access, e.g., backup copies of disk data, holding huge volumes of data.
需要快速随机访问,例如,保存大量数据的磁盘数据备份。
n Large tape installations typically use robotic tape changers
大型磁带安装通常使用自动换带机
that move tapes between tape drives and storage slots in a
在中的磁带机和存储插槽之间移动磁带
tape library.
磁带库。
l stacker library that holds a few tapes
存放几盘磁带的堆叠库
l silo library that holds thousands of tapes
存放数千盘磁带的思洛库
n A diskresident file can be archived to tape for low cost storage;the computer can stage it back into disk storage
驻留在磁盘上的文件可以归档到磁带上,以实现低成本存储;计算机可以把它放回磁盘存储器
for active use.
供积极使用。
12.46
12.46
Operating System Support
操作系统支持
n Major OS jobs are to manage physical devices and to present a virtual machine abstraction to applications
主要的操作系统工作是管理物理设备和向应用程序呈现虚拟机抽象
n For hard disks, the OS provides two abstraction:
对于硬盘,操作系统提供两种抽象:
l Raw device an array of data blocks.
原始设备是一组数据块。
l File system the OS queues and schedules the interleaved requests from several applications.
文件系统操作系统对来自多个应用程序的交错请求进行排队和调度。
Application Interface
应用程序界面
n Most OSs handle removable disks almost exactly like fixed
大多数操作系统处理可移动磁盘几乎和固定磁盘完全一样
disks — a new cartridge is formatted and an empty file
磁盘—格式化了一个新的盒式磁带和一个空文件
system is generated on the disk.
系统在磁盘上生成。
n Tapes are presented as a raw storage medium, i.e., and
磁带作为原始存储介质,即
application does not open a file on the tape, it opens the whole tape drive as a raw device.
应用程序不打开磁带上的文件,而是打开整个磁带机作为原始设备。
n Usually the tape drive is reserved for the exclusive use of
通常情况下,磁带机仅供以下人员使用
that application.
那个应用程序。
n Since the OS does not provide file system services, the application must decide how to use the array of blocks.
由于操作系统不提供文件系统服务,应用程序必须决定如何使用数据块阵列。
n Since every application makes up its own rules for how to
因为每个应用程序都有自己的规则
organize a tape, a tape full of data can generally only be
整理一盘磁带,一盘充满数据的磁带通常只能
used by the program that created it.
由创建它的程序使用。
Tape Drives
磁带驱动器
n The basic operations for a tape drive differ from those of a
磁带机的基本操作不同于
disk drive.
磁盘驱动器。
n locate positions the tape to a specific logical block, not an
将磁带定位到特定的逻辑块,而不是
entire track (corresponds to seek).
整个轨道(对应于寻道)。
n The read position operation returns the logical block
读取位置操作返回逻辑块
number where the tape head is.
磁头所在的编号。
n The space operation enables relative motion.
空间操作允许相对运动。
n Tape drives are “appendonly” devices;updating a block in
磁带机是“仅附加”设备;更新中的块
the middle of the tape also effectively erases everything
磁带的中间也有效地擦除了一切
beyond that block.
越过那个街区。
n An EOT mark is placed after a block that is written.
在写入的块后放置一个EOT标记。
File Naming
文件命名
n The issue of naming files on removable media is especially difficult when we want to write data on a removable
当我们想在可移动介质上写入数据时,给可移动介质上的文件命名尤其困难
cartridge on one computer, and then use the cartridge in
在一台计算机上安装墨盒,然后在中使用墨盒
another computer.
另一台电脑。
n Contemporary OSs generally leave the name space problem unsolved for removable media, and depend on
当代操作系统通常会让可移动媒体的命名空间问题悬而未决,并依赖于
applications and users to figure out how to access and
应用程序和用户找出如何访问和
interpret the data.
解读数据。
n Some kinds of removable media (e.g., CDs) are so well
某些类型的可移动媒体(如光盘)非常好
standardized that all computers use them the same way.
标准化所有计算机以相同的方式使用它们。
Hierarchical Storage Management (HSM)
分级存储管理(HSM)
n A hierarchical storage system extends the storage
分层存储系统扩展了存储
hierarchy beyond primary memory and secondary storage
主内存和辅助存储之外的层次结构
to incorporate tertiary storage — usually implemented as
整合第三级存储—通常实现为
a jukebox of tapes or removable disks.
磁带或可移动磁盘的自动点唱机。
n Usually incorporate tertiary storage by extending the file
通常通过扩展文件来整合三级存储
system.
系统。
l Small and frequently used files remain on disk.
小而常用的文件保留在磁盘上。
l Large, old, inactive files are archived to the jukebox.
大型、旧的、不活动的文件被归档到自动存储塔。
n HSM is usually found in supercomputing centers and other
HSM通常出现在超级计算中心和其他
large installations that have enormous volumes of data.
拥有大量数据的大型设施。
n Two aspects of speed in tertiary storage are bandwidth
三级存储速度的两个方面是带宽
and latency.
和等待时间。
n Bandwidth is measured in bytes per second.
带宽以每秒字节数来衡量。
l Sustained bandwidth average data rate during a large transfer;# of bytes/transfer time.
大型传输期间持续的带宽平均数据速率;字节数/传输时间。
Data rate when the data stream is actually flowing.
数据流实际流动时的数据速率。
l Effective bandwidth average over the entire I/O time, including seek or locate, and cartridge switching.
整个输入/输出时间内的平均有效带宽,包括寻道或定位以及盒式磁带切换。
Drive’s overall data rate.
驱动器的整体数据速率。
Speed (Cont.)
速度(续。)
n Access latency amount of time needed to locate data.
定位数据所需的访问延迟时间。
l Access time for a disk move the arm to the selected cylinder and
磁盘的存取时间将臂移至选定的气缸,并
wait for the rotational latency;< 35 milliseconds.
等待旋转延迟;< 35毫秒。
l Access on tape requires winding the tape reels until the selected block reaches the tape head;tens or hundreds of seconds.
获取磁带需要缠绕磁带卷轴,直到选定的块到达磁带头;几十或几百秒。
l Generally say that random access within a tape cartridge is about a thousand times slower than random access on disk.
一般来说,磁带盒内的随机存取比磁盘上的随机存取慢一千倍。
n The low cost of tertiary storage is a result of having many
三级存储的低成本是由许多
cheap cartridges share a few expensive drives.
便宜的盒式磁带共享一些昂贵的驱动器。
n A removable library is best devoted to the storage of infrequently used data, because the library can only satisfy
可移动存储库最适合存储不常用的数据,因为存储库只能满足
a relatively small number of I/O requests per hour.
每小时相对较少的输入/输出请求。
Reliability
可靠性
n A fixed disk drive is likely to be more reliable
固定磁盘驱动器可能更可靠
than a removable disk or tape drive.
而不是可移动磁盘或磁带驱动器。
n An optical cartridge is likely to be more reliable
光学墨盒可能更可靠
than a magnetic disk or tape.
而不是磁盘或磁带。
n A head crash in a fixed hard disk generally
固定硬盘上的磁头通常会崩溃
destroys the data, whereas the failure of a tape
销毁数据,而磁带故障
drive or optical disk drive often leaves the data
驱动器或光盘驱动器经常会留下数据
cartridge unharmed.
子弹没有受伤。
Cost
成本
n Main memory is much more expensive than disk
主存比磁盘贵得多
storage
存储
n The cost per megabyte of hard disk storage is
每兆字节硬盘存储的成本是
competitive with magnetic tape if only one tape
如果只有一盘磁带,则与磁带竞争
is used per drive.
每个驱动器使用。
n The cheapest tape drives and the cheapest disk
最便宜的磁带机和最便宜的磁盘
drives have had about the same storage capacity
驱动器具有大致相同的存储容量
over the years.
这些年来。
n Tertiary storage gives a cost savings only when the number of cartridges is considerably larger
只有当墨盒数量相当多时,三级存储才能节省成本
than the number of drives.
驱动器的数量。
Price per Megabyte of DRAM
每兆字节动态随机存取存储器的价格
Price per Megabyte of Magnetic Hard Disk
磁性硬盘每兆字节价格
Price per Megabyte of a Tape Drive
每兆字节磁带机的价格
End of Chapter 12