Sunteți pe pagina 1din 41

Computer-memory-pyramid

Typical memory hierarchy

optical disk

 numbers shown are rough approximations


 Up: fast, small, expensive, volatile (loses contents
when power goes out)
 Down: slow, large, cheap, non-volatile (persistent)
Memory hierarchy
Registers
 integrated in the central processing unit (CPU), very few
Cache
 close to CPU, more room than registers, faster than RAM
 stores copies of most recently used items from RAM
Main Memory
 RAM, ROM... (details later)
Magnetic Disk
 hard drive... (details later)
Magnetic Tape, Optical Disk
 tape drives
 huge storage, economical, but SLOW... (details later)
 CDs, DVDs... (details later)
Types of primary memory

 RAM: Random Access Memory


 RAM is fast
 Holds what’s currently being used
 Writable
 Virtually no speed penalty for accessing bits, no matter
which location they’re in: “random access”
 Typically 128 or 256 MB (and up) for personal computers
 Good idea: buy as much as you can afford.
Types of primary memory
 ROM (read-only memory)
 Contents pre-written and permanent “firmware”
 Stores bootstrap program.
 Stores BIOS (very basic parts of the operating system)
 Typically small:
 Other flavors of nonvolatile primary memory:
 PROM, EPROM, EEPROM,
 CMOS (complementary metal oxide semiconductor ) (battery powered)
 (see text for more info)
 ROM is found on the motherboard plus on any devices that need to be
accessed during startup.
 Video cards
 SCSI cards
 Enhanced IDE controller cards
 Network Interface cards
Semiconductor Memory
 Memory refers to Semiconductor Memory.
 Hold digital information 0s and 1s.
 Workspace for processor.
 Temporary storage area where the programs and data being
operated on by the processor reside.
 Starting a program brings the program files and data into RAM.
The files and data remain in RAM as long as the program is
running.
 Main memory in a system is a collection of chips or modules
that are plugged into the motherboard.
 Chips must be compatible with the motherboard.
Semiconductor Memory
 In the design of all computers, semiconductor
memories are used as primary storage for code and
data.
 They are connected directly to the CPU and they are the
memory that the CPU first asks for information (code
and data).
 For this reason, semiconductor memories are
sometimes referred to as primary memory.
 The main requirement of primary memory is that it
must be fast in responding to the CPU
Types of Memory
Two main types of memory used in PCs:
 ROM (Read-Only Memory)
 PROM,
 EPROM,
 EEPROM,
 Flash EPROM, and
 Mask ROM
 RAM (Random Access Memory)
 SRAM (used as cache),
 DRAM, and
 NV-RAM
ROM
 Motherboard ROM contains four main programs:
 POST (power on self test). A series of test routines
that test the system components.
 CMOS Setup. A menu-driven application that
allows the user to set system configuration
parameters, options, security settings, and
preferences.
 Bootstrap Loader. The routine that scans the floppy
disk and hard drive looking for an operating system
to load.
 BIOS (basic input/output system). Device drive
programs that provided a standard interface to the
other system hardware.
Memory Capacity of Computers/Chips

 The number of bits that a computer/chip can store is


called its capacity.
 While the memory capacity of a memory IC chip is
always given in bits,
 The memory capacity of a computer is given in
bytes.
4M IC memory chip means 4 megabits.
4M computer memory means 4 megabytes.
Flash memory EPROM
 Due to the fact that flash memory can be programmed
while it is in its socket on the system board, it is
becoming widely used as a way to upgrade the BIOS
ROM of the PC.
 Some designers believe that flash memory will replace
the hard disk as a mass storage medium. This would
increase the performance of the computer
tremendously, since flash memory is semiconductor
memory with access time in the range of l00 ns
compared with disk access time in the range of tens of
milliseconds.
 For this to happen, flash memory's program/erase
cycles must become infinite, just like hard disks.
USB flash drive

1. USB connector
2. USB mass storage
controller device
3. Test points
4. Flash memory chip
5. Crystal oscillator
6. LED
7. Write-protect switch
8. Space for second
flash memory chip
A Closer Look at NAND Flash Technology
Secondary/auxiliary storage

 Want more memory than is affordable in electronic


