SlideShare a Scribd company logo
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
MEMORY ORGANIZATION
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
• Memory Hierarchy
• Main Memory
• Auxiliary Memory
• Associative Memory
• Cache Memory
• Virtual Memory
MEMORY ORGANIZATION
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Register
Cache
Main Memory
Magnetic Disk
Magnetic Tape
Storage
capacity------
Access
Time
--------
MEMORY ORGANIZATION
Computer System Memory Hierarchy
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Magnetic
tapes
Magnetic
disks
I/O
processor
CPU
Main
memory
Cache
memory
Auxiliary memory
Memory Hierarchy is to obtain highest possible access speed while minimizing the total cost of the memory system
MEMORY ORGANIZATION
Components In Memory Hierarchy
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
MAIN MEMORY RAM and ROM Chips
RAM chip Block Diagram
ROM chip Block Diagram
Chip select 1
Chip select 2
Read
Write
7-bit address
CS1
CS2
RD
WR
AD 7
128 x 8 RAM 8-bit data bus
CS1 CS2 RD WR
0 0 x x
0 1 x x
1 0 0 0
1 0 0 1
1 0 1 x
1 1 x x
Memory function
Inhibit
Inhibit
Inhibit
Write
Read
Inhibit
State of data bus
High-impedence
High-impedence
High-impedence
Input data to RAM
Output data from RAM
High-impedence
Chip select 1
Chip select 2
9-bit address
CS1
CS2
AD 9
512 x 8 ROM 8-bit data bus
Function Table
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
MEMORY ADDRESS MAP
RAM 1
RAM 2
RAM 3
RAM 4
ROM
0000 - 007F
0080 - 00FF
0100 - 017F
0180 - 01FF
0200 - 03FF
Component
Hexa
address
0 0 0 x x x x x x x
0 0 1 x x x x x x x
0 1 0 x x x x x x x
0 1 1 x x x x x x x
1 x x x x x x x x x
10 9 8 7 6 5 4 3 2 1
Address bus
Memory Connection to CPU
- RAM and ROM chips are connected to a CPU through the data and address buses
- The low-order lines in the address bus select the byte within the chips and other lines in the
address bus select a particular chip through its chip select inputs
Address space assignment to each memory chip
Example: 512 bytes RAM and 512 bytes ROM
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
}
CS1
CS2
RD
WR
AD7
128 x 8
RAM 1
CS1
CS2
RD
WR
AD7
128 x 8
RAM 2
CS1
CS2
RD
WR
AD7
128 x 8
RAM 3
CS1
CS2
RD
WR
AD7
128 x 8
RAM 4
Decoder
3 2 1 0
WR
RD
9 8 7-1
10
16-11
Address bus
Data bus
CPU
CS1
CS2 512 x 8
ROM
AD9
1- 7
9
8
Data
Data
Data
Data
Data
CONNECTION OF MEMORY TO CPU
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
CONNECTION OF MEMORY TO CPU
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Memory Address Mapping Table To CPU
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Auxiliary Memory
Magnetic Disks
Magnetic Tape
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Auxiliary Memory
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Auxiliary Memory
Magnetic Disks
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Auxiliary Memory Magnetic Tape
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Auxiliary Memory Magnetic Tape
Aditya Engineering College (A)
Computer Organization
Associative Memory
Content Addressable Memory (CAM).
Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Searching objects in memory.
Data-processing applications require the search of items in a table stored in memory.
Assembler program searches the symbol address table to extract the symbol's binary equivalent.
An account number may be searched in a file to determine the holder's name and account status.
The way to search a table is to store all items where they can be addressed in sequence.
Searching Strategy for choosing a sequence of addresses, reading the content of memory at each
address, and comparing the information read with the item being searched until a match
occurs.
The number of accesses to memory depends on the location of the item and the efficiency of the
search algorithm.
Search algorithms have been developed to minimize the number of accesses while searching for
an item in a random or sequential access memory
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
If stored data identified by the content of the data itself
- The time required to find an item in memory can be reduced.
Associative Memory or Content Addressable Memory (CAM).
-Accessed simultaneously and in parallel by data content rather than address.
Write Operation : No address is given When a word is written in an associative
memory, the memory is capable of finding an empty unused location to store the word.
Read Operation : The content of the word, or part of the word, is specified. When
a word is to be read from an associative memory
The memory locates all words which match the specified content and marks them for
reading
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Hardware Organization
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Three leftmost bits of A are compared with memory words because K has 1's in these positions.
Bit configuration of Argument register (A) Key register (K)
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Associative memory of m word, n cells per word
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
One cell of associative memory.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Match Logic
Boolean function
AND operation of all n terms.
We need m such functions, one for each word i = 1, 2, 3, ... , m.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Match logic for one word of associative memory.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Read Operation
Write Operation
Operations on Associative Memory
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Cache Memory
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Locality Of Reference : References to memory at given interval of time is
confined within few localized areas in memory.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Magnetic
tapes
Magnetic
disks
I/O
processor
CPU
Main
memory
Cache
memory
Auxiliary memory
Memory Hierarchy is to obtain highest possible access speed while minimizing the total cost of the memory system
MEMORY ORGANIZATION
Components In Memory Hierarchy
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Cache Memory Example
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
The basic characteristic of cache memory is its fast access
time.
The transformation of data from main memory to cache
memory is done by mapping process.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Hit Ratio: The performance of cache memory measured in terms
of quantity hit ratio.
The ratio of the number of hits divided by the total CPU
references (hits + misses) to memory.
Hit : the CPU finds the word in the cache
Miss : the word is not found in cache (CPU must read main
memory)
Performance Of Cache Memory
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Cache memory access time = 100 ns
main memory access time = 1000 ns and
hit ratio = 0.9
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Cache memory mapping techniques
1. Associative mapping
2. Direct mapping
3. Set associative mapping
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
The fastest and most flexible cache organization uses an associative memory
Associative mapping
The associative memory stores both the address and content (data) of
the memory word.
Any location in cache to store any word.
-any location in cache to store any word from main memory.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Associative mapping
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
How Cache Memory Works
Cache read operation
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Cache write operation
How Cache Memory Works
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
 Example
