際際滷

際際滷Share a Scribd company logo
PAGE TABLES,
TRANSLATION
LOOKAHEAD BUFFERS
Submitted by
Tejal vinod kasture
Me[2nd year][1st sem]
Page Table
 Page Table Definition
 Implementation of Page Table
 Hardware Support
 Paging Hardware with TLB
 Memory Protection
 Page Table Structure
 Hierarchical Paging
 Shared Pages
Page Table Definition
A Page Table is the data
structure used by a virtual memory
system in a computer operating
system to store the mapping
between virtual address and
physical address.
Page
0
Page
1
Page
2
Page
3
Logical
memory
Page
0
Page
2
Page
1
Page
3
Physical
memory
Frame
number
1
4
3
7
Page
table
Two Concern to Discuss
 Implementation of Page Table concerning about the access time
of page table and load to main memory.
 Page table structure concerning about the page table size and
structure implementation
Implementation of Page Table (Hardware
Support)
 The hardware implementation of the page table can be done in
several ways.
 In the simplest case, the page table is implemented as a set of
dedicated registers. These registers should be built with very high
speed logic to make the paging address translation efficient .
 Problem with page size.
 Page table is kept in main memory.
 Page table base register (PTBR) indicates size of the page table.
 In this scheme every data/instruction access requires two memory
accesses. One for the page table and one for the data/instructions.
 Problem with access time.
Paging Hardware With TLB
 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).
Memory Protection
Memory protection implemented by
associating protection bit with each frame.
- One bit can define a page to be read-Write or read-only
Valid-invalid bit attached to each entry in
the page table:
 valid indicates that the associated page is in the process logical address
space, and is thus a legal page.
 invalid indicates that the page is not in the processlogical address
space.
 page-table length register (PTLR), to indicate the size of the page table.
Memory Protection
Page Table Structure
 Most modern computer systems support a large logical address
space(2^32 to 2^64). In such an environment, the page table
itself becomes excessively large. For example, consider a
system with a 32-bit logical address space. If the page size in
such a system is 4 KB (212 ), then a page table may consist of
up to 1 million entries (2^32/2^12). Assuming that each entry
consists of 4 bytes, each process may need up to 4 MB of
physical address space for the page table alone.
Hierarchical Page Tables
 Knowing as Multilevel Paging
 The page table might be too big to fit in a contiguous space, so
we may have a hierarchy with several levels
 Break up the logical address space into multiple page tables.
 A simple technique is a two-level page table, three-level page
table.
Two-Level Page-Table Scheme
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.
page number page offset
pi p2 d
10 10 12
Three-Level Paging Example
A logical address (on 64-bit machine with 4K page size) is
divided into:
The next step Would be a four-level paging scheme.
Shared Pages
 Shared code
 One copy of read-only (reentrant) code shared among processes (i.e., text
editors, compilers, window systems).
 Shared code must appear in same location in the logical address space of
all processes.
 Private code and data
 Each process keeps a separate copy of the code and data.
 The pages for the private code and data can appear anywhere in the logical
address space.
Shared Pages Example
Translational look ahead buffer
 What is Translational look aside buffer.
 Use of Translational look aside buffer.
 How it works.
 Content addressable memory (CAM)
 Page walk.
 Structure of TLB.
What is Translational look aside buffer (TLB)
The translation look aside buffer (TLB) is a cache for page table
entries. It works in much the same way as the data cache: it stores
recently accessed page table entries. It also relies on locality of
reference
Use of TLB
It is cumbersome and time consuming to calculate the physical
address from linear address for every memory location. A
Translation Look-aside Buffer (TLB) simplifies the process.
TLB is a page table cache, which stores the 32 recently accessed
page table entries.
How it works
The paging unit receives a 32-bit linear address from the
segmentation unit. The upper 20 bits of the linear address is
compared with all 32-entries in the translation look-aside buffer
(TLB) to check if it matches with any of the entries. If it matches,
the 32-bit physical address is calculated from matching TLB
entry and placed on the address bus.
Content addressable memory and page walk
The TLB is sometimes implemented as content-addressable
memory (CAM). The CAM search key is the virtual address and
the search result is a physical address. If the requested address is
present in the TLB, the CAM search yields a match quickly and
the retrieved physical address can be used to access memory. This
is called a TLB hit. If the requested address is not in the TLB, it
is a miss, and the translation proceeds by looking up the page
table in a process called a page walk.
Page walk
The page walk is an expensive process, as it involves
reading the contents of multiple memory locations and
using them to compute the physical address. After the
physical address is determined by the page walk, the
virtual address to physical address mapping is entered into
the TLB.
Ppt
Structure of TLB
TLB has 4 sets of eight entries each. Each entry consists of a
TAG and a DATA. Tags are 24 bit wide. They contain 20 upper
bits of linear address, a valid bit and three attribute bits. The Data
portion of each entry contains higher 20 bits of the Physical
address.
Ppt

