SlideShare a Scribd company logo
Page Tables Revisited




                        1
2
Two-level Translation




                        3
R3000 TLB Refill
• Can be optimised for TLB refill          • An example routine
  only                                     mfc0 k1,C0_CONTEXT
    – Does not need to check the           mfc0 k0,C0_EPC # mfc0 delay
      exception type                                         # slot
    – Does not need to save any            lw k1,0(k1) # may double
      registers                               # fault (k0 = orig EPC)
        • It uses a specialised
          assembly routine that only       nop
          uses k0 and k1.                  mtc0 k1,C0_ENTRYLO
    – Does not check if PTE exists         nop
        • Assumes virtual linear array –   tlbwr
          see extended OS notes
                                           jr k0
                                           rfe
• With careful data structure
  choice, exception handler can
  be made very fast

                                                                    4
Virtual Linear Array page table
• Assume a 2-level PT
• Assume 2nd-level PT nodes are in virtual memory
• Assume all 2nd-level nodes are allocated contiguously ⇒
  2nd-level nodes form a contiguous array indexed by page
  number




                                                       5
Virtual Linear Array Operation



• Index into 2nd level page table without referring to root
  PT!
• Simply use the full page number as the PT index!
• Leave unused parts of PT unmapped!
• If access is attempted to unmapped part of PT, a
  secondary page fault is triggered
   – This will load the mapping for the PT from the root PT
   – Root PT is kept in physical memory (cannot trigger page faults)

                                                                   6
Virtual Linear Array Page Table
• Use Context register to simply
  load PTE by indexing a PTE
  array in virtual memory
• Occasionally, will get double
  faults
   – A TLB miss, while servicing a TLB
     miss
   – Handled by general exception
     handler



                       PTEbase in virtual
                       memory in kseg2
                       • Protected from
                       user access
                                            7
c0 Context Register


• c0_Context = PTEBase + 4 * PageNumber
  – PTEs are 4 bytes
  – PTEBase is the base local of the page table array (note: aligned
    on 4 MB boundary)
  – PTEBase is (re)initialised by the OS whenever the page table
    array is changed
      • E.g on a context switch
  – After an exception, c0_Context contains the address of the PTE
    required to refill the TLB.



                                                                  8
Code for VLA TLB refill handler
Load PTE           mfc0 k1,C0_CONTEXT
address from       mfc0 k0,C0_EPC         # mfc0 delay slot
context register   lw k1,0(k1)            # may double fault
                                          # (k0 = orig EPC)
                   nop
Move the PTE                                   Load address of
                   mtc0 k1,C0_ENTRYLO
into EntryLo.                                  instruction to
                   nop                         return to
                   tlbwr
                   jr k0
                   rfe                         Load the PTE.
                                               Note: this load can cause a
Write EntryLo                                  TLB refill miss itself, but
into random TLB                                this miss is handled by the
entry.                  Return from the        general exception vector.
                        exception              The general exception
                                               vector has to understand
                                               this situation and deal with
                                                                          9
                                               in appropriately
Software-loaded TLB
• Pros
  – Can simplify hardware design
  – provide greater flexibility in page table
    structure
• Cons
  – typically have slower refill times than
    hardware managed TLBs.



                                                10
Trends
• Operating systems
   – moving functionality into user processes
   – making greater use of virtual memory for mapping data
     structures held within the kernel.
• RAM is increasing
   – TLB capacity is relatively static
• Statement:
   – Trends place greater stress upon the TLB by increasing miss
     rates and hence, decreasing overall system performance.
   – True/False? How to evaluate?



                                                                   11
Design Tradeoffs for Software-Managed TLBs
David Nagle, Richard Uhlig, Tim Stanley, Stuart Sechrest Trevor
  Mudge & Richard Brown




                                                                  12
13
14
15
Note the TLB miss costs
• What is expected to be the common case?




                                      16
17
18
19
Measurement Results




                      20
Specialising the L2/L1K miss vector




                                 21
Other performance
          improvements?
