Arquitectura de Sistemas Computacionaiscee.uma.pt/edu/asc/2004-2005/material/Cap08.pdf · Store...

30
1 Paulo N.M. Sampaio Arquitectura de Sistemas Computacionais Prof. Dr. Paulo Sampaio Universidade da Madeira - UMA Paulo N.M. Sampaio Organização da disciplina Programa Teórico 1. Introdução (IPCHW 1) 2. Microprocessadores para PCs (IPCHW 3-14) 3. Chips de Memória (IPCHW 15) 4. Chipsets (IPCHW 16) 5. Interrupções e DMA (IPCHW 17) 6. RAM CMOS e RealtimeClock (IPCHW 18, 19) 7. Arquitecturas e Sistemas de BUS (IPCHW 20, 22, 25) 8. Dispositivos de Amazenamento (IPCHW 28, 29, 30, 31) 9. Periféricos (IPCHW 32, 33, 34, 35, 37)

Transcript of Arquitectura de Sistemas Computacionaiscee.uma.pt/edu/asc/2004-2005/material/Cap08.pdf · Store...

1

Paulo N.M. Sampaio

Arquitectura de Sistemas Computacionais

Prof. Dr. Paulo Sampaio

Universidade da Madeira - UMA

Paulo N.M. Sampaio

Organização da disciplina

Programa Teórico

1. Introdução (IPCHW 1)

2. Microprocessadores para PCs (IPCHW 3-14)

3. Chips de Memória (IPCHW 15)

4. Chipsets (IPCHW 16)

5. Interrupções e DMA (IPCHW 17)

6. RAM CMOS e RealtimeClock (IPCHW 18, 19)

7. Arquitecturas e Sistemas de BUS (IPCHW 20, 22, 25)

8. Dispositivos de Amazenamento (IPCHW 28, 29, 30, 31)

9. Periféricos (IPCHW 32, 33, 34, 35, 37)

2

Paulo N.M. Sampaio

• Storage – Two basic storage technologies

– Magnetic and optical

• Magnetic storage media use disks or tapes that are coated with magnetically sensitive materials

• Optical disks have chemical coatings that can be altered to create a varying surface that represents 0’s and 1’s

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Magnetic Storage Basics

• Basically all magnetic medium does the following:– Writing

» 1. Read/write head - an electromagnet records information by transforming electrical impulses into a varying magnetic field

» 2. As magnetic materials pass beneath the read/write head the varying field forces the particles to re-arrange themselves into a meaningful pattern

– Reading» Reading involves sensing the pattern and transferring it into

electronic impulses

– Types of Magnetic media » Hard disks, floppy disks, zip disks

8. Dispositivos de Amazenamento

3

Paulo N.M. Sampaio

Store data on a magnetic disk

Storage on a magnetic disk (hard drive or a floppy drive)

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Magnetic Storage

• Floppy Disks– Floppy disks have been around since the 1970’s– First disks were floppy and were 8 inches in diameter– Next disks were floppy and 5.5 inches, while today’s disks are 3.5

inches and are encased in hard plastic» Old disks used to be highly susceptible to dust, and other

contaminants ruining the disk

8. Dispositivos de Amazenamento

4

Paulo N.M. Sampaio

• Magnetic Storage

• Floppy Disk– Current floppy’s have a 1.44 MB capacity for Window’s systems– Size of today’s programs and data files are fast making floppy’s

obsolete– Still in use– Write protect tab on floppy’s

» Open - can’t write on disk» Closed - can write on disk

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• FloppyProtection

8. Dispositivos de Amazenamento

5

Paulo N.M. Sampaio

• Magnetic Storage

• Organization of Floppy’s– Organized into sectors and tracks

– Circular bands called tracks - each track is divided into pie shaped wedges called sectors

– Formatting a disk involves laying down the magnetic pattern of tracks and sectors

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

Floppy Disk Organization

80 Tracks

18 Sectors /Track

512 bytes/Sector

8. Dispositivos de Amazenamento

6

Paulo N.M. Sampaio

• Magnetic Storage

• Logical Organization of Floppy’s– Windows maintains a table on each disk called a file allocation table -

FAT» Maintains a file’s name and where it is located on the disk by

