SlideShare a Scribd company logo
MEMORY MANAGEMENT
1 | P a g e
1. Hardware Implementation Of Page Table
2. Types of page tables
Submitted by:
Sukhraj singh
449/12
1241916
MEMORY MANAGEMENT
2 | P a g e
HARDWARE IMPLEMENTATION OF PAGE TABLE
When Page Table Is Reasonably Small
1. In this case page table is implemented by the use of dedicated registers.
2. As every memory access go through the paging map, these registers should be
built with very high speed logic to make the paging address translation efficient.
3. Brief working: the CPU dispatcher reloads these registers just as it reloads the
other register .instructions to load or modify the page table registers are only in the
hand of operating system that can change the memory map
4. Example: DEC PDP-11 is the example of such an architecture as its address
consists of 16 bits , and the page size is 8kb .the page table thus consist of eight
entries that are kept in fast register .
Thus the use of registers for the page table is satisfactory if page table is small
like 256 entries
When Page Table Is Very Large
1. Use of fast registers not feasible
2. Page table is kept in main memory and there is Page-table base register (PTBR)
that points to the page table. Page-table length register (PRLR) indicates size of
the page table.
Advantage: changing page tables requires changing only one register , as a result
the context switch time reduces.
Disadvantage: In this scheme every data/instruction access requires two memory
accesses. One for the page table and one for the data/instruction thus the memory
access is slowed by the factor of two. this delay would be intolerable under most
circumstances.
MEMORY MANAGEMENT
3 | P a g e
3.The problem is solved using translation look –aside buffer (TLB)
4. The CPU's memory management unit (MMU) stores a cache of recently used
mappings from the operating system's page table. This is called the translation look
a side buffer (TLB).
5. The TLB is associative, high speed memory . each entry in TLB consists of two
parts : a key and a value. When associative memory is presented with an item is
compared with all keys simultaneously. If the item is found, the corresponding
value field is returned .
6. The seach is fast ,the hardware is expensive .
7.Working With Translation Look –Aside Buffer (TLB): the TLB contains only
a few of the page table entries . when a logical address is generated by the CPU ,
its page number is presented to the TLB . if the page number is found , its frame
number is immediately available and is used to access memory . if the page
number is not in TLB (known as TLB miss ), a memory reference to the page table
must be made . When the frame number is obtained , we can use it to access
memory . in addition , we add the page number and frame number to the tlb , so
they will be found quickly on next reference.
MEMORY MANAGEMENT
4 | P a g e
EXAMPLE SHOWING WORKING OF TLB
MEMORY MANAGEMENT
5 | P a g e
MEMORY MANAGEMENT
6 | P a g e
MEMORY MANAGEMENT
7 | P a g e
MEMORY MANAGEMENT
8 | P a g e
TYPES OF PAGE TABLE
Hierarchical Page Tables:
1.also Known as Multilevel Paging
2.The page table might be too big to fit in a contiguous space, so we may have a
hierarchy with several levels
3.Break up the logical address space into multiple page tables.
A simple technique is a two-level page table, three-level page table
Example :
Two-Level Paging Example
A logical address (on 32-bit machine with 4K page size) is divided into:
 a page number consisting of 20 bits.
 a page offset consisting of 12 bits.
Since the page table is paged, the page number is further divided into:
 a 10-bit page number.
 a 10-bit page offset.
Thus, a logical address is as follows:
where pi is an index into the outer page table, and p2 is the displacement within
the page of the outer page table.
MEMORY MANAGEMENT
9 | P a g e
Fig: Address-translation scheme for a two-level 32-bit paging architecture
Hash page table
1.Common in address spaces > 32 bits.
2.The virtual page number is hashed into a page table. This page table contains a chain of
elements hashing to the same location.
3.Each element consists of three fields:
(1) the virtual page number,
(2) the value of the mapped page frame,
(3) a pointer to the next element in the linked list.
4.Virtual page numbers are compared in this chain searching for a match. If a match is found,
the corresponding physical frame is extracted.
MEMORY MANAGEMENT
10 | P a g e
Inverted Page Table
1. The inverted page table (IPT) combines a page table and a frame table into one data
structure.
2. One entry for each virtual page number & real page of memory.
3. Entry consists of the virtual address of the page stored in that real memory location, with
information about the process that owns that page.
Advantage: Decreases memory needed to store each page table
Disadvantage :
1. Increases time needed to search the table when a page reference occurs.
2. There is only one virtual page entry for every physical page, one physical page cannot have
two (or more) shared virtual addresses.
Fig: Inverted Page Table Architecture
Ad

More Related Content

What's hot (20)

Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
Damian T. Gordon
 
GOOGLE FILE SYSTEM
GOOGLE FILE SYSTEMGOOGLE FILE SYSTEM
GOOGLE FILE SYSTEM
JYoTHiSH o.s
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
Pooja Dixit
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
sangrampatil81
 
