university of tehran 1 interface design secondary storage omid fatemi

57
University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

Upload: jamya-cougill

Post on 29-Mar-2015

227 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 1

Interface DesignSecondary Storage

Omid Fatemi

Page 2: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 2

Outline

Page 3: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 3

PC disk drives

• 1st were diskette

• Then hard drives

• Then removable drives

Page 4: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 4

Diskette Drives for a PC

• Magnetic

• One or more circular disks that are coated with material that responds to magnetic fields

• Disks are mounted on spindle and turn under head(s) that move radially in and out to read/write data

Page 5: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 5

Disk Organization

Page 6: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 6

Formats

• Original drives 5 ¼, today 3 ½ -- 160K to 1.44/2 M

• Microsoft Distribution Format (2 M)

• IBM – eXtended Diskette Format (2M) XDF

• Even have 2.88 diskette (but requires special drive)

Page 7: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 7

Disk Size

Page 8: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 8

Hard Disks

• Disks are harder material – platters

• Platter – rigid disks made of aluminum or glass

• Data is encoded before storage to ensure that the patterns of 0s and 1s changes enough for heads to read/write them correctly

Page 9: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 9

Access Time

• In the range of 10ms

• Seek time

• Settling time

• Latency time – relates to rotation speed (RPM)

• Controller overhead

Page 10: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 10

Encoding Formats

• MFM – Modified Frequency Modulation encoding

• RLL – Run Length Limited encoding

• ESDI (enhanced small device interface)

• SCSI (small computer system interface)

• IDE (integrated device electronics)

• E-IDE

Page 11: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 11

Encoding

Page 12: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 12

Run Length Limit

Data: 0011 10 10

Code: 00001000 0100 0100

Page 13: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 13

ESDI, IDE

• Like MFM and RLL, but allows for larger capacity drives and speed

• Died quickly when IDE (integrated device electronics) drives appeared. EIDE is extension of IDE

• Controller electronics are on circuit card on the side of the drive and not on a plug in I/O card.

• AT attachment packet interface (ATAPI)– Extended EIDE– Accommodates other devices besides hard drives – CD

ROMs for example.

Page 14: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 14

Hard Disks

Page 15: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 15

Hard Disk Interleaving

Page 16: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 16

SCSI

• Tiny one-computer local area network

• Requires SCSI host adapter

• Multiple SCSI devices can be connected together (drives and other peripheral devised)

Page 17: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 17

DOS Disk Overview

• Fundamental unit of storage is sector– Usually 512 bytes of information

• Each sector is actually 571 bytes– remaining is header and trailer for each footer

– checksum data for verification of data accuracy

• All sectors around a disk at a given distance form a track.

• With multiple disks, tracks form cylinders

• Most disk can be recorded on both sides

Page 18: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 18

Physical Versus Logical Formatting of Disks

• Physical – set up the sectors/tracks that will be used

• Logical– add in the operating system component (such as DOS header/trailer information)– Boot record (if disk is bootable)

– FAT – File Allocation Table

– Root directory

Page 19: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 19

Bad Sectors

• Diskette– Sectors are marked and capacity id reduced by number

of bad sectors

• Hard Disk– Spare sectors are held in reserve and used to replace the

bad ones

» Defragmentation of drive will optimize performance

Page 20: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 20

Integrity Maintenance

• Cyclical Redundancy Check (CRC)

• Diskettes try and then report ‘Abort, Retry, or Fail’

• Hard Drives also have ECC, so if can, errors are fixed

Word Bits ECC Bits Parity Bits

8 5 1

16 6 2

32 7 4

64 8 8

128 9 16

Page 21: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 21

Logical Structure

• FAT 12 or FAT16– DOS boot sector

– FAT #1

– FAT #2

– Root Directory

– Data area

Page 22: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 22

• FAT 32– DOS boot record (3 sectors)

– Reserved sectors

– Copy of boot

– Reserved sectors

– FAT #1

– FAT #2

– Data area

Page 23: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 23

Clusters

• Minimum amount of space that can be allocated to a file

• Means that if cluster is 4K, and file is 1K, then to store file use 4K

• Unused portion is called slack space

Page 24: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 24

FAT usage

• FAT 12 – Floppy diskettes, hard disks of less than 16M

– (0 to 4086 values)

– For hard disks, the cluster size is 4K

Page 25: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 25

• FAT 16– 16 bit numbers

– Up to 2 GB drive

– Cluster size of 2K for drives less than 128M

– Cluster size doubles every time capacity doubles, so 2G means cluster size of 32K

Page 26: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 26

• FAT 32– 32 bits (4 bytes)

– Minimum 512K, up to 2048G

– (32 bit number, but 28 are cluster, 4 are reserved – so only 268,435,456 clusters max)

– FAT can be up to 1G

Page 27: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 27

Root directory

• Part of FAT 12 and 16

• Not part of FAT 32

• Is the “directory board”

• Subdirectories are pointed to by their parents, themselves and their children

Page 28: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 28

FAT table

• Huge table of numbers

• Starts at address 2

• Each number is twelve bits

• 0 means it is unused

• EOF means that it is end of file

• 3rd for bad sector

• Any other number means address of next cluster as part of file

Page 29: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 29

Floppy Layout

Page 30: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 30

Boot Record Layout

L CS:100 0 0 1

D CS:100 17F

Page 31: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 31

Directory Layout

L CS:200 0 13 1

D CS:200 27F

Page 32: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 32

FAT Layout

L CS:100 0 1 1

D CS:100 L100

Page 33: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 33

Logical Differences between diskettes and hard disks

