Addressing methods & machine program sequencing:
Memory locations
The Role of Memory Locations in Program ExecutionMemory Location.pptx
Memory Hierarchy
Key Characteristic of Computer Memory
system
The Role of Memory Locations in Program ExecutionMemory Location.pptx
Main Memory
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
Memory address Map
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
Associative Memory
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
Read Operation
Write Operation
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
Mapping Techniques
 1. Direct Mapping
 Each main memory block maps to only one specific cache line.
 Simple and fast but can lead to more conflicts.
 2. Associative Mapping (Fully Associative)
 Any block of main memory can go to any line in the cache.
 Very flexible but slower due to searching entire cache.
 3. Set-Associative Mapping
 Cache is divided into sets, and each set has multiple lines (ways).
 A block maps to a specific set but can go into any line within that set.
 Compromise between direct and associative mapping.
Comparison Table:
Feature Direct Mapping
Associative
Mapping
Set-Associative
Mapping
Flexibility Low High Medium
Speed Fast Slow Moderate
Hardware Cost Low High Medium
Conflict Misses High Low Low to Medium
Cache Initialization
Virtual Memory
Address Space and memory Space
How It Works
• The CPU generates a virtual address (used by the program).
• The Memory Management Unit (MMU) translates this into a physical address.
• If the data is in RAM it's accessed directly.
→
• If not in RAM it's in
→ secondary storage (e.g., hard disk or SSD), and the
system:
• Loads the data into RAM
• May remove some existing data from RAM to make space
• This process is called paging or swapping
Demand Paging Is Used
• Only the "active" or "frequently used" parts of a program are loaded into
RAM.
• The rest are stored in the page file / swap space on the disk (SSD or HDD).
• When needed, inactive parts (pages) are brought into RAM.
• If RAM is full, some unused pages are swapped out.
 This is called demand paging.
The Role of Memory Locations in Program ExecutionMemory Location.pptx
The Role of Memory Locations in Program ExecutionMemory Location.pptx
 Virtual Address Register (20 bits)
 The CPU generates a virtual address whenever a program accesses memory.
 This virtual address is stored in the Virtual Address Register.
 It is 20 bits wide, meaning the program can use up to 220=1,048,5762^{20} =
1,048,576220=1,048,576 memory locations (1 MB addressable space).
Memory Mapping Table
•This is the core of the translation system.
•It takes the virtual address as input and looks up the corresponding physical
address.
•You can think of it like a dictionary:
Virtual Address Physical Address
→
 Memory Table Buffer Register
 After translation, the result (physical address) is temporarily stored in this
buffer.
 This register acts as a bridge between the mapping table and the main
memory hardware.4.
 Main Memory Address Register (15 bits)
 It receives the 15-bit physical address from the buffer.
 Since it is 15 bits, it can access up to 215=32,7682 15 =32,768 locations 32
→
KB of physical memory.
 This shows that even if we have a large virtual space (1 MB), the actual
physical space is smaller (32 KB).
 Main Memory
 This is the physical memory (RAM) where data or instructions are stored.
 The address in the Main Memory Address Register is used to locate the
required word in memory.6.
 Main Memory Buffer Register
 Once the data is accessed from main memory, it is temporarily held in this
register before being sent to the CPU or I/O device.
CPU generates a 20-bit virtual address
The address goes into the memory mapping table.
The table converts it into a 15-bit physical address.
This address is stored in the main memory address
register.
Main memory is accessed at this physical address.
The data is fetched and placed in the main memory
buffer register.
 Advantages of Virtual Memory
 Efficient use of physical memory
 Enables multi-tasking
 Protects memory between processes
 Lets large programs run even on small RAM systems
 Disadvantages
 May cause slower performance if paging happens frequently (called thrashing)
 Requires additional hardware (MMU)

More Related Content

PPT
memory management and Virtual Memory.ppt
PPT
Cache replacement policies,cache miss,writingtechniques
DOCX
virtual memory
PPTX
Memory Management
PPTX
Computer organizatin.Chapter Seven.pptxs
PPTX
jdsbfvkjsdbfvbasibgvyisbvilawbvslaksbvlawbvrab
PPTX
Computer architecture virtual memory
PPTX
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx
memory management and Virtual Memory.ppt
Cache replacement policies,cache miss,writingtechniques
virtual memory
Memory Management
Computer organizatin.Chapter Seven.pptxs
jdsbfvkjsdbfvbasibgvyisbvilawbvslaksbvlawbvrab
Computer architecture virtual memory
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx

Similar to The Role of Memory Locations in Program ExecutionMemory Location.pptx (20)

PPTX
Paging +Algorithem+Segmentation+memory management
PPTX
Unit 5-lecture-2
PDF
lecture-2-3_Memory.pdf,describing memory
PPTX
5.6 Basic computer structure microprocessors
PPT
Memory+management
ODP
Unix Memory Management - Operating Systems
PPT
Ch9 OS
 
PPT
PPT
unit-4 class (2).ppt,Memory managements part-1
PPTX
Memory Managment(OS).pptx
PPT
Chapter 8 - Main Memory
PPT
Memory management
PDF
Operating system Memory management
PPT
Memory comp
DOCX
virtual memory - Computer operating system
PPTX
Memory Management in System Designing.pptx
PPTX
Unit 5Memory management.pptx
PPT
Virtual memory
Paging +Algorithem+Segmentation+memory management
Unit 5-lecture-2
lecture-2-3_Memory.pdf,describing memory
5.6 Basic computer structure microprocessors
Memory+management
Unix Memory Management - Operating Systems
Ch9 OS
 
