SlideShare a Scribd company logo
1 of 8
Memory Organization 1 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Overview
 Memory Hierarchy
 Main Memory
 Auxiliary Memory
 Associative Memory
 Cache Memory
 Virtual Memory
 Memory Mgt Hardware
Memory Organization 2 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Memory Mgt Hardware
Basic Functions of MM
- Dynamic Storage Relocation - mapping logical memory references to physical
memory references
- Provision for Sharing common information stored in memory by different users
- Protection of information against unauthorized access
Segmentation
- A segment is a set of logically related instructions or data elements associated with a
given name
- Variable size
User's view of memory
User's view of a program
The user does not think of
memory as a linear array
of words. Rather the user
prefers to view memory as
a collection of variable
sized segments, with no
necessary ordering among
segments.
Subroutine
Stack
SQRT
Main
Program
Symbol
Table
Memory Organization 3 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Segmentation
- A memory management scheme which supports user's view of memory
- A logical address space is a collection of segments
- Each segment has a name and a length
- Address specify both the segment name and the offset within the segment.
- For simplicity of implementations, segments are numbered.
Segmentation Hardware
<
Segment Table
limit base
(s,d)
s
Memory
+
y
n
error
CPU
Memory Organization 4 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Segmentation Example
Subroutine
Segment 0
Stack
Segment 3
SQRT
Segment 1 Main
Program
Segment 2
Symbol
Table
Segment 4
Segment 0
Segment 3
Segment 2
Segment 4
Segment 1
1400
2400
3200
4300
4700
5700
6300
6700Segment Table
1000 1400
400 6300
400 4300
1100 3200
1000 4700
limit base
0
1
2
3
4
Logical Address Space
Memory Organization 5 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Sharing of Segmentation
Editor
Segment 0
Data 1
Segment 1
Logical Memory
(User 1)
Editor
Segment 0
Data 2
Segment 1
Logical Memory
(User 2)
Editor
43062
Data 1
68348
72773
90003
98556
Data 2
25286 43062
4425 68348
limit base
0
1
Segment Table
(User 1)
25286 43062
8550 90003
limit base
0
1
Segment Table
(User 2)
Physical Memory
Memory Organization 6 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Segmented Page System
Segment Page Word
Segment table Page table
+
Block Word
Logical address
Physical address
Memory Organization 7 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Implementation of Page and Segment table
Implementation of the Page Table
- Hardware registers (if the page table is reasonably small)
- Main memory
Implementation of the Segment Table
Similar to the case of the page table
- Cache memory (TLB: Translation Lookaside Buffer)
- To speedup the effective memory access time,
a special small memory called associative
memory, or cache is used
- Page Table Base Register(PTBR) points to PT
- Two memory accesses are needed to access
a word; one for the page table, one for the word
Memory Organization 8 Lecture 44
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Example
Logical and Physical Addresses
Logical and Physical Memory Address Assignment
Segment Page Word
4 8 8
Block Word
12 8
Physical address format: 4096 blocks of 256 words
each, each word has 32bits
2 x 32
Physical
memory
20
Logical address format: 16 segments of 256 pages
each, each page has 256words
Hexa
address Page number
Page 0
Page 1
Page 2
Page 3
Page 4
60000
60100
60200
60300
60400
604FF
Segment Page Block
6 00 012
6 01 000
6 02 019
6 03 053
6 04 A61
(a) Logical address assignment (b) Segment-page versus
memory block assignment

More Related Content

What's hot

Introduction of Memory Management
Introduction of Memory Management Introduction of Memory Management
Introduction of Memory Management Maitree Patel
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.Muhammad SiRaj Munir
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organizationMuhammad Ishaq
 
Assignment#1 Mapacpac, F M P (Cs3112 Os)
Assignment#1 Mapacpac, F M P  (Cs3112 Os)Assignment#1 Mapacpac, F M P  (Cs3112 Os)
Assignment#1 Mapacpac, F M P (Cs3112 Os)dyandmy
 
Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)myanddy
 
Chapter 8 : Memory
Chapter 8 : MemoryChapter 8 : Memory
Chapter 8 : MemoryAmin Omi
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System ArchitectureBrenda Debra
 
Basic Computer Architecture
Basic Computer ArchitectureBasic Computer Architecture
Basic Computer ArchitectureYong Heui Cho
 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systemsMybej Che
 