sector and track» Its like a map from the operating system to the file

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Magnetic Storage

• Hard Disks– Hard disks are the most ubiquitous on-line storage – all PC’s have one!– Hard disk have several rotating disks - called platters

» They are stacked vertically - like a stack of pancakes– Platters are sealed completely within an airtight case

8. Dispositivos de Amazenamento

7

Paulo N.M. Sampaio

• Hard Disk

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Magnetic Storage

• How Hard Disks Work» Contains two or more stacked platters» Organized into tracks and sectors like floppies» Each one has two read/write heads - one for each side of the

platter

» Disk spins fast and read/write head floats on a thin surface of air 300 times smaller than a human hair

» Anything in the way of the head and it will cause a head crashwhere the head hits the disk surface and causes damage to the disk

8. Dispositivos de Amazenamento

8

Paulo N.M. Sampaio

• Magnetic Storage

• How Hard Disks Work Continued– Have Cylinders

» Location made up of the same track on all the platters– If a platter contains 1200 tracks, there will be 1200 cylinders– Hard disks can be partitioned so they look like more than one disk

» Can run different operating systems in each partition

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Hard DiskOrganization

Cylinder is the vertical section of a track through all platters

8. Dispositivos de Amazenamento

9

Paulo N.M. Sampaio

• Optical Storage Basics

– Optical Storage media differs as to how it is written and read• Reading

– Use focused laser beams to read microscopic patterns of data on plastic disks

– Indentation called “pits” - absorb the laser light – Drive has a light sensor and because no light is emitted records a pit as a 0– There are also flat reflective areas called “lands” which bounce the light

back and are read as a 1• Writing

– Varies by the type of optical media– Each CD type is written differently

• Types of Optical Media– CD-ROM, CD-RW, DVD-ROM, DVD-RW are all optical storage media

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Optical disk Reading

8. Dispositivos de Amazenamento

10

Paulo N.M. Sampaio

An optical storage device

Reading on an optical storage device.

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Optical Storage

• Nearly all PC’s have optical storage drives

• Two types of drives– CD type drives are read only

» CD-ROM, DVD-ROM– CD type drives are read-write

» CD-RW, and DVD-RW

8. Dispositivos de Amazenamento

11

Paulo N.M. Sampaio

CD-ROM– Read only type of CD

– Manufacturers record information

including text, graphics or audio

on the CD distribution • Encyclopedias, • software, • games, • e-books

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Optical Storage

• CD-ROM– Have a reported speed, what does it mean?

» Can operate at that speed

» Example: 48X = 48 x 150 kbps or 7200 kbps» Current CD-ROM drives transfer data at speeds of 48X to 75X

– CD-ROM drives was the first CD technology to emerge for PC’s

8. Dispositivos de Amazenamento

12

Paulo N.M. Sampaio

• Optical Storage

• CD-R– CD-R and CD-RW have replaced the original CD-ROM drives

» Record music or write data

– CD-R means Compact Disk Recordable– CD-R’s allow you to write on one part of the disk one time and

another part at a later time

– Each part of a CD-R can be written on only once and the disk can’t be erased

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Optical Storage

• CD-RW– Compact disk rewritable is an erasable disk you can write on

multiple times– CD-RW overcomes the disadvantage of being able to write on

them only once

– CD-RW discs are more like floppy’s or hard discs - can write on them many times

8. Dispositivos de Amazenamento

13

Paulo N.M. Sampaio

• Optical Storage

• DVD’s– DVD-ROM - digital video disk – ROM is high capacity optical disk capable of storing 4.7 GB to 17

GB

– Storage capacity of 1 DVD ROM enough to store a telephone book containing every resident in the U.S.

– DVD’s were originally developed for the movie industry

» Huge capacity makes them attractive for storing large amounts of data

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• DVD – Can Store video data

8. Dispositivos de Amazenamento

14

Paulo N.M. Sampaio

DVD-ROM Storage Capacities

Different ways DVD’s store data affects the capacity

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• Optical Storage

• DVD’s– DVD-ROM drives can read audio CD’s, CD-ROM’s, CD-R’s and

CD-RW’s– DVD-R similar to CD-R’s allow users to write on the disc once but

read it many times – Most writable DVD drives are DVD+RW