• In Paper
  – Pinned slots
  – Increased TLB size
  – TLB associativity
• Other options
  – Bigger page sizes
  – Multiple page sizes


                             22
Itanium Page Table
• Takes a bet each way
• Loading
  – software
  – two different format hardware walkers
• Page table
  – software defined
  – linear
  – hashed
                                            23
24
what about the P4?
P4
• Sophisticated, supports:
  – demand paging
  – pure segmentation
  – segmentation with paging
• Heart of the VM architecture
  – Local Descriptor Table (LDT)
  – Global Descriptor Table (GDT)
• LDT
  – 1 per process
  – describes segments local to each process (code, stack,
    data, etc.)
• GDT
  – shared by all programs
  – describes system segments (including OS itself)
P4
• To access a segment P4
  – loads a selector in 1 of the segment registers
  –…
P4
• a P4 selector:
P4         determine LDT
                                 or GDT (and
• a P4 selector:                privilege level)



                        1 11




• when selector is in register, corresponding
  segment descriptor is
  – fetched by MMU
  – loaded in internal MMU registers
• Next, segment descriptor is used to handle
  memory reference (discussed later)
P4
     LDT   GDT


     000    zero these 3 bits
           and add the 16b to
             base address of
               LDT or GDT
P4
                       LDT         GDT


                      000




 • finds a a P4 code segment descriptor
P4
• calculating a linear address from
  selector+offset
P4
IF no paging used: we are done

     this is the physical address




ELSE
   linear address interpreted as virtual address
   paging again!
P4 with paging
• every process has page directory
   – 1024 32bit entries
   – each entry points to page table
   – page table contains 1024 32bit entries
   – each entry points to page frame


mapping
linear
address to
physical
address
with paging
P4
• Many OSs:
    –BASE=0
    –LIMIT=MAX


•    no segmentation at all

More Related Content

What's hot

loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
Temesgen Molla
 
Loader
LoaderLoader
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
Motaz Saad
 
Unit 4 assembly language programming
Unit 4   assembly language programmingUnit 4   assembly language programming
Unit 4 assembly language programming
Kartik Sharma
 
Programming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet ProcessorsProgramming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet Processors
Open Networking Summits
 
32 dynamic linking nd overlays
32 dynamic linking nd overlays32 dynamic linking nd overlays
32 dynamic linking nd overlaysmyrajendra
 
FARIS: Fast and Memory-efficient URL Filter by Domain Specific Machine
FARIS: Fast and Memory-efficient URL Filter by Domain Specific MachineFARIS: Fast and Memory-efficient URL Filter by Domain Specific Machine
FARIS: Fast and Memory-efficient URL Filter by Domain Specific Machine
Yuuki Takano
 
LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723Iftach Ian Amit
 
20170925 onos and p4
20170925 onos and p420170925 onos and p4
20170925 onos and p4
Yi Tseng
 
Threading Successes 03 Gamebryo
Threading Successes 03   GamebryoThreading Successes 03   Gamebryo
Threading Successes 03 Gamebryoguest40fc7cd
 
Dynamic Linker
Dynamic LinkerDynamic Linker
Dynamic Linker
Sanjiv Malik
 
(8) cpp stack automatic_memory_and_static_memory
(8) cpp stack automatic_memory_and_static_memory(8) cpp stack automatic_memory_and_static_memory
(8) cpp stack automatic_memory_and_static_memory
Nico Ludwig
 
23100136 mpls
23100136 mpls23100136 mpls
23100136 mpls
amirulalam
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
Maxim Kharchenko
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loadersTech_MX
 
Fast, deterministic, and verifiable computations with WebAssembly
Fast, deterministic, and verifiable computations with WebAssemblyFast, deterministic, and verifiable computations with WebAssembly
Fast, deterministic, and verifiable computations with WebAssembly
Fluence Labs
 
Lecture 14 run time environment
Lecture 14 run time environmentLecture 14 run time environment
Lecture 14 run time environment
Iffat Anjum
 
Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
Haritha Hary
 