for (i=0; i<M; i++)
s = s + i;
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
 Example
for (i=0; i<M; i++)
for(j=0; j<N; j++)
X[i][j] = X[i][j] + K;
Each element of X is double (eight bytes)
Loop is executed (M*N) times
Placing the code in cache avoids access to main memory
Repetitive use (one of the factors)
Temporal locality
Prefetching data
Spatial locality
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Direct mapping
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Direct Mapping Cache Organization
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Hit ratio drop if two or more words whose addresses have the same
index but different tags are accessed repeatedly.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Direct mapping cache with block size of 8 words
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Set-Associative Mapping
Two way set .. associative mapping cache
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Virtual Memory
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
In a memory hierarchy programs and data are first stored in auxiliary
memory.
Portions of a program or data are brought into main memory as they
are needed by the CPU
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Virtual memory permit to construct programs as though a large memory
space were available, equal to the totality of auxiliary memory.
Each address that is referenced by the CPU goes through an address mapping
from virtual address to a physical address in main memory
Virtual memory provides a mechanism for translating programgenerated
addresses into correct main memory locations.
This is done dynamically, while programs are being executed in the CPU.
The translation is handled automatically by the hardware by a mapping table.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Address Space and Memory Space
An address used by a programmer will be called a virtual address.
The set of such addresses the address space.
The set of addresses generated by programs as they reference instructions and data
An address in main memory is called a location or physical address.
The set of such locations is called the memory space.
It consists actual main memory locations directly addressable for processing.
The address and memory spaces are identical.
The address space is allowed to be larger than the memory space in
computers with virtual memory.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Example for 1024k auxiliary memory and 32k main
memory
Address space =1024k Virtual address bits =20
Memory space = 32k Physical address bits =15
Programs and data are transferred to and from auxiliary memory and
main memory based on demands imposed by the CPU
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Mapping function Between virtual address space and physical address space
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Address Mapping Using Pages
The table implementation of the address mapping is simplified if the information in the
address space and the memory space are each divided into groups of fixed size.
The physical memory is broken down into groups of equal size called blocks, range from 64 to
4096 words each.
The term page refers to groups of address space of the same size.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Splitting Address Space into Pages
The mapping of virtual address is considered to be represented by two numbers:
i) Page number address
ii) Line (word) within the page.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Memory mapping table in a paged system
8K x 12 auxiliary memory and 4K x 12 main memory with block size = page size = 1k
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Memory mapping table in a paged system
8K x 12 auxiliary memory and 4K x 12 main memory with block size = page size = 1k
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Associative Memory Page Table
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Page fault and Replacement
Replacement algorithms
1. FIFO (First-In First-Out): Select the item has been in the Cache the longest.
2. LRU (Least Recently Used): Select the item that has been least recent used by CPU
3. Random Replacement: Select the item randomly.
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024
Aditya Engineering College (A)
Computer Organization Sunday, April 21, 2024