More Related Content

Similar to Ppt (20)

Kalpana Devi/Operating System/Paging.pptx
Kalpana Devi/Operating System/Paging.pptxKalpana Devi/Operating System/Paging.pptx
Kalpana Devi/Operating System/Paging.pptx
Kalpana Devi M
Memory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdfMemory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdf
Harika Pudugosula
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
Harika Pudugosula
Hardware implementation of page table
Hardware implementation of page table Hardware implementation of page table
Hardware implementation of page table
Sukhraj Singh
Os4
Os4Os4
Os4
gopal10scs185
Os4
Os4Os4
Os4
gopal10scs185
Virtual memory translation.pptx
Virtual memory translation.pptxVirtual memory translation.pptx
Virtual memory translation.pptx
RAJESH S
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page table
duvvuru madhuri
Operating system 35 paging
Operating system 35 pagingOperating system 35 paging
Operating system 35 paging
Vaibhav Khanna
Segmentation with paging methods and techniques
Segmentation with paging methods and techniquesSegmentation with paging methods and techniques
Segmentation with paging methods and techniques
nikhilrana24112003
Csc4320 chapter 8 2
Csc4320 chapter 8 2Csc4320 chapter 8 2
Csc4320 chapter 8 2
bshikhar13
Memory+management
Memory+managementMemory+management
Memory+management
Kushagra Gaur
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
C.U
OS_Ch9
OS_Ch9OS_Ch9
OS_Ch9
Supriya Shrivastava
OSCh9
OSCh9OSCh9
OSCh9
Joe Christensen
Memory management
Memory managementMemory management
Memory management
CHANDERPRABHU JAIN COLLEGE OF HIGHER STUDIES & SCHOOL OF LAW
Unit-4 swapping.pptx
Unit-4 swapping.pptxUnit-4 swapping.pptx
Unit-4 swapping.pptx
ItechAnand1
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentation
sathish sak
CAO-Unit-III.pptx
CAO-Unit-III.pptxCAO-Unit-III.pptx
CAO-Unit-III.pptx
ClassicFUKRA
Vm
VmVm
Vm
Aparna Bhadran

Recently uploaded (20)

