By Matthew Smith, John Allred, Chris Fulton. Requirements Relocation Protection Sharing Logical Organization Physical Organization.

Slides:



Advertisements
Similar presentations
MEMORY MANAGEMENT Y. Colette Lemard. MEMORY MANAGEMENT The management of memory is one of the functions of the Operating System MEMORY = MAIN MEMORY =
Advertisements

Chapter 4 Memory Management Basic memory management Swapping
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Paging: Design Issues. Readings r Silbershatz et al: ,
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Memory Management Design & Implementation Segmentation Chapter 4.
Virtual Memory Chapter 8.
Memory Management (II)
Understanding Operating Systems1 Operating Systems Virtual Memory Thrashing Single-User Contiguous Scheme Fixed Partitions Dynamic Partitions.
CE6105 Linux 作業系統 Linux Operating System 許 富 皓. Chapter 2 Memory Addressing.
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 121 Today’s class Operating System Machine Level.
Virtual Memory Chapter 8.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Chapter 3.2 : Virtual Memory
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
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.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
CSI 400/500 Operating Systems Spring 2009 Lecture #9 – Paging and Segmentation in Virtual Memory Monday, March 2 nd and Wednesday, March 4 th, 2009.
File System Variations and Software Caching May 19, 2000 Instructor: Gary Kimura.
Memory Management April 28, 2000 Instructor: Gary Kimura.
1 Memory Management in Representative Operating Systems.
CS 241 Section Week #12 (04/22/10).
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
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.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
ITEC 325 Lecture 29 Memory(6). Review P2 assigned Exam 2 next Friday Demand paging –Page faults –TLB intro.
Some VM Complications Extra memory accesses Page tables are huge
Lecture 19: Virtual Memory
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
1 Linux Operating System 許 富 皓. 2 Memory Addressing.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Chapter 4 Memory Management Virtual Memory.
The Three C’s of Misses 7.5 Compulsory Misses The first time a memory location is accessed, it is always a miss Also known as cold-start misses Only way.
Computer Systems Week 14: Memory Management Amanda Oddie.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
Windows XP & Vista Memory Management
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
Processes and Virtual Memory
UNIX & Windows NT Name: Jing Bai ID: Date:8/28/00.
Windows XP Memory Management Aaron Lanoy and Jason Farnsworth.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
COS 318: Operating Systems Virtual Memory Design Issues.
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
Virtual Memory Chapter 8.
Memory Management.
Lecture 12 Virtual Memory.
Memory Caches & TLB Virtual Memory
CS703 - Advanced Operating Systems
ITEC 202 Operating Systems
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Main Memory Management
Chapter 8: Main Memory.
O.S Lecture 13 Virtual Memory.
Chapter 9: Virtual-Memory Management
Page Replacement.
Computer Architecture
Module IV Memory Organization.
Page Replacement Implementation Issues
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE451 Virtual Memory Paging Autumn 2002
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CS703 - Advanced Operating Systems
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
COMP755 Advanced Operating Systems
CSE 542: Operating Systems
Presentation transcript:

By Matthew Smith, John Allred, Chris Fulton

Requirements Relocation Protection Sharing Logical Organization Physical Organization

Sharing Lazy evaluation: Philosophy used in windows memory manager to wait until as late as possible to avoid doing and expensive operation. Like paging to hard disk. If two process are going to be using the same page the memory manager will mark it as read only and map both of the process’s virtual address’s to a shared page. Copy on write, if the memory may want to be written but can be shared to start, then if a process writes, it will copy it and write it to that process’s memory.

Protection Unless shared the process’s cannot access each others memory. Each page has access flags to determine types of access allowed. Read only, Read/Write, Execute only (if hardware supports), Guard Page, No Access, Copy on Write Memory has a kernel mode and a user mode.

Relocation and Logical Organization TLB uses a LRU policy to load pages into its memory Main Memory uses a local replacement policy, with global scope, each process has a dynamic number of pages assigned in main memory If a page fault occurs new page brought in and other removed to virtual memory based on LRU if no room is left, on a per process basis.

Physical Organization Each process has its own page directory and page tables that take 4MB per process In a 4 byte address 10 bytes for lookup in page directory index for the correct logical page. 10 bits for lookup in the page table to find actual base physical page Last 12 bits are an offset for within the base physical page you looked up previously. This scheme prevent process over righting each other because each process thinks it has all the memory to itself

Memory Implementation 32 bit addressing allows 4GB of address space in XP, with PAE (Physical Address Extension) allows up to 128 GB mostly for servers and datacenters 4 KB pages in original implementation, can vary from 4KB to 64KB Each process see’s 4GB of address space, 2GB is reserved for kernel level threads. 2GB for process and user level threads, kernel level threads may access. You can change the kernel space to 1GB with 3GB for process and user level threads, for memory intensive applications. Process may use as much as they want of this 2GB, though it may mean putting it in virtual memory.

Vista’s Implementation Basically the same in Vista 32 bit, memory size limitations change with 64 bit addressing Vista Basic tops out at 8GB by design Vista Home tops out at 16GB by design Vista Business, Enterprise and Ultimate can exceed 128GB Actual memory limit with 64 bit addressing is 16 exa- bytes(I wonder what we would use it for)‏ Aggressive pre-fetching (Super Fetch), based on previous use, of pages into main memory, its suppose to use all your ram

Performance These numbers are relative every system is a little different, these are to access different memory types Register time250ps L1Cache time: 1ns, 4 times slower then Register Ram or main memory time: 10ns, 10 times slower then cache Hard disk time: 10ms, 1000 times slower then ram

Memory Optimization Use ram to avoid using Virtual Memory Move virtual memory off disk that hold boot and system partitions Format with NTFS with 4KB Clusters (defaults to this), with 4KB page sizes Let Windows manage the virtual memory size. If you have a Raid-0 drive use it to store the pagefile Do not use a fault tolerant drive, like Raid 1 or Raid 5 Don’t touch the rest of memory management in general, things that “Free” up your ram don’t improve performance most of the time.

Shows opening idle, then opening firefox, and then opening windows media center.

Comparison Linux and Windows XP have surprisingly a lot in common when it comes to memory management, including copy-on-write, shadow pages, management daemons, memory-mapped files, and interprocess communication Windows uses a local working set scheme, but employs a process (Balance Set Manager) to check every second whether or not the working sets are adequate. Linux only invokes its memory manager when a page fault is generated Windows uses a dynamically allocated portion of the hard drive for virtual memory, which is mingled with data and sometimes results in segmentation. Linux uses a separate swap partition for virtual memory.

Demo Of Pre-fetch Of Virtual Memory Benefit Interesting change in regsitry: HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\ Control\Session Manager\MemoryManagement “DisablePagingExecutive” you could change this value from 0 to 1 it will move all your core system and user level drivers to main memory, have at least 512 MB of Ram. Other programs may suffer, because of thrashing.

Credits Optimization: AMD TLB error 0&p=2 0&p=2 “Windows NT” by Helen Custer html registry tweak html