More Related Content

PPTX
Memory organization (Computer architecture)
Sandesh Jonchhe
 
PPTX
Cache memory ppt
Arpita Naik
 
PPTX
Intel x86 and ARM Data types
Rowena Cornejo
 
PPTX
Cache Memory
Subid Biswas
 
PPT
Cache memory and cache
VISHAL DONGA
 
PPTX
DDR SDRAMs
Prankit Mishra
 
PPTX
Addressing Modes
Mayank Garg
 
Memory organization (Computer architecture)
Sandesh Jonchhe
 
Cache memory ppt
Arpita Naik
 
Intel x86 and ARM Data types
Rowena Cornejo
 
Cache Memory
Subid Biswas
 
Cache memory and cache
VISHAL DONGA
 
DDR SDRAMs
Prankit Mishra
 
Addressing Modes
Mayank Garg
 

What's hot (20)

PPTX
Cache memory
Jay Prajapati
 
PPTX
PCI & ISA bus
Sushant Burde
 
PPTX
Bus aribration
Saiyam Agrawal
 
PPTX
Cache memory
Prasenjit Dey
 
PPTX
Networks software
Mukesh Chinta
 
PPT
Arbitration in computer organization
Amit kashyap
 
PPT
Cache memory
Muhammad Ishaq
 
PPTX
486 or 80486 DX Architecture
Muthusamy Arumugam
 
PDF
DDR4 SDRAM : Notes
Subhajit Sahu
 
PDF
Real-time applications on IntelXeon/Phi
Karel Ha
 
PPT
DDR2 SDRAM
Subash John
 
PDF
Memory organization
Dr. Abhineet Anand
 
PPTX
General Purpose Registers.pptx
VedantGhumade
 
PPT
Memory management ppt coa
Bharti Khemani
 
PPTX
Memory organization
ishapadhy
 
PDF
ARM AAE - Architecture
Anh Dung NGUYEN
 
PPT
Unit 4 memory system
chidabdu
 
PPTX
Pentium processor
Pranjali Deshmukh
 
PPTX
Introduction to arm processor
RAMPRAKASHT1
 
PPT
04 cache memory.ppt 1
Anwal Mirza
 
Cache memory
Jay Prajapati
 
PCI & ISA bus
Sushant Burde
 
Bus aribration
Saiyam Agrawal
 
Cache memory
Prasenjit Dey
 
Networks software
Mukesh Chinta
 
Arbitration in computer organization
Amit kashyap
 
Cache memory
Muhammad Ishaq
 
486 or 80486 DX Architecture
Muthusamy Arumugam
 
DDR4 SDRAM : Notes
Subhajit Sahu
 
Real-time applications on IntelXeon/Phi
Karel Ha
 
DDR2 SDRAM
Subash John
 
