Sunday, 14 June 2009

Geometry of Hard Disk

Two weeks I did not write in this Blog. I am preparing a website here. I needed to become used to the Microsoft Office Live tools and editing the files and uploading and changing backgrounds. Now I am smoothly on the track. Hopefully that site includes very interesting pieces regarding hardware and assembly codes and this Blog remains for general tuning of computer and similar ideas. I was talking about the structure of hard disk. Their technology constantly is changing to reduce the size, to reduce access time for retrieving each piece of data, or in other words to increase the speed of data retrieve. At the same time it is desirable to increase the amount of data that one can put on a hard disk. There are also other goals such as reducing the noise created by hard disk and improve its mechanical features such as ambient compatibility and positioning of a working hard disk in different orientations. BIOS of computer and operating system talk with the embedded software of the hard disk and from that point on we do not know how that software handles data that I give to my computer to be saved. Hard disk takes my data and with all honesty keep them and gives them back to me. For that software all of my data are in form of bytes next to each other. It is like the RAM of computer: there is no cylinder or head or anything. From the time of corporate mainframe computers with their stacks of disks we have data organization in form of a three dimensional space. At each point "head" should stop, read the data and after passing certain time move to another point. While moving it cannot read anything. Normally people understand that a cylinder is a solid object. This is not meaning of a cylinder. A cylinder is only the outer surface of a solid cylinder similar to a pipe with no pith. A solid cylinder object is like many pipes, thousands, smaller inside the larger. I can address each pipe or cylinder by counting from the most outer and larger pipe to the most inner narrower pipe. Each disk in our imaginary stack of disks has two sides for putting data: top and bottom. On each side we have an imaginary head. Actually a real hard disk has two disks, called platter with four heads, but these are not our concern. For partitioning practice I assume that I have 128 disks each two heads (two sides), a total of 256 heads. I further assume that the most bottom disk has not a bottom disk and therefore no head. that reduces heads to 255 at the end. Hence, H=255. That gives address to find one side of an imaginary disk. cylinders on each disk can be seen as circular track of a CD ROM. Then I should navigate around over that side. I divide that similar to a pizza or a pie. Normally, you do it by make it half and then half again and further until you get small portions. For hard disk, small portions are called "sector." It is standard to continue to make half until we get 64 sectors; six times halving, one after the other. They are counted from "zero" to 63 included, 64 all together. Hence, S=63. One does not change this default, except to commit him to some adventures not utilizing partitions for daily work. the last thing remains for me to decide that on a specific sector on a specific head how many cylinders, inside each other, I need. With the scheme that I have had so far each of my cylinders contain roughly 8Mb of data. From that I can decide for number of cylinders. For safe experience I never exceed C=1024 cylinder, or around 8Gb. But for real works, I do not care much about these things and allow GParted or Windows or Solaris or other software manage these tasks.

No comments:

Post a Comment