Assembly language part I
Assembly language part IAssembly language part I
Assembly language part I
Mohammed A. Imran
 

What's hot (20)

loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
 
Loader
LoaderLoader
Loader
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
Unit 4 assembly language programming
Unit 4   assembly language programmingUnit 4   assembly language programming
Unit 4 assembly language programming
 
Programming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet ProcessorsProgramming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet Processors
 
32 dynamic linking nd overlays
32 dynamic linking nd overlays32 dynamic linking nd overlays
32 dynamic linking nd overlays
 
FARIS: Fast and Memory-efficient URL Filter by Domain Specific Machine
FARIS: Fast and Memory-efficient URL Filter by Domain Specific MachineFARIS: Fast and Memory-efficient URL Filter by Domain Specific Machine
FARIS: Fast and Memory-efficient URL Filter by Domain Specific Machine
 
LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723
 
20170925 onos and p4
20170925 onos and p420170925 onos and p4
20170925 onos and p4
 
Threading Successes 03 Gamebryo
Threading Successes 03   GamebryoThreading Successes 03   Gamebryo
Threading Successes 03 Gamebryo
 
Dynamic Linker
Dynamic LinkerDynamic Linker
Dynamic Linker
 
(8) cpp stack automatic_memory_and_static_memory
(8) cpp stack automatic_memory_and_static_memory(8) cpp stack automatic_memory_and_static_memory
(8) cpp stack automatic_memory_and_static_memory
 
23100136 mpls
23100136 mpls23100136 mpls
23100136 mpls
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
 
Lecture6
Lecture6Lecture6
Lecture6
 
Fast, deterministic, and verifiable computations with WebAssembly
Fast, deterministic, and verifiable computations with WebAssemblyFast, deterministic, and verifiable computations with WebAssembly
Fast, deterministic, and verifiable computations with WebAssembly
 
Lecture 14 run time environment
Lecture 14 run time environmentLecture 14 run time environment
Lecture 14 run time environment
 
Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
 
Assembly language part I
Assembly language part IAssembly language part I
Assembly language part I
 

Viewers also liked

Căn hộ vạn hưng phát quận 8
Căn hộ vạn hưng phát quận 8Căn hộ vạn hưng phát quận 8
Căn hộ vạn hưng phát quận 8tranduyen76
 
Prova elemental 2008
Prova elemental 2008Prova elemental 2008
Prova elemental 2008Josep Miquel
 
Ikumen communication
Ikumen communicationIkumen communication
Ikumen communicationTakaho Maeda
 
Ponencia Desarrollo Territorial Barahona
Ponencia Desarrollo Territorial BarahonaPonencia Desarrollo Territorial Barahona
Ponencia Desarrollo Territorial Barahona
Alain Jordà
 
Sebastian ingles
Sebastian inglesSebastian ingles
Sebastian ingles
Sebastianestepamaldonado
 
Ponencia smagua zaragoza marzo 2016
Ponencia smagua zaragoza marzo 2016Ponencia smagua zaragoza marzo 2016
Ponencia smagua zaragoza marzo 2016
Alain Jordà
 
http://accountants.inboxhilllocalarea.com/
http://accountants.inboxhilllocalarea.com/http://accountants.inboxhilllocalarea.com/
http://accountants.inboxhilllocalarea.com/accountantsbh
 
Tele3113 wk2tue
Tele3113 wk2tueTele3113 wk2tue
Tele3113 wk2tueVin Voro
 
Waterfall video
Waterfall videoWaterfall video
Waterfall video
Paul_Antony_Beagley
 
Bedrijfspresentatie C2 - The Communication Square
Bedrijfspresentatie C2 - The Communication SquareBedrijfspresentatie C2 - The Communication Square
Bedrijfspresentatie C2 - The Communication SquareValerie Leeman
 
Ennio Ciriolo - Chi gioca con la nostra storia?
Ennio Ciriolo - Chi gioca con la nostra storia?Ennio Ciriolo - Chi gioca con la nostra storia?
Ennio Ciriolo - Chi gioca con la nostra storia?enniociriolo
 