» Can erase and read many times

– DVD technology is coming down in price» DVD drives are replacing CD technology

8. Dispositivos de Amazenamento

15

Paulo N.M. Sampaio

• Solid State Storage Devices

• A solid state storage device has– Nonvolatile memory chips– No moving parts

– Not mechanical

• Advantages– Small, lightweight

– Portable and reliable

• Examples– PC Cards, flash memory cards and smart cards

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• PC Cards

• Thin credit card or smaller sized device• PC cards used in notebook computers

– Add memory, networking, sound and other capabilities– Originally called PCM-CIA cards

– Storage PC Cards have capacities up to 5 GB» Advantage of a storage PC card is portability» Take data from your laptop and plug it directly into a card

reader on a PC

8. Dispositivos de Amazenamento

16

Paulo N.M. Sampaio

• PC Card

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• PC Cards

• Flash Memory Cards– Portable digital devices such as PDA, MP3 players, cameras and

smart phones use flash memory cards» Devices are too small for any type of hard drive

– These devices are available in sizes from 16 MB up to 2 GB

8. Dispositivos de Amazenamento

17

Paulo N.M. Sampaio

Uses for Miniature Mobile Storage

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• PC Cards

• Flash Memory Cards– Types include:

» Compact Flash (CF)» Smart Media Secure Digital (SD)» Memory stick

– These types of storage are rewritable– Need a flash memory reader to read them

8. Dispositivos de Amazenamento

18

Paulo N.M. Sampaio

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

8. Dispositivos de Amazenamento

19

Paulo N.M. Sampaio

Connecting the Disk?

IDE & SCSIIDE & SCSI& & FibreFibre ChannelChannel

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

Hard Disk Interfaces

• The interface is the communication channel overwhich all the data flows that is read from or written to the hard disk.

• The choice of interface has na essential impact onsystem configuration, compatibility, upgradabilityand other factors.

8. Dispositivos de Amazenamento

20

Paulo N.M. Sampaio

Obsolete Hard Disks

• Hard disks interfaces used on the early days of PCs (1980s) had the hard drive control logic on a separate controller cardthat plugged in a system bus slot.– ST-506 / ST412 Interfaces– Enhanced Small Device Interface (ESDI)

• This led to a number of compatibility and reliability problems => Integration of the logic board on the hard disk itself (IDE).

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

IDE Bus• IDE ou Integrated Drive Electronics (ou ATA - Advanced Technology

Attachment, ou ainda ATAPI - ATA Packet Interface)

• Características– Desenvolvido pela Western Digital a pedido da Compaq (1984)

– Suporta discos rígidos de até 528 MB.– Permite apenas dois dispositivos conectados.– Baixo custo.

– Versão 8 bits (PC-XT), 16 bits (PC-AT).– Velocidade depende do barramento conectado:

• ISA bus => 3,3 MB/s• VL-bus => 5,5 MB/s

8. Dispositivos de Amazenamento

21

Paulo N.M. Sampaio

IDE Integrated Drive ElectronicsFirst Connected the ISA Slot

An IDE interface is an interfacefor mass storage devices, in which the controller is integratedinto the disk or CD-ROM drive.

IDE also equals ATA (AT Attachment)

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

EIDE* Bus, ATA-2 ou Fast ATA**

• Enhanced IDE, 1994.

• Características– Suporta até quatro dispositivos– 32 bits

– Suporta discos, unidades de fitas e CD-ROMs– Simula duas interfaces IDE – Permite discos de até 8,4 GB

– Velocidade depende do modo de operação (que são 4):– Programmed I/O (PIO) Mode 3 (mais usado) => 11,11 MB/s– PIO Mode 4 (or Multiword DMA Mode 2) => 16,67 MB/s

8. Dispositivos de Amazenamento

* Western Digital** Seagate

22

Paulo N.M. Sampaio

UIDE, Ultra ATA ou ATA-3

• Ultra IDE desenvolvido pela Quantum em 1996

– Taxa de transferência de 33 MB/s.

– Requer protocolo Ultra DMA (suporta taxas mais rápidas de transferência)

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

• SATA – Serial ATA

•• Each SEach S--ATA connection supports a single drive, no ATA connection supports a single drive, no more master or slave.more master or slave.