ch10 Mass Storage Structure .ppt
ch10 Mass Storage Structure .pptch10 Mass Storage Structure .ppt
ch10 Mass Storage Structure .ppt
Mariam749277
 
Cache memory
Cache memoryCache memory
Cache memory
Ansari Maviya
 
Memory management
Memory managementMemory management
Memory management
Rajni Sirohi
 
Translation lookaside buffer
Translation lookaside bufferTranslation lookaside buffer
Translation lookaside buffer
Chetan Mahawar
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
Piyush Rochwani
 
File organisation
File organisationFile organisation
File organisation
Mukund Trivedi
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
Maulik Togadiya
 
RAID
RAIDRAID
RAID
Mukesh Tekwani
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
File Organization
File OrganizationFile Organization
File Organization
RAMPRAKASH REDDY ARAVA
 
raid technology
raid technologyraid technology
raid technology
Mangukiya Maulik
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 
Feng’s classification
Feng’s classificationFeng’s classification
Feng’s classification
Narayan Kandel
 
Address Binding Scheme
Address Binding SchemeAddress Binding Scheme
Address Binding Scheme
Rajesh Piryani
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
United International University
 
Transport layer
Transport layerTransport layer
Transport layer
reshmadayma
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
Damian T. Gordon
 
GOOGLE FILE SYSTEM
GOOGLE FILE SYSTEMGOOGLE FILE SYSTEM
GOOGLE FILE SYSTEM
JYoTHiSH o.s
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
Pooja Dixit
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
sangrampatil81
 
ch10 Mass Storage Structure .ppt
ch10 Mass Storage Structure .pptch10 Mass Storage Structure .ppt
ch10 Mass Storage Structure .ppt
Mariam749277
 
Translation lookaside buffer
Translation lookaside bufferTranslation lookaside buffer
Translation lookaside buffer
Chetan Mahawar
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
Maulik Togadiya
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 
Feng’s classification
Feng’s classificationFeng’s classification
Feng’s classification
Narayan Kandel
 
Address Binding Scheme
Address Binding SchemeAddress Binding Scheme
Address Binding Scheme
Rajesh Piryani
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
United International University
 

Similar to Hardware implementation of page table (20)

Csc4320 chapter 8 2
Csc4320 chapter 8 2Csc4320 chapter 8 2
Csc4320 chapter 8 2
bshikhar13
 
Ppt
PptPpt
Ppt
Tejal Kasture
 
Memory Management
Memory ManagementMemory Management
Memory Management
Ramasubbu .P
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
Google
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
Harika Pudugosula
 
Cache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniquesCache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniques
subhasishdas79
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
Drishti Bhalla
 
OS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptxOS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptx
Pankaj Debbarma
 
Os4
Os4Os4
Os4
gopal10scs185
 
Os4
Os4Os4
Os4
gopal10scs185
 
Deco_Module 4.5_Virtual Memory.pptg kghgohg
Deco_Module 4.5_Virtual Memory.pptg kghgohgDeco_Module 4.5_Virtual Memory.pptg kghgohg
Deco_Module 4.5_Virtual Memory.pptg kghgohg
ChetanyaChopra1
 
Memory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdfMemory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdf
Harika Pudugosula
 
Operating System- Multilevel Paging, Inverted Page Table
Operating System- Multilevel Paging, Inverted Page TableOperating System- Multilevel Paging, Inverted Page Table
Operating System- Multilevel Paging, Inverted Page Table
Zishan Mohsin
 
Computer memory management
Computer memory managementComputer memory management
Computer memory management
Kumar
 
memory
memorymemory
memory
Kishore Kumar
 
Vm
VmVm
Vm
Aparna Bhadran
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
C.U
 
OS_Ch9
OS_Ch9OS_Ch9
OS_Ch9
Supriya Shrivastava
 
OSCh9
OSCh9OSCh9
OSCh9
Joe Christensen
 
chap.4.memory.manag.ppt
chap.4.memory.manag.pptchap.4.memory.manag.ppt
chap.4.memory.manag.ppt
amadayshwan
 
Csc4320 chapter 8 2
Csc4320 chapter 8 2Csc4320 chapter 8 2
Csc4320 chapter 8 2
bshikhar13
 
Chapter 04
Chapter 04Chapter 04
Chapter 04
Google
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
Harika Pudugosula
 
Cache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniquesCache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniques
subhasishdas79
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
Drishti Bhalla
 
OS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptxOS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptx
Pankaj Debbarma
 
Deco_Module 4.5_Virtual Memory.pptg kghgohg
Deco_Module 4.5_Virtual Memory.pptg kghgohgDeco_Module 4.5_Virtual Memory.pptg kghgohg
Deco_Module 4.5_Virtual Memory.pptg kghgohg
ChetanyaChopra1
 
Memory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdfMemory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdf
Harika Pudugosula
 
