You are on page 1of 73

Microprocessors – VI

Memory elements
Yashar Hajiyev
Azerbaijan Caucasus University
1
The Key Characteristics of Computer Memory System

Word → unit of memory organization. CRAY C90 has 64-bits word length.

Numbers of Addressable units →N=2A where A is bits in address code;

Units of transfer →number of bits written/read out at moment

2
The Methods of accessing of memory elements

Sequential access → shared read/write mechanisms to separate records from current positions to
desired location.

Direct access → searching, counting, waiting to access to reach final location;

Random access →location can be selected at random/directly addressed and accessed


Associative → enables to compare of desired bit location within the word for specified match.

Access time → time to perform read/write operation;

Memory cycle time → time of access + additional time before next access available.

Transfer rate → rate for data can be transferred into or out of memory elements.
Is equal to 1/(cycle time)

Physical types → semiconductor, magnetic surface memory, optical, magnetico optical ;

Physical characterictics → semiconductor, magnetic surface

3
The Memory Hierarchy

Down to hierarchy → a) decreasing cost per bit. b) increasing of capacity ;


c) increasing access time;
d) decreasing frequency of access of memory by processor
4
The Memory Addressing

5
The Memory Addressing

6
The Architecture Addressing

7
8
9
10
11
12
The Magnetic Disc
Contemporary rigid disk system

RAID → is a family technologies


for using multiple disks as
parallel
arrays for data storage;

Read Head → partially shielded


magneto-resistive (MR)
sensor;

Wring Head → to convert electric


pulse signal to magnetic
patterns to be recorded on disk
surface.

Magnetic disk → is a circular platters constructed from nonmagnetic material –


aluminum substrate – coated by magnetizable material;

13
Disks. Disk Hardware

14
Disks
A hard disk consists of a stack of aluminum, alloy, or glass platters
(boyuk mustevi) 5.25 inch or 3.5 inch in diameter (or even smaller
on notebook computers).
On each platter is deposited a thin magnetizable metal oxide. After
manufacturing, there is no information whatsoever on the disk.

The ECC field contains redundant information that can be


used to recover from read errors. The size and content of this
field varies, depending on how much disk space the designer
is willing to give up for higher reliability and how complex an
ECC code the controller can handle.
A 16-byte ECC field is not unusual. All hard disks have some
number of spare sectors allocated to be used to replace
sectors with a manufacturing defect. 15
Disks
A 2.5" hard drive that has been opened, exposing its inner
workings.
Below 500GB Western Digital Scorpio Blue hard drive
with SATA connections.
This 2.5" hard drive is common in laptops.

16
Disks
A 2.5" hard drive that has been opened, exposing its inner workings.
Below 500GB Western Digital Scorpio Blue hard drive
with SATA connections.
This 2.5" hard drive is common in laptops.

17
Each sector stores a fixed amount of user-accessible data, traditionally 512 bytes
 for hard disk drives (HDDs) and 2048 bytes for CD-ROMs
and DVD-ROMs.

18
Disk Hardware (2)

 Physical geometry of a disk with two zones


 A possible virtual geometry for this disk 20
The Magnetic Disc
Contemporary rigid disk system

RAID → is a family technologies


for using multiple disks as
parallel
arrays for data storage;

Read Head → partially shielded


magneto-resistive (MR)
sensor;

Wring Head → to convert electric


pulse signal to magnetic
patterns to be recorded on disk
surface.

Magnetic disk → is a circular platters constructed from nonmagnetic material –


aluminum substrate – coated by magnetizable material;

21
The Magnetic Disc
Contemporary rigid disk system

22
The Magnetic Disc
Contemporary rigid disk system

23
The Magnetic Disc
Contemporary rigid disk system

24
The Magnetic Disc
Contemporary rigid disk system

25
The Magnetic Disc
Contemporary rigid disk system

26
The Magnetic Disc
Contemporary rigid disk system

27
Contemporary rigid disk system
Data Organization and Formatting

Tracks → is concentric set of rings.


Thousands of tracks per disk surface.

Tracks are separated by gaps

Rings are subdivided on Sectors with


mostly fixed-length → 512 bytes

Old model disks were 14 inches


(36cm) in diameter;

New model disks are 3.5 inches


(8.9cm) in diameter;

Magnetic disk → is a circular platters constructed from nonmagnetic material –


aluminum substrate – coated by magnetizable material;
28
Disk Formatting

Cylinder skew — This offset is done to improve performance. It is to allow


the disk to read multiple tracks in one continuous operation without losing data.
29
Contemporary rigid disk system
Data Organization and Formatting
CAV → is Constant Angular Velocity →
to increase space between bits within
segment;
Disk is subdivided into pie-shaped
sectors.

