Professional Documents
Culture Documents
MEMORY TYPES
2
1. RAM (random access memory)
Volatile, i.e. retains data as long as power is applied
Temporarily stores data
Used to store currently running programs
3
3. Hard Drive
Introduced in 1956 with a capacity of 5MB at a cost of $50,000 (now
several TBs are at <$200)
Mechanical drives that rely on a pin moving to magnetically read data
Lifespan: Theoretically infinite read/write capability
4
HD: 0.1-1.7 MBps SSD: 50-250 MBps
5
A. PROM: one-time field programmable
faster slower
Up to 32MB up 32GB
8
What happens when the RAM is full?
9
Virtual memory is a storage scheme that
provides user an illusion of having a very
big main memory. This is done by treating
a part of secondary memory as the main
memory.
10
What happens when a large file is transferred between
memories?
11
DMA Controller is a hardware device that allows
I/O devices to directly access memory with less
participation of the processor.
12
Burst Mode: In burst mode, the full data block is transmitted in a continuous
sequence. Burst mode totally hacks the system bus causing the CPU to be
inactive for a considerable long time.
Cycle Stealing Mode: used in a system where the CPU cannot be disabled for
the length of time required for the burst transfer mode. In the cycle stealing
mode, the DMA controller obtains the access to the system bus by using the BR
(Bus Request) and BG (Bus Grant) signals. These two signals control the
interface between the CPU and the DMA controller.
Transparent Mode: takes the longest time to transfer data blocks, but it is also
the most efficient mode in terms of overall system performance. In transparent
mode, the DMA controller transfers data only when the CPU performs
operations that do not use the system buses.
CPU never stops executing its programs
H/W needs to determine when CPU is not using the system buses,
which can be complicated.
13
2 MEMORY ADDRESSING
14
How are the various RAM chips addressed?
15
a) Address lines (AN…A0)
c) Read/Write Enable
16
a) Address lines:?? 15
b) Data lines:?? 8
c) Read/Write Enable
d) Chip Select
17
Assume a simple microprocessor with 10 address lines (1KB
memory) and we wish to implement all its memory space using
128x8 memory chips.
a) How many memory chips are needed?
b) How many address lines are needed to access any word in the
total memory?
c) How many address lines are common to all chips?
d) How many address line must be decoded for chip select?
e) What is the size of the decoder?
18
Assume a simple microprocessor with 10 address lines (1KB
memory) and we wish to implement all its memory space using
128x8 memory chips.
a) How many memory chips are needed?
b) How many address lines are needed to access any word in the
total memory?
c) How many address lines are common to all chips?
d) How many address line must be decoded for chip select?
e) What is the size of the decoder?
19
20
21
A computer system uses RAM chips of 256x8. The computer system
require 4K bytes of RAM
a) How many memory chips are needed?
b) How many address lines are needed to access any word in the
total memory?
c) How many address lines are common to all chips?
d) How many address line must be decoded for chip select?
e) What is the size of the decoder?
22
A computer system uses RAM chips of 256x8. The computer system
require 4K bytes of RAM
a) How many memory chips are needed? 16
b) How many address lines are needed to access any word in the
total memory?12
c) How many address lines are common to all chips? 8
d) How many address line must be decoded for chip select? 4
e) What is the size of the decoder? 4x16
23
A computer system has 20 address bits. It is required to design a
64kx8 ROM memory using 8kx8 ROM chips (IC No.: 2764) for
addresses F0000H to FFFFFH. (Slides)
a) How many ROM chips are needed? 8
b) How many address lines are common to all ROM chips? 16
c) What is the size of the decoder?3x8
24
25
A computer system has 12 address bits and 8 bits data. Available are
RAM chips of size 256Bytes.
a) What will be the required decoder size to build the complete
memory?4x16
b) Indicate the chip number and memory location to be accessed by the
address 0x4567H
26
A 16-data bits and 18-address bits computer system requires 128kB
of RAM and 64kB of ROM using 32kB RAM chips and 16kB
ROM chips. (Slides)
a) How many RAM chips are needed? 4
b) How many address lines are common to all RAM chips? 17
c) How many ROM chips are needed? 4
d) How many address lines are common to all ROM chips? 16
e) What is the size of the decoder?3x8
27
The memory system for the 8086 that contains a 64K byte EROM and 128K byte SRAM 28
3 CACHE MEMORY
29
Registers B
1. Speed Inside or
2. Cost close to CPU
Cache (~MB )
RAM (~GB)
Outside
CPU
Hard Disk (~ TB)
30
Why do we use a memory hierarchy in computers?
31
Why do we use a memory hierarchy in computers?
32
Cache memory is an extremely fast memory that
acts as a buffer between RAM and the CPU.
https://www.geeksforgeeks.org/cache-memory-in-computer-organization/
33
Cache memory is used to reduce the average time
to access data from the main memory (RAM).
35
When the processor needs to read or write a location in
main memory, it first checks for a corresponding entry in
the cache.
Cache hit: processor finds that the memory location is in
the cache, and data is read from cache.
Cache miss: processor does not find the memory
location in the cache. For a cache miss, the cache gets a
copy of the data from the main memory, then the
request is fulfilled from the contents of the cache.
36
The performance of cache memory is frequently
measured of the hit ratio:
37