Tuesday, September 11, 2007

OPS335 Week 2 Second Lecture

OPS335
Second Lecture

Today we are going to be talking about Disks, 1956 IBM made the first disk which was 5mb, about 50 years ago, and cost about $50, 000, contrast this from 2007 called the Desk Star 1000, 1TB - $500, there is new way to give 50% more capacity, as technology progresses everything gets cheaper. Disks, we use them for Non- Volatile Storage, information is saved when your computer is turned off, that is one of the systems storage, your memory is Volatile, what ever is in RAM is gone, but in you hard drive the data will still be their, we use this type of storage to store programs, video clips, photographs. Now you can purchase, NAS, Network Attached Storage, you can buy them now at Tiger Direct or Future Shop, it plugs into your Ethernet. You can store stuff on it, drives may go away in the future because of chip memory, hard drives are mechanical with moving parts the disk is rotating, chip memory will probably be faster in the future, you may buy memory cards for you camera this is an example of chips out doing Disks. A picture of a disk…we can write on the top and read at the bottom we have 8 surfaces we can do our reading and writing, in the example of the cylinders the tracks are concentric tracks its circles into circles, if you take a look at one particular track and ask yourself how much data the track can hold and multiply the track by 8, it will give you the capacity of the cylinder, the cylinder is the sum of the tracks in one sweep through the surfaces of the platters, so you have a sector here which is the smallest part of the track, a sector is typically 512 bytes, if you have a file it will be written into a whole sector the system cannot read more then a sector at a time, they cannot read one byte but a sector at a time, these are all of the attributes of a hard drive,

Disks

Looking at the zones of the drives, the top platter, you have 5 different zones, every zone the number of sectors, you can count the sectors and in our example its 9 sectors, as you get closer to the centre its harder to squeeze in data, as it branches out form the centre you can have more tracks, in the early days a disk only had one zone,

Disks

C=T*H*S*Z
The formula Computing Disk Capacity
C is the capacity size of the drive measured in bytes
T is the number of tracks on one recordable surface
S is the number of sectors per track
H is the number read/write heads (usually the same surfaces)
Z is the size of one sector usually 512 bytes

For pcs a sector is 512 bytes, lets take an example we have a disk with one platter, if it has one platter it has two surfaces, so it has 2 sets of r/w heads, we have 18 sectors /tracks and 80 tracks and 512 bytes per sector
H=1 platter * 2
S=18 sectors/track
T =80 tracks bytes /sectord
Z = 512 bytes/sector

Echo 2 *80*18*512
1474560 bytes
Divide by 1024 we get 1440Kb = 1.44mb this is like a floppy this formula works for every single hard drive unless you have a hard drive with multiple zones, then you have to work out the capacity for each zone, if you have six zones on the hard drive you have to do the complication 6 times and write it down, 1024 bytes is one kilobyte, kilo, mega, gig, tera peta, exa, zeda, remember we only 10^88 electrons in the universe, those are the standards, take a look at the example he did, he wants to know what is the capacity of one cylinder,
The capacity of one cylinder,
1440kb =1.44mb
Capacity= 2*18*80*512
=1474569bytes
=1024

1474569/80x2 -this is one cylinder
36864 bytes

Cylinder, we have two plates, if you have 2 plates you have four surfaces, the track 0, 1 platter is two surfaces, the cylinder will be the first track and the track under it.

Cylinder Y= H*S*Z
=2*18*512
=18432 bytes 1 cylinder
Size of one Track divide by 2
T=9216 bytes

Why is it important to know what a cylinder, because when we partition a hard drive we have to partition a hard drive, every partition you make has to be an even number of cylinder, so the smallest partition you can make is one cylinder, Linux on the other hand cylinder/track/sectors/heads does not really care that much,
fdisk –l shows the partition table,
dd if=/dev/sda of=mymbr bs=512 count=1
copy from to
file – what kind of file is your mbr
with fdisk with p it will show you the partition, if you want to delete d of partition number 2 and p will print and you will not longer have a partition 2.


Capacity = 64* 32*17547*512
18399936
C= 128*16*17547*512

E-mails are sent a week before
What is in /boot:
/boot – kernel ram disk file, grub file.

No comments: