Windows XP & Vista Memory Management

Slides:



Advertisements
Similar presentations
OS Fall’02 Virtual Memory Operating Systems Fall 2002.
Advertisements

Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
Memory/Storage Architecture Lab Computer Architecture Virtual Memory.
OS Spring ‘04 Paging and Virtual Memory Operating Systems Spring 2004.
Memory Management (II)
Operating System Support Focus on Architecture
Paging and Virtual Memory. Memory management: Review  Fixed partitioning, dynamic partitioning  Problems Internal/external fragmentation A process can.
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 121 Today’s class Operating System Machine Level.
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Computer Organization and Architecture
03/22/2004CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
CSCI2413 Lecture 6 Operating Systems Memory Management 2 phones off (please)
VIRTUAL MEMORY. Virtual memory technique is used to extents the size of physical memory When a program does not completely fit into the main memory, it.
CS 241 Section Week #12 (04/22/10).
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
CSE378 Virtual memory.1 Evolution in memory management techniques In early days, single program ran on the whole machine –used all the memory available.
Windows 2000 Memory Management Computing Department, Lancaster University, UK.
Memory Management in Windows and Linux &. Windows Memory Management Virtual memory manager (VMM) –Executive component responsible for managing memory.
By Matthew Smith, John Allred, Chris Fulton. Requirements Relocation Protection Sharing Logical Organization Physical Organization.
Address Translation Mechanism of 80386
CSNB334 Advanced Operating Systems 5. Memory Management
Chapter 8 Memory Management Dr. Yingwu Zhu. Outline Background Basic Concepts Memory Allocation.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Computer Architecture Lecture 28 Fasih ur Rehman.
Operating Systems Unit 8: – Virtual Memory management Operating Systems.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Lecture 19: Virtual Memory
®® Microsoft Windows 7 for Power Users Tutorial 9 Evaluating System Performance.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
1 Linux Operating System 許 富 皓. 2 Memory Addressing.
CE Operating Systems Lecture 14 Memory management.
Memory Management Fundamentals Virtual Memory. Outline Introduction Motivation for virtual memory Paging – general concepts –Principle of locality, demand.
Virtual Memory Virtual Memory is created to solve difficult memory management problems Data fragmentation in physical memory: Reuses blocks of memory.
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
Virtual Memory 1 1.
1 CSE451 Architectural Supports for Operating Systems Autumn 2002 Gary Kimura Lecture #2 October 2, 2002.
Lecture 18 Windows – NT File System (NTFS)
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
ICOM Noack Memory management Virtual memory Paging and segmentation Demand paging Memory management hardware.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Carnegie Mellon Introduction to Computer Systems / Spring 2009 March 23, 2009 Virtual Memory.
Windows XP Memory Management Aaron Lanoy and Jason Farnsworth.
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
CSCI 156: Lab 11 Paging. Our Simple Architecture Logical memory space for a process consists of 16 pages of 4k bytes each. Your program thinks it has.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
Virtual Memory Pranav Shah CS147 - Sin Min Lee. Concept of Virtual Memory Purpose of Virtual Memory - to use hard disk as an extension of RAM. Personal.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 33 Paging Read Ch. 9.4.
Computer Organization
CS161 – Design and Architecture of Computer
Lecture 12 Virtual Memory.
CS703 - Advanced Operating Systems
Address Translation Mechanism of 80386
Module IV Memory Organization.
Module 2: Computer-System Structures
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 29: Virtual Memory-Address Translation
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
CSE451 Virtual Memory Paging Autumn 2002
Computer Architecture
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Paging and Segmentation
Module 2: Computer-System Structures
Virtual Memory 1 1.
Presentation transcript:

Windows XP & Vista Memory Management Sources: http://www.microsoft.com/whdc/driver/kernel/XP_kernel.mspx#ECLAC http://www.et.byu.edu/groups/it344/Class%20Notes/CaseStudies/LinuxWinRefs/Chapter%2021_WinXP.pdf

Objective Become familiar with Window’s methods of implementing memory management and handling memory space

Windows XP – Basics Windows XP uses a virtual memory manager (VMM) VMM creates 4GB contiguous memory space that spans both main memory and disk memory Memory space on disk is called a pagefile

Windows XP Memory Organization Each process given unique 4GB virtual address space 2GB for process 2GB for kernel-mode components Each process has a page directory table Each process’ page directory table is stored in a universal page directory register A page directory table is full of page directory entries (PDE), each of which points to a page table A page table consists of page table entries (PTE), which point to a page frame in main memory or on disk

Windows XP Virtual Address Translation For faster access times, Windows also implements a Translation Look-aside Buffer (a buffer that holds a limited amount of entries but translates directly from a virtual address to a physical one)

Structure of a PTE in Windows XP 5-bit Protection bits 20-bits for offset in page file 4-bits for specifying if the page is on disk and which pagefile it is located in 3-bits to indicate the state of a page that is in memory: Valid Modified Transition – in the process of being written to disk

Protection in Page Table in Windows XP 5-bits (called protection bits) on each PTE hold security information 1-bit for read privileges 1-bit for write privileges 1-bit for execute privileges 1-bit for copy-on-write 1-bit for specifying whether the system should throw an exception upon access of that PTE

Windows XP’s Logical Prefetcher Windows keeps traces of memory accesses by certain applications, including Windows itself, and stores that information in scenario files Windows also keeps track of which applications are needed most commonly at start-up When Windows XP is starting up and initializing devices, it makes one asynchronous request via the prefetcher for the pages needed by the applications to be loaded

Windows XP’s Logical Prefetcher Fetches by the location of the pages on disk What is a potential problem with this method? Pages can get scattered over the disk To overcome this problem, Prefetcher uses system idle time to optimize the layout of the pages and move the pages to the appropriate location on disk

Windows XP’s Prefetcher – Pros and Cons Reduces window’s boot time Reduces required disk access time by loading multiple pages for application at once Drawback more disk space is used to store application memory-access traces However… most users prefer faster application loads as opposed to more disk-space

Windows XP’s Prefetcher’s Parameters Prefetcher’s default settings can be found and modified in the Windows Registry at the location shown below. EnablePrefetcher (DWORD) 0x00000001= application launch prefetching 0x00000002= boot prefetching 0x00000003= both

Windows Vista Memory Management Overview

Superfetch An improvement upon the Windows XP Prefetch feature One improvement comes in the way of security: when blocks of memory are loaded in main memory, they are written to a random location. This is known as Address Space Layout Randomization or ASLR This keeps malicious software from knowing the starting address for a given application, thus preventing remote execution attacks

Superfetch vs Prefetch only loads pages for application upon launch Superfetch Tries to always keep the pages for the most-used applications in main memory

Readyboost Process of using USB flash drives or CF and SD memory cards to increase main memory Basic concept being that USB flash drives can be accessed faster than disk drives