Virtualizing Intelligent Memory

Total Page:16

File Type:pdf, Size:1020Kb

Virtualizing Intelligent Memory ActiveOS: Virtualizing Intelligent Memory Mark Oskin, Frederic T. Chong, and Timothy Sherwood* Department of Computer Science University of California at Davis systems with limited memory requirements suchas PDAs. Abstract We exp ect that the memory demands of most systems will Current trends in DRAM memory chip fabrication have led scale with DRAM density, and multiple memory chips will many researchers to propose \intel ligent memory" architec- b e required. Weintro duce Active Pages, a page-based archi- tures that integrate microprocessors or logic with memory. tecture for intelligent memory systems (see Figure 1). Ac- Such architectures o er a potential solution to the growing tive Pages consist of a sup erpage of data and a collection communication bottleneck between conventional microproces- of functions which op erate on that data. Implementations sors and memory. Previous studies, however, have focused of ActivePages can execute functions for hundreds of pages upon single-chip systems and have largely neglected o -chip simultaneously,providing substantial parallelism. communication in larger systems. To use ActivePages, computation for an application must We introduceActiveOS, an operating system which demon- b e divided, or partitioned, between pro cessor and memory. strates multi-process execution on Active Pages [OCS98], a For example, we use Active-Page functions to gather op erands page-based intel ligent memory architecture. We present re- for a sparse-matrix multiply and pass those op erands on to sults from multiprogrammed workloads running on a proto- the pro cessor for multiplication. To p erform such a compu- typeoperating system implemented on top of the SimpleScalar tation, the matrix data and gathering functions must rst processor simulator. Our results indicate that paging and b e loaded into a memory system that supp orts ActivePages. inter-chip communication can be scheduled to achieve high Then the pro cessor, through a series of memory-mapp ed performance for applications that use Active Pages with min- writes, starts the gather functions in the memory system. imal adverse e ects to applications that only use conven- As the op erands are gathered, the pro cessor reads them from tional pages. Overal l, ActiveOS al lows Active Pages to ac- user-de ned output areas in each page, multiplies them, and celerate individual applications by up to 1000 percent and to writes the results back to the array datastructures in mem- accelerate total workloads from 20 to 60 percent as long as ory. physical memory can contain the working set of each indi- Previous work [OCS98 ] has shown that ActivePages are vidual application. a exible architecture that can lead to dramatic p erformance improvements (up to 1000X) in a single-pro cess over conven- tional memory systems. This pap er evaluates ActivePages 1 Intro duction in a multi-pro cess environment. ActivePages fundamentally change memory systems from a uniform storage resource to Micropro cessor p erformance continues to follow phenomenal a non-uniform collection of storage and computational ele- growth curves whichdrive the computing industry. Unfor- ments that require b oth management and scheduling. tunately, memory systems are falling b ehind when \feeding" We intro duce ActiveOS, a prototyp e op erating system data to these pro cessors. Pro cessor-centric optimizations to which illustrates the interaction between an OS and Ac- bridge this processor-memory gap [WM95 ] [Wil95 ] include tive Pages. Our goal is to demonstrate that ActivePages prefetching, sp eculation, out-of-order execution, and mul- can p erform correctly and ecientlyinamulti-pro cess en- tithreading. Unfortunately, manyof these approaches can vironment. In suchanenvironment, our results show that lead to memory-bandwidth problems [BGK96 ]. while paging ActivePages to and from disk can b e exp en- DRAM memory technology, however, is growing signif- sive, opp ortunities to overlap memory and pro cessor com- icantly denser. The Semiconductor Industry Asso ciation putation increase dramatically. On mixed workloads of con- (SIA) roadmap [Sem94] pro jects mass pro duction of 1-gigabit ventional and Active-Page applications, ActivePage single- DRAM chips by the year 2001. If wedevote half of the area pro cess p erformance translates well to a multi-pro cess envi- of such a chip to logic, we exp ect the DRAM pro cess to ronment as long as memory pressure is mo derate. Note that supp ort approximately 32 million transistors. This density our current cycle-level simulation environment limits work- has led many researchers to prop ose intelligent memory sys- load sizes in our exp eriments. Our applications are highly tems that integrate pro cessors or logic with DRAM. The scalable, however, and we exp ect our results to generalize to increased bandwidth and lower latency of on-chip commu- larger workload sizes. nication promises to address many asp ects of the pro cessor- + The remainder of this pap er is organized as follows: Sec- memory gap [P 97] [KADP97 ]. tion 2 describ es the three main services provided by Ac- These improvements, however, are limited to single-chip tiveOS to supp ort Active Pages. Section 3 describ es our exp erimental metho dology. Section 5 describ es the appli- Acknowledgments: Thanks to Andre Dehon, Matt Farrens, cations in our workload. Section 6 presents our results. Lance Halstead, Diana Keen, and our anonymous referees. This Section 7 discusses related work. Finally, Sections 8 and 9 work is supp orted in part by an NSF CAREER award to Fred Chong, by NSF grant CCR-9812415, by grants from Altera, and present future work and conclusions. by grants from the UC Davis Academic Senate. More info at http://arch.cs.ucdavis.edu/AP *Now at University of California, San Diego functions A set of synchronization variables which the AP and the pro cessor use to co ordinate activities b etween the pro cessor and ActivePages within the page group. DD There are two imp ortant implications of this interface. hronization variables are essentially memory- P F First, the sync mapp ed registers that allow a pro cess to eciently invoke e-Page functions without a system call. Second, the al- D Activ lo cation of ActivePages, which are signi cantly larger than ventional pages, requires memory management of mixed F con sup erpages and pages. This memory management will b e- come a signi cant issue as we discuss paging and our p erfor- Disk mance results. D 2.2 Interpage Communication D D An application will generally use more data than will t on ePage (each one is 512 Kbytes in our current D a single Activ tation). Such data will often reside in page groups, F implemen a collection of ActivePages whichwork together to p erform F functions on the data. For example, inserting an element into the middle of an arraythatspansmultiple pages would require elements to movebetween pages. Such data movement is accomplished entirely via explicit Figure 1: The ActivePage architecture interpage communication requests. Active-Page functions can reference any virtual address available to their allo cat- 2 ActiveOS ing pro cess. For p erformance, applications should keep ref- erences from functions to addresses on other pages to a min- ActiveOS is a prototyp e op erating system for which the pri- imum. mary goal is to demonstrates mechanisms which correctly Our implementation uses a processor mediated approach manage ActivePages in a multi-pro cess environment. These to satisfying inter-page memory references. Each Active mechanisms fall into three key categories: pro cess services, Page explicitly distinguishes b etween lo cal and non-lo cal ref- interpage communication, and virtual memory. erences bychecking if a virtual address is b etween its start- ing address, kept in a base register, and the starting address plus the Active-Page size. When an ActivePage reaches a 2.1 Pro cess Services non-lo cal reference it raises an interrupt and blo cks. The The rst step in developing op erating system supp ort for Ac- interrupt causes the pro cessor to obtain the memory request tivePages involves providing basic services for user pro cesses through a memory-mapp ed read and executes an OS han- to allo cate pages and bind functions to them. Furthermore, dler. The handler consults a p er-pro cess table which will a pro cess must b e able to eciently call these functions. determine if the ActivePage containing the reference is in The ActivePage interface is designed to resemble the in- physical memory. If so, the page is lo cated and the request is terface of a conventional memory system. Pro cesses commu- satis ed. If not, a page fault o ccurs and the page is brought nicate with ActivePages through memory reads and writes. in from disk. In practice, alarge numb er of non-lo cal ref- Sp eci cally,theinterface includes: erences from di erent pages can b e satis ed up on a single interrupt, substantially reducing overhead. We assume that Standard memory interface functions: a single interrupt takes 3.5 ms. write(address, data) and read(address) Our pro cessor-mediated approach makes inter-page com- munication exp ensive, but greatly simpli es page faults and A set of functions available for computation on a par- reduces the complexity of ActivePage chip implementations. ticular ActivePage: AP functions We assume that our memory chips can trigger pro cessor in- terrupts, but pro cessor p olling is also a p ossiblility. An allo cation function: AP al loc(group id) 2.3 Virtual Memory When insucentphysical memory is available to execute all id and which allo cates an ActivePage in group group pro cesses in the system, memory must be paged to swap returns the virtual address of the start of the sup erpage space.
Recommended publications
  • Memory Deduplication: An
    1 Memory Deduplication: An Effective Approach to Improve the Memory System Yuhui Deng1,2, Xinyu Huang1, Liangshan Song1, Yongtao Zhou1, Frank Wang3 1Department of Computer Science, Jinan University, Guangzhou, 510632, P. R. China {[email protected][email protected][email protected][email protected]} 2Key Laboratory of Computer System and Architecture, Chinese Academy of Sciences Beijing, 100190, PR China 3 School of Computing,University of Kent, CT27NF, UK [email protected] Abstract— Programs now have more aggressive demands of memory to hold their data than before. This paper analyzes the characteristics of memory data by using seven real memory traces. It observes that there are a large volume of memory pages with identical contents contained in the traces. Furthermore, the unique memory content accessed are much less than the unique memory address accessed. This is incurred by the traditional address-based cache replacement algorithms that replace memory pages by checking the addresses rather than the contents of those pages, thus resulting in many identical memory contents with different addresses stored in the memory. For example, in the same file system, opening two identical files stored in different directories, or opening two similar files that share a certain amount of contents in the same directory, will result in identical data blocks stored in the cache due to the traditional address-based cache replacement algorithms. Based on the observations, this paper evaluates memory compression and memory deduplication. As expected, memory deduplication greatly outperforms memory compression. For example, the best deduplication ratio is 4.6 times higher than the best compression ratio.
    [Show full text]
  • Memory Protection at Option
    Memory Protection at Option Application-Tailored Memory Safety in Safety-Critical Embedded Systems – Speicherschutz nach Wahl Auf die Anwendung zugeschnittene Speichersicherheit in sicherheitskritischen eingebetteten Systemen Der Technischen Fakultät der Universität Erlangen-Nürnberg zur Erlangung des Grades Doktor-Ingenieur vorgelegt von Michael Stilkerich Erlangen — 2012 Als Dissertation genehmigt von der Technischen Fakultät Universität Erlangen-Nürnberg Tag der Einreichung: 09.07.2012 Tag der Promotion: 30.11.2012 Dekan: Prof. Dr.-Ing. Marion Merklein Berichterstatter: Prof. Dr.-Ing. Wolfgang Schröder-Preikschat Prof. Dr. Michael Philippsen Abstract With the increasing capabilities and resources available on microcontrollers, there is a trend in the embedded industry to integrate multiple software functions on a single system to save cost, size, weight, and power. The integration raises new requirements, thereunder the need for spatial isolation, which is commonly established by using a memory protection unit (MPU) that can constrain access to the physical address space to a fixed set of address regions. MPU-based protection is limited in terms of available hardware, flexibility, granularity and ease of use. Software-based memory protection can provide an alternative or complement MPU-based protection, but has found little attention in the embedded domain. In this thesis, I evaluate qualitative and quantitative advantages and limitations of MPU-based memory protection and software-based protection based on a multi-JVM. I developed a framework composed of the AUTOSAR OS-like operating system CiAO and KESO, a Java implementation for deeply embedded systems. The framework allows choosing from no memory protection, MPU-based protection, software-based protection, and a combination of the two.
    [Show full text]
  • Murciano Soto, Joan; Rexachs Del Rosario, Dolores Isabel, Dir
    This is the published version of the bachelor thesis: Murciano Soto, Joan; Rexachs del Rosario, Dolores Isabel, dir. Anàlisi de presta- cions de sistemes d’emmagatzematge per IA. 2021. (958 Enginyeria Informàtica) This version is available at https://ddd.uab.cat/record/248510 under the terms of the license TFG EN ENGINYERIA INFORMATICA,` ESCOLA D’ENGINYERIA (EE), UNIVERSITAT AUTONOMA` DE BARCELONA (UAB) Analisi` de prestacions de sistemes d’emmagatzematge per IA Joan Murciano Soto Resum– Els programes d’Intel·ligencia` Artificial (IA) son´ programes que fan moltes lectures de fitxers per la seva naturalesa. Aquestes lectures requereixen moltes crides a dispositius d’emmagatzematge, i aquestes poden comportar endarreriments en l’execucio´ del programa. L’ample de banda per transportar dades de disc a memoria` o viceversa pot esdevenir en un bottleneck, incrementant el temps d’execucio.´ De manera que es´ important saber detectar en aquest tipus de programes, si les entrades/sortides (E/S) del nostre sistema se saturen. En aquest treball s’estudien diferents programes amb altes quantitats de lectures a disc. S’utilitzen eines de monitoritzacio,´ les quals ens informen amb metriques` relacionades amb E/S a disc. Tambe´ veiem l’impacte que te´ el swap, el qual tambe´ provoca un increment d’operacions d’E/S. Aquest document preten´ mostrar la metodologia utilitzada per a realitzar l’analisi` descrivint les eines i els resultats obtinguts amb l’objectiu de que serveixi de guia per a entendre el comportament i l’efecte de les E/S i el swap. Paraules clau– E/S, swap, IA, monitoritzacio.´ Abstract– Artificial Intelligence (IA) programs make many file readings by nature.
    [Show full text]
  • Strict Memory Protection for Microcontrollers
    Master Thesis Spring 2019 Strict Memory Protection for Microcontrollers Erlend Sveen Supervisor: Jingyue Li Co-supervisor: Magnus Själander Sunday 17th February, 2019 Abstract Modern desktop systems protect processes from each other with memory protection. Microcontroller systems, which lack support for memory virtualization, typically only uses memory protection for areas that the programmer deems necessary and does not separate processes completely. As a result the application still appears monolithic and only a handful of errors may be detected. This thesis presents a set of solutions for complete separation of processes, unleash- ing the full potential of the memory protection unit embedded in modern ARM-based microcontrollers. The operating system loads multiple programs from disk into indepen- dently protected portions of memory. These programs may then be started, stopped, modified, crashed etc. without affecting other running programs. When loading pro- grams, a new allocation algorithm is used that automatically aligns the memories for use with the protection hardware. A pager is written to satisfy additional run-time demands of applications, and communication primitives for inter-process communication is made available. Since every running process is unable to get access to other running processes, not only reliability but also security is improved. An application may be split so that unsafe or error-prone code is separated from mission-critical code, allowing it to be independently restarted when an error occurs. With executable and writeable memory access rights being mutually exclusive, code injection is made harder to perform. The solution is all transparent to the programmer. All that is required is to split an application into sub-programs that operates largely independently.
    [Show full text]
  • HALO: Post-Link Heap-Layout Optimisation
    HALO: Post-Link Heap-Layout Optimisation Joe Savage Timothy M. Jones University of Cambridge, UK University of Cambridge, UK [email protected] [email protected] Abstract 1 Introduction Today, general-purpose memory allocators dominate the As the gap between memory and processor speeds continues landscape of dynamic memory management. While these so- to widen, efficient cache utilisation is more important than lutions can provide reasonably good behaviour across a wide ever. While compilers have long employed techniques like range of workloads, it is an unfortunate reality that their basic-block reordering, loop fission and tiling, and intelligent behaviour for any particular workload can be highly subop- register allocation to improve the cache behaviour of pro- timal. By catering primarily to average and worst-case usage grams, the layout of dynamically allocated memory remains patterns, these allocators deny programs the advantages of largely beyond the reach of static tools. domain-specific optimisations, and thus may inadvertently Today, when a C++ program calls new, or a C program place data in a manner that hinders performance, generating malloc, its request is satisfied by a general-purpose allocator unnecessary cache misses and load stalls. with no intimate knowledge of what the program does or To help alleviate these issues, we propose HALO: a post- how its data objects are used. Allocations are made through link profile-guided optimisation tool that can improve the fixed, lifeless interfaces, and fulfilled by
    [Show full text]
  • Computer Problem Solving 1) What Is the First 640K of Memory Addresses Called?
    Computer Problem Solving 1) What is the first 640k of memory addresses called? a. extended memory b. upper memory c. high memory d. conventional memory Competency: Personal computer components 2) What was the first socket to support dual voltage inputs? a. Socket 7 b. Socket 5 c. Socket 8 d. Socket 423 Competency: Personal computer components 3) Which card is used to add modems and network cards to the portable computer? a. Type 1 b. Type 2 c. Type 3 d. Type 4 Competency: Laptop and portable devices 4) Which type of battery is used most often in notebook computers? a. NiMH b. NiCad c. Li-ION d. Zinc Air Competency: Laptop and portable devices 5) Which of the following does the erase lamp remove? a. static charge from the developed image area on the paper b. static charge from the margin areas of the paper c. leftover toner particles from the paper d. any static charge that may remain on the drum Competency: Printers and scanners 6) Which standard that was first available in Windows 95 and that incorporated as a BIOS configuration option to conserve electrical power? a. ACPI b. APM c. PCMIA d. Energy Star Competency: Operating systems 7) Which of the following files is the virtual memory swap file needed to boot Windows 2000/XP? a. Pagefile.sys b. Hal.dll c. Kernel32.dll d. Himem.sys Competency: Operating systems 8) Which of the following protocols guarantees packet delivery? a. HTTP b. IP c. TCP d. UDP Competency: Networks 9) What is the standard recommendation for changing your password? a.
    [Show full text]
  • Hiding Process Memory Via Anti-Forensic Techniques
    DIGITAL FORENSIC RESEARCH CONFERENCE Hiding Process Memory via Anti-Forensic Techniques By: Frank Block (Friedrich-Alexander Universität Erlangen-Nürnberg (FAU) and ERNW Research GmbH) and Ralph Palutke (Friedrich-Alexander Universität Erlangen-Nürnberg) From the proceedings of The Digital Forensic Research Conference DFRWS USA 2020 July 20 - 24, 2020 DFRWS is dedicated to the sharing of knowledge and ideas about digital forensics research. Ever since it organized the first open workshop devoted to digital forensics in 2001, DFRWS continues to bring academics and practitioners together in an informal environment. As a non-profit, volunteer organization, DFRWS sponsors technical working groups, annual conferences and challenges to help drive the direction of research and development. https://dfrws.org Forensic Science International: Digital Investigation 33 (2020) 301012 Contents lists available at ScienceDirect Forensic Science International: Digital Investigation journal homepage: www.elsevier.com/locate/fsidi DFRWS 2020 USA d Proceedings of the Twentieth Annual DFRWS USA Hiding Process Memory Via Anti-Forensic Techniques Ralph Palutke a, **, 1, Frank Block a, b, *, 1, Patrick Reichenberger a, Dominik Stripeika a a Friedrich-Alexander Universitat€ Erlangen-Nürnberg (FAU), Germany b ERNW Research GmbH, Heidelberg, Germany article info abstract Article history: Nowadays, security practitioners typically use memory acquisition or live forensics to detect and analyze sophisticated malware samples. Subsequently, malware authors began to incorporate anti-forensic techniques that subvert the analysis process by hiding malicious memory areas. Those techniques Keywords: typically modify characteristics, such as access permissions, or place malicious data near legitimate one, Memory subversion in order to prevent the memory from being identified by analysis tools while still remaining accessible.
    [Show full text]
  • Virtual Memory - Paging
    Virtual memory - Paging Johan Montelius KTH 2020 1 / 32 The process code heap (.text) data stack kernel 0x00000000 0xC0000000 0xffffffff Memory layout for a 32-bit Linux process 2 / 32 Segments - a could be solution Processes in virtual space Address translation by MMU (base and bounds) Physical memory 3 / 32 one problem Physical memory External fragmentation: free areas of free space that is hard to utilize. Solution: allocate larger segments ... internal fragmentation. 4 / 32 another problem virtual space used code We’re reserving physical memory that is not used. physical memory not used? 5 / 32 Let’s try again It’s easier to handle fixed size memory blocks. Can we map a process virtual space to a set of equal size blocks? An address is interpreted as a virtual page number (VPN) and an offset. 6 / 32 Remember the segmented MMU MMU exception no virtual addr. offset yes // < within bounds index + physical address segment table 7 / 32 The paging MMU MMU exception virtual addr. offset // VPN available ? + physical address page table 8 / 32 the MMU exception exception virtual address within bounds page available Segmentation Paging linear address physical address 9 / 32 a note on the x86 architecture The x86-32 architecture supports both segmentation and paging. A virtual address is translated to a linear address using a segmentation table. The linear address is then translated to a physical address by paging. Linux and Windows do not use use segmentation to separate code, data nor stack. The x86-64 (the 64-bit version of the x86 architecture) has dropped many features for segmentation.
    [Show full text]
  • Chapter 4 Memory Management and Virtual Memory Asst.Prof.Dr
    Chapter 4 Memory management and Virtual Memory Asst.Prof.Dr. Supakit Nootyaskool IT-KMITL Object • To discuss the principle of memory management. • To understand the reason that memory partitions are importance for system organization. • To describe the concept of Paging and Segmentation. 4.1 Difference in main memory in the system • The uniprogramming system (example in DOS) allows only a program to be present in memory at a time. All resources are provided to a program at a time. Example in a memory has a program and an OS running 1) Operating system (on Kernel space) 2) A running program (on User space) • The multiprogramming system is difference from the mentioned above by allowing programs to be present in memory at a time. All resource must be organize and sharing to programs. Example by two programs are in the memory . 1) Operating system (on Kernel space) 2) Running programs (on User space + running) 3) Programs are waiting signals to execute in CPU (on User space). The multiprogramming system uses memory management to organize location to the programs 4.2 Memory management terms Frame Page Segment 4.2 Memory management terms Frame Page A fixed-lengthSegment block of main memory. 4.2 Memory management terms Frame Page A fixed-length block of data that resides in secondary memory. A page of data may temporarily beSegment copied into a frame of main memory. A variable-lengthMemory management block of data that residesterms in secondary memory. A segment may temporarily be copied into an available region of main memory or the segment may be divided into pages which can be individuallyFrame copied into mainPage memory.
    [Show full text]
  • Module 4: Memory Management the Von Neumann Principle for the Design and Operation of Computers Requires That a Program Has to Be Primary Memory Resident to Execute
    Operating Systems/Memory management Lecture Notes Module 4: Memory Management The von Neumann principle for the design and operation of computers requires that a program has to be primary memory resident to execute. Also, a user requires to revisit his programs often during its evolution. However, due to the fact that primary memory is volatile, a user needs to store his program in some non-volatile store. All computers provide a non-volatile secondary memory available as an online storage. Programs and files may be disk resident and downloaded whenever their execution is required. Therefore, some form of memory management is needed at both primary and secondary memory levels. Secondary memory may store program scripts, executable process images and data files. It may store applications, as well as, system programs. In fact, a good part of all OS, the system programs which provide services (the utilities for instance) are stored in the secondary memory. These are requisitioned as needed. The main motivation for management of main memory comes from the support for multi- programming. Several executables processes reside in main memory at any given time. In other words, there are several programs using the main memory as their address space. Also, programs move into, and out of, the main memory as they terminate, or get suspended for some IO, or new executables are required to be loaded in main memory. So, the OS has to have some strategy for main memory management. In this chapter we shall discuss the management issues and strategies for both main memory and secondary memory.
    [Show full text]
  • Computing :: Operatingsystems :: DOS Beyond 640K 2Nd
    DOS® Beyond 640K 2nd Edition DOS® Beyond 640K 2nd Edition James S. Forney Windcrest®/McGraw-Hill SECOND EDITION FIRST PRINTING © 1992 by James S. Forney. First Edition © 1989 by James S. Forney. Published by Windcrest Books, an imprint of TAB Books. TAB Books is a division of McGraw-Hill, Inc. The name "Windcrest" is a registered trademark of TAB Books. Printed in the United States of America. All rights reserved. The publisher takes no responsibility for the use of any of the materials or methods described in this book, nor for the products thereof. Library of Congress Cataloging-in-Publication Data Forney, James. DOS beyond 640K / by James S. Forney. - 2nd ed. p. cm. Rev. ed. of: MS-DOS beyond 640K. Includes index. ISBN 0-8306-9717-9 ISBN 0-8306-3744-3 (pbk.) 1. Operating systems (Computers) 2. MS-DOS (Computer file) 3. PC -DOS (Computer file) 4. Random access memory. I. Forney, James. MS-DOS beyond 640K. II. Title. QA76.76.063F644 1991 0058.4'3--dc20 91-24629 CIP TAB Books offers software for sale. For information and a catalog, please contact TAB Software Department, Blue Ridge Summit, PA 17294-0850. Acquisitions Editor: Stephen Moore Production: Katherine G. Brown Book Design: Jaclyn J. Boone Cover: Sandra Blair Design, Harrisburg, PA WTl To Sheila Contents Preface Xlll Acknowledgments xv Introduction xvii Chapter 1. The unexpanded system 1 Physical limits of the system 2 The physical machine 5 Life beyond 640K 7 The operating system 10 Evolution: a two-way street 12 What else is in there? 13 Out of hiding 13 Chapter 2.
    [Show full text]
  • Memory Management
    Memory Management These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang’s courses at GMU can make a single machine readable copy and print a single copy of each slide for their own reference as long as the slide contains the copyright statement, and the GMU facilities are not used to produce the paper copies. Permission for any other use, either in machine-readable or printed form, must be obtained form the author in writing. CS471 1 Memory 0000 A a set of data entries 0001 indexed by addresses 0002 0003 Typically the basic data 0004 0005 unit is byte 0006 0007 In 32 bit machines, 4 bytes 0008 0009 grouped to words 000A 000B Have you seen those 000C 000D DRAM chips in your PC ? 000E 000F CS471 2 1 Logical vs. Physical Address Space The addresses used by the RAM chips are called physical addresses. In primitive computing devices, the address a programmer/processor use is the actual address. – When the process fetches byte 000A, the content of 000A is provided. CS471 3 In advanced computers, the processor operates in a separate address space, called logical address, or virtual address. A Memory Management Unit (MMU) is used to map logical addresses to physical addresses. – Various mapping technologies to be discussed – MMU is a hardware component – Modern processors have their MMU on the chip (Pentium, Athlon, …) CS471 4 2 Continuous Mapping: Dynamic Relocation Virtual Physical Memory Memory Space Processor 4000 The processor want byte 0010, the 4010th byte is fetched CS471 5 MMU for Dynamic Relocation CS471 6 3 Segmented Mapping Virtual Physical Memory Memory Space Processor Obviously, more sophisticated MMU needed to implement this CS471 7 Swapping A process can be swapped temporarily out of memory to a backing store (a hard drive), and then brought back into memory for continued execution.
    [Show full text]