Disadvantages is data stored in outer


tracks is the same as on short inner
tracks

Multiple recoding Zone → is constant


angular velocity → to increase space
between bits within segment;
Suface is subdivided on concentric zones
→ 16 .
Within zone the number of bits per tract
is constant.

30
A disk sector

31
A disk sector

Head number → identifier


head on multiple surfaces;

Track number → number


on surface.

32
33
Disk sectors

34
Contemporary rigid disk system
Data Organization and Formatting

30 fixed –length sectors →


each sector 600 bytes 

512 bytes for data →


plus → information for
disk controller;

ID field → identifier of
sector address/localization

SYNCH byte → special bit


pattern to indicate
beginning of field;
Contemporary rigid disk system
Physical Characteristics
Types of Magnetic disks 

1) Read/Write Fixed-Head Disk → is one head per


truck → mounted on rigid arm (rare today)

2) Movable-Head Disk → is one head mounted on


flexible arm that can be positioned over any track;

3) Non-removable disk →permanently in disk drive→


used in PC;
4) Removable disk →disk can be removed and replaced
with another one → used in data storage systems;
5) Multiple-platter disks → one head per platter
surface. Cylinder→ set of tracks in same position of
platter disks;

Head mechanisms classification 


1) head positioned a fixed distance over platter
2) head is contacted with surface during read/write
operation (floppy disks)
3) when motionless → head is rest on aerodynamic
foil over surface. When read/write operations
→air pressure from spinning disk does keep head
over surface 36
Hard disk drive operating parameters
General Timing Diagram of disk I/O transfer 
Time required to read /write a disk block determined by 3 factors:
1.Seek time;
2 Rotational delay;
3 Actual transfer time
Seek time dominates
Error checking is done by controllers

37
Hard disk drive operating parameters
Features of disk I/O operations depend on 1) Computer system; 2) Operating system;
3)Nature of I/O channel; 4) Disk controller hardware.

General Timing Diagram of disk I/O transfer 

Seek time  to position head at track →disk controller waits when selected sector
rotates to line up with head. Average seek time is <10 ms.
Rotational delay  time for beginning of sector to reach the head 
rotation speed 3600—15000 rpm , one revolution per 4 ms → rotation delay =2 ms
for floppy disks rotation speed 300—600 rpm → rotation delay =100 — 50 ms ;

Access time = Seek time + Rotational delay  time to get in position to read/write.
average access time Ta= Ts+ 1/2r + b/rN

Data transfer time  time for read/write operation on sector under head.
T=b/rN ; T transfer time; N number of bytes on track;
r-rotation;
Wait for device  time for waiting in a queue for device for I/O operations;
Wait for channel  if device shares I/O channels with other disk drives →waiting 38

for
Hard disk drive operating parameters

Timing comparison  for two cases


1) File occupies all sectors on 5 adjacent tracts (5 tracts x 500 sectors/track = 2500 sectors)
Read 1 sector ― 0,008 ms; Read 500 sectors --- 4ms;

Average seek — 4 ms
Average rotation delay — 2 ms
Read 500 sectors — 4 ms
------------
10 ms
Total time = 10+ (4 x 6) = 34 ms

2) Same data in sectors are distributed randomly over disk.

Average seek — 4 ms
Average rotation delay — 2 ms
Read 1 sector — 0,008 ms
------------
6,008 ms
Total time = 2500 sectors x 6,008 ms = 15020 ms = 15 seconds

39
Disk Arm Scheduling Algorithms (1)

Time required to read or write a disk block determined by 3


factors

1. Seek time
2. Rotational delay
3. Actual transfer time

Seek time dominates

Error checking is done by controllers

40
Disk Arm Scheduling Algorithms (2)

Shortest Seek First (SSF) disk scheduling algorithm.


Conflicting goals of efficiency and fairness

41
Disk Arm Scheduling Algorithms (3)

The elevator algorithm for scheduling disk requests


(needs 1 bit to remember the direction of searching:
UP and DOWN)

42
Disk Arm Scheduling Algorithms (3)

With a modern hard disk, the seek and rotational delays so


dominate performance that reading one or two sectors at a
time is very inefficient.
That is why  many disk controllers always read and cache
multiple sectors, even when only one is requested.
Point is  that all of above disk scheduling algorithms
assume that real disk geometry is same as virtual geometry.

If it is not  scheduling disk requests makes no sense


because the operating system cannot really tell whether
cylinder 40 or cylinder 200 is closer to cylinder 39.

43
Error Handling

A disk track with a bad sector


