Mekelle Institute of Technology: PC Hardware Troubleshooting (CSE501) Lecture - 4
Mekelle Institute of Technology: PC Hardware Troubleshooting (CSE501) Lecture - 4
Mekelle Institute of Technology: PC Hardware Troubleshooting (CSE501) Lecture - 4
2
Memory Hierarchy
The memory unit is an essential component in any
digital computer since it is needed for storing
programs and data
Not all accumulated information is needed by the
CPU at the same time
Therefore, it is more economical to use low-cost
storage devices to serve as a backup for storing the
information that is not currently used by CPU
3
Memory Hierarchy
4
Memory Hierarchy
The memory unit that directly communicate with
CPU is called the main memory
Devices that provide backup storage are called
auxiliary memory
5
Memory Hierarchy
The main memory occupies a central position by being able to
communicate directly with the CPU and with auxiliary memory devices
through an I/O processor
A special very-high-speed memory called cache is used to increase the
speed of processing by making current programs and data available to the
CPU at a rapid rate
6
Memory Hierarchy
CPU logic is usually faster than main memory access time,
with the result that processing speed is limited primarily by
the speed of main memory
The cache is used for storing segments of programs currently
being executed in the CPU and temporary data frequently
needed in the present calculations
The typical access time ratio between cache and main
memory is about 1 to 7~10
Auxiliary memory access time is usually 1000 times that of
main memory
7
Main Memory
Most of the main memory in a general purpose
computer is made up of RAM integrated circuits
chips, but a portion of the memory may be
constructed with ROM chips
8
Random-Access Memory (RAM)
Static RAM (SRAM)
Each cell stores bit with a six-transistor circuit.
Retains value indefinitely, as long as it is kept powered.
Relatively insensitive to disturbances such as electrical noise.
Faster (8-16 times faster) and more expensive (8-16 times more expensice as
well) than DRAM.
9
SRAM vs DRAM Summary
Tran. Access
per bit time Persist? Sensitive? Cost Applications
10
ROM
ROM is used for storing programs that are
PERMENTLY resident in the computer and for
tables of constants that do not change in value once
the production of the computer is completed
The ROM portion of main memory is needed for
storing an initial program called bootstrap loader,
witch is to start the computer software operating
when power is turned off
11
Main Memory
A RAM chip is better suited for communication with
the CPU if it has one or more control inputs that
select the chip when needed
12
RAM
13
ROM
14
Memory Address Map
Memory Address Map is a pictorial representation of assigned
address space for each chip in the system
The RAM have 128 byte and need seven address lines, where
the ROM have 512 bytes and need 9 address lines
15
Memory Address Map
16
Memory Address Map
The hexadecimal address assigns a range of
hexadecimal equivalent address for each chip
17
18
Outline
Memory Hierarchy
Cache
Cache performance
19
Cache memory
If the active portions of the program and data are
placed in a fast small memory, the average memory
access time can be reduced,
Thus reducing the total execution time of the
program
Such a fast small memory is referred to as cache
memory
The cache is the fastest component in the memory
hierarchy and approaches the speed of CPU
component
20
Cache memory
When CPU needs to access memory, the cache is examined
If the word is found in the cache, it is read from the fast
memory
If the word addressed by the CPU is not found in the cache,
the main memory is accessed to read the word
21
Cache memory
When the CPU refers to memory and finds the word
in cache, it is said to produce a hit
Otherwise, it is a miss
22
Cache memory
The basic characteristic of cache memory is its fast access
time,
Therefore, very little or no time must be wasted when
searching the words in the cache
The transformation of data from main memory to cache
memory is referred to as a mapping process, there are three
types of mapping:
Associative mapping
Direct mapping
Set-associative mapping
23
Cache memory
To help understand the mapping procedure, we have the
following example:
24
Associative mapping
The fastest and most flexible cache organization uses an
associative memory
The associative memory stores both the address and data of
the memory word
This permits any location in cache to store ant word from
main memory
25
Associative mapping
26
Associative mapping
A CPU address of 15 bits is places in the argument
register and the associative memory us searched for a
matching address
If the address is found, the corresponding 12-bits
data is read and sent to the CPU
If not, the main memory is accessed for the word
If the cache is full, an address-data pair must be
displaced to make room for a pair that is needed and
not presently in the cache
27
Direct Mapping
Associative memory is expensive compared to RAM
In general case, there are 2^k words in cache memory and
2^n words in main memory (in our case, k=9, n=15)
The n bit memory address is divided into two fields: k-bits
for the index and n-k bits for the tag field
28
Direct Mapping
29
Direct Mapping
30
Set-Associative Mapping
The disadvantage of direct mapping is that two
words with the same index in their address but with
different tag values cannot reside in cache memory at
the same time
31
Set-Associative Mapping
32
Set-Associative Mapping
In the slide, each index address refers to two data words
and their associated tags
Each tag requires six bits and each data word has 12 bits, so
the word length is 2*(6+12) = 36 bits
33
Outline
Memory Hierarchy
Cache
Cache performance
34
Cache performance
Although a single cache could try to supply instruction and
data, it can be a bottleneck.
35
Cache performance
One simple way to conquer this problem is to divide it:
36
Average memory access time
37
Average memory access time
Assume 40% of the instructions are data accessing
instruction.
Let a hit take 1 clock cycle and the miss penalty is 100 clock
cycle
Assume instruction miss rate is 4% and data access miss
rate is 12%, what is the average memory access time?
38
Average memory access time
60% * (1 + 4% * 100) +
40% * (1 + 12% * 100)
39
Memory Troubleshooting
RAM
The system board’s memory is a very serviceable
part of the system. RAM failures basically fall into
two major categories and create two different types
of failures. What are they?
If no fan speed
measurement is
shown, check to
see if the fan is
actually turning.
If not, you should
turn the system
off as soon as
possible, check
the operation of
the fan, and
replace it before
the processor is
damaged.
1 Long, 8 Short
TEST TIP
Know what type of failures hard- and
soft-memory errors are and how they
affect the system.
TEST
Be
TIP
aware of what can cause the
system to continually lose track of
time.
TEST TIP
Memorize the IBM-compatible
error codes.
TEST
TIP
Know the most common conditions
that will produce a keyboard error
message.
TEST TIP
Be aware that standard PS/2 6-pin
mini-DIN keyboards cannot be hot
swapped, and that doing so can
cause damage to the keyboard
and system board.
Devices Troubleshooting