Viewers also liked (20)

Nagasaki
NagasakiNagasaki
Nagasaki
 
Practica excel
Practica excelPractica excel
Practica excel
 
Căn hộ vạn hưng phát quận 8
Căn hộ vạn hưng phát quận 8Căn hộ vạn hưng phát quận 8
Căn hộ vạn hưng phát quận 8
 
Prova elemental 2008
Prova elemental 2008Prova elemental 2008
Prova elemental 2008
 
Ucp s.tax 2
Ucp s.tax 2Ucp s.tax 2
Ucp s.tax 2
 
Ikumen communication
Ikumen communicationIkumen communication
Ikumen communication
 
Ponencia Desarrollo Territorial Barahona
Ponencia Desarrollo Territorial BarahonaPonencia Desarrollo Territorial Barahona
Ponencia Desarrollo Territorial Barahona
 
Lect04
Lect04Lect04
Lect04
 
Sebastian ingles
Sebastian inglesSebastian ingles
Sebastian ingles
 
Ponencia smagua zaragoza marzo 2016
Ponencia smagua zaragoza marzo 2016Ponencia smagua zaragoza marzo 2016
Ponencia smagua zaragoza marzo 2016
 
http://accountants.inboxhilllocalarea.com/
http://accountants.inboxhilllocalarea.com/http://accountants.inboxhilllocalarea.com/
http://accountants.inboxhilllocalarea.com/
 
Tele3113 wk2tue
Tele3113 wk2tueTele3113 wk2tue
Tele3113 wk2tue
 
Waterfall video
Waterfall videoWaterfall video
Waterfall video
 
Extlect02
Extlect02Extlect02
Extlect02
 
Designing call
Designing callDesigning call
Designing call
 
Ar&G
Ar&GAr&G
Ar&G
 
JAXB
JAXBJAXB
JAXB
 
Bedrijfspresentatie C2 - The Communication Square
Bedrijfspresentatie C2 - The Communication SquareBedrijfspresentatie C2 - The Communication Square
Bedrijfspresentatie C2 - The Communication Square
 
Ennio Ciriolo - Chi gioca con la nostra storia?
Ennio Ciriolo - Chi gioca con la nostra storia?Ennio Ciriolo - Chi gioca con la nostra storia?
Ennio Ciriolo - Chi gioca con la nostra storia?
 
Iphone 4
Iphone 4Iphone 4
Iphone 4
 

Similar to Extlect04

Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecturePiyush Mittal
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel Programming
HARMAN Services
 
I3 multicore processor
I3 multicore processorI3 multicore processor
I3 multicore processorAmol Barewar
 
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Ontico
 
Ceph in the GRNET cloud stack
Ceph in the GRNET cloud stackCeph in the GRNET cloud stack
Ceph in the GRNET cloud stack
Nikos Kormpakis
 
Intel® hyper threading technology
Intel® hyper threading technologyIntel® hyper threading technology
Intel® hyper threading technology
Amirali Sharifian
 
Pitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardwarePitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardware
Tamas K Lengyel
 
SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...
SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...
SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...
Linaro
 
CrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardwareCrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardware
Tamas K Lengyel
 
QuadIron An open source library for number theoretic transform-based erasure ...
QuadIron An open source library for number theoretic transform-based erasure ...QuadIron An open source library for number theoretic transform-based erasure ...
QuadIron An open source library for number theoretic transform-based erasure ...
Scality
 
Paper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresPaper_Scalable database logging for multicores
Paper_Scalable database logging for multicores
Hyo jeong Lee
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Pythian
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
Kernel TLV
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHC
dterei
 
OpenStack Scale-out Networking Architecture
OpenStack Scale-out Networking ArchitectureOpenStack Scale-out Networking Architecture
OpenStack Scale-out Networking Architecture
Randy Bias
 
Properly Use Parallel DML for ETL
Properly Use Parallel DML for ETLProperly Use Parallel DML for ETL
Properly Use Parallel DML for ETL
Andrej Pashchenko
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64
Yi-Hsiu Hsu
 
