COA Unit 4 Computer Memory System RRP
COA Unit 4 Computer Memory System RRP
1 04/06/2025
Computer organization and
Architecture
2 04/06/2025
Computer organization and
Architecture
• Internal Memory-
• Semiconductor main memory
• Advanced DRAM organization
• External Memory-
• Hard Disk organization
• RAID- level 1 to level 6.
5 04/06/2025
Requirements of Memory
Management System
• Memory distribution: The system must be able to distribute
memory to processes as needed. Additionally, the system
must make sure that memory is allocated as effectively as
possible in order to reduce fragmentation.
• Memory security: The system must prevent other processes
from improperly accessing the memory allotted to each
process. Furthermore, it should make sure that processes are
unable to alter memory that does not belong to them.
• Deallocating memory: The system must be able to release
memory that is no longer required by a running process. This
involves restoring RAM to the system after it has been freed
up and is no longer needed.
6 04/06/2025
• Memory sharing: The system need to permit processes to
share memory.
Requirements of Memory
Management System
• Virtual memory: The system must be capable of offering virtual
memory, which enables programmes to access more memory
than is physically accessible. By switching data between the RAM
and the hard drive, this is accomplished.
• Memory fragmentation can happen when memory is frequently
allocated and deallocated; the system should avoid this.
Fragmentation might result in memory usage that is wasteful and
slow down the system.
• Memory mapping: The system ought to support memory
mapping, which permits the mapping of files to memory. As data
can be read and written directly from memory, this may speed up
file I/O processes.
• Memory
7 leaks are caused when a process04/06/2025
fails to deallocate
memory that it no longer requires. The system should be able to
identify and prevent memory leaks.
Characteristics of memory
system
8 04/06/2025
• Memory originated from Latin called ‘Memor’
means mindful, remembering.
• The term Location refers to whether
memory is Internal or External to the
computer.
• An obvious characteristic of memory is its
Capacity.
• For Internal memory, this is typically
expressed in terms of bytes (1 byte = 8 bits)
or words. Common word lengths are 8, 16,
and 32 bits.
• External memory capacity is typically
expressed in terms of Bytes, Megabytes,
Gigabytes
9
or more. 04/06/2025
• A related concept is the unit of transfer. For
internal memory, the unit of transfer is equal
to the number of data lines into and out of the
memory module.
• Word: The “natural” unit of organization of memory.
The size of a word is typically equal to the number of
bits used to represent an integer and to the
instruction length. Eg. Intel processors uses 8 bits to
represent a number.
14 04/06/2025
• For random-access memory, the
Organization is a key design issue.
15 04/06/2025
The Memory Hierarchy
• The design constraints on a computer’s
memory can be summed up by three
questions:
• How much?
• How fast?
• How expensive?
• So there are three key characteristics of
memory:
• Capacity
• Access Time
• Cost.
16 04/06/2025
• According to the characteristics of a memory,
A variety of technologies are used to
implement memory systems.
17 04/06/2025
18 Fig: The Memory Hierarchy 04/06/2025
• As one goes down the hierarchy, the
following occur:
• Increasing capacity.
19 04/06/2025
Cache Memory
• Cache Memory Principles
33 04/06/2025
• Cache Organization
34 04/06/2025
• Example: Smart Cache of i-Series…
(core-i3)
• L1 cache: 32 kb Instructions cache +32 kb data cache
35 04/06/2025
• Cache/Main Memory Structure
36 04/06/2025
• Cache Operation – Overview
• CPU requests contents of memory location.
• Check cache for this data.
• If present, get from cache (fast).
• If not present, read required block from main
memory to cache.
• Then deliver from cache to CPU.
• Cache includes tags to identify which block of
main memory is in each cache slot.
37 04/06/2025
• Cache Read Operation - Flowchart
38 04/06/2025
• Typical Cache Organization
39 04/06/2025
• Elements of Cache Design
40 04/06/2025
• Cache Addresses
• Two types of Addresses:
1. Logical Cache:
• When virtual addresses are used, the system
designer may choose to place the cache between the
processor and the MMU or between the MMU and
main memory. A Logical Cache, also known as a
Virtual Cache, stores data using Virtual
Addresses.
41 04/06/2025
2. Physical Cache: The processor accesses the cache
directly, without going through the MMU. A physical
cache stores data using main memory Physical
Addresses.
42 04/06/2025
• Cache Size
• We would like the size of the cache like this:
43 04/06/2025
• The larger the cache, the larger the
number of gates involved in addressing
the cache.
i = j modulo m
• where
• i = cache line number
• j = main memory block number
• m = number of lines in the cache
46 04/06/2025
• Direct Mapping from Cache to Main
Memory
47 04/06/2025
• Disadvantage
• Its main disadvantage is that there is a
fixed cache location for any given block.
48 04/06/2025
• Example
49 04/06/2025
50 04/06/2025
51 04/06/2025
The effect of this mapping is that blocks of main
memory are assigned to lines of the cache as
follows:
52 04/06/2025
2. Associative Mapping
53 04/06/2025
54 04/06/2025
Fully Associative Cache Organization
55 04/06/2025
• Disadvantage
• The principal disadvantage of associative
mapping is the complex circuitry required to
examine the tags of all cache lines in
parallel.
56 04/06/2025
3. Set-associative Mapping
• Set-associative mapping uses strengths of both
the direct and associative approaches while
reducing their disadvantages.
• In this case, the cache consists of a number sets,
each of which consists of a number of lines. The
relationships are-
m=v*k
i = j modulo v
• i = cache set number
• j = main memory block number
• m = number of lines in the cache
• v = number of sets
• k = 57number of lines in each set 04/06/2025
58 04/06/2025
59 04/06/2025
Its 2018!!
don’t
forget me.
I am
coming….
60 04/06/2025
61 04/06/2025
Don’t
forget
me…
62 04/06/2025
• Currently the largest capacity hard drive(SSD)
63 04/06/2025
• Servers of different companies
Microsoft Google
64 04/06/2025
• Servers of different companies
65 04/06/2025
End of Unit-II
Thank you!
66 04/06/2025