memory.
 Cheaper: shares one set of electronics for R and W.
 But much slower: at least by 10,000 times.
 Need non-volatile storage that is recordable.
 Primary memory:like your closet (private)
 Access is frequent and fast; but less is taken at a time.
 Secondary storage:like your attic (loft, upper floor)
 Access is far less frequent and much slower; but a whole
block of data is taken at a time.
Memory vs. Storage
Hard Drive – storage RAM – memory

 Storage, also known as mass media or auxiliary storage,


refers to the various media on which a computer system can
store data.
 Storage devices hold programs and data in units called files.
 Memory is a temporary workplace where the computer
transfers the contents of a file while it is being used.
Why Is Storage Necessary?

 Storage devices:
Retain data when the computer is turned off
Are cheaper than memory
Play an important role during startup
Are needed for output
Storage Devices

 Storage devices are categorized by:


The type of operations they perform
The method they use to access the information
The technology they use
Their location in the storage hierarchy
Their capacity and speed
Sequential vs. Random Access Storage
Tape Drive – Floppy Disk Drive – Hard Disk –
sequential storage random-access storage random-access storage

 Sequential – Storage devices that read and write data


in a serial (one after the other) fashion
 Random-Access – Storage devices that read and
write data without going through a sequence of
locations
Storage Technologies: Magnetic and Optical
Magnetic Storage Optical Storage –
CD/DVD drive

 Magnetic – Storage devices use disks or tapes that


are coated with magnetically sensitive material
 Optical – Storage devices that use laser beams to
read patterns etched into plastic disks
Magnetic Disk Storage

 A disk is formatted; it is
divided into tracks and sectors, Track
and a file allocation table
(FAT) is created.
Sector
 Track – circular band
 Sector – pie shaped section
 Cluster – two or more Cluster
adjacent sectors
 FAT – keeps track of
specific locations of files
Optical Disk Storage
Cross-section of a disk Disk surface magnified

 Microscopic indentations called pits scatter the laser beam’s


light. A light-sensing device receives no light from the pits. A
signal is sent to the computer corresponding to a 0 in the binary
system.
 Flat, reflective areas, called lands, bounce the light back to the
light sensing device, which sends a signal corresponding to a 1.
Compact Disk (CD)

 A schematic of an
optical three-beam
pick-up of a CD drive
is shown in the figure
along with the laser
beam route through
the system.
Optical Storage
 Use lasers to record (write), and also to read.
 Record: high-powered laser burns pits into reflective coating.
 Read: weaker laser reads pits; differences in reflectance of pits &
lands interpreted as 0 and 1. (See textbook figures)

 For PCs: ~650 MB per disk (275,000 pgs of text)


 Internal & external drives.
 Many flavors of optical storage…
 READ ONLY: CD-ROM [standard; early generations]
 Rigid platter; various sizes, densities.
 Usually 650 MB, 5 1/4”
 Standard transfer rate was 150 Kb/sec; then came:
 2X... 4X... 24X...
 40X speed drive ~$60. [Disk cost: depends on what’s on it!]
 Read only; who writes? __________
 Good for?
Optical Storage (cont.)

 RECORDABLE:
 Recordable by user (various technologies)
 generally readable by most standard, same-sized drives and players
 WRITE ONCE: CD-R
 Good for? (used where data won’t change)
 Multimedia presentations
 Archives
 Greatest hits
 Photos; video clips
 Unalterable once written; so what?
 Hold 650 MB of data, or ~74 min. of audio
 Can copy files to it (like removable magnetic media) but a little more
complicated (software comes with drive)
Optical Storage (Cont..)

 WRITE MANY: CD-RW


 Recordable/writable/erasable many times
 when used with appropriate software
 RW drives generally can record on both CD-R and CD-RW disks.
 Prices are falling
 Newer optical disc technology: DVD
 “Digital video (versatile) disc”
 Similar to DVD-video that you hook up to your TV….
 READ ONLY: DVD-ROM
 ...instead, holds computer data & is hooked to your computer
 RECORDABLE VERSIONS:
 DVD-R (write once)
 DVD-RAM, and DVD-RW (write many)
 DVD disks can store a whopping 2.6 to 8.75 GB!
 For huge graphics files, video, etc.
Storage Capacity and Speed
Floppy Disk Hard Drive CD ROM / DVD

Capacity – 720 KB to Capacity – Up to 400 GB Capacity – CD-ROM 650