Control Unit (CU) – Part 2
Control Unit (CU) – Part 2Control Unit (CU) – Part 2
Control Unit (CU) – Part 2Ajeng Savitri
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating SystemRaj Mohan
 
PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)Fizaril Amzari Omar
 
Operating Systems Part III-Memory Management
Operating Systems Part III-Memory ManagementOperating Systems Part III-Memory Management
Operating Systems Part III-Memory ManagementAjit Nayak
 

What's hot (20)

Introduction of Memory Management
Introduction of Memory Management Introduction of Memory Management
Introduction of Memory Management
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
 
INSTRUCTION SET
INSTRUCTION SETINSTRUCTION SET
INSTRUCTION SET
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
 
Assignment#1 Mapacpac, F M P (Cs3112 Os)
Assignment#1 Mapacpac, F M P  (Cs3112 Os)Assignment#1 Mapacpac, F M P  (Cs3112 Os)
Assignment#1 Mapacpac, F M P (Cs3112 Os)
 
Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)
 
Chapter 8 : Memory
Chapter 8 : MemoryChapter 8 : Memory
Chapter 8 : Memory
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
 
Basic Computer Architecture
Basic Computer ArchitectureBasic Computer Architecture
Basic Computer Architecture
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systems
 
Memory management
Memory managementMemory management
Memory management
 
Control Unit (CU) – Part 2
Control Unit (CU) – Part 2Control Unit (CU) – Part 2
Control Unit (CU) – Part 2
 
Oak 0-2011
Oak 0-2011Oak 0-2011
Oak 0-2011
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Unit 5-lecture-2
Unit 5-lecture-2Unit 5-lecture-2
Unit 5-lecture-2
 
Memory management
Memory managementMemory management
Memory management
 
PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)
 
Memory management
Memory managementMemory management
Memory management
 
Operating Systems Part III-Memory Management
Operating Systems Part III-Memory ManagementOperating Systems Part III-Memory Management
Operating Systems Part III-Memory Management
 

Viewers also liked (7)

Lecture 40
Lecture 40Lecture 40
Lecture 40
 
Lecture 46
Lecture 46Lecture 46
Lecture 46
 
Lecture 25
Lecture 25Lecture 25
Lecture 25
 
Magnetic tape
Magnetic tapeMagnetic tape
Magnetic tape
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Lecture 27
Lecture 27Lecture 27
Lecture 27
 
Lecture 47
Lecture 47Lecture 47
Lecture 47
 

Similar to Lecture 44

Similar to Lecture 44 (20)

Memory Management in Operating System
Memory Management in Operating SystemMemory Management in Operating System
Memory Management in Operating System
 
Ch8
Ch8Ch8
Ch8
 
Chapter 9 OS
Chapter 9 OSChapter 9 OS
Chapter 9 OS
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
 
Main memory os - prashant odhavani- 160920107003
Main memory   os - prashant odhavani- 160920107003Main memory   os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003
 
Cache memory
Cache memoryCache memory
Cache memory
 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Management
 
Paging
PagingPaging
Paging
 
Unit 5Memory management.pptx
Unit 5Memory management.pptxUnit 5Memory management.pptx
Unit 5Memory management.pptx
 
Main Memory
Main MemoryMain Memory
Main Memory
 
Operating system 34 contiguous allocation
Operating system 34 contiguous allocationOperating system 34 contiguous allocation
Operating system 34 contiguous allocation
 
Architecture and implementation issues of multi core processors and caching –...
Architecture and implementation issues of multi core processors and caching –...Architecture and implementation issues of multi core processors and caching –...
Architecture and implementation issues of multi core processors and caching –...
 
Implementing sorting in database systems
Implementing sorting in database systemsImplementing sorting in database systems
Implementing sorting in database systems
 
Memory Management
Memory Management Memory Management
Memory Management
 
Design of file system architecture with cluster
Design of file system architecture with clusterDesign of file system architecture with cluster
Design of file system architecture with cluster
 
Memory management OS
Memory management OSMemory management OS
Memory management OS
 
Module 4 memory management
Module 4 memory managementModule 4 memory management
Module 4 memory management
 
Bab 4
Bab 4Bab 4
Bab 4
 
