LANGUAGE RUNTIME NON-VOLATILE RAM AWARE SWAPPING

Similar documents
Older geometric based addressing is called CHS for cylinder-head-sector. This triple value uniquely identifies every sector.

Run-Time Environments/Garbage Collection

UNIT III MEMORY MANAGEMENT

Heap, Variables, References, and Garbage. CS152. Chris Pollett. Oct. 13, 2008.

6.172 Performance Engineering of Software Systems Spring Lecture 9. P after. Figure 1: A diagram of the stack (Image by MIT OpenCourseWare.

CSCE Operating Systems Non-contiguous Memory Allocation. Qiang Zeng, Ph.D. Fall 2018

Memory Management! Goals of this Lecture!

CS399 New Beginnings. Jonathan Walpole

Dynamic Memory: Alignment and Fragmentation

Operating Systems Unit 6. Memory Management

Memory Allocation. Static Allocation. Dynamic Allocation. Dynamic Storage Allocation. CS 414: Operating Systems Spring 2008

Memory Management. Goals of this Lecture. Motivation for Memory Hierarchy

DYNAMICALLY CACHING VIDEO CONTENT BASED ON USER LIKELIHOOD OF INTERACTING WITH CONTENT ELEMENT

MULTIPLE TIER LOW OVERHEAD MEMORY LEAK DETECTOR

In Java we have the keyword null, which is the value of an uninitialized reference type

Memory Management! How the hardware and OS give application pgms:" The illusion of a large contiguous address space" Protection against each other"

Dynamic Storage Allocation

Memory Management 3/29/14 21:38

Performance Analysis of Java Communications with and without CORBA

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1

Run-time Environments

NGN Progress Report. Table of Contents

Run-time Environments

Lecture 17. Edited from slides for Operating System Concepts by Silberschatz, Galvin, Gagne

Heap Management. Heap Allocation

Zing Vision. Answering your toughest production Java performance questions

Dynamic Data Structures. CSCI 112: Programming in C

Prediction and Selection of Sequence of Actions Related to Voice Activated Computing Systems

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Name, Scope, and Binding. Outline [1]

Secure web proxy resistant to probing attacks

Enterprise Architect. User Guide Series. Profiling

Enterprise Architect. User Guide Series. Profiling. Author: Sparx Systems. Date: 10/05/2018. Version: 1.0 CREATED WITH

StackVsHeap SPL/2010 SPL/20

Run-time Environment

Chapter 9: Virtual-Memory

An efficient method to avoid path lookup in file access auditing in IO path to improve file system IO performance

Chapter 3: Operating-System Structures

Optimal Algorithm. Replace page that will not be used for longest period of time Used for measuring how well your algorithm performs

CS370 Operating Systems

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit

Preview. Memory Management

CSE 120. Translation Lookaside Buffer (TLB) Implemented in Hardware. July 18, Day 5 Memory. Instructor: Neil Rhodes. Software TLB Management

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Virtual Memory COMPSCI 386

CIS Operating Systems Non-contiguous Memory Allocation. Professor Qiang Zeng Spring 2018

Garbage Collection. Steven R. Bagley

Reference Counting. Reference counting: a way to know whether a record has other users

Manual Allocation. CS 1622: Garbage Collection. Example 1. Memory Leaks. Example 3. Example 2 11/26/2012. Jonathan Misurda

APPLICATIONS ON TOP OF DNA CENTER: TOPOLOGY EVOLUTION BASED ON CUSTOMER NETWORK DYNAMICS

Lecture Notes on Garbage Collection

Buffer Overflow Defenses

Page Replacement. 3/9/07 CSE 30341: Operating Systems Principles

Displaying web pages within a software keyboard

Heap Compression for Memory-Constrained Java

Technical Disclosure Commons

Q.1 Explain Computer s Basic Elements

Exploiting the Behavior of Generational Garbage Collector

SSD Admission Control for Content Delivery Networks

JavaOS. David Burhans 2/3/2003 CS384 Dr. Taylor

Lecture Notes on Garbage Collection

Memory: Overview. CS439: Principles of Computer Systems February 26, 2018

CS 61C: Great Ideas in Computer Architecture. The Memory Hierarchy, Fully Associative Caches

+ Random-Access Memory (RAM)

Windows Java address space

Deallocation Mechanisms. User-controlled Deallocation. Automatic Garbage Collection

CHAPTER 3 RESOURCE MANAGEMENT

JAVA PERFORMANCE. PR SW2 S18 Dr. Prähofer DI Leopoldseder

Lecture 2: September 9

12: Memory Management

Virtual Memory Outline

Replay Real World Network Conditions To Test Cellular Switching

Chapter 3: Operating-System Structures

Processes and Tasks What comprises the state of a running program (a process or task)?

Cooperative Memory Management in Embedded Systems

CIS Operating Systems Memory Management. Professor Qiang Zeng Fall 2017

2 Introduction to Java. Introduction to Programming 1 1

Chapter 9: Virtual Memory

Memory Management. Dr. Yingwu Zhu

Introduction to Java

Course: Operating Systems Instructor: M Umair. M Umair

Java Performance Tuning

Synchronizing Media Content In A Shared Virtual Reality Environment

PARTIAL CLICK PROTECTIONS FOR ADS

Structure of Programming Languages Lecture 10

Principles of Operating Systems

Garbage Collection. Akim D le, Etienne Renault, Roland Levillain. May 15, CCMP2 Garbage Collection May 15, / 35

Chapter 9: Virtual Memory

First-In-First-Out (FIFO) Algorithm

Memory Hierarchy, Fully Associative Caches. Instructor: Nick Riasanovsky

198:231 Intro to Computer Organization. 198:231 Introduction to Computer Organization Lecture 14

Behavior-Triggered Answer Reconfirmation for Spam Detection in Online Surveys

memory management Vaibhav Bajpai

OPERATING SYSTEMS UNIT - 1

Programmer Directed GC for C++ Michael Spertus N2286= April 16, 2007

CS370 Operating Systems

CS 111. Operating Systems Peter Reiher

The Processor Memory Hierarchy

Advanced Memory Allocation

Transcription:

Technical Disclosure Commons Defensive Publications Series July 03, 2017 LANGUAGE RUNTIME NON-VOLATILE AWARE SWAPPING Follow this and additional works at: http://www.tdcommons.org/dpubs_series Recommended Citation "LANGUAGE RUNTIME NON-VOLATILE AWARE SWAPPING", Technical Disclosure Commons, ( July 03, 2017) http://www.tdcommons.org/dpubs_series/576 This work is licensed under a Creative Commons Attribution 4.0 License. This Article is brought to you for free and open access by Technical Disclosure Commons. It has been accepted for inclusion in Defensive Publications Series by an authorized administrator of Technical Disclosure Commons.

: LANGUAGE RUNTIME NON-VOLATILE AWARE SWAPPING Language Runtime Non-Volatile Aware Swapping Abstract One possible way to take advantage of NV s lower latency is to use it as swap space for a program. Moving stored data from to NV frees up space that can then be used for storing other program data or instructions. Since data stored in can be accessed faster, moving stored data from to NV increases the overall performance of the program. As an example, a language runtime may take advantage of NV by identifying program memory that is less likely to be used in the near future and storing the identified program memory in NV rather than directly in. This enables the program to consume less, which is per byte more expensive than NV. The advantage of using the language runtime to trigger these types of paging events is that one does not have to wait for the operating system to realize that these memory regions are not being used often. I. Program Runtime Usage of NV Non-volatile memory, such as flash memory, retains stored content even when power is turned off. In contrast, volatile memory such as dynamic random access memory (D) and static random access memory (S) loses stored data when power is turned off. Non-volatile random access memory (NV) falls somewhere between flash memory and D. For example, NV has much lower latency than flash memory and it is cheaper than, but it retains data when not powered, much like flash memory. One possible way to take advantage of NV s lower latency is to use it as swap space for a program. For example, if a program uses large amounts of then some of the program working memory can be stored in NV instead of. Moving stored data from to Published by Technical Disclosure Commons, 2017 2

Defensive Publications Series, Art. 576 [2017] NV frees up space that can then be used for storing other program data or instructions. Since data stored in can be accessed faster, moving stored data from to NV increases the overall performance of the program. A language runtime is a program that manages the execution of a program, sometimes including automatic memory management. For example, a Java runtime manages the execution of a Java program within the Java Virtual Machine. Other programming languages that exploit a runtime program are the languages Go, Dart, C# and Objective C. Figure 1 illustrates a highly simplified diagram of the Java Virtual Machine (JVM). The Java runtime manages the execution of a Java program within the JVM including automatic memory management via a garbage collector. The garbage collector periodically monitors allocation of the program memory, for example, in the heap memory, and deallocates program memory associated with objects that are no longer being referenced by the Java program. The garbage collector looks at the heap memory and identifies objects that are in use and objects that are unused and deletes the unused objects. An object is identified as in use if some portion of the Java program is maintaining a reference to that object. In contrast, an object is identified as unused if no portion of the Java program is maintaining a reference to that object and thus, the memory associated with the unused object can be deallocated. http://www.tdcommons.org/dpubs_series/576 3

: LANGUAGE RUNTIME NON-VOLATILE AWARE SWAPPING Java Virtual Machine (JVM) Heap Memory Java Program Source Code Java Compiler Object A Object B Object C NV Garbage Collector Object D Object E Operating System (OS) CPU NV Figure 1: High-level diagram of garbage collection in the JVM. II. NV Storage Strategies As an example, a language runtime may take advantage of NV by identifying program memory that is less likely to be used in the near future and storing the identified program memory in NV rather than directly in. Using the language runtime, rather than the operating system, to determine which program memory to store in NV is more efficient because the language runtime, rather than the operating system, has access to more of the information needed to make such a decision. Referring to Figure 1, the garbage collector or other portion of the language runtime can be configured to identify objects in the heap memory that are less likely to be used in the near future and if the identified objects are allocated to be stored in, the objects may be reallocated to NV thereby, moving these objects from Published by Technical Disclosure Commons, 2017 4

Defensive Publications Series, Art. 576 [2017] to NV. In Figure 1, Objects B and C may be identified as less likely to be used in the near future by the program and may be reallocated to NV. This enables the program to consume less, which is per byte more expensive than NV. This can be particularly valuable on servers or other computing devices that are simultaneously executing multiple programs. storage requirement savings across multiple applications executing on the computing device can grow to be quite meaningful. As another example, a garbage collector or automatic memory management program that runs periodically could be configured to identify program memory associated with data structures that will not be needed by the program until the garbage collector s next cycle. The garbage collector could store the identified program memory in NV rather than at the end of the garbage collector s current cycle. This leaves space into which additional program data instructions to be loaded into so that they will be available at lower latency than if they had to be fetched from NV. This increases the overall performance of the program. As another example, a language runtime could be configured to identify program data that is unlikely to be used in the near future within the program and move the identified data to NV. For example, the Go language runtime could detect memory that is only accessible in Go by using unsafe operations (i.e., operations included in the unsafe Go package), such as accessing array slices that have been truncated such that they no longer point to the beginning of the underlying array. This memory cannot be freed by the garbage collector but it also cannot be accessed by the language without the use of commands included in the unsafe package. This information may be identified as unlikely to be used and can be moved from to NV. http://www.tdcommons.org/dpubs_series/576 5

: LANGUAGE RUNTIME NON-VOLATILE AWARE SWAPPING In the case that unsafe is used and the information is required, the only cost is a small latency increase associated with retrieving this memory from NV rather than. As another example, a language runtime may be configured to detect information in memory regions of the program that it knows will not be needed for a long time and move them to NV. For example, in the Go programming language, when a goroutine is waiting for a timer to expire, that goroutine's stack or other code that will not be executed until the timer expires can be moved to NV for the duration of the timer. The advantage of using the language runtime to trigger these types of paging events is that one does not have to wait for the operating system to realize that these memory regions are not being used often. Preempting the operating system by leveraging runtime program information can therefore lead to improved performance. Published by Technical Disclosure Commons, 2017 6