SlideShare a Scribd company logo
Address Translation Mechanism
of 80386
By Aniket Bhute
aniket.bhute96@gmail.com
G.H.RAISONI COLLEGE OF
ENGINEERING
(An Autonomous Institute Under UGC act 1956 & affiliated to R.T.M. Nagpur
University)
Protected Mode Addressing
Mechanism
• 80386 transforms logical addresses into physical
address two steps:
• Segment translation: a logical address is converted to
a linear address.
• Page translation: a linear address is converted to a
physical address.(optional)
• These translations are performed in a way that is not
visible to applications programmers.
• The following figure illustrates the two translations:
Segmentation
Segmentation
Unit
Logical(Virtual)
Address
Linear Address
Base Address
in LDTR
Register
Base Address
in GDTR
Register
Segment Descriptor
For currently executing task
For each Task
Paging
Paging UnitLinear Address Physical Address
Page Descriptor Base Register
• CR2 is used to store the 32-bit linear address
of page fault.
• CR3 (Page Directory Physical Base Address
Register) stores the physical starting address
of Page Directory.
Page Descriptor Base Register
• The lower 12 bits of CR3 are always zero to
ensure that the Page Directory is always page
aligned
• A move operation to CR3 automatically loads
the Page Table Entry caches and a task switch
through a TSS changes the value of CR0.
Page Directory
• It is at the most 4KB in size and allows upto
1024 entries are allowed.
• The upper 10 bits of the linear address are
used as an index to corresponding page
directory entry
• Page directory entry points to page tables.
Page Directory Entry
Page Tables
• Each Page Table is 4KB and holds up to 1024 Page
Table Entries(PTE).
• PTEs contain the starting address of the page
frame and statistical information about the page.
• Upper 20 bit page frame address is concatenated
with the lower 12 bits of the linear address to
form the physical address.
• Page tables can be shared between tasks and
swapped to disks.
Page Table Entry
• P(Present)Bit: indicates if the entry can be
used in address translation. P-bit of the
currently executed page is always high.
• A (Accessed) Bit: It is set before any access to
the page.
Page Table Entry
• D (Dirty) bit: It is set before a write operation to
the page is carried out. The D bit is undefined for
PDEs.
• OS Reserved Bits: They are defined by the
operating system software.
• U/S (User/Supervisor)Bit and R/W (Read/Write)
Bit: They are used to provide protection. They
are decoded as
Example
Linear Address : 0301008A
Binary 00 0000 1100
(10bits)
00 0001 0000
(10bits)
0000 1000 1010
(12bits)
Hex 00C 010 08A
0000 0011 0000 0001 0000 0000 1000 1010
Example
Hex 00C(DIR) x4 030
Binary 00 0000 1100 00 0000 1100
x
0100
_____________
00 0011 0000
CR3 + DIR*4 = Index to PDE
00010H + 030H = 00010030H
(20-bit) (12-bit)
Example
Page Directory Entry
Hex 010(TABLE) x4 040
Binary 00 0001 0000 00 0001 0000
x
0100
_____________
00 0100 0000
PTA + Table*4 = Index to PTE
05001H + 040H = 05001040H
(20-bit) (12-bit)
Example
Page Table Entry
PFA + Offset = Physical Address
03000H + 08AH = 03000 08AH
(20-bit) (12-bit)
Example
Translation Lookaside Buffer(TLB)
• Performance degrades if the processor access
two levels of tables for every memory
reference.
• To solve this problem, the Intel386 DX keeps a
cache of the most recently accessed pages and
this cache is called Translation Lookaside
Buffer (TLB).
• TLB is a 4 way set associative 32 entry page
table cache
Translation Lookaside Buffer(TLB)
Translation Lookaside Buffer(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 (Validation of
Entry) and three attribute bits(D,U/S and
R/W)
• Data portion of each entry contains upper 20
bits of the Physical address.
TLB Entry
V D U/S R/W Upper 20 bit Linear Address Upper 20-bit Physical Address
Translation Lookaside Buffer(TLB)
• It automatically keeps the most commonly
used Page Table Entries.
• 32-entry TLB coupled with a 4K page size
results in the coverage of 128KB of memory
addresses.
Paging Operation
• The paging unit hardware receives a 32-bit
linear address from the segmentation unit.
• The upper 20 linear address bits are compared
with all 32 entries in the TLB to determine if
there is a match.
• If there is a match (i.e. a TLB hit), then the 32-
bit physical address is calculated and will be
placed on the address bus.
Paging Operation
• If PTE entry is not in TLB, the 80386 DX will read
the appropriate PDE Entry.
• If P = 1 on PDE (the page table is in memory),
then the 80386 DX will read the appropriate PTE
and set the Access bit.
• If P = 1 on PTE ( the page is in memory), then
the Intel386 DX will update the Access and Dirty
bits as needed and fetch the operand.
Paging Operation
• The upper 20 bits of the linear address read
from the page table will be stored in the TLB
for future accesses.
• If P = 0 for either PDE or PTE, then the
processor will generate a page fault exception
• This exception is also generated when
protection rules are violated and the CR2 is
loaded with the page fault address
Linear Address
Upper 20 bits
available in TLB
P=1 in PDE?
P=1 in PTE?
N
N
N
Page Fault
Exception
Y (Page Table is present in physical
memory, set access bit)
(Page is present in physical
memory but entry is not there
in TLB,set A and D(if needed) )
Y
Update TLB
Paging Operation
Y
(Page is present in physical
memory, set A and D(if
needed))
Paging Operation
Paging
Page 0
Page 1
Page 2
. . .
Page n
Page 0
Page 1
Page 2
. . .
Page m
linearvirtualaddress
spaceofProgram1
. . .
Hard Disk
Main Memory
Pages that cannot
fit in main memory
are stored on the
hard disk
Each running
program has
its own page
table
The operating
system uses
page tables to
map the pages
in the linear
virtual address
space onto
main memory
As a program is running, the processor translates the linear virtual addresses
onto real memory (called also physical) addresses
The operating
system swaps
pages between
memory and the
hard disk
linearvirtualaddress
spaceofProgram2

More Related Content

What's hot

Code generation
Code generationCode generation
Code generation
Aparna Nayak
 
design of accumlator
design of accumlatordesign of accumlator
design of accumlator
SangeethaSasi1
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
karthiga selvaraju
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Synchronous counters
Synchronous countersSynchronous counters
Synchronous countersLee Diaz
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer Science
Transweb Global Inc
 
Applications of Mealy & Moore Machine
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine
SardarKashifKhan
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
priya Nithya
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
Ravinder Kamboj
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
Balakrishna Chowdary
 
Interrupts of microprocessor 8085
Interrupts of microprocessor  8085Interrupts of microprocessor  8085
Interrupts of microprocessor 8085
mujeebkhanelectronic
 
Segment registers
Segment registersSegment registers
Segment registers
maamir farooq
 
Arm modes
Arm modesArm modes
Arm modes
abhi165
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
Renu Kewalramani
 
BCD ADDER
BCD ADDER BCD ADDER
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
Jismy .K.Jose
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
Vinit Raut
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
prasadpawaskar
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's types
Nishant Joshi
 

What's hot (20)

Code generation
Code generationCode generation
Code generation
 
design of accumlator
design of accumlatordesign of accumlator
design of accumlator
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Synchronous counters
Synchronous countersSynchronous counters
Synchronous counters
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer Science
 
Applications of Mealy & Moore Machine
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Interrupts of microprocessor 8085
Interrupts of microprocessor  8085Interrupts of microprocessor  8085
Interrupts of microprocessor 8085
 
Segment registers
Segment registersSegment registers
Segment registers
 
Arm modes
Arm modesArm modes
Arm modes
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
 
BCD ADDER
BCD ADDER BCD ADDER
BCD ADDER
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's types
 

Viewers also liked

INTEL 80386 MICROPROCESSOR
INTEL  80386  MICROPROCESSORINTEL  80386  MICROPROCESSOR
INTEL 80386 MICROPROCESSOR
Annies Minu
 
Why the Address Translation Scheme Matters?
Why the Address Translation Scheme Matters?Why the Address Translation Scheme Matters?
Why the Address Translation Scheme Matters?Jiaqing Du
 
Introduction to 80386 microprocessor
Introduction to 80386 microprocessorIntroduction to 80386 microprocessor
Introduction to 80386 microprocessor
Shehrevar Davierwala
 
80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
Rohit Choudhury
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
Mukesh Chinta
 
Microprocessor Protected Mode Memory addressing By DHEERAJ KATARIA
Microprocessor Protected Mode Memory addressing By DHEERAJ KATARIAMicroprocessor Protected Mode Memory addressing By DHEERAJ KATARIA
Microprocessor Protected Mode Memory addressing By DHEERAJ KATARIA
Dheeraj Kataria
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086
mudulin
 
Introduction To Translation Technologies
Introduction To Translation TechnologiesIntroduction To Translation Technologies
Introduction To Translation Technologies
xenotext
 
Protection 80386
Protection 80386Protection 80386
Protection 80386
Akshay Nagpurkar
 
Memory Management
Memory ManagementMemory Management
Memory Management
Visakh V
 
Protection mode
Protection modeProtection mode
Protection mode
Deepak Kumar
 
Memory mgmt 80386
Memory mgmt 80386Memory mgmt 80386
Memory mgmt 80386
Akshay Nagpurkar
 
Protected mode memory addressing 8086
Protected mode memory addressing 8086Protected mode memory addressing 8086
Protected mode memory addressing 8086
University of Gujrat, Pakistan
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentationTech_MX
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OSC.U
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSOR
Gurudev joshi
 

Viewers also liked (19)

INTEL 80386 MICROPROCESSOR
INTEL  80386  MICROPROCESSORINTEL  80386  MICROPROCESSOR
INTEL 80386 MICROPROCESSOR
 
The 80386 80486
The 80386 80486The 80386 80486
The 80386 80486
 
Why the Address Translation Scheme Matters?
Why the Address Translation Scheme Matters?Why the Address Translation Scheme Matters?
Why the Address Translation Scheme Matters?
 
DAT Education
DAT EducationDAT Education
DAT Education
 
Introduction to 80386 microprocessor
Introduction to 80386 microprocessorIntroduction to 80386 microprocessor
Introduction to 80386 microprocessor
 
80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
Microprocessor Protected Mode Memory addressing By DHEERAJ KATARIA
Microprocessor Protected Mode Memory addressing By DHEERAJ KATARIAMicroprocessor Protected Mode Memory addressing By DHEERAJ KATARIA
Microprocessor Protected Mode Memory addressing By DHEERAJ KATARIA
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086
 
Introduction To Translation Technologies
Introduction To Translation TechnologiesIntroduction To Translation Technologies
Introduction To Translation Technologies
 
Protection 80386
Protection 80386Protection 80386
Protection 80386
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Protection mode
Protection modeProtection mode
Protection mode
 
Memory mgmt 80386
Memory mgmt 80386Memory mgmt 80386
Memory mgmt 80386
 
Protected mode memory addressing 8086
Protected mode memory addressing 8086Protected mode memory addressing 8086
Protected mode memory addressing 8086
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentation
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSOR
 
Memory management
Memory managementMemory management
Memory management
 

Similar to Address translation-mechanism-of-80386 by aniket bhute

address-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).pptaddress-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).ppt
1556AyeshaShaikh
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 Microporcessor
KanchanPatil34
 
