Hardware Reference
In-Depth Information
Figure 9.4. Format efficiency improvement from 512-byte sectors to 4K sectors.
Although 4K sectors may sound like a simple solution, this transition has many issues. The main
problem is that the 512-byte sector format has been so ingrained into PC operating systems (OSs) and
other software that changing it causes tremendous compatibility problems. The interim solution to this
problem was to have 4K sector drives use internal emulation to act at the interface level as if they are
512-byte sector drives, a format that is called 512e (for 512 emulation) in the industry. But, even with
emulation, there can be problems.
Consider what happens when a program writes a single sector to a disk. If the drive is a standard
512-byte sector drive, the one sector is written quickly and efficiently. However, if the drive is a 4K
sector drive that is emulating a 512-byte sector drive (512e), the drive must read a full 4K sector
into controller RAM, update 1/8 of the RAM-based data (512 bytes worth), and then write the full 4K
sector back to the disk. This results in a read-modify-write operation that takes much longer than just
writing the data to a 512-byte sector drive.
Fortunately, single sector writes rarely happen in the real world, because most file systems (including
Windows NT File System, or NTFS) write to disks in 4K clusters, or multiples of 4K. But even if the
file system cluster size matches the drive sector size (or is a multiple thereof), there can still be
problems with the file system or partition alignment (as discussed in the next section).
Partition Alignment
In 1993, sector addressing was done by cylinder head sector (CHS), and drive manufacturers
standardized on an emulated track size of 63 sectors per track. Internally, drives actually used a zoned
recording, where the number of sectors per track varied by zone. DOS and Windows disk partitioning
software placed the master boot record (MBR) in the first sector of the first track, which was at
Cylinder 0, Head 0, sector 1. The volume boot sector (VBR) for the first partition was then placed in
the first sector of the second track, which was Cylinder 0 Head 1, sector 1. With the sectors per track
standardized at 63, this meant that the first partition started in the 64 th sector on the disk, which in
logical block address (LBA) terminology would be LBA 63. Note that LBA sector numbering starts
with 0.
Because of this, Windows XP and earlier versions will start the first partition on a disk in sector
LBA 63. This means that the first sector of the partition (LBA 63) will also be the first sector in
 
 
Search WWH ::




Custom Search