FIWARE Lab architecture, an open point to start the installation of a new region
FIWARE Lab architecture, an open point to start the installation of a new regionFIWARE Lab architecture, an open point to start the installation of a new region
FIWARE Lab architecture, an open point to start the installation of a new region
Fernando Lopez Aguilar
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- MulticoreLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Hsien-Hsin Sean Lee, Ph.D.
 

Similar to Extlect04 (20)

Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecture
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel Programming
 
I3 multicore processor
I3 multicore processorI3 multicore processor
I3 multicore processor
 
I3
I3I3
I3
 
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
Cистема распределенного, масштабируемого и высоконадежного хранения данных дл...
 
Ceph in the GRNET cloud stack
Ceph in the GRNET cloud stackCeph in the GRNET cloud stack
Ceph in the GRNET cloud stack
 
Intel® hyper threading technology
Intel® hyper threading technologyIntel® hyper threading technology
Intel® hyper threading technology
 
Pitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardwarePitfalls of virtual machine introspection on modern hardware
Pitfalls of virtual machine introspection on modern hardware
 
SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...
SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...
SFO15-406: ARM FDPIC toolset, kernel & libraries for Cortex-M & Cortex-R mmul...
 
CrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardwareCrySys guest-lecture: Virtual machine introspection on modern hardware
CrySys guest-lecture: Virtual machine introspection on modern hardware
 
QuadIron An open source library for number theoretic transform-based erasure ...
QuadIron An open source library for number theoretic transform-based erasure ...QuadIron An open source library for number theoretic transform-based erasure ...
QuadIron An open source library for number theoretic transform-based erasure ...
 
Paper_Scalable database logging for multicores
Paper_Scalable database logging for multicoresPaper_Scalable database logging for multicores
Paper_Scalable database logging for multicores
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHC
 
OpenStack Scale-out Networking Architecture
OpenStack Scale-out Networking ArchitectureOpenStack Scale-out Networking Architecture
OpenStack Scale-out Networking Architecture
 
Properly Use Parallel DML for ETL
Properly Use Parallel DML for ETLProperly Use Parallel DML for ETL
Properly Use Parallel DML for ETL
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64
 
FIWARE Lab architecture, an open point to start the installation of a new region
FIWARE Lab architecture, an open point to start the installation of a new regionFIWARE Lab architecture, an open point to start the installation of a new region
FIWARE Lab architecture, an open point to start the installation of a new region
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- MulticoreLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
 

More from Vin Voro

Tele3113 tut6
Tele3113 tut6Tele3113 tut6
Tele3113 tut6Vin Voro
 
Tele3113 tut5
Tele3113 tut5Tele3113 tut5
Tele3113 tut5Vin Voro
 
Tele3113 tut4
Tele3113 tut4Tele3113 tut4
Tele3113 tut4Vin Voro
 
Tele3113 tut1
Tele3113 tut1Tele3113 tut1
Tele3113 tut1Vin Voro
 
Tele3113 tut3
Tele3113 tut3Tele3113 tut3
Tele3113 tut3Vin Voro
 
Tele3113 tut2
Tele3113 tut2Tele3113 tut2
Tele3113 tut2Vin Voro
 
Tele3113 wk11tue
Tele3113 wk11tueTele3113 wk11tue
Tele3113 wk11tueVin Voro
 
Tele3113 wk10wed
Tele3113 wk10wedTele3113 wk10wed
Tele3113 wk10wedVin Voro
 
Tele3113 wk10tue
Tele3113 wk10tueTele3113 wk10tue
Tele3113 wk10tueVin Voro
 
Tele3113 wk11wed
Tele3113 wk11wedTele3113 wk11wed
Tele3113 wk11wedVin Voro
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wedVin Voro
 
Tele3113 wk9tue
Tele3113 wk9tueTele3113 wk9tue
Tele3113 wk9tueVin Voro
 
Tele3113 wk8wed
Tele3113 wk8wedTele3113 wk8wed
Tele3113 wk8wedVin Voro
 
