1module 6: storage how do you explain how cpu works to a housewife

38
1 Module 6: Storage Module 6: Storage How do you explain how CPU How do you explain how CPU works works to a housewife to a housewife

Upload: dorothy-ward

Post on 03-Jan-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

11Module 6: StorageModule 6: Storage

How do you explain how CPU works How do you explain how CPU works to a housewifeto a housewife

22Module 6: StorageModule 6: Storage

Domains and their measurementDomains and their measurement

SpaceSpace Meter, millimeter, micrometer, Meter, millimeter, micrometer, nanometernanometer

TimeTime Second, millisecond, microsecond, Second, millisecond, microsecond, nanosecondnanosecond

FrequencyFrequency Hertz (Hz), KHz, MHz, Hertz (Hz), KHz, MHz, GHzGHz Clock cycle time = 1 / system clock frequencyClock cycle time = 1 / system clock frequency

InformationInformation Bit, Byte, KB, MB, Bit, Byte, KB, MB, GM, TBGM, TB

Printing/publicationPrinting/publication Point (pt), 1 pt = 1/72 inchPoint (pt), 1 pt = 1/72 inch

Copyright © 2003 by Prentice HallCopyright © 2003 by Prentice Hall

Module 6: Information storageModule 6: Information storage

ObjectiveObjective The bird view of data and information storageThe bird view of data and information storage Benefits of secondary storageBenefits of secondary storage Second storage device for personal computersSecond storage device for personal computers Features of secondary storage devices. Features of secondary storage devices. How data is stored on a diskHow data is stored on a disk

44Module 6: StorageModule 6: Storage

StorageStorage

Hierarchy of Hierarchy of data/information storagedata/information storage Register: small, fast Register: small, fast Cache: intermediate, not Cache: intermediate, not

addressableaddressable Main memory: Main memory:

addressable, volatile addressable, volatile Second storage, not Second storage, not

addressable, can only addressable, can only store files, e.g. program store files, e.g. program files, data filesfiles, data files

Control Unit

ALU

Registers

Main memory

CPU

Cache L1

Cache L2

Secondarystorage

Storage system

55Module 6: StorageModule 6: Storage

Benefits of Secondary StorageBenefits of Secondary Storage

SpaceSpace

ReliabilityReliability

ConvenienceConvenience

EconomyEconomy

66Module 6: StorageModule 6: Storage

SpaceSpace

Store a roomful of data on disks smaller Store a roomful of data on disks smaller than the size of a breadboxthan the size of a breadbox Diskette contains equivalent of 500 printed Diskette contains equivalent of 500 printed

pagespages Optical disk can hold equivalent of 500 booksOptical disk can hold equivalent of 500 books A DVD disk can hold 3,500 booksA DVD disk can hold 3,500 books

77Module 6: StorageModule 6: Storage

ReliabilityReliability

Data in secondary storage is relatively Data in secondary storage is relatively safesafe Secondary storage is highly reliableSecondary storage is highly reliable More difficult for untrained people to tamper More difficult for untrained people to tamper

with data stored on diskwith data stored on disk

88Module 6: StorageModule 6: Storage

ConvenienceConvenience

Authorized users can easily and quickly Authorized users can easily and quickly locate data stored on the computerlocate data stored on the computer

99Module 6: StorageModule 6: Storage

EconomyEconomy

Several factors create significant savings Several factors create significant savings in storage costsin storage costs Less expensive to store data on disks than to Less expensive to store data on disks than to

buy and house filing cabinetsbuy and house filing cabinets Reliable and safe data is less expensive to Reliable and safe data is less expensive to

maintainmaintain Greater speed and convenience in filing and Greater speed and convenience in filing and

retrieving dataretrieving data

1010Module 6: StorageModule 6: Storage

Magnetic Disk StorageMagnetic Disk Storage

Data represented as magnetized spots on Data represented as magnetized spots on surface of spinning disksurface of spinning disk Two states of magnetic molecule: Ordered or Two states of magnetic molecule: Ordered or

unorderedunordered Can be controlled, and changed by Can be controlled, and changed by

electronic/magnetic fieldelectronic/magnetic field Spots on disk converted to electrical impulsesSpots on disk converted to electrical impulses