Memory organization
Dr. Abhineet Anand
 
General Purpose Registers.pptx
VedantGhumade
 
Memory management ppt coa
Bharti Khemani
 
Memory organization
ishapadhy
 
ARM AAE - Architecture
Anh Dung NGUYEN
 
Unit 4 memory system
chidabdu
 
Pentium processor
Pranjali Deshmukh
 
Introduction to arm processor
RAMPRAKASHT1
 
04 cache memory.ppt 1
Anwal Mirza
 
Ad

Similar to memory Organization in computer organization (20)

PPTX
Modern computer architecture presentation
aguptabestenglish
 
PPT
UNIT-4.ppt
Sri Latha
 
PPTX
CS304PC:Computer Organization and Architecture Session 29 Memory organization...
Guru Nanak Technical Institutions
 
PPTX
Memory Hierarchy
SoumadipDey1
 
PPT
Memory Organizationsssssssssssssssss.ppt
k2w9psdb96
 
PPTX
Chapter_07_Cache_Memory presentation.pptx
yohannestafete
 
PDF
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)
Beat Signer
 
PPTX
Unit_06_2_Cache_Memory.pptx
alwishariff
 
PDF
【AWS】Amazon DocumentDB (with MongoDB compatibility).pdf
blackangel52
 
PPT
Cache
Amit Roy
 
PPT
Memory organization and management in system.ppt
gnvivekananda4u
 
PPTX
Lec06 memory
Taras Zakharchenko
 
PPTX
UNIT-9 MEMORY ORGANIZATION OF COA..pptx
Sakina68859
 
PPTX
Lec08 optimizations
Taras Zakharchenko
 
PPTX
Lecture 41
RahulRathi94
 
PPTX
An Introduction to Amazon Aurora Cloud-native Relational Database
DataLeader.io
 
PDF
Deep Dive: Memory Management in Apache Spark
Databricks
 
PPTX
Lecture 42
RahulRathi94
 
PPS
Cache memory
Anuj Modi
 
Modern computer architecture presentation
aguptabestenglish
 
UNIT-4.ppt
Sri Latha
 
CS304PC:Computer Organization and Architecture Session 29 Memory organization...
Guru Nanak Technical Institutions
 
Memory Hierarchy
SoumadipDey1
 
Memory Organizationsssssssssssssssss.ppt
k2w9psdb96
 
Chapter_07_Cache_Memory presentation.pptx
yohannestafete
 
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)
Beat Signer
 
Unit_06_2_Cache_Memory.pptx
alwishariff
 
【AWS】Amazon DocumentDB (with MongoDB compatibility).pdf
blackangel52
 
Cache
Amit Roy
 
Memory organization and management in system.ppt
gnvivekananda4u
 
Lec06 memory
Taras Zakharchenko
 
UNIT-9 MEMORY ORGANIZATION OF COA..pptx
Sakina68859
 
Lec08 optimizations
Taras Zakharchenko
 
Lecture 41
RahulRathi94
 
An Introduction to Amazon Aurora Cloud-native Relational Database
DataLeader.io
 
Deep Dive: Memory Management in Apache Spark
Databricks
 
Lecture 42
RahulRathi94
 
Cache memory
Anuj Modi
 
Ad

More from michaelaaron25322 (14)

PPT
computer-system-architecture-morris-mano-220720124304-fefd641d.ppt
michaelaaron25322
 
PPTX
Python programming language introduction unit
michaelaaron25322
 
PPTX
EST is a software architectural style that was created to guide the design an...
michaelaaron25322
 
PPTX
Spring data jpa are used to develop spring applications
michaelaaron25322
 
PPTX
Python programming language introduction unit
michaelaaron25322
 
PPTX
Typescript language extension of java script
michaelaaron25322
 
PPTX
Unit-II AES Algorithm which is used machine learning
michaelaaron25322
 
PPT
UNIT2_NaiveBayes algorithms used in machine learning
michaelaaron25322
 