• MBR – Master Boot Record

• Hard drives have an MBR that not only contains boot information, but also table of the drive partitioning

Page 34: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 34

Drive Partitioning

• Primary logical volume.

• Hidden partition.

• Extended partition.

• Each disk can have only 1 active primary partition – all others are hidden.

• Each disk can also only have 1 extended partition.

• A logical volume is all the storage space referred to by a single drive letter. An extended partition can have any number of logical volumes.

Page 35: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 35

LBA vs. CSH

• Partitioning involves separating blocks of storage in terms of cylinder, head and section numbers.

• Table may actually use logical block address (LBA) numbering, so the division numbers shown in the table listing (as seen in your disk editor) may have no relationship with an actual cylinder start on the physical drive.

Page 36: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 36

Partitions

• Hidden partitions can house other operating systems

• When booting, you choose between the operating systems

• When booted DOS can only see one active partition and generally does not see the other hidden partitions; however, some OS s like Unix and Linux can see their partition as well as the DOS partitions

Page 37: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 37

Managing Multiple Disk Drives

• Floppy diskettes– Connect via 34-wire ribbon cables typically. These cables

can have 0, 1, or 2 drives.

– Drive connected to middle connection is B:, one at end will be A:

Page 38: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 38

IDE Hard Disks

• IDE– Connect via special connectors or option cards

– Current versions of the IDE allow four IDE channel, each channel supporting 2 devices

– Most PCs support two EIDE

– Jumpers determine if drive is master or slave, the first drive is usually the master, and the rest are slaves

– Hard drive wires are wider and not twisted with 3 connectors typically

– On each IDE channel, you have one master and then 1 slave

Page 39: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 39

IDE vs. EIDE

Page 40: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 40

IDE Connections

Page 41: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 41

IDE Registers

Page 42: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 42

SCSI

• SCSI– All their controller electronics are on the device

– Operate over a SCSI bus with SCSI host adapter

– Some PCs (like Macintosh computers) have SCSI host adapter built in

– Host adapter typically plugs into a PCI bus

» Adaptec 2940W/UW

» Has 2 internal connectors (one for narrow, one for ultra wide)

» External connector (ultra wide)

Page 43: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 43

SMART Drives

• Self-Monitoring and Reporting Technology

• Set flags that the BIOS can read and then report

Page 44: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 44

RAID

• Redundant arrays of inexpensive disks

• Data is stored on more than one disk and then you can avoid or minimize downtime

• 9 levels

• In some cases, allows hot swaps of drives or power supplies when they have failed

• Formerly used only on mainframe computers and large servers

Page 45: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 45

Tape Drives

• Earliest type converted digital to audio and stored it on audio cassettes

• Digital Audio Tape – special purpose drives meant just for digital data recording

• Capacities go up to 24G

• Downside – sequential access only, and sometimes not reliable in terms of functionality

• Advantage – great for drive backups

Page 46: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 46

Removable disks

• Uses a docking bay

• Plug in drive, put data into it, then remove it

• Can hot swap

• Alternative is external drive (through parallel port)

Page 47: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 49

Zip Drives

• Larger than 3 ½

• 100M and 250 M

• Internal and external modes

• ZIP drives appear as additional logic drives

• Over parallel port, performance is slow

• Over SCSI, approaches performance of a hard drive

Page 48: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 50

Optical PC

• CD ROM, CD-R, CD-RW

• Only one side of CD is typically used

• Binary data stored and read optically

• Bits are stored more densely

• Pits burned to alter reflection of laser light– Encode the data

– Signal where spiral track goes

Page 49: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 51

Optical Data

Page 50: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 52

CD ROM drives

• Differ in in standard, but can share some parts and design

• Red, Orange, Yellow, Green, White, and Blue Book

• Storage capacity of around 650M or better

• Can only be read, not written

Page 51: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 53

CD – R

• Disk are gold or silver and deep green or cyan on recordable side

• Silver/cyan is Type II (to reflect red lasers used in DVD

• Can be read in ROM drives, but written in CD-R

• Laser operates at three or more power levels – at highest, it burns pits

• Write once read many (worm)

Page 52: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 54

CD-RW

• Has two more layers on disk than CD-R

• Recordable layer is made of alloy of several metals

• Melts regions to switch from crystalline form to data form

• Enough temperature, and they go back to crystalline form, allowing for a rewrite

• Marks are not as good at light-scattering, so not all CD drives can read them

Page 53: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 55

Digital Versatile Disc

• DVD

• Higher capacity

• Tuned to red band of visible light spectrum

• Data is more densely packed

• Can be double sided – 17G or more

• MPEG2 standard

• Requires special decoders and copy-protection circuitry

Page 54: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 56

DVD Drive

• Can read CD-ROMs but not as fast as best CD-ROM drives

• DVD ram is still under discussion, but there is one standard in place

• Allows for 2.6G or more per side as storage

• DVD RAM discs are in sealed cartridges and can only be used in DVD RAM drives

Page 55: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 59

Data Compression

• Compressing data so that storage is increased without changing the disks

• Two forms– Compressing individual files through utility (such as

WINZIP)

– OS compression – all data automatically compressed by the OS

• Downside: data has to be compressed then uncompressed to be read

• Useful for archiving data

Page 56: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 60

OS Data Compression

• DoubleSpace, DriveSpace for example

• Requires extra driver

• OS takes care of compression

• While tested, errors can occur; so keep backups

Page 57: University of Tehran 1 Interface Design Secondary Storage Omid Fatemi

University of Tehran 61

Problems

• 1, 22, 24

• 25, 29

• 31, 33, 34