Substituting a spare for the bad sector
Shifting all the sectors to bypass the bad one

Spare – reserve; Two methods exist.


There also two levels of Error handling - Controller and OS.
OS can create secret list of bad sectors.

44
Search errors caused by Bad sectors and mechanical problems in the
arm.
The controller keeps track of the arm position internally.
To perform a seek, it issues a series of pulses to arm motor —
one pulse per cylinder,→ to move arm to new cylinder.
When arm gets to its destination, the controller reads the actual
cylinder number from the preamble of next sector.
If the arm is in the wrong place, a seek error has occurred.

Most hard disk controllers correct seek errors automatically, but most
floppy controllers (including the Pentium’s) just set an error bit and
leave the rest to the driver.
The driver handles this error by issuing a recalibrate command, to
move the arm as far out as it will go and reset the controller’s
internal idea of the current cylinder to 0.
Usually this solves the problem. If it does not, the drive must be
repaired. 45
46
3.5 inch4 in × 1 in × 5.75 in (101.6 mm × 25.4 mm × 146 mm) = 376.77344 cm³.
This smaller form factor is similar to that used in an HDD by Rodime in 1983,[104]
 which was the same size as the "half height" 3½" FDD, i.e., 1.63 inches high.
Today, the 1-inch high ("slimline" or "low-profile") version of this form factor is the
most popular form used in most desktops. The format was standardized in terms
of dimensions and positions of mounting holes as EIA/ECA-740, co-published as 
SFF-8301.[105]

2.5 inch2.75 in × 0.275–0.75 in × 3.945 in (69.85 mm × 7–19 mm × 100 mm) =


48.895–132.715 cm3. This smaller form factor was introduced by PrairieTek in
1988;[106] there is no corresponding FDD. The 2.5 drive format is standardized in
theEIA/ECA-720 co-published as SFF-8201; when used with specific connectors,
more detailed specifications are SFF-8212 for the 50-pin (ATA laptop) connector,
SFF-8223 with the SATA, or SAS connector and SFF-8222 with the SCA-2
connector.[107] It came to be widely used for HDDs in mobile devices (laptops,
music players, etc.) and for solid-state drives (SSDs), by 2008 replacing some
3.5 inch enterprise-class drives.[108] It is also used in the PlayStation 3[109] andXbox
360[citation needed] video game consoles. Drives 9.5 mm high became an unofficial
standard for all except the largest-capacity laptop drives (usually having two
platters inside); 12.5 mm-high drives, typically with three platters, are used for
maximum capacity, but will not fit most laptop computers. Enterprise-class drives
can have a height up to 15 mm.[110]Seagate released a 7 mm drive aimed at entry 47
level laptops and high end netbooks in December 2009. [111] Western Digital
released on April 23, 2013 a hard drive 5 mm in height specifically aimed at
48
49
50
Stable Storage

Analysis of the influence of crashes on stable writes


51
Stable writes. A stable write consists of first writing the block on drive 1,
then reading it back to verify that it was written correctly. If it was not
written correctly, the write and reread are done again up to n times
until they work. After n consecutive failures, the block is remapped
onto a spare and the operation repeated until it succeeds, no matter
how many spares have to be tried. After the write to drive 1 has
succeeded, the corresponding block on drive 2 is written and etc.
Stable reads. A stable read first reads the block from drive 1. If this yields
an incorrect ECC, the read is tried again, up to n times. If all of these
give bad ECCs, the corresponding block is read from drive 2. Given
the fact that a successful stable write leaves two good copies of the
block behind, and our assumption that the probability of the same
block spontaneously going bad on both drives in a reasonable time
interval is negligible, a stable read always succeeds.
Crash recovery. After a crash, a recovery program scans both disks
comparing corresponding blocks. And repair them.

52
Commercial Available HDD Parameters
CD Disk

Recording structure of a CD or CD-ROM 56


Compact Disk (CD) Hardware

Logical data layout on a CD-ROM


57
Optical-disk Systems for Computer Data Storage
Since 1983 Compact disk (CD) is used to store 60 minutes digital audio info.
CD and CD-ROM (compact disk read-only-memory) are made same technology 
Disk is of resin (polycarbonate).
Digital info is imprinted as a series of microscopic pits on surface of resin. Finely focused
high-intensity laser to create master disk to make a die to stamp out copies onto
Polycarbonate. The surfaces are coated by gold/aluminum film. Label to be silk-screened
onto acrylic.
Digital info is retrieved by lower-powered laser → its beam strongly reflected from clear
places in resin.
When beam falls on a pit (its rough surface) light is scattered and low intensity is reflected.
A change between (beginning/end) pits and lands is detected by photo-sensor and converted
into digital signal. A pit represent ‘1’ and when when no changes in reflecting during
intervals the ‘0’ is recorded.