PPTX
Spring Data JPA USE FOR CREATING DATA JPA
michaelaaron25322
 
PPTX
Computer organization algorithms like addition and subtraction and multiplica...
michaelaaron25322
 
PPTX
mean stack
michaelaaron25322
 
PPT
karnaughmaprev1-130728135103-phpapp01.ppt
michaelaaron25322
 
PPT
booleanalgebra-140914001141-phpapp01 (1).ppt
michaelaaron25322
 
PPTX
mst_unit1.pptx
michaelaaron25322
 
computer-system-architecture-morris-mano-220720124304-fefd641d.ppt
michaelaaron25322
 
Python programming language introduction unit
michaelaaron25322
 
EST is a software architectural style that was created to guide the design an...
michaelaaron25322
 
Spring data jpa are used to develop spring applications
michaelaaron25322
 
Python programming language introduction unit
michaelaaron25322
 
Typescript language extension of java script
michaelaaron25322
 
Unit-II AES Algorithm which is used machine learning
michaelaaron25322
 
UNIT2_NaiveBayes algorithms used in machine learning
michaelaaron25322
 
Spring Data JPA USE FOR CREATING DATA JPA
michaelaaron25322
 
Computer organization algorithms like addition and subtraction and multiplica...
michaelaaron25322
 
mean stack
michaelaaron25322
 
karnaughmaprev1-130728135103-phpapp01.ppt
michaelaaron25322
 
booleanalgebra-140914001141-phpapp01 (1).ppt
michaelaaron25322
 
mst_unit1.pptx
michaelaaron25322
 

Recently uploaded (20)

PDF
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
PPTX
Tunnel Ventilation System in Kanpur Metro
220105053
 
PDF
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PPTX
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
PPT
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
PPT
Understanding the Key Components and Parts of a Drone System.ppt
Siva Reddy
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PDF
Zero Carbon Building Performance standard
BassemOsman1
 
PPTX
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PPTX
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
PPTX
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PPTX
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
PPTX
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PDF
Natural_Language_processing_Unit_I_notes.pdf
sanguleumeshit
 
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
Tunnel Ventilation System in Kanpur Metro
220105053
 
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
Understanding the Key Components and Parts of a Drone System.ppt
Siva Reddy
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
Zero Carbon Building Performance standard
BassemOsman1
 
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
Natural_Language_processing_Unit_I_notes.pdf
sanguleumeshit
 

