zoukankan      html  css  js  c++  java
  • 7、深入理解计算机系统笔记:存储器层次结构,存储技术(2)

    1、磁盘构造

    每个表面是由一组称为磁道(track)的同心圆组成;每个磁道被划分成一组扇区(sector);每个扇区包含相等数量的数据位(通常是512字节);这些数据编码在扇区上的磁性材料中。扇区之间由一些间隙(gap)分隔开,这些间隙中不存在数据位。间隙存储用来标识扇区的格式化位。

    wps_clip_image-27712

    注:spindle(主轴)platter(盘片)cylinder(柱面)

    2、磁盘容量

    wps_clip_image-10978

    (扇区大小×每条磁道平均扇区数×每个面磁道的磁道数×每个盘片的面数×每个磁盘的盘数)

    3、对于与DRAMSRAM容量相关的单位,通常K 210M 220G 230,对于磁盘和网络这样的I/O设备容量相关的单位,通常K 103M 106G 109

    4、任何时刻,所有的读写头都位于同一柱面上。

    wps_clip_image-221

    注:spin(旋转),cushion(垫子),radially(放射状的,在半径方向上)

    在传动臂末端的读/写头在磁盘表面高度约0.1微米处一层薄薄的气垫上飞翔,速度大约为80km/h。磁盘以扇区大小的块来读写数据。

    5、对扇区的访问时间有三个主要部分组成:寻道时间(seek time),旋转时间(rotational latency)和传送时间(transfer time)。

    1)寻道时间(seek time):为了读取某个目标扇区的内容,传动臂把读/写头首先定位到包含目标扇区的磁道上。所需时间即为寻道时间,约等于最大旋转时间。

    2)旋转时间:定位到期望的磁道后,驱动器等待目标扇区的第一个位旋转到读/写头下。

    Tmax rotation = 1/最大旋转数率

    Tavg rotation = (1/2) × Tmax rotation

    3)传送时间

    Tavg transfer = (1/最大旋转数率) × (1/每磁道的平均扇区数)。

    6、现代磁盘构造复杂,有多个盘面,这些盘面上有不同的记录区。为了对操作系统隐藏这样的复杂性,现代磁盘将它们的构造简化为一个b个扇区大小的逻辑块的序列,编号为0,1,2,...b-1。磁盘中有一个小的硬件/固件设备,称为磁盘控制器,维护着逻辑块号的和实际(物理)磁盘扇区之间的映射关系。

        When the operating system wants to perform(执行) an I/O operation such as

    reading a disk sector into main memory, it sends a command to the disk controller 

    asking it to read a particular logical block number. Firmware on the controller

    performs a fast table lookup that translates the logical block number into a (surface,

    track, sector) triple that uniquely identifies the corresponding physical sector.

    Hardware on the controller interprets this triple to move the heads to the appropriate

    cylinder, waits for the sector to pass under the head, gathers up the bits sensed by the

    head into a small buffer on the controller, and copies them into main memory.

    <Computer Systems:A Programmer's Perspective>

  • 相关阅读:
    WebClient.UploadData 方法 上载文件数据
    webclient提交并接受返回
    webClient上载下载
    斯特林反演与伯恩赛德引理
    Re0: 从 1 开始的省选前生活
    Windows 8将可能带动触摸屏的发展
    后PC时代的那些事
    关于ASP网页在IIS7.5下访问数失效
    Windows 要终结了?微软要推超级系统?
    未来10年的开放式互联网
  • 原文地址:https://www.cnblogs.com/mydomain/p/2079190.html
Copyright © 2011-2022 走看看