unit-4 class (2).ppt,Memory managements part-1
Memory Managment(OS).pptx
Chapter 8 - Main Memory
Memory management
Operating system Memory management
Memory comp
virtual memory - Computer operating system
Memory Management in System Designing.pptx
Unit 5Memory management.pptx
Virtual memory
Ad

Recently uploaded (20)

PDF
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
PDF
Introduction to Machine Learning -Basic concepts,Models and Description
PPTX
Unit IILATHEACCESSORSANDATTACHMENTS.pptx
DOCX
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
PPT
Unit - I.lathemachnespct=ificationsand ppt
PPTX
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
PPTX
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
PPTX
SC Robotics Team Safety Training Presentation
PDF
B461227.pdf American Journal of Multidisciplinary Research and Review
PPT
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
PPT
Comprehensive Java Training Deck - Advanced topics
PDF
IAE-V2500 Engine Airbus Family A319/320
PPTX
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
PPTX
Real Estate Management PART 1.pptxFFFFFFFFFFFFF
PDF
BBC NW_Tech Facilities_30 Odd Yrs Ago [J].pdf
PDF
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
PPTX
IOP Unit 1.pptx for btech 1st year students
PDF
25AF1191PC303 MODULE-1 CHAIN SURVEYING SEMESTER III SURVEYING
PDF
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
PPTX
Unit IImachinemachinetoolopeartions.pptx
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
Introduction to Machine Learning -Basic concepts,Models and Description
Unit IILATHEACCESSORSANDATTACHMENTS.pptx
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
Unit - I.lathemachnespct=ificationsand ppt
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
SC Robotics Team Safety Training Presentation
B461227.pdf American Journal of Multidisciplinary Research and Review
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
Comprehensive Java Training Deck - Advanced topics
IAE-V2500 Engine Airbus Family A319/320
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
Real Estate Management PART 1.pptxFFFFFFFFFFFFF
BBC NW_Tech Facilities_30 Odd Yrs Ago [J].pdf
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
IOP Unit 1.pptx for btech 1st year students
25AF1191PC303 MODULE-1 CHAIN SURVEYING SEMESTER III SURVEYING
AIGA 012_04 Cleaning of equipment for oxygen service_reformat Jan 12.pdf
Unit IImachinemachinetoolopeartions.pptx
Ad

The Role of Memory Locations in Program ExecutionMemory Location.pptx

  • 1. Addressing methods & machine program sequencing: Memory locations
  • 4. Key Characteristic of Computer Memory system
  • 27.  1. Direct Mapping  Each main memory block maps to only one specific cache line.  Simple and fast but can lead to more conflicts.  2. Associative Mapping (Fully Associative)  Any block of main memory can go to any line in the cache.  Very flexible but slower due to searching entire cache.  3. Set-Associative Mapping  Cache is divided into sets, and each set has multiple lines (ways).  A block maps to a specific set but can go into any line within that set.  Compromise between direct and associative mapping.
  • 28. Comparison Table: Feature Direct Mapping Associative Mapping Set-Associative Mapping Flexibility Low High Medium Speed Fast Slow Moderate Hardware Cost Low High Medium Conflict Misses High Low Low to Medium
  • 31. Address Space and memory Space
  • 32. How It Works • The CPU generates a virtual address (used by the program). • The Memory Management Unit (MMU) translates this into a physical address. • If the data is in RAM it's accessed directly. → • If not in RAM it's in → secondary storage (e.g., hard disk or SSD), and the system: • Loads the data into RAM • May remove some existing data from RAM to make space • This process is called paging or swapping
  • 33. Demand Paging Is Used • Only the "active" or "frequently used" parts of a program are loaded into RAM. • The rest are stored in the page file / swap space on the disk (SSD or HDD). • When needed, inactive parts (pages) are brought into RAM. • If RAM is full, some unused pages are swapped out.  This is called demand paging.
  • 36.  Virtual Address Register (20 bits)  The CPU generates a virtual address whenever a program accesses memory.  This virtual address is stored in the Virtual Address Register.  It is 20 bits wide, meaning the program can use up to 220=1,048,5762^{20} = 1,048,576220=1,048,576 memory locations (1 MB addressable space). Memory Mapping Table •This is the core of the translation system. •It takes the virtual address as input and looks up the corresponding physical address. •You can think of it like a dictionary: Virtual Address Physical Address →
  • 37.  Memory Table Buffer Register  After translation, the result (physical address) is temporarily stored in this buffer.  This register acts as a bridge between the mapping table and the main memory hardware.4.  Main Memory Address Register (15 bits)  It receives the 15-bit physical address from the buffer.  Since it is 15 bits, it can access up to 215=32,7682 15 =32,768 locations 32 → KB of physical memory.  This shows that even if we have a large virtual space (1 MB), the actual physical space is smaller (32 KB).
  • 38.  Main Memory  This is the physical memory (RAM) where data or instructions are stored.  The address in the Main Memory Address Register is used to locate the required word in memory.6.  Main Memory Buffer Register  Once the data is accessed from main memory, it is temporarily held in this register before being sent to the CPU or I/O device.
  • 39. CPU generates a 20-bit virtual address The address goes into the memory mapping table. The table converts it into a 15-bit physical address. This address is stored in the main memory address register. Main memory is accessed at this physical address. The data is fetched and placed in the main memory buffer register.
  • 40.  Advantages of Virtual Memory  Efficient use of physical memory  Enables multi-tasking  Protects memory between processes  Lets large programs run even on small RAM systems  Disadvantages  May cause slower performance if paging happens frequently (called thrashing)  Requires additional hardware (MMU)