CHS到LBA映射 - (磁盘存储) [英] CHS to LBA mapping - (Disk Storage)

查看:257
本文介绍了CHS到LBA映射 - (磁盘存储)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在LBA之前,你只需要一个磁盘的物理映射,最初在IBM-PC兼容机器上的原始映像如下所示:


  • Cylinder Number (10-bits)


    • 0-1024 (1024 = 2 ^ 10)



      • 0-256(256 = 2 ^ 8)

      • (6位)


        • 0通常保留为



          在我看来,把它们称为磁头磁头磁头表面,因为圆柱贯穿整个磁盘(多个盘片)。



          < img src =https://i.stack.imgur.com/2plwL.pngalt =在这里输入图片描述>






          逻辑块寻址: $ b 公式: A =(c·Nheads + h)⋅Nsectors +(s - 1)




          • A $逻辑块地址
            $ Nheads - 磁盘上磁头的数量磁盘每个磁盘

          • Nsectors - 轨道上的扇区数量每轨道扇区

          • c,h,s - 是圆柱体,头部,扇区数 24位总数(10 + 8 + 6) / li>


          查看 here

           对于几何1020 16 63 (3×16 + 2)×63 



          <几何:




          • 柱面号码 - 1020(0-1024)

          • 开头号码 - 16(0-256)

          • 行业编号 - 63(1-64)


          这些 几何 CHS数字映射到CHS元组(3,2,1)公式?

          解决方案

          我不认为头是一个字面太多的数字。除了大的5-1 / 4英寸驱动器外,我已经采取了一些分开来挽救钕磁铁,只看到一个磁盘。和2个头。一些早期的Windows版本只能处理255个头,所以这些数字可以一起玩。

          简短的回答:乘法气缸#倍#头#倍#和LBA接近。我尝试了在这里粘贴一个OpenBSD的fdisk列表,但是它的整个宽度为80个字符,而且网页不会占用它。


          Before LBA you simply had the physical mapping of a disk, which on originally on an old a IBM-PC compatible machine would look something like this the following:

          • Cylinder Number : (10-bits)
            • 0-1024 (1024 = 2^10)
          • Head Number : (8-bits)
            • 0-256 (256 = 2^8)
          • Sector Number : (6-bits)
            • 0 is reserved typically for the "boot sector" (c-0,h-0,s-0)
            • 1-64 (63 = 2^6 - 1) *0 is reserved

          Total CHS address bits : 24-Bits


          Back in day the average (file|block|sector) size was 512B.

          Example from wikipedia:

          512(bytes) × 63(sectors) x 256(heads) × 1024(cylinders) = 8064 MiB (yields what is known as 8 GiB limit) 
          

          What I'm confused on is what a head actually means, when referred to as heads-per-cylinder in the LBA formula. It doesn't make sense to me because from what I know a head is head, and unless it removable media each platter has two of them (top,bottom) for each of the it's surfaces.

          In my mind it would make more since to referred to them as heads-per-disk or heads-per-surface, since a cylinder goes through the entire disk (multiple platters).


          Logical Block Addressing:

          Formula: A = (c ⋅ Nheads + h) ⋅ Nsectors + (s − 1)

          • A - Logical Block Address
          • Nheads - Number of heads on a disk heads-per-disk
          • Nsectors - Numbers of sectors on a track sectors-per-track
          • c,h,s - is the cylinder,head,sector numbers 24-bits total (10+8+6)

          Looking at the first example on here:

          For geometry 1020 16 63 of a disk with 1028160 sectors CHS 3 2 1 is LBA  3150=(3× 16+2)× 63
          

          Geometry:

          • Cylinder Number - 1020 (0-1024)
          • Head Number - 16 (0-256)
          • Sector Number - 63 (1-64)

          How are these geometry CHS number mapping in to the CHS tuple (3,2,1) to be used in this formula?

          解决方案

          I don't think heads is a number to be taken too literally. I've taken a few apart to salvage the neodymium magnets and only ever seen one disk, except on big 5-1/4 inch drives. And 2 heads. And cylinders start at 0 but heads and sectors start at 1. Some early Windows versions could only deal with 255 heads so the numbers get played with.

          Short answer: Multiply cylinder # times head # times sector # and it's close to LBA. I tried pasting an OpenBSD fdisk listing in here but it's a whole 80 characters wide and the web page wouldn't take it.

          这篇关于CHS到LBA映射 - (磁盘存储)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