Operating System- Multilevel Paging, Inverted Page Table
Operating System- Multilevel Paging, Inverted Page TableOperating System- Multilevel Paging, Inverted Page Table
Operating System- Multilevel Paging, Inverted Page Table
Zishan Mohsin
 
Computer memory management
Computer memory managementComputer memory management
Computer memory management
Kumar
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
C.U
 
chap.4.memory.manag.ppt
chap.4.memory.manag.pptchap.4.memory.manag.ppt
chap.4.memory.manag.ppt
amadayshwan
 
Ad

Recently uploaded (20)

"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Ad

Hardware implementation of page table

  • 1. MEMORY MANAGEMENT 1 | P a g e 1. Hardware Implementation Of Page Table 2. Types of page tables Submitted by: Sukhraj singh 449/12 1241916
  • 2. MEMORY MANAGEMENT 2 | P a g e HARDWARE IMPLEMENTATION OF PAGE TABLE When Page Table Is Reasonably Small 1. In this case page table is implemented by the use of dedicated registers. 2. As every memory access go through the paging map, these registers should be built with very high speed logic to make the paging address translation efficient. 3. Brief working: the CPU dispatcher reloads these registers just as it reloads the other register .instructions to load or modify the page table registers are only in the hand of operating system that can change the memory map 4. Example: DEC PDP-11 is the example of such an architecture as its address consists of 16 bits , and the page size is 8kb .the page table thus consist of eight entries that are kept in fast register . Thus the use of registers for the page table is satisfactory if page table is small like 256 entries When Page Table Is Very Large 1. Use of fast registers not feasible 2. Page table is kept in main memory and there is Page-table base register (PTBR) that points to the page table. Page-table length register (PRLR) indicates size of the page table. Advantage: changing page tables requires changing only one register , as a result the context switch time reduces. Disadvantage: In this scheme every data/instruction access requires two memory accesses. One for the page table and one for the data/instruction thus the memory access is slowed by the factor of two. this delay would be intolerable under most circumstances.
  • 3. MEMORY MANAGEMENT 3 | P a g e 3.The problem is solved using translation look –aside buffer (TLB) 4. The CPU's memory management unit (MMU) stores a cache of recently used mappings from the operating system's page table. This is called the translation look a side buffer (TLB). 5. The TLB is associative, high speed memory . each entry in TLB consists of two parts : a key and a value. When associative memory is presented with an item is compared with all keys simultaneously. If the item is found, the corresponding value field is returned . 6. The seach is fast ,the hardware is expensive . 7.Working With Translation Look –Aside Buffer (TLB): the TLB contains only a few of the page table entries . when a logical address is generated by the CPU , its page number is presented to the TLB . if the page number is found , its frame number is immediately available and is used to access memory . if the page number is not in TLB (known as TLB miss ), a memory reference to the page table must be made . When the frame number is obtained , we can use it to access memory . in addition , we add the page number and frame number to the tlb , so they will be found quickly on next reference.
  • 4. MEMORY MANAGEMENT 4 | P a g e EXAMPLE SHOWING WORKING OF TLB
  • 8. MEMORY MANAGEMENT 8 | P a g e TYPES OF PAGE TABLE Hierarchical Page Tables: 1.also Known as Multilevel Paging 2.The page table might be too big to fit in a contiguous space, so we may have a hierarchy with several levels 3.Break up the logical address space into multiple page tables. A simple technique is a two-level page table, three-level page table Example : Two-Level Paging Example A logical address (on 32-bit machine with 4K page size) is divided into:  a page number consisting of 20 bits.  a page offset consisting of 12 bits. Since the page table is paged, the page number is further divided into:  a 10-bit page number.  a 10-bit page offset. Thus, a logical address is as follows: where pi is an index into the outer page table, and p2 is the displacement within the page of the outer page table.
  • 9. MEMORY MANAGEMENT 9 | P a g e Fig: Address-translation scheme for a two-level 32-bit paging architecture Hash page table 1.Common in address spaces > 32 bits. 2.The virtual page number is hashed into a page table. This page table contains a chain of elements hashing to the same location. 3.Each element consists of three fields: (1) the virtual page number, (2) the value of the mapped page frame, (3) a pointer to the next element in the linked list. 4.Virtual page numbers are compared in this chain searching for a match. If a match is found, the corresponding physical frame is extracted.
  • 10. MEMORY MANAGEMENT 10 | P a g e Inverted Page Table 1. The inverted page table (IPT) combines a page table and a frame table into one data structure. 2. One entry for each virtual page number & real page of memory. 3. Entry consists of the virtual address of the page stored in that real memory location, with information about the process that owns that page. Advantage: Decreases memory needed to store each page table Disadvantage : 1. Increases time needed to search the table when a page reference occurs. 2. There is only one virtual page entry for every physical page, one physical page cannot have two (or more) shared virtual addresses. Fig: Inverted Page Table Architecture