Primary typesPrimary types DiskettesDiskettes Hard DisksHard Disks

1111Module 6: StorageModule 6: Storage

DiskettesDiskettes

Made of flexible Mylar and coated with Made of flexible Mylar and coated with iron oxideiron oxide

Has protection of rigid plastic jacketHas protection of rigid plastic jacket

3 ½” diskette holds 1.44 MB of data3 ½” diskette holds 1.44 MB of data

High-capacity variationsHigh-capacity variations Sony’s HiFD holds 200 MBSony’s HiFD holds 200 MB Imation’s SuperDisk available in 120 and 240 Imation’s SuperDisk available in 120 and 240

MB versionsMB versions Iomega’s Zip drive available in 100, 250, and Iomega’s Zip drive available in 100, 250, and

750 MB versions750 MB versions

1212Module 6: StorageModule 6: Storage

Hard DisksHard Disks

Rigid platter coated with magnetic oxideRigid platter coated with magnetic oxide Several can be combined into a disk packSeveral can be combined into a disk pack

Disk drive - a device that allows data to be Disk drive - a device that allows data to be read from or written to a diskread from or written to a disk Disk drive for personal computers contained Disk drive for personal computers contained

within computer housingwithin computer housing Large computer systems may have several Large computer systems may have several

external disk drivesexternal disk drives

1313Module 6: StorageModule 6: Storage

Reading/Writing DataReading/Writing Data

Access arm moves read/write Access arm moves read/write head over particular locationhead over particular location

Read/write head hovers a few Read/write head hovers a few millionths of an inch above millionths of an inch above platterplatter

If head touches platter, a head If head touches platter, a head crash occurs and data is crash occurs and data is destroyeddestroyed

Data can be destroyed if head Data can be destroyed if head touches miniscule foreign matter touches miniscule foreign matter on surface of diskon surface of disk

1414Module 6: StorageModule 6: Storage

Disk PacksDisk Packs

Each platter has its own Each platter has its own access arm with access arm with read/write headread/write head

Most disk packs Most disk packs combine platters, access combine platters, access arms, and read/write arms, and read/write headhead

1515Module 6: StorageModule 6: Storage

Hard Disks for Personal ComputersHard Disks for Personal Computers

Sealed modules that mount in a 3 Sealed modules that mount in a 3 ½” bay½” bay

Capacity in gigabytesCapacity in gigabytes

Accessing files much faster than Accessing files much faster than accessing files on diskettesaccessing files on diskettes

Some contain removable Some contain removable cartridgescartridges Iomega’s Jaz drive is very popularIomega’s Jaz drive is very popular

1616Module 6: StorageModule 6: Storage

Redundant Array of Independent Redundant Array of Independent Disks (RAID)Disks (RAID)

A group of disks that work A group of disks that work together as onetogether as one Raid level 0 spreads data from a Raid level 0 spreads data from a

single file over several drivessingle file over several drivesCalled data stripingCalled data striping

Increases performanceIncreases performance Raid level 1 duplicates data on Raid level 1 duplicates data on

several drivesseveral drivesCalled disk mirroringCalled disk mirroring

Increases fault toleranceIncreases fault tolerance

1717Module 6: StorageModule 6: Storage

How Data Is Organized on DiskHow Data Is Organized on Disk

TrackTrack

SectorSector

ClusterCluster

CylinderCylinder

1818Module 6: StorageModule 6: Storage

TrackTrack

The circular portion of the The circular portion of the disk surface that passes disk surface that passes under the read/write headunder the read/write head Floppy diskette has 80 tracks Floppy diskette has 80 tracks

on each surfaceon each surface Hard disk may have 1,000 or Hard disk may have 1,000 or

more tracks on each surface of more tracks on each surface of each plattereach platter

1919Module 6: StorageModule 6: Storage

SectorSector

Each track is divided into Each track is divided into sectors that hold a fixed sectors that hold a fixed number of bytesnumber of bytes Typically 512 bytes per Typically 512 bytes per

sectorsector

Zone recording assigns Zone recording assigns more sectors to tracks in more sectors to tracks in outer zones than those in outer zones than those in inner zonesinner zones Uses storage space more Uses storage space more