58
Optical -disk Systems for Computer Data Storage

CD and CD-ROM organize info on single spiral track (not on concentric tracks) beginning
from center. Sectors are same length along the spiral track.
Info is packed in segments of same size and scanned by laser at the constant linear velocity
(CLV) or same rate by rotating disk at a variable speed.
Disk rotates slowly at outer edge than near the center.
CD-ROM capacity is about 680MB.

Data on CD-ROM are in the form of blocks which consists of following fields:
Sync  is identification of beginning of block of 12 bytes →1 byte of 00s + 10 bytes of
11s + 1byte of 00s ;
Header  contains block (3bytes) address (min+sec+sector) and mode byte →
mode 0 is blank data field;
mode 1→ is using error correcting code byte and 2048 bytes of data;
mode 2→ is 2336 bytes of data + no error correction code;

Data  User data ;


Auxilary in mode 2 → additional user data; in mode 1 → 288-byte error-correcting code;
59
Optical -disk Systems for Computer Data Storage

CD Recordable (CD-R) write once read-many CD known as recordable CD-R.


It can be written by customer once with a laser beam of modest intensity.
Different from CD-ROM, the medium for information permanent writing includes a dye
(красящий) layer which reflectivity activated by modest intensity laser.

CD Rewritable (CD-RW) the medium for info repeatedly written/overwritten


includes medium which has two different reflectivities in two different phase states 
amorphous (slight reflectivity )and crystalline (high reflectivity ).
Beam of modest intensity laser can change the phase from one to another more than
500,000-1,000,000 times.

Digital Versatile Disk (DVD) originally was engineered to replace VHS video tape.
DVD has three differences from CD-ROM :
1 →bits are packed more closely.
In CD spacing between spirals is 1.6 µm, between pits 0.834 µm. Memory vol is 700 MB;
In DVD between spirals is 0.74 µm and between pits is 0.4 µm. Memory volume is 4.7 GB

2 →DVD has second layer of pits and lands on first layer, so dual-layer DVD has
mem/volume 8.5 GB .
3 →DVD can be two-sided with memory capacity up to 17 GB

60
Optical -disk Systems for Computer Data Storage

61
Semiconductor Main Memory
Basic element of semiconductor memory → is memory cell with
properties :
-has two stable states which persaved as 0 or 1;
-is capable of being written into to set the state;
-is capable of being read to sense the state

Cell has tree functional terminals 


1)to select cell; 2) to assign read/write
operation;
3) to send info in/out cell
Semiconductor Memory Types
Random-Access Memory (RAM)

RAM is volatile/temporary storage element and has to be supplied with electric power →
divided in Dynamic RAM (DRAM) and Static RAM (SRAM).

In DRAM cells data (one bit) stored as charge on capacitors


→ ‘1’ if charge exist, if no →‘0’.
Capacitors are discharging → so DRAM needs power supplying.
Address line is to activate selected cell where bit info is written in or
read out capacitor.
Transistor is a switcher that enables ‘write-down current’ flow to or
‘readout current’ from selected capacitor .

Static RAM based on flip-flop logical element consisting of 4 cross


connected transistors. Element has long stabile logic state.
SRAM and DRAM are volatile.
SRAM is used for cache memory → both on and off chip.
Read Only Memory (ROM)

ROM is non-volatile storage element and no-power source is required to maintain bit in
memory.
Best application for ROM is microprogramming, system programs, function tables,
library for frequently wanted functions, for high-volume production runs.
ROM is integrated circuit chip, where data is wired in chip during fabrication process.

Three types of ROM → used for read-mostly memory where read operations are
more fluent than writing  EPROM, EEPROM, and flash memory.

EPROM → erasable programmable read-only memory is read and written


electrically, however before writing all cells must be erased by ultraviolet.

EEPROM → electrically erasable programmable read-only memory is


written electrically, without erasing → only bytes addressed are updated.
Writing is longer than the read, takes several 100 ms per byte, and might be
done in place by using ordinary bus control, address and data lines.

Flash memory →is between EPROM and EEPROM, uses electrical erasing
(like EEPROM). It’s possible to erase blocks of memory rather than entire chip,
and not byte-level erasure. Flash like EPROM uses 1 transistor per bit –high
density.
RAM and ROM chip organization
Static and Dynamic RAMs are volatile → power must be
4 bits are read/written at permanently.
time. DRAM – much smaller and chipper, but some slower than SRAM.
Memory array consist of DRAM – for main memory, SRAM – for cache memory
2048 (211) by 2048 (211)
elements Chip Logic 16- Mbit DRAM (4M x 4)
WE is write enable
Two signal packets are signal – from D1-D4.
passing through 11 OE is output enable
address lines at time signal – to D1-D4