•• Hot swappableHot swappable•• 7 pins 7 pins vsvs 80 pin cables80 pin cables•• Improved raw performance Improved raw performance -- the clock rate of Sthe clock rate of S--

ATA is 1.5GHz. ATA is 1.5GHz. •• Net bandwidth of 150MB/sNet bandwidth of 150MB/s•• SATA II could triple this rateSATA II could triple this rate

8. Dispositivos de Amazenamento

23

Paulo N.M. Sampaio

SCSI BusSmall Computer System Interface

• Adotado inicialmente no Macintosh

• Família SCSIPadrões ANSI Não Padronizados

– SCSI-1 Ultra (Wide) SCSI

– SCSI-2 Ultra2 (Wide) SCSI

• Fast (Wide) SCSI– SCSI-3

• Os padrões Ultra e Ultra2 não são reconhecidos pelo ANSI (American NationalStandards Institute)

• A palavra Ultra também é usada para designar barramentos SCSI-3 com 20 MHz

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

SCSI BusSmall Computer System Interface

• SCSI is a much higher-level protocol than IDE is => While IDE is an interface, SCSI is really a system-levelbus, with inteligent controllers on each SCSI deviceworking together to manage the flow of information onthe channel.– Supports many different types of devices

– Performance– Expandability

– Compatibility

8. Dispositivos de Amazenamento

24

Paulo N.M. Sampaio

SCSI Small Computer System Interface

••Can Connect up to 15 devicesCan Connect up to 15 devices••One of PCOne of PC’’s fastest connectionss fastest connections••SCSISCSI--1 1 –– 8bits @ 5MB/s8bits @ 5MB/s••Fast SCSI Fast SCSI –– 8bits @ 10MB/s8bits @ 10MB/s••Fast Wide Fast Wide –– 8bits @ 20MB/s8bits @ 20MB/s••Ultra2 Ultra2 –– 8bits @ 40MB/s8bits @ 40MB/s••Wide Ultra Wide Ultra –– 16bits @ 80MB/s16bits @ 80MB/s••Ultra160 Ultra160 –– 16bits @ 160MB/s16bits @ 160MB/s••Ultra320 Ultra320 –– 16MB/s @ 320MB/s (2.5Gb/s)16MB/s @ 320MB/s (2.5Gb/s)

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

SCSI-1• Tornou-se padrão ANSI em 1986• Usado como padrão no Macintosh

• 5 MHz• 8 bits, 5MB/s• Transf. síncrona e assíncrona

• Suporta 7 dispositivos + 1 host• Praticamente só controla discos rígidos• Barramento com 6 metros

• Arbitragem distribuída

8. Dispositivos de Amazenamento

25

Paulo N.M. Sampaio

SCSI-2

• Tornou-se padrão ANSI em 1990• 10 MHz

• Fast SCSI => 8 bits, 10 MB/s• Fast Wide SCSI => 16 bits, 20 MB/s (usado normalmente)

=> 32 bits, 40 MB/s (requer cabo extra)

• 7 dispositivos (ou 15 no Wide SCSI) + 1 host• Vários tipos de dispositivos (Scanners, cdrom, discos até 9GB)• Versão diferencial 16 bits (máx. 20MB/s, até 25 metros)

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

SCSI Bus - Características elétricas

• Barramento com terminação simples

– Os níveis lógicos 0 e 1 são representados comparando a tensão de cada fio com um padrão comum (chamado “terra”).

– Um barramento SCSI com term. simples tem no máximo 6m.

• Barramento diferencial– Usa dois fios para cada sinal lógico. A diferença de tensão entre eles, positiva

ou negativa, representa os níveis lógicos. Com isso espera-se minimizar ruídos externos induzidos nos fios, assumindo que essa indução ocorre nos dois fios e portanto se anulam quando a diferença é calculada.

– Um barramento SCSI diferencial tem até 25 metros.

8. Dispositivos de Amazenamento

26

Paulo N.M. Sampaio

SCSI-3 e Ultra2: O Futuro...• Ainda em desenvolvimento• 20 MHz (Também é chamado de Fast20 ou Ultra-SCSI)

– 8 bits, 20MB/s

