Unit-3 Coa
Unit-3 Coa
Unit-3 Coa
MEMORY ORGANIZATION
Memory Hierarchy
Main Memory
I/O Processor
Cache Memory
Main Memory
The RAM integrated circuit chips are further classified into two
possible operating modes, static and dynamic.
RAM chips are available in a variety of sizes and are used as per
the system requirement. The following block diagram
demonstrates the chip interconnection in a 128 * 8 RAM chip.
A ROM memory is used for keeping programs and data that are
permanently resident in the computer.
ROM chips are also available in a variety of sizes and are also
used as per the system requirement. The following block
diagram demonstrates the chip interconnection in a 512 * 8
ROM chip.
Auxiliary Memory
Magnetic Disks
Magnetic Tape
Associative Memory
The cells present inside the memory array are marked by the
letter C with two subscripts. The first subscript gives the word
number and the second specifies the bit position in the word. For
instance, the cell Cij is the cell for bit j in word i.
Cache Memory
Prof. Nikita Ahuja
Department of Computer Sceince and Engineering
The data or contents of the main memory that are used
frequently by CPU are stored in the cache memory so that the
processor can easily access that data in a shorter time. Whenever
the CPU needs to access memory, it first checks the cache
memory. If the data is not found in cache memory, then the CPU
moves into the main memory.
Levels of memory:
Level 1
Level 2
It is the fastest memory which has faster access time where data
is temporarily stored for faster access.
Level 3
Level 4
Cache Mapping:
Prof. Nikita Ahuja
Department of Computer Sceince and Engineering
There are three different types of mapping used for the purpose
of cache memory which are as follows:
o Direct mapping,
o Associative mapping
o Set-Associative mapping
Direct Mapping -
The tag consists of the higher significant bits of the address and
these bits are stored with the data in cache. The index consists of
the lower significant b of the address. Whenever the memory is
referenced, the following sequence of events occurs
The index part in the address is used to access the cache and the
stored tag is compared with required tag address.
For a read operation, if the tags are same, the word within the
block is selected for transfer to the processor. If tags are not
same, the block containing the required word is first transferred
to the cache. In direct mapping, the corresponding blocks with
the same index in the main memory will map into the same
block in the cache, and hence only blocks with different indices
can be in the cache at the same time. It is important that all
words in the cache must have different indices. The tags may be
the same or different.
The tag address bits are always chosen to be the most significant
bits of the full address, the block address bits are the next
significant bits and the word/byte address bits are the least
significant bits. The number of comparators required in the set
associative cache is given by the number of blocks in a set. The
set can be selected quickly and all the blocks of the set can be
read out simultaneously with the tags before waiting for the tag
comparisons to be made. After a tag has been identified, the
corresponding block can be selected.
Cache Memory
Levels of memory:
Level 1
Level 2
It is the fastest memory which has faster access time where data
is temporarily stored for faster access.
Level 3
Cache Mapping:
There are three different types of mapping used for the purpose
of cache memory which are as follows:
o Direct mapping,
o Associative mapping
o Set-Associative mapping
Direct Mapping -
The tag consists of the higher significant bits of the address and
these bits are stored with the data in cache. The index consists of
the lower significant b of the address. Whenever the memory is
referenced, the following sequence of events occurs
The index part in the address is used to access the cache and the
stored tag is compared with required tag address.
For a read operation, if the tags are same, the word within the
block is selected for transfer to the processor. If tags are not
same, the block containing the required word is first transferred
to the cache. In direct mapping, the corresponding blocks with
the same index in the main memory will map into the same
block in the cache, and hence only blocks with different indices
can be in the cache at the same time. It is important that all
words in the cache must have different indices. The tags may be
the same or different.
The tag address bits are always chosen to be the most significant
bits of the full address, the block address bits are the next
significant bits and the word/byte address bits are the least
significant bits. The number of comparators required in the set
associative cache is given by the number of blocks in a set. The
set can be selected quickly and all the blocks of the set can be
read out simultaneously with the tags before waiting for the tag
comparisons to be made. After a tag has been identified, the
corresponding block can be selected.
Memory interleaving
If, at any point, the RAM space is needed for something more
urgent, data can be swapped out of RAM and into virtual
memory. The computer's memory manager is in charge of
keeping track of the shifts between physical and virtual memory.
If that data is needed again, the computer's MMU will use
a context switch to resume execution.
***********************************************