First 11 address codes to


select one of 2048 rows.

Second 11 address codes


to select one of 2048
columns of 4 bits per
column.

Row address select RAS


signal accompanies row
211 codes

Column address select


SAS signal accompanies
column 211 codes

4 data lines (D1-D4) to


input/output 4 bits from
DATA buffer.
Chip Packaging
Dynamic RAM (DRAM) organization as (4M x 4) 
11 address lines – to specify 4M row/column (1011 x 1011)
combinations of cells/words/chips with 4 bits each.
Row address select pins (220 =1M) – A0-A19 ; 8 data lines D0-D7;
RAS – row address select ; CAS – column address select ;

WE – write enable pin ; OE – output enable pin


NC – no connect pin;

Electrically Erasable Programmable Read-only Memory (EPROM) 


8-Mbit chip organized as 1 M cells/words with 8 bits each.

20 address pins (220 =1M) – A0-A19 ; 8 data lines D0-D7;

CE chip enable (CE) pin  – to indicate address code is valid for this
chip → is connected to higher address lines above A19;
Chip Packaging
Memory Module Organization Archtecture

Dynamic RAM (DRAM) contains


only 1 bits per word 

Module consists of 256 – 8 bit


words

Module needs 18-bit address codes to


to address 8 pieces of 256K x 1-bit
chips each of wich – input/output
of 1 bit
Memory Module Organization Archtecture

Dynamic RAM (DRAM)


organization as (4M x 4) 

11 address lines – to specify 4M


row/column (1011 x 1011)
combinations of cells/words/chips
with 4 bits each.

Row address select pins (220 =1M)


– A0-A19 ; 8 data lines D0-
D7;

RAS – row address select ; CAS –


column address select ;
Traditional and Synchronous Dynamic RAM
Interface to internal memory is critical bottlenecks for high-performance processor
system.
Traditional DRAM was asynchronous, and was constrained by its internal architecture
and its interface to processor’s memory bus.
In DRAM, processor gives addresses and control levels to the memory → initiating that
set of data should be read or written to DRAM. During access-time delay, DRAM
activates high capacitance of the row/column lines, routes data through buffers.
Processor waits through this delay.
Synchronous DRAM (SDRAM) moves data to and out under control of system clock.
Processor issues the instructions and address information which latched by DRAM.
SDRAM then responds after a set of number clock cycles. During these cycles MP can do
other tasks.
SDRAM performs best for transferring large blocks of data → serially word processing,
spreadsheets and multimedia. Once-per-cycle limitation.
Mode register in SDRAM allows programmer to adjust delaying/latency between receipt
of read request and beginning of data transfer. SDRAM when burst
Length= 4 and latency=2;

Address inputs  determine


the starting column address for
burst;

Mode Register to set type of


burst (sequential or interleave)
and burst length (1,2,4,8 and
full page)
Multiple-bank internal Architecture of Synchronous Dynamic
RAM (SDRAM)
IBM’s 64-Mb SDRAM

SDRAM has mode register and associated control logic that specifies
burst length .number of data synchronously fed in bus

Burst read
command 
when at rising
edge of
clock pulse →
CS & CAS are
low,
and RAS & WE
are high
Mode Register
Is set by CAS 
that equals to
delay from start
of command to
when data from
first cell appears
on outputs
Double data rate SDRAM (DDR-SDRAM) is enhanced version, that overcomes of
once-per-cycle limitation. It can send data to processor twice per clock cycle
Rambus DRAM (RDRAM)

Rambus DRAM adopted by INTEL for Pentium and Itanium processors  is the main
competitor for SDRAM.
Rambus DRAM chips are vertical packages with all pins on one side  changes data with
MP over 28 wires bus  no longer 12 cm.
Special high speed BUS can address up to 320 RDRAM chips  is rated at 1.6 GBps.
BUS delivers address and control info by using asynchronous block-oriented protocol.
Initial access time →460 ns. Data rate → 1.6 GBps
Controlled signals RAS, CAS, R/W and CE are the same as for SDRAM. Memory request over
Bus contains desired address, type of operation, and number of bytes In operation.
RDRAM module sends data to Controller synchronously to clock; Controller to module in
opposite direction.

Bus  18 data lines


(16 actual + 2 parity) →
Cycling at twice the clock
rate  at the beginning
and end of clock pulse
 Serial data with signal
rate over each line  800
Mbps.
Separate 8 lines (RC)  for
address and control signals

You might also like