Tele3113 wk9wed
Tele3113 wk9wedTele3113 wk9wed
Tele3113 wk9wedVin Voro
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wedVin Voro
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wedVin Voro
 
Tele3113 wk7tue
Tele3113 wk7tueTele3113 wk7tue
Tele3113 wk7tueVin Voro
 
Tele3113 wk6wed
Tele3113 wk6wedTele3113 wk6wed
Tele3113 wk6wedVin Voro
 
Tele3113 wk6tue
Tele3113 wk6tueTele3113 wk6tue
Tele3113 wk6tueVin Voro
 
Tele3113 wk5tue
Tele3113 wk5tueTele3113 wk5tue
Tele3113 wk5tueVin Voro
 

More from Vin Voro (20)

Tele3113 tut6
Tele3113 tut6Tele3113 tut6
Tele3113 tut6
 
Tele3113 tut5
Tele3113 tut5Tele3113 tut5
Tele3113 tut5
 
Tele3113 tut4
Tele3113 tut4Tele3113 tut4
Tele3113 tut4
 
Tele3113 tut1
Tele3113 tut1Tele3113 tut1
Tele3113 tut1
 
Tele3113 tut3
Tele3113 tut3Tele3113 tut3
Tele3113 tut3
 
Tele3113 tut2
Tele3113 tut2Tele3113 tut2
Tele3113 tut2
 
Tele3113 wk11tue
Tele3113 wk11tueTele3113 wk11tue
Tele3113 wk11tue
 
Tele3113 wk10wed
Tele3113 wk10wedTele3113 wk10wed
Tele3113 wk10wed
 
Tele3113 wk10tue
Tele3113 wk10tueTele3113 wk10tue
Tele3113 wk10tue
 
Tele3113 wk11wed
Tele3113 wk11wedTele3113 wk11wed
Tele3113 wk11wed
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wed
 
Tele3113 wk9tue
Tele3113 wk9tueTele3113 wk9tue
Tele3113 wk9tue
 
Tele3113 wk8wed
Tele3113 wk8wedTele3113 wk8wed
Tele3113 wk8wed
 
Tele3113 wk9wed
Tele3113 wk9wedTele3113 wk9wed
Tele3113 wk9wed
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wed
 
Tele3113 wk7wed
Tele3113 wk7wedTele3113 wk7wed
Tele3113 wk7wed
 
Tele3113 wk7tue
Tele3113 wk7tueTele3113 wk7tue
Tele3113 wk7tue
 
Tele3113 wk6wed
Tele3113 wk6wedTele3113 wk6wed
Tele3113 wk6wed
 
Tele3113 wk6tue
Tele3113 wk6tueTele3113 wk6tue
Tele3113 wk6tue
 
Tele3113 wk5tue
Tele3113 wk5tueTele3113 wk5tue
Tele3113 wk5tue
 

Recently uploaded

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 