Protected addressing mode and Paging
Protected addressing mode and PagingProtected addressing mode and Paging
Protected addressing mode and Paging
marada0033
 
Module 1-ppt System programming
Module 1-ppt System programmingModule 1-ppt System programming
Module 1-ppt System programming
vishnu sankar
 
LECTURE2 td 2 sue les theories de graphes
LECTURE2 td 2 sue les theories de graphesLECTURE2 td 2 sue les theories de graphes
LECTURE2 td 2 sue les theories de graphes
AhmedMahjoub15
 
PattPatelCh05.ppt
PattPatelCh05.pptPattPatelCh05.ppt
PattPatelCh05.ppt
DipakShow2
 
Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2
Premier Farnell
 
System Software
System SoftwareSystem Software
System Software
PandurangBiradar2
 
amba.ppt
amba.pptamba.ppt
amba.ppt
Rahul534035
 
8086 module 1 & 2 work
8086 module 1 & 2   work8086 module 1 & 2   work
8086 module 1 & 2 work
Suhail Km
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
Harika Pudugosula
 
system software.ppt
system software.pptsystem software.ppt
system software.ppt
byuvashreeitITDept
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA
 
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
Asst.prof M.Gokilavani
 
11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf
WilliamTom9
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Kanika Thakur
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Sher Shah Merkhel
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
Nahian Ahmed
 
Implementation of page table
Implementation of page tableImplementation of page table
Implementation of page tableguestff64339
 

Similar to Address translation-mechanism-of-80386 by aniket bhute (20)

address-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).pptaddress-translation-mechanism-of-80386 (1).ppt
address-translation-mechanism-of-80386 (1).ppt
 
PAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 MicroporcessorPAI Unit 3 Paging in 80386 Microporcessor
PAI Unit 3 Paging in 80386 Microporcessor
 
Protected addressing mode and Paging
Protected addressing mode and PagingProtected addressing mode and Paging
Protected addressing mode and Paging
 
Module 1-ppt System programming
Module 1-ppt System programmingModule 1-ppt System programming
Module 1-ppt System programming
 
S09mid2sol
S09mid2solS09mid2sol
S09mid2sol
 
LECTURE2 td 2 sue les theories de graphes
LECTURE2 td 2 sue les theories de graphesLECTURE2 td 2 sue les theories de graphes
LECTURE2 td 2 sue les theories de graphes
 
PattPatelCh05.ppt
PattPatelCh05.pptPattPatelCh05.ppt
PattPatelCh05.ppt
 
Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2
 
System Software
System SoftwareSystem Software
System Software
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
8086 module 1 & 2 work
8086 module 1 & 2   work8086 module 1 & 2   work
8086 module 1 & 2 work
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
 