fullyfully

2020Module 6: StorageModule 6: Storage

ClusterCluster

A fixed number of adjacent sectors that A fixed number of adjacent sectors that are treated as a unit of storageare treated as a unit of storage Typically two to eight sectors, depending on Typically two to eight sectors, depending on

the operating systemthe operating system

2121Module 6: StorageModule 6: Storage

CylinderCylinder

The track on each surface that The track on each surface that is beneath the read/write head is beneath the read/write head at a given position of the at a given position of the read/write headsread/write heads When file is larger than the When file is larger than the

capacity of a single track, capacity of a single track, operating system will store it in operating system will store it in tracks within the same cylindertracks within the same cylinder

2222Module 6: StorageModule 6: Storage

Disk Access SpeedDisk Access Speed

Access time - the time needed to access Access time - the time needed to access data on diskdata on disk

Three factorsThree factors Seek time: moving arm over a trackSeek time: moving arm over a track Head switching: from one head to anotherHead switching: from one head to another Rotational delay: rotating to a sectorRotational delay: rotating to a sector

Once data found, next step is data transferOnce data found, next step is data transfer

2323Module 6: StorageModule 6: Storage

Data TransferData Transfer

The process of transferring data between The process of transferring data between its location on the disk track and memoryits location on the disk track and memory

Measures of performanceMeasures of performance Average access timeAverage access time

About 10 milliseconds (10 thousandth of a second)About 10 milliseconds (10 thousandth of a second) Data transfer rate - how fast data can be Data transfer rate - how fast data can be

transferred once it has been foundtransferred once it has been foundStated in terms of megabytes per secondStated in terms of megabytes per second

2424Module 6: StorageModule 6: Storage

Optical Disk StorageOptical Disk Storage

Provides inexpensive and compact Provides inexpensive and compact storage with greater capacitystorage with greater capacityLaser scans disk and picks up light Laser scans disk and picks up light reflections from disk surfacereflections from disk surfaceCategorized by read/write capabilityCategorized by read/write capability Read-only media - user can read from, but not Read-only media - user can read from, but not

write to diskwrite to disk Write-once, read-many (WORM) - user can Write-once, read-many (WORM) - user can

write to disk oncewrite to disk once

2525Module 6: StorageModule 6: Storage

Compact DisksCompact Disks

CD-ROM - drive can only read data CD-ROM - drive can only read data from CDsfrom CDs

CD-ROM stores up to 700 MB per diskCD-ROM stores up to 700 MB per disk Primary medium for software distributionPrimary medium for software distribution

CD-R - drive can write to disk onceCD-R - drive can write to disk once Disk can be read by CD-ROM or CD-R Disk can be read by CD-ROM or CD-R

drivedrive

CD-RW - drive can erase and record CD-RW - drive can erase and record over data multiple timesover data multiple times

Some compatibility problems trying to Some compatibility problems trying to read CD-RW disks on CD-ROM drivesread CD-RW disks on CD-ROM drives

2626Module 6: StorageModule 6: Storage

Digital Versatile Disk (DVD)Digital Versatile Disk (DVD)

Short wavelength laser can read densely Short wavelength laser can read densely packed spotspacked spots DVD drive can read CD-ROMsDVD drive can read CD-ROMs Capacity up to 17GBCapacity up to 17GB Allows for full-length moviesAllows for full-length movies Sound is better than on audio CDsSound is better than on audio CDs

Several versions of writable and rewritable Several versions of writable and rewritable DVDs existDVDs exist

2727Module 6: StorageModule 6: Storage

MultimediaMultimedia

Presents information with text, illustrations, Presents information with text, illustrations, photos, narration, music, animation, and photos, narration, music, animation, and film clipsfilm clips

Not practical until the advent of the optical Not practical until the advent of the optical diskdisk

RequirementsRequirements

ApplicationsApplications

2828Module 6: StorageModule 6: Storage

RequirementsRequirements

CD-ROM or DVD-ROM driveCD-ROM or DVD-ROM drive

Sound card or sound chipSound card or sound chip

SpeakersSpeakers For high-quality sound, get good speakers For high-quality sound, get good speakers