Extlect04

  • 2. 2
  • 4. R3000 TLB Refill • Can be optimised for TLB refill • An example routine only mfc0 k1,C0_CONTEXT – Does not need to check the mfc0 k0,C0_EPC # mfc0 delay exception type # slot – Does not need to save any lw k1,0(k1) # may double registers # fault (k0 = orig EPC) • It uses a specialised assembly routine that only nop uses k0 and k1. mtc0 k1,C0_ENTRYLO – Does not check if PTE exists nop • Assumes virtual linear array – tlbwr see extended OS notes jr k0 rfe • With careful data structure choice, exception handler can be made very fast 4
  • 5. Virtual Linear Array page table • Assume a 2-level PT • Assume 2nd-level PT nodes are in virtual memory • Assume all 2nd-level nodes are allocated contiguously ⇒ 2nd-level nodes form a contiguous array indexed by page number 5
  • 6. Virtual Linear Array Operation • Index into 2nd level page table without referring to root PT! • Simply use the full page number as the PT index! • Leave unused parts of PT unmapped! • If access is attempted to unmapped part of PT, a secondary page fault is triggered – This will load the mapping for the PT from the root PT – Root PT is kept in physical memory (cannot trigger page faults) 6
  • 7. Virtual Linear Array Page Table • Use Context register to simply load PTE by indexing a PTE array in virtual memory • Occasionally, will get double faults – A TLB miss, while servicing a TLB miss – Handled by general exception handler PTEbase in virtual memory in kseg2 • Protected from user access 7
  • 8. c0 Context Register • c0_Context = PTEBase + 4 * PageNumber – PTEs are 4 bytes – PTEBase is the base local of the page table array (note: aligned on 4 MB boundary) – PTEBase is (re)initialised by the OS whenever the page table array is changed • E.g on a context switch – After an exception, c0_Context contains the address of the PTE required to refill the TLB. 8
  • 9. Code for VLA TLB refill handler Load PTE mfc0 k1,C0_CONTEXT address from mfc0 k0,C0_EPC # mfc0 delay slot context register lw k1,0(k1) # may double fault # (k0 = orig EPC) nop Move the PTE Load address of mtc0 k1,C0_ENTRYLO into EntryLo. instruction to nop return to tlbwr jr k0 rfe Load the PTE. Note: this load can cause a Write EntryLo TLB refill miss itself, but into random TLB this miss is handled by the entry. Return from the general exception vector. exception The general exception vector has to understand this situation and deal with 9 in appropriately
  • 10. Software-loaded TLB • Pros – Can simplify hardware design – provide greater flexibility in page table structure • Cons – typically have slower refill times than hardware managed TLBs. 10
  • 11. Trends • Operating systems – moving functionality into user processes – making greater use of virtual memory for mapping data structures held within the kernel. • RAM is increasing – TLB capacity is relatively static • Statement: – Trends place greater stress upon the TLB by increasing miss rates and hence, decreasing overall system performance. – True/False? How to evaluate? 11
  • 12. Design Tradeoffs for Software-Managed TLBs David Nagle, Richard Uhlig, Tim Stanley, Stuart Sechrest Trevor Mudge & Richard Brown 12
  • 13. 13
  • 14. 14
  • 15. 15
  • 16. Note the TLB miss costs • What is expected to be the common case? 16
  • 17. 17
  • 18. 18
  • 19. 19
  • 21. Specialising the L2/L1K miss vector 21
  • 22. Other performance improvements? • In Paper – Pinned slots – Increased TLB size – TLB associativity • Other options – Bigger page sizes – Multiple page sizes 22
  • 23. Itanium Page Table • Takes a bet each way • Loading – software – two different format hardware walkers • Page table – software defined – linear – hashed 23
  • 24. 24
  • 26. P4 • Sophisticated, supports: – demand paging – pure segmentation – segmentation with paging • Heart of the VM architecture – Local Descriptor Table (LDT) – Global Descriptor Table (GDT) • LDT – 1 per process – describes segments local to each process (code, stack, data, etc.) • GDT – shared by all programs – describes system segments (including OS itself)
  • 27. P4 • To access a segment P4 – loads a selector in 1 of the segment registers –…
  • 28. P4 • a P4 selector:
  • 29. P4 determine LDT or GDT (and • a P4 selector: privilege level) 1 11 • when selector is in register, corresponding segment descriptor is – fetched by MMU – loaded in internal MMU registers • Next, segment descriptor is used to handle memory reference (discussed later)
  • 30. P4 LDT GDT 000 zero these 3 bits and add the 16b to base address of LDT or GDT
  • 31. P4 LDT GDT 000 • finds a a P4 code segment descriptor
  • 32. P4 • calculating a linear address from selector+offset
  • 33. P4 IF no paging used: we are done this is the physical address ELSE linear address interpreted as virtual address paging again!
  • 34. P4 with paging • every process has page directory – 1024 32bit entries – each entry points to page table – page table contains 1024 32bit entries – each entry points to page frame mapping linear address to physical address with paging
  • 35. P4 • Many OSs: –BASE=0 –LIMIT=MAX • no segmentation at all