– 16 bits, 40 MB/s• Mais dispositivos• Cabos mais longos

• Vários protocolos seriais e paralelos– Barramento serial (chamado firewire)

– Barramento paralelo para manter compatibilidade com padrão SCSI-1 e 2

• Ultra2 SCSI: 8-bit, 40 MBps. • Wide Ultra2 SCSI: 16-bit bus, 80 MBps.

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

SCSI: Resumo

Protocolo Padrão Frequência(MHz)

Núm.bits

Taxa deTransf.(MB/s)

Tam. Máx. doCabo com Term.

Simples (m)

Número dedispositivos(inc. Host)

"normal" SCSI SCSI-1 5 8 5 6 8 Wide SCSI SCSI-2 5 16 10 6 16 Fast SCSI SCSI-2 10 8 10 3 8 Fast Wide SCSI SCSI-2 10 16 20 3 16 Ultra SCSI SCSI-3 20 8 20 1,5 8 Ultra Wide SCSI SCSI-3 20 16 40 1,5 16 Serial SCSI(Firewire)

SCSI-3 100 a400+

1 12 até50+ (?)

(?) (?)

8. Dispositivos de Amazenamento

27

Paulo N.M. Sampaio

Fases do Barramento SCSI

• Bus free.

• Arbitration.• Selection: mestre seleciona escravo.

• Reselection: escravo reconecta ao mestre para continuar transação parada pelo escravo.

• Command: escravo pede comando ao mestre.

• Data: escravo pede transf. de dados ao mestre.

• Status: escravo pede para transf. status para o mestre.• Message: escravo pede transf. de mensagem.

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

Fases do Barramento SCSI

Bus free Arbitration

Selection ouReselection

Command,Data, Status,ou Message

RESET

8. Dispositivos de Amazenamento

28

Paulo N.M. Sampaio

SCSI - Arbitragem Distribuída

• Na fase Bus Free, os candidatos a mestre ativam o BSY (barr. busy) e a linha de dados correspondente ao seu identificador (de 0 a 7)

• Todos os candidatos verificam se outros dispositivos também querem ser mestres.

• Aquele com maior prioridade (7 é a maior) torna-se mestre.

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

Fibre Channel

•• Supports up to 127 NodesSupports up to 127 Nodes•• 133Mb/s to 4.25Gb/s133Mb/s to 4.25Gb/s•• Used for highUsed for high--end systemsend systems•• IBMIBM’’s new 15,000 RPM drive uses s new 15,000 RPM drive uses FibreFibre to to

transfer at 647Mb/s transfer at 647Mb/s

8. Dispositivos de Amazenamento

29

Paulo N.M. Sampaio

Computer Ports

•• Parallel Port Parallel Port –– A standard for printers 25pinsA standard for printers 25pins•• Serial Port Serial Port -- uses DBuses DB--9 and DB9 and DB--25 connectors and 25 connectors and

communicates via RS232communicates via RS232

•• USB USB -- (Universal Serial Bus) A hardware interface (Universal Serial Bus) A hardware interface for lowfor low--speed peripherals up to 12Mb/sspeed peripherals up to 12Mb/s

•• USB v2.0 USB v2.0 –– 480Mb/s. Connects like SCSI but can 480Mb/s. Connects like SCSI but can also connect up to 127 devices like also connect up to 127 devices like FibreFibre..

•• USB can is also hotUSB can is also hot--swappableswappable

8. Dispositivos de Amazenamento

Paulo N.M. Sampaio

Organização da disciplina

Programa Teórico

1. Introdução (IPCHW 1)

2. Microprocessadores para PCs (IPCHW 3-14)

3. Chips de Memoria (IPCHW 15)

4. Chipsets (IPCHW 16)

5. Interrupções e DMA (IPCHW 17)

6. RAM CMOS e RealtimeClock (IPCHW 18, 19)

7. Arquitecturas e Sistemas de BUS (IPCHW 20, 22, 25)

8. Dispositivos de Amazenamento (IPCHW 28, 29, 30, 31)

9. Periféricos (IPCHW 32, 33, 34, 35, 37)

30

Paulo N.M. Sampaio

Prof. Dr. Paulo Sampaio

Universidade da Madeira - UMA

Arquitectura de Sistemas Computacionais