SlideServe
Menu
Préférences
© SlideServe · v2026

Virtual Memory

archibald avatar
15 diapositives · 437 Views · Feb 08, 2013

Virtual Memory. -Neha Jain. Topics Covered. Introduction Virtual Memory Address Translation Thrashing and Protection References. Introduction. Memory Hierarchy. CPU. Memory Content : Cache  Main Mem  Secondary Mem. Functional units.

Virtual Memory - slide 1
01 / 15Virtual Memory
1 / 17

Télécharger la présentation

Virtual Memory
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Virtual Memory -Neha Jain ELEC6200-001

  2. Topics Covered • Introduction • Virtual Memory • Address Translation • Thrashing and Protection • References ELEC6200-001

  3. Introduction • Memory Hierarchy CPU Memory Content: Cache  Main Mem Secondary Mem Functional units Registers Memory Parameters: Access Time: increase with distance from CPU Cost/Bit: decrease with distance from CPU Capacity: increase with distance from CPU Internal cache External Cache Main Memory Cache : use SRAM (faster and costly) Main Memory : use DRAM (slower and cheap) Secondary Memory (Disk) ELEC6200-001

  4. Principle of Locality • Temporal Locality : Item tend to be referenced again soon • Spatial Locality : Nearby items tend to be referenced again soon • Cache Memory -Takes advantage of principle of locality ELEC6200-001

  5. Virtual Memory • A technique that uses main memory as a “cache” for secondary storage • Basic Terminology • Page : Fixed number of bytes recognized by operating system • Page Fault : Occurs when accessed page is not in main memory • Physical Address : Address in main memory • Virtual Address: Addresses that application programmers deal with and are translated by MMU to physical address ELEC6200-001

  6. 31 30 29 28 27 ……………....13 12 11………….…….…2 1 0 Virtual Page Number Page Offset Translation 29 28 27 ……………………...13 12 11………….…….…2 1 0 Physical page number Page Offset MMU: Memory management unit Physical address Virtual Address Cache Data Processor Physical address Data Main memory Virtual Address ELEC6200-001 Physical Address

  7. Physical Memory Memory Management Unit (MMU) S1 x S3 free S2 S3 x S1 Segment Table free S4 Segmented Memory ELEC6200-001

  8. Virtual Address Physical Memory Segment # Displacement Segment Table + V prot limit base datum Protection Physical address Compare segment Limit to displacement Mapping Segmented Address Segment# : specifies which segment to use( base address and length) Displacement: offset from base address for actual memory access ELEC6200-001

  9. P a g e t a b l e P h y s i c a l m e m o r y P h y s i c a l p a g e o r d i s k a d d r e s s Page table for address translation V i r t u a l p a g e n u m b e r V a l i d 1 1 1 1 0 1 1 0 D i s k s t o r a g e 1 1 0 1 ELEC6200-001

  10. Page Tables The page table ,PC and registers specifies the state or process of a program Swap Space : Space on hard disk for all the pages of a process ELEC6200-001

  11. Making Address Translation Fast • By Translation-lookaside Buffer ELEC6200-001

  12. TLBs and Caches ELEC6200-001

  13. Who handles page faults? • Operating System (in system software) - Look up page table - Choose a physical page to replace - Bring referenced page from disk into chosen physical page ELEC6200-001

  14. Thrashing is a disaster and it occurs when program does not follow locality principle and continuously swaps pages from main memory to disk • Protection • One of the way is by having different physical addresses for a same virtual address ELEC6200-001

  15. References • http://www.eng.auburn.edu/users/nelsovp/courses/elec5200_6200/ • http://www.eng.auburn.edu/users/agrawvd/E5200/course.html • http://webster.cs.ucr.edu/AoA/Windows/HTML/MemoryArchitecturea3.html ELEC6200-001