memory Organization in computer organization

  • 1. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 MEMORY ORGANIZATION
  • 2. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024
  • 3. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 • Memory Hierarchy • Main Memory • Auxiliary Memory • Associative Memory • Cache Memory • Virtual Memory MEMORY ORGANIZATION
  • 4. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Register Cache Main Memory Magnetic Disk Magnetic Tape Storage capacity------ Access Time -------- MEMORY ORGANIZATION Computer System Memory Hierarchy
  • 5. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Magnetic tapes Magnetic disks I/O processor CPU Main memory Cache memory Auxiliary memory Memory Hierarchy is to obtain highest possible access speed while minimizing the total cost of the memory system MEMORY ORGANIZATION Components In Memory Hierarchy
  • 6. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 MAIN MEMORY RAM and ROM Chips RAM chip Block Diagram ROM chip Block Diagram Chip select 1 Chip select 2 Read Write 7-bit address CS1 CS2 RD WR AD 7 128 x 8 RAM 8-bit data bus CS1 CS2 RD WR 0 0 x x 0 1 x x 1 0 0 0 1 0 0 1 1 0 1 x 1 1 x x Memory function Inhibit Inhibit Inhibit Write Read Inhibit State of data bus High-impedence High-impedence High-impedence Input data to RAM Output data from RAM High-impedence Chip select 1 Chip select 2 9-bit address CS1 CS2 AD 9 512 x 8 ROM 8-bit data bus Function Table
  • 7. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 MEMORY ADDRESS MAP RAM 1 RAM 2 RAM 3 RAM 4 ROM 0000 - 007F 0080 - 00FF 0100 - 017F 0180 - 01FF 0200 - 03FF Component Hexa address 0 0 0 x x x x x x x 0 0 1 x x x x x x x 0 1 0 x x x x x x x 0 1 1 x x x x x x x 1 x x x x x x x x x 10 9 8 7 6 5 4 3 2 1 Address bus Memory Connection to CPU - RAM and ROM chips are connected to a CPU through the data and address buses - The low-order lines in the address bus select the byte within the chips and other lines in the address bus select a particular chip through its chip select inputs Address space assignment to each memory chip Example: 512 bytes RAM and 512 bytes ROM
  • 8. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 } CS1 CS2 RD WR AD7 128 x 8 RAM 1 CS1 CS2 RD WR AD7 128 x 8 RAM 2 CS1 CS2 RD WR AD7 128 x 8 RAM 3 CS1 CS2 RD WR AD7 128 x 8 RAM 4 Decoder 3 2 1 0 WR RD 9 8 7-1 10 16-11 Address bus Data bus CPU CS1 CS2 512 x 8 ROM AD9 1- 7 9 8 Data Data Data Data Data CONNECTION OF MEMORY TO CPU
  • 9. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 CONNECTION OF MEMORY TO CPU
  • 10. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Memory Address Mapping Table To CPU
  • 11. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Auxiliary Memory Magnetic Disks Magnetic Tape
  • 12. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Auxiliary Memory
  • 13. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Auxiliary Memory Magnetic Disks
  • 14. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024
  • 15. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Auxiliary Memory Magnetic Tape
  • 16. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Auxiliary Memory Magnetic Tape
  • 17. Aditya Engineering College (A) Computer Organization Associative Memory Content Addressable Memory (CAM). Sunday, April 21, 2024
  • 18. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Searching objects in memory. Data-processing applications require the search of items in a table stored in memory. Assembler program searches the symbol address table to extract the symbol's binary equivalent. An account number may be searched in a file to determine the holder's name and account status. The way to search a table is to store all items where they can be addressed in sequence. Searching Strategy for choosing a sequence of addresses, reading the content of memory at each address, and comparing the information read with the item being searched until a match occurs. The number of accesses to memory depends on the location of the item and the efficiency of the search algorithm. Search algorithms have been developed to minimize the number of accesses while searching for an item in a random or sequential access memory
  • 19. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 If stored data identified by the content of the data itself - The time required to find an item in memory can be reduced. Associative Memory or Content Addressable Memory (CAM). -Accessed simultaneously and in parallel by data content rather than address. Write Operation : No address is given When a word is written in an associative memory, the memory is capable of finding an empty unused location to store the word. Read Operation : The content of the word, or part of the word, is specified. When a word is to be read from an associative memory The memory locates all words which match the specified content and marks them for reading
  • 20. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Hardware Organization
  • 21. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Three leftmost bits of A are compared with memory words because K has 1's in these positions. Bit configuration of Argument register (A) Key register (K)
  • 22. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Associative memory of m word, n cells per word
  • 23. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 One cell of associative memory.
  • 24. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Match Logic Boolean function AND operation of all n terms. We need m such functions, one for each word i = 1, 2, 3, ... , m.
  • 25. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Match logic for one word of associative memory.
  • 26. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Read Operation Write Operation Operations on Associative Memory
  • 27. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Cache Memory
  • 28. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Locality Of Reference : References to memory at given interval of time is confined within few localized areas in memory.
  • 29. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Magnetic tapes Magnetic disks I/O processor CPU Main memory Cache memory Auxiliary memory Memory Hierarchy is to obtain highest possible access speed while minimizing the total cost of the memory system MEMORY ORGANIZATION Components In Memory Hierarchy
  • 30. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Cache Memory Example
  • 31. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 The basic characteristic of cache memory is its fast access time. The transformation of data from main memory to cache memory is done by mapping process.
  • 32. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Hit Ratio: The performance of cache memory measured in terms of quantity hit ratio. The ratio of the number of hits divided by the total CPU references (hits + misses) to memory. Hit : the CPU finds the word in the cache Miss : the word is not found in cache (CPU must read main memory) Performance Of Cache Memory
  • 33. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Cache memory access time = 100 ns main memory access time = 1000 ns and hit ratio = 0.9
  • 34. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Cache memory mapping techniques 1. Associative mapping 2. Direct mapping 3. Set associative mapping
  • 35. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 The fastest and most flexible cache organization uses an associative memory Associative mapping The associative memory stores both the address and content (data) of the memory word. Any location in cache to store any word. -any location in cache to store any word from main memory.
  • 36. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Associative mapping
  • 37. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 How Cache Memory Works Cache read operation
  • 38. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024
  • 39. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Cache write operation How Cache Memory Works
  • 40. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024  Example for (i=0; i<M; i++) s = s + i;
  • 41. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024  Example for (i=0; i<M; i++) for(j=0; j<N; j++) X[i][j] = X[i][j] + K; Each element of X is double (eight bytes) Loop is executed (M*N) times Placing the code in cache avoids access to main memory Repetitive use (one of the factors) Temporal locality Prefetching data Spatial locality
  • 42. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Direct mapping
  • 43. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Direct Mapping Cache Organization
  • 44. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Hit ratio drop if two or more words whose addresses have the same index but different tags are accessed repeatedly.
  • 45. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Direct mapping cache with block size of 8 words
  • 46. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Set-Associative Mapping Two way set .. associative mapping cache
  • 47. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Virtual Memory
  • 48. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 In a memory hierarchy programs and data are first stored in auxiliary memory. Portions of a program or data are brought into main memory as they are needed by the CPU
  • 49. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Virtual memory permit to construct programs as though a large memory space were available, equal to the totality of auxiliary memory. Each address that is referenced by the CPU goes through an address mapping from virtual address to a physical address in main memory Virtual memory provides a mechanism for translating programgenerated addresses into correct main memory locations. This is done dynamically, while programs are being executed in the CPU. The translation is handled automatically by the hardware by a mapping table.
  • 50. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Address Space and Memory Space An address used by a programmer will be called a virtual address. The set of such addresses the address space. The set of addresses generated by programs as they reference instructions and data An address in main memory is called a location or physical address. The set of such locations is called the memory space. It consists actual main memory locations directly addressable for processing. The address and memory spaces are identical. The address space is allowed to be larger than the memory space in computers with virtual memory.
  • 51. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Example for 1024k auxiliary memory and 32k main memory Address space =1024k Virtual address bits =20 Memory space = 32k Physical address bits =15 Programs and data are transferred to and from auxiliary memory and main memory based on demands imposed by the CPU
  • 52. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024
  • 53. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Mapping function Between virtual address space and physical address space
  • 54. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Address Mapping Using Pages The table implementation of the address mapping is simplified if the information in the address space and the memory space are each divided into groups of fixed size. The physical memory is broken down into groups of equal size called blocks, range from 64 to 4096 words each. The term page refers to groups of address space of the same size.
  • 55. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Splitting Address Space into Pages The mapping of virtual address is considered to be represented by two numbers: i) Page number address ii) Line (word) within the page.
  • 56. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Memory mapping table in a paged system 8K x 12 auxiliary memory and 4K x 12 main memory with block size = page size = 1k
  • 57. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Memory mapping table in a paged system 8K x 12 auxiliary memory and 4K x 12 main memory with block size = page size = 1k
  • 58. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Associative Memory Page Table
  • 59. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024 Page fault and Replacement Replacement algorithms 1. FIFO (First-In First-Out): Select the item has been in the Cache the longest. 2. LRU (Least Recently Used): Select the item that has been least recent used by CPU 3. Random Replacement: Select the item randomly.
  • 60. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024
  • 61. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024
  • 62. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024
  • 63. Aditya Engineering College (A) Computer Organization Sunday, April 21, 2024