Biases, our brain and software development
Biases, our brain and software developmentBiases, our brain and software development
Biases, our brain and software development
Matias Iacono
Introduction to Safety, Health & Environment
Introduction to Safety, Health  & EnvironmentIntroduction to Safety, Health  & Environment
Introduction to Safety, Health & Environment
ssuserc606c7
GM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptxGM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptx
crdslalcomumbai
PPt physics -GD.pptx gd topic for physics btech
PPt physics -GD.pptx gd topic for physics btechPPt physics -GD.pptx gd topic for physics btech
PPt physics -GD.pptx gd topic for physics btech
kavyamittal2201735
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
prasadmutkule1
Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,
Dr. Madhuri Jawale
Design of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solvedDesign of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solved
Er. Gurmeet Singh
Sppu engineering artificial intelligence and data science semester 6th Artif...
Sppu engineering  artificial intelligence and data science semester 6th Artif...Sppu engineering  artificial intelligence and data science semester 6th Artif...
Sppu engineering artificial intelligence and data science semester 6th Artif...
pawaletrupti434
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
Taykon-Kalite belgeleri
Taykon-Kalite belgeleriTaykon-Kalite belgeleri
Taykon-Kalite belgeleri
TAYKON
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
prasadmutkule1
INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...
INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...
INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...
csijjournal
Scientific_Thinking_and_Method_GE3791.pptx
Scientific_Thinking_and_Method_GE3791.pptxScientific_Thinking_and_Method_GE3791.pptx
Scientific_Thinking_and_Method_GE3791.pptx
aravym456
Turbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdfTurbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdf
Totok Sulistiyanto
Environmental Product Declaration - Uni Bell
Environmental Product Declaration - Uni BellEnvironmental Product Declaration - Uni Bell
Environmental Product Declaration - Uni Bell
ManishPatel169454
惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸
惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸
惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸
o774656624
1-Nature of Software Software Engineering Software process project product Pr...
1-Nature of Software Software Engineering Software process project product Pr...1-Nature of Software Software Engineering Software process project product Pr...
1-Nature of Software Software Engineering Software process project product Pr...
UjjwalAgrawal34
AI ppt on water jug problem by shivam sharma
AI ppt on water jug problem by shivam sharmaAI ppt on water jug problem by shivam sharma
AI ppt on water jug problem by shivam sharma
ShivamSharma588604
Practice Head Torpedo - Neometrix Defence.pptx
Practice Head Torpedo - Neometrix Defence.pptxPractice Head Torpedo - Neometrix Defence.pptx
Practice Head Torpedo - Neometrix Defence.pptx
Neometrix_Engineering_Pvt_Ltd
Wireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdfWireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdf
AbhinandanMishra30
Biases, our brain and software development
Biases, our brain and software developmentBiases, our brain and software development
Biases, our brain and software development
Matias Iacono
Introduction to Safety, Health & Environment
Introduction to Safety, Health  & EnvironmentIntroduction to Safety, Health  & Environment
Introduction to Safety, Health & Environment
ssuserc606c7
GM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptxGM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptx
crdslalcomumbai
PPt physics -GD.pptx gd topic for physics btech
PPt physics -GD.pptx gd topic for physics btechPPt physics -GD.pptx gd topic for physics btech
PPt physics -GD.pptx gd topic for physics btech
kavyamittal2201735
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
prasadmutkule1
Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,Sorting Algorithms: Bubble Sort, Selection Sort,
Sorting Algorithms: Bubble Sort, Selection Sort,
Dr. Madhuri Jawale
Design of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solvedDesign of cannal by Kennedy Theory full problem solved
Design of cannal by Kennedy Theory full problem solved
Er. Gurmeet Singh
Sppu engineering artificial intelligence and data science semester 6th Artif...
Sppu engineering  artificial intelligence and data science semester 6th Artif...Sppu engineering  artificial intelligence and data science semester 6th Artif...
Sppu engineering artificial intelligence and data science semester 6th Artif...
pawaletrupti434
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
Taykon-Kalite belgeleri
Taykon-Kalite belgeleriTaykon-Kalite belgeleri
Taykon-Kalite belgeleri
TAYKON
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
ESIT135 Problem Solving Using Python Notes of Unit-1 and Unit-2
prasadmutkule1
INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...
INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...
INVESTIGATION OF PUEA IN COGNITIVE RADIO NETWORKS USING ENERGY DETECTION IN D...
csijjournal
Scientific_Thinking_and_Method_GE3791.pptx
Scientific_Thinking_and_Method_GE3791.pptxScientific_Thinking_and_Method_GE3791.pptx
Scientific_Thinking_and_Method_GE3791.pptx
aravym456
Turbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdfTurbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdf
Totok Sulistiyanto
Environmental Product Declaration - Uni Bell
Environmental Product Declaration - Uni BellEnvironmental Product Declaration - Uni Bell
Environmental Product Declaration - Uni Bell
ManishPatel169454
惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸
惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸
惠悋惡 悋惠悋惶 悋悋愆悋悧 愆悛惠 悋悽惘愕悋悸
o774656624
1-Nature of Software Software Engineering Software process project product Pr...
1-Nature of Software Software Engineering Software process project product Pr...1-Nature of Software Software Engineering Software process project product Pr...
1-Nature of Software Software Engineering Software process project product Pr...
UjjwalAgrawal34
AI ppt on water jug problem by shivam sharma
AI ppt on water jug problem by shivam sharmaAI ppt on water jug problem by shivam sharma
AI ppt on water jug problem by shivam sharma
ShivamSharma588604
Wireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdfWireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdf
AbhinandanMishra30