and powered subwooferand powered subwoofer

Equipped to handle MPEGEquipped to handle MPEG Standards for compressing videoStandards for compressing video

2929Module 6: StorageModule 6: Storage

Magnetic Tape StorageMagnetic Tape Storage

Tape similar to tape used in Tape similar to tape used in music cassettesmusic cassettes

Categorized in terms of densityCategorized in terms of density Number of bits per inch stored on Number of bits per inch stored on

tapetape

Used primarily for backup of data Used primarily for backup of data stored on disk systemsstored on disk systems

3030Module 6: StorageModule 6: Storage

Backup SystemsBackup Systems

Imperative to have copies of important data Imperative to have copies of important data stored away from the computerstored away from the computer Disks occasionally failDisks occasionally fail Software installation can cause computer to crashSoftware installation can cause computer to crash Users make mistakes entering dataUsers make mistakes entering data

Tape is ideal backup mediumTape is ideal backup medium Can copy entire hard disk to single tape in minutesCan copy entire hard disk to single tape in minutes Backup can be scheduled when you are not going to Backup can be scheduled when you are not going to

use the systemuse the system

3131Module 6: StorageModule 6: Storage

File Plan OverviewFile Plan Overview

Must devise a plan for placing data on a Must devise a plan for placing data on a storage unitstorage unit

Key factorsKey factors Whether users must access data directly Whether users must access data directly

(immediately)(immediately) How data must be organized on diskHow data must be organized on disk Type of processing that will take placeType of processing that will take place

3232Module 6: StorageModule 6: Storage

File OrganizationFile Organization

Three major methods of organizing data Three major methods of organizing data files in secondary storagefiles in secondary storage SequentialSequential DirectDirect IndexedIndexed

3333Module 6: StorageModule 6: Storage

Sequential File OrganizationSequential File Organization

Records are stored in order according to a Records are stored in order according to a key fieldkey field If a particular record is desired, all prior If a particular record is desired, all prior

records must be read firstrecords must be read first To update a record, a new sequential file must To update a record, a new sequential file must

be created, with changed and unchanged be created, with changed and unchanged recordsrecords

Tape storage uses sequential organizationTape storage uses sequential organization

3434Module 6: StorageModule 6: Storage

Direct File OrganizationDirect File Organization

Also called random accessAlso called random access

Go directly to desired Go directly to desired record by using a keyrecord by using a key Computer does not have to Computer does not have to

read all prior recordsread all prior records Hashing algorithm used to Hashing algorithm used to

determine address of given determine address of given keykey

Requires disk storageRequires disk storage

3535Module 6: StorageModule 6: Storage

Indexed File OrganizationIndexed File Organization

Combines elements of sequential and Combines elements of sequential and direct methodsdirect methods Records stored sequentially, but file also Records stored sequentially, but file also

contains an indexcontains an index Index stored sequentially, contains record keyIndex stored sequentially, contains record key Data accessed by record keyData accessed by record key

3636Module 6: StorageModule 6: Storage

Processing Stored DataProcessing Stored Data

Transactions processed to update a Transactions processed to update a master filemaster file Transactions - a business event such as a Transactions - a business event such as a

salesale Master file - data that is updated when a Master file - data that is updated when a

transaction occurs, such as a sales file or transaction occurs, such as a sales file or inventory fileinventory file

Two main methods of processing dataTwo main methods of processing data Batch processingBatch processing Transaction processingTransaction processing

3737Module 6: StorageModule 6: Storage

Batch ProcessingBatch Processing

Transactions collected into Transactions collected into groups or batchesgroups or batches Batch processed and master Batch processed and master

file updated when the file updated when the computer has few users computer has few users onlineonline

Very efficient use of Very efficient use of computer resourcescomputer resourcesMaster file current only Master file current only immediately after immediately after processingprocessing

3838Module 6: StorageModule 6: Storage

Transaction ProcessingTransaction Processing

Processing transactions as Processing transactions as they occurthey occur Also called real-time Also called real-time

processing and online processing and online processingprocessing

Terminals must be connected Terminals must be connected directly to the computerdirectly to the computer

Offers immediate updating Offers immediate updating of master fileof master file