360 likes | 517 Views
PC Construction and Maintenance Week 4. Storage Hard Disks, Floppy Drives and Optical Devices. What is storage?. Computers have primary store and secondary store Primary store refers to RAM chips RAM is volatile. It’s contents are lost when the machine RAM is used because it is very fast
E N D
PC Construction and Maintenance Week 4 Storage Hard Disks, Floppy Drives and Optical Devices
What is storage? • Computers have primary store and secondary store • Primary store refers to RAM chips • RAM is volatile. It’s contents are lost when the machine • RAM is used because it is very fast • Secondary store is slow, but permanent and of very high capacity
Secondary Store • Examples of secondary store are floppy drives, CD-ROMs, Hard Drives • There also exists Tertiary Store – examples include magnetic tape • All desktop machines use one or more hard drives for secondary store • The hard drive is used to store the operating system, applications and user data
What is a hard drive? • A hard drive consists of a hard disk, drive electronics and a metal case • The electronics are normally attached to the underside of the hard drive externally • The hard disk itself is contained inside the sealed case • The hard disk consists of several disks called platters • Each platter is mounted onto the central spindle and they are stacked vertically above one another
The platter • Each platter is magnetically coated with iron oxide • Both sides of the platter are used to record data • The spindle rotates at a fixed speed, causing the platter to spin • Data is stored by the application of magnetic pulses from the head onto the spinning platter • Data is organised into co-centric tracks on each platter.
The head • For each side of each platter in the drive, there is a corresponding read/write head • The head should not actually touch the platter, but remain at a very close distance to it for reading and writing data • Each head is mounted onto the end of an access arm
The access arm • The access arms move in a radial fashion across the disk platters in order to provide access to any track on the disk • The access arms normally return to a parked position away from the platter surface when the drive is powered down
Drive Electronics • The circuit board attached to the underside of the drive controls the operation of the disk • It also provides a communications interface with the computer • The circuit board can occasionally be replaced with one from the same type of drive
Drive connectors • The hard drive power connector is the industry standard four pin socket for internal computer peripherals • The type of data connector depends on the interface that the drive uses • Most desktop computers use the IDE interface. This interface always uses 40-pin connectors. • On higher end machines, the SCSI, or Small Computer Systems Interface is used. These connectors have 50 pins or 68 pins, depending on the type of device
IDE device selection • One IDE channel allows the connection of two IDE devices • One device is designated the master, and one device is designated the slave • In the case of hard drives and CD-ROM drives, selection of master or slave is usually done via jumpers mounted on the device itself
Hard drive Parameters • Main parameter of hard drive is capacity. Usually quoted as unformatted capacity. Capacity is measured in Gigabytes (Gb) • Access time is a measurement of how long the drive takes to access random sectors on the disk, averaged out over time • Spindle speed is the rotational speed of the disk, measured in RPM. Typical values are 5,400 and 7,200 rpm • For two drives of identical capacity and identical rotational speed, the drive with the most heads will most likely have the best (lowest) access time.
Hard drive parameters • On-drive cache. All hard drives have a built-in cache, to improve real-life access times. This is measured in Megabytes. A typical value is 2Mb • UDMA/PIO mode. For IDE drives, there are several different specifications for transfer modes between mainboard and drive. All new drives are UDMA. The BIOS takes care of this automatically • Transfer speed. Measured in MHz, typical values are 33, 66, 100
Layout of data on disk surface • Each side of each platter has the same number of tracks • The projection of a track throughout all the platters is called a cylinder • Each cylinder is divided into arc-shaped sections of equal length called sectors
Disk Geometry • The Geometry of a hard disk is the collective term for the number of sectors, cylinders and heads that a disk has • For a computer to be able to address every sector on the disk, it must know the geometry of the disk • Disk geometry settings are set up in the BIOS, and stored in the CMOS • With very old computers, the geometry had to be typed in by hand. All new computers auto detect these parameters for you
BIOS Addressing mode • Apart from knowing the disk geometry, the BIOS also uses one of several addressing modes to access sectors on the disk • The three commonly used modes are Normal, Large and LBA • All disks use LBA now. LBA stands for Logical Block addressing • LBA is implemented by a BIOS routine that translates logical sector requests into physical sector addresses • LBA mode is needed to circumvent some limitations found in some operating systems such as DOS
Low level formatting • A disk has to be low-level formatted before it can be used • Low-level formatting is the laying down of the magnetic sectors and tracks onto the platter • All disks are supplied pre low-level formatted • The low-level format is independent of any operating system • It is highly unlikely that you will ever have to low-level format a hard disk
High level structure of data • The first cylinder of the hard disk is used to store the boot loader and the partition table • The partition table contains a list of the positions and sizes of each partition on the disk • Each partition is specific to a particular operating system • The boot loader contains a small program to boot an operating system
Partitions • In normal life, a partition is a boundary or separator between spaces. In computing however, the term partition refers to the space itself • A disk will normally have one or more partitions on it • One partition is always designated the active partition. The system always boots from the active partition • Partitioning is useful, as it allows multiple operating systems to share the same disk
Managing partitions • A brand new hard-disk will have no partitions on it • Before an operating system can be installed, a new partition must be created • The most commonly used program used to manage partitions is called fdisk (for fixed-disk) • Fdisk runs in a DOS/windows environment • Linux also has its own fdisk which is more powerful than the DOS one • Windows NT/2000 has its own partition manager built into the install program
DOS/Windows FDISK • DOS fdisk can be used to create two types of partitions • These partitions are called FAT and FAT32 • Windows 95/98 can be installed on either a FAT or FAT32 partition • Windows NT and 2000 use a different type of partition known as NTFS4 and NTFS5 respectively. Although they can still work with FAT partitions • Linux mainly uses two types of partitions called ext2 and “linux swap”
Using DOS FDISK • FDISK will run under windows 95/98 or DOS mode • FDISK is used to manage hard drive partitions • Care must be taken when using FDISK not to remove the wrong partition • In general, changing the partition table on a disk normally causes all data on the disk to be wiped • FDISK has two modes, large disk and small disk. Large disk mode is always used now
Filesystems • Before a partition is used, it needs to be high-level formatted (commonly known simply as formatting) • Formatting creates a Filesystem on a partition • Filesystems are specific to each operating system • The type of the filesystem is the same as the partition type • E.g. Take a FAT32 unformatted partition and format it. That partition is then said to contain a FAT32 filesystem • A filesystem determines how the operating system organises files and folders on a partition
High-level formatting • After setting a disk partition up using Fdisk, we need to apply the filesystem by formatting the disk • To prepare a partition ready for installation of windows 95/98, we can use the ‘format’ command from the DOS prompt • If “Large Disk Mode” was selected during the time that fdisk was executed, then the format will create a FAT32 filesystem. Otherwise a FAT (a.k.a FAT16) filesystem will be created
FAT32 v FAT16 • All newer windows 95/98/ME computers use FAT32. It has a smaller allocation unit • An allocation unit is the smallest possible amount of disk space a file can occupy on the disk • E.g. a file 1 byte in length on a 1Gb drive will occupy 32Kb of disk space under FAT16, but only 4Kb under FAT32 • FAT32 is slightly slower than FAT16, but suffers from none of the FAT16 limitations • Windows 98/ME ships with a program to upgrade a FAT16 partition to FAT32
Formatting the drive • Typing FORMAT C: at the DOS prompt will format the C: partition, and prepare it for the installation of windows • After formatting is complete, an optional volume label can be entered • Any error on the disk surface will show up during the format process. In general, corrective measures will have to be made.
Floppy drives • The floppy drive used to be the main secondary store of old computers when hard drives were very expensive • Floppy drive is still useful now to boot diagnostic disks,for installing operating systems and for transferring small files • The floppy connector on the motherboard accepts a twisted cable that will take up to two floppy drives • Drive A: plugs into the end of the lead. Drive B:, if present plugs into the middle • The power connector for floppy drives has been standardised. It is a smaller connector than that for hard drives and CD-ROM drives
How a floppy drive works • The disk itself is a thin piece of plastic with a magnetic coating on both sides • As the disk rotates, read/write heads scan the surface • Data is written by sending electrical pulses to the head. This causes areas on the disk to become magnetised. In read mode, the movement of the head over the magnetised disk causes a signal to be generated in the head • Like hard disks, the data is arranged into tracks and sectors
Floppy Disks • Floppy disk have become standardised, the most common capacity being 1.44Mb (a.k.a High Density) • 2.88Mb disks did exist, but never became standard • Practically all disks are sold pre-formatted to MS-DOS format • A bootable floppy is a disk which has boot code written into the boot sector. These disks are useful for diagnostics, flashing the BIOS or installing an operating system
CD-ROM drives • Like most hard drives, CD-ROM drives are typically of the IDE type, although SCSI drives are available • DVD drives are often used instead of CD-ROM drives. They plug into the computer in exactly the same way. All DVD drives can read CDs as well as DVD disks • Likewise, CD writers (CD-R/W drives) can be used as an alternative to CD-ROM drives, and will also read all CD-ROM disks
How a CD-ROM drive works • CD-ROM disks are an example of optical media • Binary data is stored by the absence or presence of pits or troughs in tracks in the CD-ROM disk • As the CD rotates, laser light is bounced off the CD to detect the pits • To provide a constant linear speed at any point on the CD-disk, the rotational speed of CD-drives varies as the disk is read. Although some fast new drives have constant speed of rotation • DVD disks have higher capacities than CD-ROM disks. This is because DVD-drives use a narrower beam of laser light, and so the tracks are narrower
CD-ROM disks • Most CD-ROM disks have a capacity of around 650Mb, or 74 minutes of audio for music CDs • Blank CDR (CD-Recordable) disks can have capacities of 650Mb, or 700Mb • CDR disks are an example of WORM media. (write once, Read Many Times) • CDRW disks can be erase and used again, but not all old CD-ROM drives can read these disks. Hi-fi systems can’t read them either