Ppt

  • 1. PAGE TABLES, TRANSLATION LOOKAHEAD BUFFERS Submitted by Tejal vinod kasture Me[2nd year][1st sem]
  • 2. Page Table Page Table Definition Implementation of Page Table Hardware Support Paging Hardware with TLB Memory Protection Page Table Structure Hierarchical Paging Shared Pages
  • 3. Page Table Definition A Page Table is the data structure used by a virtual memory system in a computer operating system to store the mapping between virtual address and physical address. Page 0 Page 1 Page 2 Page 3 Logical memory Page 0 Page 2 Page 1 Page 3 Physical memory Frame number 1 4 3 7 Page table
  • 4. Two Concern to Discuss Implementation of Page Table concerning about the access time of page table and load to main memory. Page table structure concerning about the page table size and structure implementation
  • 5. Implementation of Page Table (Hardware Support) The hardware implementation of the page table can be done in several ways. In the simplest case, the page table is implemented as a set of dedicated registers. These registers should be built with very high speed logic to make the paging address translation efficient . Problem with page size. Page table is kept in main memory. Page table base register (PTBR) indicates size of the page table. In this scheme every data/instruction access requires two memory accesses. One for the page table and one for the data/instructions. Problem with access time.
  • 6. Paging Hardware With TLB 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).
  • 7. Memory Protection Memory protection implemented by associating protection bit with each frame. - One bit can define a page to be read-Write or read-only Valid-invalid bit attached to each entry in the page table: valid indicates that the associated page is in the process logical address space, and is thus a legal page. invalid indicates that the page is not in the processlogical address space. page-table length register (PTLR), to indicate the size of the page table.
  • 9. Page Table Structure Most modern computer systems support a large logical address space(2^32 to 2^64). In such an environment, the page table itself becomes excessively large. For example, consider a system with a 32-bit logical address space. If the page size in such a system is 4 KB (212 ), then a page table may consist of up to 1 million entries (2^32/2^12). Assuming that each entry consists of 4 bytes, each process may need up to 4 MB of physical address space for the page table alone.
  • 10. Hierarchical Page Tables Knowing as Multilevel Paging The page table might be too big to fit in a contiguous space, so we may have a hierarchy with several levels Break up the logical address space into multiple page tables. A simple technique is a two-level page table, three-level page table.
  • 12. 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. page number page offset pi p2 d 10 10 12
  • 13. Three-Level Paging Example A logical address (on 64-bit machine with 4K page size) is divided into: The next step Would be a four-level paging scheme.
  • 14. Shared Pages Shared code One copy of read-only (reentrant) code shared among processes (i.e., text editors, compilers, window systems). Shared code must appear in same location in the logical address space of all processes. Private code and data Each process keeps a separate copy of the code and data. The pages for the private code and data can appear anywhere in the logical address space.
  • 16. Translational look ahead buffer What is Translational look aside buffer. Use of Translational look aside buffer. How it works. Content addressable memory (CAM) Page walk. Structure of TLB.
  • 17. What is Translational look aside buffer (TLB) The translation look aside buffer (TLB) is a cache for page table entries. It works in much the same way as the data cache: it stores recently accessed page table entries. It also relies on locality of reference Use of TLB It is cumbersome and time consuming to calculate the physical address from linear address for every memory location. A Translation Look-aside Buffer (TLB) simplifies the process. TLB is a page table cache, which stores the 32 recently accessed page table entries.
  • 18. How it works The paging unit receives a 32-bit linear address from the segmentation unit. The upper 20 bits of the linear address is compared with all 32-entries in the translation look-aside buffer (TLB) to check if it matches with any of the entries. If it matches, the 32-bit physical address is calculated from matching TLB entry and placed on the address bus.
  • 19. Content addressable memory and page walk The TLB is sometimes implemented as content-addressable memory (CAM). The CAM search key is the virtual address and the search result is a physical address. If the requested address is present in the TLB, the CAM search yields a match quickly and the retrieved physical address can be used to access memory. This is called a TLB hit. If the requested address is not in the TLB, it is a miss, and the translation proceeds by looking up the page table in a process called a page walk.
  • 20. Page walk The page walk is an expensive process, as it involves reading the contents of multiple memory locations and using them to compute the physical address. After the physical address is determined by the page walk, the virtual address to physical address mapping is entered into the TLB.
  • 22. Structure of TLB TLB has 4 sets of eight entries each. Each entry consists of a TAG and a DATA. Tags are 24 bit wide. They contain 20 upper bits of linear address, a valid bit and three attribute bits. The Data portion of each entry contains higher 20 bits of the Physical address.

Editor's Notes

  • #7: MMU is a computer hardware component responsible for handling accesses to memory requested by the CPU. Its functions include translation of virtual addresses to physical addresses, memory protection, cache control
  • #8: in the form of a page-table length register (PTLR), to indicate the size of the page table. This value is checked against every logical address to verify that the address is in the valid range for the process. Failure of this test causes an error trap to the operating system