system software.ppt
system software.pptsystem software.ppt
system software.ppt
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSOR
 
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
 
11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf11_ InstructionSetsAddressingModes .pdf
11_ InstructionSetsAddressingModes .pdf
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Implementation of page table
Implementation of page tableImplementation of page table
Implementation of page table
 

More from Aniket Bhute

Cn transmission media by aniket bhute
Cn transmission media by aniket bhuteCn transmission media by aniket bhute
Cn transmission media by aniket bhute
Aniket Bhute
 
Basic structure of computers by aniket bhute
Basic structure of computers by aniket bhuteBasic structure of computers by aniket bhute
Basic structure of computers by aniket bhute
Aniket Bhute
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhute
Aniket Bhute
 
Arithmetic by aniket bhute
Arithmetic by aniket bhuteArithmetic by aniket bhute
Arithmetic by aniket bhute
Aniket Bhute
 
8251 usart programmable communication interface by aniket bhute
8251  usart  programmable communication interface by aniket bhute8251  usart  programmable communication interface by aniket bhute
8251 usart programmable communication interface by aniket bhute
Aniket Bhute
 
Assembler numericals by aniket bhute
Assembler numericals by aniket bhuteAssembler numericals by aniket bhute
Assembler numericals by aniket bhute
Aniket Bhute
 

More from Aniket Bhute (6)

Cn transmission media by aniket bhute
Cn transmission media by aniket bhuteCn transmission media by aniket bhute
Cn transmission media by aniket bhute
 
Basic structure of computers by aniket bhute
Basic structure of computers by aniket bhuteBasic structure of computers by aniket bhute
Basic structure of computers by aniket bhute
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhute
 
Arithmetic by aniket bhute
Arithmetic by aniket bhuteArithmetic by aniket bhute
Arithmetic by aniket bhute
 
8251 usart programmable communication interface by aniket bhute
8251  usart  programmable communication interface by aniket bhute8251  usart  programmable communication interface by aniket bhute
8251 usart programmable communication interface by aniket bhute
 
Assembler numericals by aniket bhute
Assembler numericals by aniket bhuteAssembler numericals by aniket bhute
Assembler numericals by aniket bhute
 

Recently uploaded

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 

Recently uploaded (20)

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 