OSCh9
OSCh9OSCh9
OSCh9
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
 

More from RahulRathi94 (20)

Lecture 39
Lecture 39Lecture 39
Lecture 39
 
Lecture 38
Lecture 38Lecture 38
Lecture 38
 
Lecture 37
Lecture 37Lecture 37
Lecture 37
 
Lecture 36
Lecture 36Lecture 36
Lecture 36
 
Lecture 35
Lecture 35Lecture 35
Lecture 35
 
Lecture 34
Lecture 34Lecture 34
Lecture 34
 
Lecture 28
Lecture 28Lecture 28
Lecture 28
 
Lecture 26
Lecture 26Lecture 26
Lecture 26
 
Lecture 24
Lecture 24Lecture 24
Lecture 24
 
Lecture 23
Lecture 23Lecture 23
Lecture 23
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 
Lecture 20
Lecture 20Lecture 20
Lecture 20
 
Lecture 19
Lecture 19Lecture 19
Lecture 19
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 

Recently uploaded

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Lecture 44

  • 1. Memory Organization 1 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Overview  Memory Hierarchy  Main Memory  Auxiliary Memory  Associative Memory  Cache Memory  Virtual Memory  Memory Mgt Hardware
  • 2. Memory Organization 2 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Memory Mgt Hardware Basic Functions of MM - Dynamic Storage Relocation - mapping logical memory references to physical memory references - Provision for Sharing common information stored in memory by different users - Protection of information against unauthorized access Segmentation - A segment is a set of logically related instructions or data elements associated with a given name - Variable size User's view of memory User's view of a program The user does not think of memory as a linear array of words. Rather the user prefers to view memory as a collection of variable sized segments, with no necessary ordering among segments. Subroutine Stack SQRT Main Program Symbol Table
  • 3. Memory Organization 3 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Segmentation - A memory management scheme which supports user's view of memory - A logical address space is a collection of segments - Each segment has a name and a length - Address specify both the segment name and the offset within the segment. - For simplicity of implementations, segments are numbered. Segmentation Hardware < Segment Table limit base (s,d) s Memory + y n error CPU
  • 4. Memory Organization 4 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Segmentation Example Subroutine Segment 0 Stack Segment 3 SQRT Segment 1 Main Program Segment 2 Symbol Table Segment 4 Segment 0 Segment 3 Segment 2 Segment 4 Segment 1 1400 2400 3200 4300 4700 5700 6300 6700Segment Table 1000 1400 400 6300 400 4300 1100 3200 1000 4700 limit base 0 1 2 3 4 Logical Address Space
  • 5. Memory Organization 5 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Sharing of Segmentation Editor Segment 0 Data 1 Segment 1 Logical Memory (User 1) Editor Segment 0 Data 2 Segment 1 Logical Memory (User 2) Editor 43062 Data 1 68348 72773 90003 98556 Data 2 25286 43062 4425 68348 limit base 0 1 Segment Table (User 1) 25286 43062 8550 90003 limit base 0 1 Segment Table (User 2) Physical Memory
  • 6. Memory Organization 6 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Segmented Page System Segment Page Word Segment table Page table + Block Word Logical address Physical address
  • 7. Memory Organization 7 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Implementation of Page and Segment table Implementation of the Page Table - Hardware registers (if the page table is reasonably small) - Main memory Implementation of the Segment Table Similar to the case of the page table - Cache memory (TLB: Translation Lookaside Buffer) - To speedup the effective memory access time, a special small memory called associative memory, or cache is used - Page Table Base Register(PTBR) points to PT - Two memory accesses are needed to access a word; one for the page table, one for the word
  • 8. Memory Organization 8 Lecture 44 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Example Logical and Physical Addresses Logical and Physical Memory Address Assignment Segment Page Word 4 8 8 Block Word 12 8 Physical address format: 4096 blocks of 256 words each, each word has 32bits 2 x 32 Physical memory 20 Logical address format: 16 segments of 256 pages each, each page has 256words Hexa address Page number Page 0 Page 1 Page 2 Page 3 Page 4 60000 60100 60200 60300 60400 604FF Segment Page Block 6 00 012 6 01 000 6 02 019 6 03 053 6 04 A61 (a) Logical address assignment (b) Segment-page versus memory block assignment