Administracion de Memoria 2

Anuncio
2
3
4
00000000
Paginas
Virtuales
Memoria Fisica
7FFFFFFF
80000000
C0000000
C1000000
Entradas
de la tabla
de paginas
FFFFFFFF
5
usuario
Paginas
Virtuales
Memoria Fisica
31
sistema
22 21
10
usuario
sistema
x86:
Entrada
de la tabla
de paginas
12 11
10
0
12
Page directory
index
Page table
index
Byte index
6
Process A
00000000
Process B
Memoria
Fisica
7FFFFFFF
80000000
C0000000
C1000000
FFFFFFFF
7
Default
3 GB user space
8
x64
Itanium
9
00000000
Unico por
proceso,
accesiable en
modo usuario
o modo kernel
7FFFFFFF
80000000
Por
proceso,
accesible solo en
modo kernel
C0000000
El SO
accesible solo
en modo
kernel,
FFFFFFFF
10
00000000 00000000
6FC 00000000
1FFFFF00 00000000
20000000 00000000
3FFFFF00 00000000
E0000000 00000000
E0000600 00000000
FFFFFF00 00000000
FFFFFFFF FFFFFFFF
11
12
Intel
Logical
address
Offset
Segment Selector
15
3
Index
2
TI=0
1
RPL
31
0
0
:
Intel
Linear
Addresses
Global Descriptor
Table (GDT)
0xffffffff
Access Limit=0xfffff
Base Address = 0
Access Limit=0xfffff
Base Address = 0
+
Windows Virtual
Addresses
0
13
Intel Linear
31
Address
22 21
10
12 11
10
Physical Address
0
n
12
Windows Virtual
Address
operand
4Kb PDE
4Mb PDE
PTE
Page table
1024 entries
4kb page
frame
22 bit
offset
4MB page frame
cr 3
Windows-PFN
Database
Page directory
1024x4byte entries
(one per process)
Physical address
4 Kb page
operand
4 Mb page
3
2
1
0
Physical Memory
Page tables are created on demand
Page Frame
Number Database
14
x86 32-bit
31
22
21
Page table
selector
12
11
Page table
entry selector
10 bits
0
Byte within page
12 bits
10 bits
x64 64-bit (48-bit in today’s processors)
47
39 38
30
Page map level Page directory
pointer selector
4 selector
9 bits
9 bits
29
21
Page table
selector
9 bits
20
12
11
0
Page table
Byte within page
entry selector
9 bits
12 bits
15
PFN 0
31
1
0
Page table
selector
Page table
entry selector
2
Byte within page
3
4
CR3
5
Direccion
fisica
6
index
physical
page number
(“page frame
number” or
“PFN”)
index
7
8
9
10
11
12
Directorio de Paginas
(una por proceso, 1024 entries)
Tablas de paginas
(up to 512 per process,
plus up to 512 system-wide)
Physical Pages
(up to 2^20)
16
PFN 0
48
0
Page map
Level 4
Page dir
pointer
Page table
selector
Page table
entry selector
Byte within page
1
2
3
4
5
6
7
8
9
10
11
12
Page Map
Level 4
CR3
Page
Directory
Pointers
Page
Directories
Page
Tables
Physical Pages
(up to 2^40)
17
virtual address
Page
Directory
Virtual page number
Byte within page
Address translation (hardware)
Page
Tables
Translation
Lookaside
Buffer
a cache of recentlyused page table entries
if page
not valid...
Physical page number
page fault
(exception,
handled by
software)
Byte within page
physical address
18
Descargar