Address translation-mechanism-of-80386 by aniket bhute

  • 1. Address Translation Mechanism of 80386 By Aniket Bhute aniket.bhute96@gmail.com G.H.RAISONI COLLEGE OF ENGINEERING (An Autonomous Institute Under UGC act 1956 & affiliated to R.T.M. Nagpur University)
  • 2. Protected Mode Addressing Mechanism • 80386 transforms logical addresses into physical address two steps: • Segment translation: a logical address is converted to a linear address. • Page translation: a linear address is converted to a physical address.(optional) • These translations are performed in a way that is not visible to applications programmers.
  • 3. • The following figure illustrates the two translations:
  • 6.
  • 7. Base Address in LDTR Register Base Address in GDTR Register
  • 8.
  • 9.
  • 14. Paging UnitLinear Address Physical Address
  • 15.
  • 16. Page Descriptor Base Register • CR2 is used to store the 32-bit linear address of page fault. • CR3 (Page Directory Physical Base Address Register) stores the physical starting address of Page Directory.
  • 17. Page Descriptor Base Register • The lower 12 bits of CR3 are always zero to ensure that the Page Directory is always page aligned • A move operation to CR3 automatically loads the Page Table Entry caches and a task switch through a TSS changes the value of CR0.
  • 18. Page Directory • It is at the most 4KB in size and allows upto 1024 entries are allowed. • The upper 10 bits of the linear address are used as an index to corresponding page directory entry • Page directory entry points to page tables.
  • 20. Page Tables • Each Page Table is 4KB and holds up to 1024 Page Table Entries(PTE). • PTEs contain the starting address of the page frame and statistical information about the page. • Upper 20 bit page frame address is concatenated with the lower 12 bits of the linear address to form the physical address. • Page tables can be shared between tasks and swapped to disks.
  • 21. Page Table Entry • P(Present)Bit: indicates if the entry can be used in address translation. P-bit of the currently executed page is always high. • A (Accessed) Bit: It is set before any access to the page.
  • 22. Page Table Entry • D (Dirty) bit: It is set before a write operation to the page is carried out. The D bit is undefined for PDEs. • OS Reserved Bits: They are defined by the operating system software. • U/S (User/Supervisor)Bit and R/W (Read/Write) Bit: They are used to provide protection. They are decoded as
  • 23. Example Linear Address : 0301008A Binary 00 0000 1100 (10bits) 00 0001 0000 (10bits) 0000 1000 1010 (12bits) Hex 00C 010 08A 0000 0011 0000 0001 0000 0000 1000 1010
  • 25. Hex 00C(DIR) x4 030 Binary 00 0000 1100 00 0000 1100 x 0100 _____________ 00 0011 0000
  • 26. CR3 + DIR*4 = Index to PDE 00010H + 030H = 00010030H (20-bit) (12-bit)
  • 29. Hex 010(TABLE) x4 040 Binary 00 0001 0000 00 0001 0000 x 0100 _____________ 00 0100 0000
  • 30. PTA + Table*4 = Index to PTE 05001H + 040H = 05001040H (20-bit) (12-bit)
  • 33. PFA + Offset = Physical Address 03000H + 08AH = 03000 08AH (20-bit) (12-bit)
  • 35. Translation Lookaside Buffer(TLB) • Performance degrades if the processor access two levels of tables for every memory reference. • To solve this problem, the Intel386 DX keeps a cache of the most recently accessed pages and this cache is called Translation Lookaside Buffer (TLB). • TLB is a 4 way set associative 32 entry page table cache
  • 37. Translation Lookaside Buffer(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 (Validation of Entry) and three attribute bits(D,U/S and R/W) • Data portion of each entry contains upper 20 bits of the Physical address.
  • 38. TLB Entry V D U/S R/W Upper 20 bit Linear Address Upper 20-bit Physical Address
  • 39. Translation Lookaside Buffer(TLB) • It automatically keeps the most commonly used Page Table Entries. • 32-entry TLB coupled with a 4K page size results in the coverage of 128KB of memory addresses.
  • 40. Paging Operation • The paging unit hardware receives a 32-bit linear address from the segmentation unit. • The upper 20 linear address bits are compared with all 32 entries in the TLB to determine if there is a match. • If there is a match (i.e. a TLB hit), then the 32- bit physical address is calculated and will be placed on the address bus.
  • 41. Paging Operation • If PTE entry is not in TLB, the 80386 DX will read the appropriate PDE Entry. • If P = 1 on PDE (the page table is in memory), then the 80386 DX will read the appropriate PTE and set the Access bit. • If P = 1 on PTE ( the page is in memory), then the Intel386 DX will update the Access and Dirty bits as needed and fetch the operand.
  • 42. Paging Operation • The upper 20 bits of the linear address read from the page table will be stored in the TLB for future accesses. • If P = 0 for either PDE or PTE, then the processor will generate a page fault exception • This exception is also generated when protection rules are violated and the CR2 is loaded with the page fault address
  • 43. Linear Address Upper 20 bits available in TLB P=1 in PDE? P=1 in PTE? N N N Page Fault Exception Y (Page Table is present in physical memory, set access bit) (Page is present in physical memory but entry is not there in TLB,set A and D(if needed) ) Y Update TLB Paging Operation Y (Page is present in physical memory, set A and D(if needed))
  • 45. Paging Page 0 Page 1 Page 2 . . . Page n Page 0 Page 1 Page 2 . . . Page m linearvirtualaddress spaceofProgram1 . . . Hard Disk Main Memory Pages that cannot fit in main memory are stored on the hard disk Each running program has its own page table The operating system uses page tables to map the pages in the linear virtual address space onto main memory As a program is running, the processor translates the linear virtual addresses onto real memory (called also physical) addresses The operating system swaps pages between memory and the hard disk linearvirtualaddress spaceofProgram2