1.44 MB MB; DVD 17 GB
Access Time – 6 to 12ms
Access Time – 100ms Access Time – 80 to 800ms

 A storage device’s performance is measured by:


 Capacity – The number of bytes of data that a device can hold
 Access Time – The amount of time, in milliseconds (ms), it takes
the device to begin reading data
Hard Disks

Platter Read/Write
head

 Hard disks are high-speed, high-capacity storage devices.


 They contain metal disks called platters.
 They contain two or more stacked platters with read/write
heads for each side.
 Hard disks can be divided into partitions to enable computers
to work with more than one operating system.
Factors Affecting a Hard Disk’s Performance

 Seek time or positioning performance – How


quickly the read/write head positions itself and
begins transferring information. It is measured in
milliseconds (ms).
 Spindle speed or transfer performance – How
quickly the drive transfers data. It is measured in
rotations per minute (RPM).
Hard Disk Layout
Head
Block Head
Platter motor

Sector
Track

Cylinder

Track

Drive Head, on
motor Head moving arm
assembly
Terminology

 Platter
 A round surface – the disk – containing a magnetic coating
 Track
 A circle on the disk surface on which data are contained
 Head
 A transducer attached to an arm for writing/reading data to/from
the disk surface
 Head assembly
 A mechanical unit holding the heads and arms
 All the head/arm units move together, via the head assembly
 Cylinder
 A set of tracks simultaneously accessible from the heads on the
head assembly
Terminology
 Drive motor
 The motor that rotates the platters
 Typically a DC motor (DC = direct current)
 The disk rotates at a fixed speed (e.g., 3600 rpm,
revolutions per minute)
 Head motion
 A mechanism is required to move the head assembly in/out
 Two possibilities:
 A stepper motor (digital, head moves in steps, no
feedback)
 A servo motor (analogue, very precision positioning,
but requires feedback)
Terminology
 Sector
 That portion of a track falling along a predefined pie-shaped
portion of the disk surface
 The number of bytes stored in a sector is the same, regardless
of where the sector is located; thus, the density of bits is
greater for sectors near the centre of the disk
 The rotational speed is constant; i.e., constant angular
velocity
 Thus, the transfer rate is the same for inner sectors and outer
sectors
 Block
 The smallest unit of data that can be written or read to/from
the disk (typically 512 bytes)
Locating a Block of Data
Seek Time Latency Time Transfer Rate

Latency Transfer

Head

Seek

Desired
track Note: Access time = seek time + latency
Terminology
 Seek time
 The time for the head to move to the correct track
 Specified as an average for all tracks on the disk surface
 Latency time
 The time for the correct block to arrive at the head once
the head is positioned at the correct track
 Specified as an average, in other words, ½ the period of
rotation
 Also called “rotational delay”
 Access time is the time “to get to” the data (remember!)
 Access time = seek time + latency
 Transfer rate
 Same as throughput
Latency Example

 A hard disk rotates at 3600 rpm


 What is the average latency?
Period of rotation = (1 / 3600) minutes
= (1 / 3600) × 60 seconds
= 0.01667 s
= 16.67 ms

Average latency = 16.67 / 2 ms


= 8.33 ms
CD-R and CD-RW Discs and Recorders

CD-R CD-RW
 Discs can be read and  Discs can be read and
written to written to
 Discs can only be  Discs are erasable
written to “once”  Discs can be written to
 CD-R drives are capable many times
of reading and writing  CD-RW drives are
data capable of reading,
writing, and erasing data
DVD-ROM Discs and Drives

 DVD stands for Digital Video Disc.


 DVD technology is similar to CD-
ROM technology.
 DVDs are capable of storing up to
17GB of data.
 The data transfer rate of DVD drives is
comparable to that of hard disk drives.
 DVD-R and DVD-RW drives have the
ability to read/write data.
Solid State Storage Devices

Smart Memory
Card Stick

Compact
Flash
Flash
Memory
Memory

PC Micro
Card Drive
Terms related with PC

 Case  Keyboard/mouse
 Power switch  Network card
 Reset switch  Modem
 Hard drive  Sound card
 Floppy  Video card
 CD/DVD  RAM
 Zip drive  Motherboard
 Serial ports  Bus
 Parallel port  Fan
 USB port  Cables

S-ar putea să vă placă și