Hard Disk Drive (HDD)

Nonvolatile magnetic computer memory: floppy disks, hard drives

26 flashcards · Computer Science · by lakesare

  1. Name 5 parts of a floppy magnetic disk.

    platter sector track (each track of a head | width) intersector gap intertrack gap Head moves up and down between tracks, disk rotates presenting different sectors for a head. In most contemporary systems, fixed-length sectors are used, with 512 bytes being the nearly universal sector size. In fact, a sector also has a number of extra bytes at both ends for storing some control information, such as the track number, the sector number, and the beginning and end signs of the sector. So to be more…

  2. How does fixed VS movable read/write head function?

    Fixed head: (or head-per-track) multiple heads, one per track. Only the head sitting above the relevant track needs to be activated, and when the sector in question spins to underneath the head, reading/writing can begin. Movable head: single head, head needs to move to the desired track and wait for the desired section to spin to the position under the head.

  3. What is a hard disk physically?

    Hard disk can be considered a collection of floppy magnetic disks. Each platter has two surfaces, and thus there is a read/write head for each surface. When arm moves - all heads move, you can't position them individually. You can use one head at the time, not all simultaneously. If we look at a surface of a single disk platter, then we can say that it is divided into a set of concentric tracks. But if we look at the hard disk, which consists of several disk platters, we can say that the hard d…

  4. Are read/write heads in HDD fixed or movable?

    Heads are movable. Some high-performance HDDs were manufactured with one head per track so that no time was lost physically moving the heads to a track. Known as fixed-head or head-per-track HDDs they were very expensive and are no longer in production.

  5. What is a seek time?

    Time it takes for a head to move to the desired track.

  6. What's rotational latency?

    The head needs first to move to the desired track and wait for the desired sector to come under the head. Disks, other than floppy disks, rotate at speeds ranging from 3600 rpm (for handheld devices such as digital cameras) up to, as of this writing, 20,000 rpm; at this latter speed, there is one revolution per 3 ms. Thus, on the average, the rotational delay will be 1.5 ms.

  7. How is average rotational latency calculated? Let us have rotation speed in revolutions per second.

    (min latency + max latency) / 2 = (0 + time it takes to make a whole revolution) / 2 = (1/rotation_speed[rps])/2 = 1/(2*rotation_speed) The minimum latency is 0; this corresponds to the case where the head happens to be above the desired sector. The maximum latency is the time taken for the disk to rotate once; this corresponds to the case where the head just missed the desired sector, and it has to wait for the sector to spin around again.

  8. What's access time?

    access_time = rotational_latencyave + seek_time. Time it takes to get into position to read or write..

  9. What's meant by the transfer rate: in RAM in HDD

    in RAM - data rate between RAM and CPU, bits/second in HDD - data rate between HDD and RAM, bits/second Different disk systems have different transfer rates. But in general floppy disk drives have transfer rates of 500KB–2MB/s, and the transfer rates for hard disk drives are 4–12 MB/s. In general the access time for disk drives is on the scale of milliseconds (10–3 second). By contrast, access time in main memory is on the scale of nanoseconds (10–9 seconds)

  10. What's a transfer time?

    The time taken to read data after head is in the desired position. Once the head is in position, the read or write operation is then performed as the sector moves under the head; this is the data transfer portion of the operation.

  11. What is a formula for a total time to access and read data stored as tracks on a computer disk?

    access_time + transfer_time = seek_timeave + rotational_latency + transfer_time

  12. What is the formula for transfer time?

    It's just a sequential access. So, if we're reading 0.4 of one track, it's equal to 0.4 * max rotational delay. transfer_time = number of bytes to be transferred _________________________________________________ rotation speed [rps] * number of bytes on a track Clearly if all of the data on a track is to be read, then this reduces to the time taken for one disk rotation.

  13. What is the transfer rate?

    Just the amount of bytes transferred per second as head slides, e.g.: Transfer rate = bytes on track / max rotation time

  14. Can you read or write some part of a sector?

    No, a full sector always has to be read or written from/to the disk.

  15. What's a block?

    Group of sectors that the operating system can address (point to). A block might be one sector, or it might be several sectors. The bigger the drive, the more sectors that block will hold. Blocking is almost universally employed when storing data to 9-track magnetic tape, to NAND flash memory, and to rotating media such as floppy disks, hard disks, and optical discs.

  16. So why are there blocks, why doesn't OS just point straight to the sectors?

    Because there are limits to the number of blocks that an operating system can address. By defining a block as several sectors, an OS can work with bigger hard drives without increasing the number of block addresses. E.g., PC DOS could only address 64K blocks, and each block could could only be a single sector. Thus, the largest size a disk volume could be was 32mb (64K * 512K).

  17. HDD block size: 4k bits. logical file size: 4.5k bits. What's the physical size of this file?

    This file requires 8k bits to be stored on this hard disk (2 whole blocks). Physical file size is the amount of bits on the hard disk used up by this file. Read from or writing to disk happens at the granularity of blocks.

  18. What's the slack space?

    slack space = physical file size - logical file size Remaining bits of a block on which file-smaller-than-the-block is placed. Let's assume that you have a hard disk with 512 byte sectors and that each cluster is comprised of eight sectors. That means that each cluster will be 4096 bytes in length. Now, let's create a file that's exactly one byte in length. An entire cluster will be allocated to that file - all 4096 bytes will be removed from the available disk space and dedicated to this file.…

  19. When's the slack space an issue?

    When you're storing large amount of very small files.

  20. Is it possible to change disk block size?

    Yes, using disk reformatting. This will also mark all data as deleted. In this case block/cluster size is named 'allocation unit size':

  21. Slack space is extensively used in computer forensics. How?

    When a file is deleted/disk is reformatted, OS doesn't erase the file, it simply makes blocks file occupied available for reallocation. Slack space can provide investigators with clues as to prior uses of the computer in question. In 2016, for example, FBI reviewed millions of email fragments that resided in the slack space of Hillary Clinton’s personal servers in order to determine whether or not the servers have improperly stored or transmitted classified information.

  22. Name 2 schemes OS uses for exposing hard disk to software. What's used nowadays?

    Logical Block Addressing (LBA) - practice of referring to hard disk blocks from 0 to ... Cylinder-Head-Sector (CHS) Only LBA is used on modern systems.

  23. What's defragmentation?

    Fragmentation is a phenomenon when one file is scattered among multiple noncontiguous blocks. Defragmentation is a process that reduces fragmentation.

  24. What's formatting?

    low-level formatting: drawing tracks and sectors on a disk. high-level formatting: can be performed on some partition after partitioning - erase all data, install a file system, add a volume boot record, set block size Much of the old data is still on the disk, but the access paths to it have been wiped out. Today, an end-user, in most cases, should never perform a low-level formatting of hard drive, and in fact it is often not possible to do so on modern hard drives.

  25. Consider a disk with a sector size of 512 bytes, 2000 tracks per surface, 50 sectors per track, five double-sided platters, and average seek time of 10 msec. 1. What is the capacity of a track in bytes? What is the capacity of each surface? What is the capacity of the disk? 2. How many cylinders does the disk have? 3. Give examples of valid block sizes. Is 256 bytes a valid block size? 2048? 51200? 4. If the disk platters rotate at 5400 rpm, what is the maximum rotational delay?

    1. bytes/track = bytes/sector × sectors/track = 512 × 50 = 25K bytes/surface = bytes/track × tracks/surface = 25K × 2000 = 50 000K bytes/disk = bytes/surface× surfaces/disk = 50, 000K × 5 × 2 = 500 000K 2. The number of cylinders is the same as the number of tracks on each platter, which is 2000. 3. The block size should be a multiple of the sector size. We can see that 256 is not a valid block size while 2048 is. 51200 is not a valid block size in this case because block size cannot exceed the…

  26. Consider a disk with an average seek time of 4 ms, rotation speed of 15,000 rpm, and 512-byte sectors with 500 sectors per track. Suppose that we wish to read a file consisting of 2500 sectors for a total of 1.28 Mbytes. We would like to estimate the total time for the transfer. What's the total time when: When file is sequentially organized. Sectors are distributed randomly across the disk.

    total time = seek time + ave rot delay + transfer time seek time = 4ms max rot delay = 1/rot speed = 60s * 1/15k = 4ms ave rot delay = 4ms/2 = 2ms 1. Sequential organization is when file occupies all of the sectors on 5 adjacent tracks. transfer timeeach track = time to travel whole disk = 4ms time1st track = 4ms + 2ms + 4ms = 10ms timeother track = we can neglect seek time, but not rotational delay = 0 + 2ms + 4ms = 6ms total time = 10ms + 4*6ms = 34ms. 2. transfer timeeach sector = time to tr…