Title: Primary Memory, Secondary Memory
1Primary Memory,Secondary Memory
- Structured Computer
Organization
Lecture 4 -
Jahan Zeb
2Memory Addresses
- Memories consists of number of cells (or
locations) each of which can store a piece of
information - Cells have numbers, called addresses
- n cells memory will have 0 to n-1 addresses
- A cell is the smallest addressable unit
- Computer manufacturers have standarddised on an
- 8-bit cell (byte)
- Bytes are grouped into words
- 32-bit word has 4 bytes/word
3Memory Addresses
Three ways of organizing a 96-bit memory.
4Memory Addresses
Number of bits per cell for some historically
interesting commercial computers
5Byte Ordering
- Byte in a word can be numbered from left-to-right
or right-to-left - Fig (a) depicts part of the memory of a 32-bit
computer whose bytes are numbered from
left-to-right, fig (b) shows right-to-left
numbering - System where numbering begins at big end is
called a big endian computer, and other one
called little endian computer fig (b)
6Byte Ordering
(a) Big endian memory (b) Little endian memory
7Byte Ordering (2)
(a) A personal record for a big endian machine.
(b) The same record for a little endian
machine. (c) The result of transferring from big
endian to little endian. (d) The result of
byte-swapping (c).
8Error Correcting Codes
- Computer memories can make errors occasionally
due to voltage spikes etc - To guard against such errors memories use
error-detecting or error correcting codes - Codes add extra bits in a special way
- Codeword
- Memory word consists of m data bits to which we
add r check bits. Let total length be n (i.e.
nmr)
9Error Correcting Codes (2)
- Hamming Distance
- Parity Bits
- (a) Encoding of 1100
- (b) Even parity added
- (c) Error in AC
10Cache Memory
- The small, fast memory is called a Cache
- Basic idea The most heavily used memory words
are kept in the memory - Programs do not access memory completely at
random - Locality Principle forms the basis for all
caching systems - Using locality principle primary memories and
caches are divided into fixed-size blocks known
as cache lines - Cache hit/miss
- Unified Cache ( Instructions and data use the
same cache) - Split Cache (Instructions and data separated)
- Number of Caches (Primary cache on chip,Secondary
off chip)
11Cache Memory
- The cache is logically between the CPU and main
memory. Physically, there are several possible
places it could be located.
12Memory Packaging and Types
- A single inline memory module (SIMM) holding 256
MB. Two of the chips control the SIMM.
13Memory Hierarchies
- A five-level
memory hierarchy
14Magnetic Disks (1)
- Circular sequence of bits written, disk makes
complete rotation is called a track, whereas set
of tracks is known as Cylinder - A portion of a disk track. Two sectors are
illustrated - Seek and Latency
15Magnetic Disks (2)
- A disk with four
platters
16Magnetic Disks (3)
17Other Disks
- IDE (Integrated Drive Electronics)
- SCSI ( Small Computer System Interface)
18RAID
- Redundant Array of Inexpensive Disk
- Parallel processing is being used more and more
to speed up CPU performance, why not parallel I/O - Box full of Disks
- Disk Controller replaced by a RAID Controller
- Appear to OS as a single large disk
- RAID levels
19RAID (1)
- RAID levels 0 through 2
- Backup and parity disks are shown shaded
20RAID (2)
- RAID levels 3 through 5
- Backup and parity disks are shown shaded.
21CD-ROMs (1)
- Recording structure of a Compact Disk or CD-ROM
22CD-ROMs (2)
- Logical data layout on a CD-ROM.
23Other Optical Storage Media
- CD-Recordables, CD-Rs
- CD-ReWritable, CD-RW
- DVD, originally Digital Video Disk, officially
Digital Versatile Disk - Single-Sided, Single Layer (4.7 GB)
- Single-Sided, Dual Layer (8.5 GB)
- Double-Sided, Single Layer (9.4 GB)
- Double-Sided, Dual Layer (17 GB)