Comp215: Performance 2: Java Internals

Size: px
Start display at page:

Download "Comp215: Performance 2: Java Internals"

Transcription

1

2 Comp215: Performance 2: Java Internals Mack Joyner, Dan S. Wallach (Rice University) Copyright 2016, Mack Joyner, Dan S. Wallach. All rights reserved.

3 Recall: Collision Resolution Chaining: 0 Store all elements that hash to the same slot in a linked list Store a pointer to the head of the linked list in the hash table slot k 5 k 2 k 6 m 1 k 1 k 4 k 7 k 3 k 8 Open Addressing: All elements stored in hash table itself When collisions occur, use a systematic (consistent) procedure to store elements in free slots of the table

4 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list 0 k 1 k 4 k 5 k 2 k 6 k 7 k 3 Store a pointer to the head of the linked list in the hash table slot k 8 m 1 Open Addressing: All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table

5 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list 0 k 1 k 4 k 5 k 2 k 6 k 7 k 3 Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 k 8 m 1 All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table

6 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list 0 k 1 k 4 k 5 k 2 k 6 k 7 k 3 Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself 12 k 8 m 1 When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table

7 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list 0 k 1 k 4 k 5 k 2 k 6 k 7 k 3 Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself k 8 m 1 When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table

8 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list 0 k 1 k 4 k 5 k 2 k 6 k 7 k 3 Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself k 8 m 1 When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table

9 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list 0 k 1 k 4 k 5 k 2 k 6 k 7 k 3 Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table k 8 m

10 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list 0 k 1 k 4 k 5 k 2 k 6 k 7 k 3 Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table k 8 m

11 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table k 5 k 2 k 6 m 1 k 1 k 4 k 7 k 3 k 8 Linear probing: delete and move collision chain

12 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table k 5 k 2 k 6 m 1 k 1 k 4 k 7 k 3 k 8 Linear probing: delete and move collision chain

13 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table k 5 k 2 k 6 m 1 k 1 k 4 k 7 k 3 k 8 Linear probing: delete and move collision chain initial search for 22

14 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table k 5 k 2 k 6 m 1 k 1 k 4 k 7 k 3 k 8 Linear probing: delete and move collision chain initial search for 22

15 Recall: Collision Resolution Chaining: Store all elements that hash to the same slot in a linked list Store a pointer to the head of the linked list in the hash table slot Open Addressing: Hash function: h(x) = x % 10 All elements stored in hash table itself 0 22 k 5 k 2 k 6 m 1 32 k 1 k 4 k 7 k 3 k 8 Linear probing: delete and move collision chain initial search for 22 When collisions occur, use a systematic (consistent) Linear probing: procedure insert to store in next elements in closest following free location free slots of the table

16 Live Coding Traditional vs memoized fibonacci

17 Memory Hierarchy Computer Architecture, Fifth Edition: A Quantitative approach by John Hennessy and David Patterson

18 Java Technology The Java programming language The library (JDK) Required to build java files The Java virtual machine (JVM) An instruction set and the meaning of those instructions the bytecodes Needed to run java applications

19 Garbage Collection

20 Where do objects live? You ve ignored the issue of where objects, variables, and methods live The implementation (Python or Java) takes care of these details Fred Kate Julia System.out. println() Java World

21 Where do objects live? The Java System maps Java World onto Processor Resources The implementation (Python or Java) takes care of these details Java compiler and runtime handle mapping Fred Julia Kate System.out. println() Knowing how mapping works can helps understand behavior of program Find ways how to improve it Java World k RAM Processor Core Processor Core Processor Core

22 Fundamentals In this example, what needs storage? The two classes (Point & C) Point s local members (x, y, & draw) C s local members (s, t, & m) m s local variables (a, b, & p) class Point { public int x, y; public void draw(){}; } class C { int s, t; public void m() { int a, b; Point p = new Point(); a = ; b = ; p.draw(); } } A classic example

23 Fundamentals In this example, what needs storage? The two classes (Point & C) Point s local members (x, y, & draw) C s local members (s, t, & m) m s local variables (a, b, & p) Memory in the Java runtime is divided, broadly speaking, into a Heap and a collection of Stacks STACK 0 STACK 1 p: a: b: STACK 2 STACK n Point Hello world! C String Pool new point Heap class Point { public int x, y; public void draw(){}; } class C { int s, t; public void m() { int a, b; Point p = new Point(); a = ; b = ; p.draw(); } } A classic example

24 JVM Memory Layout Stacks Growth space for stacks Heap Globals Code

25 JVM Memory Layout Stacks Growth space for stacks Heap Globals Code created variables go on the thread s stack

26 JVM Memory Layout Stacks Growth space for stacks Heap Globals Code created variables go on the thread s stack created objects with new go on the heap

27 JVM Memory Layout Stacks Growth space for stacks Heap Globals Code created variables go on the thread s stack created objects with new go on the heap Used tail call optimization in past to reduce stack use

28 JVM Memory Layout Stacks Growth space for stacks Heap Globals Code created variables go on the thread s stack created objects with new go on the heap Use garbage collection at runtime to reclaim heap space Used tail call optimization in past to reduce stack use

29 Why Garbage Collection? Today s programs consume storage freely 1GB laptops, 1-4GB deskops, 8-512GB servers 64-bit address spaces (SPARC, Itanium, Opteron) and mismanage it Memory leaks, dangling references, double free, misaligned addresses, null pointer dereference, heap fragmentation Poor use of reference locality, resulting in high cache miss rates and/or excessive demand paging Explicit memory management breaks high-level programming abstraction Luckily, you don t have to do that in Java

30 Sustainable Memory Management (AKA Garbage Collection ) When the heap runs out of space, the system copes Scours the heap looking for objects that are no longer of interest Technical term is live An object is considered live iff it can be reached from the running code Modern garbage collectors are copying collectors

31 Garbage Collection via Copying A copying collector divides the heap into two or more pools New objects are allocated in the current pool When the current pool is full, execution pauses and the collector: copies all live objects from the current pool to the empty pool swaps the designations current and empty Unreachable objects are not copied, so the new pool has free space Current Pool HEAP Empty Pool

32 Garbage Collection via Copying A copying collector divides the heap into two or more pools New objects are allocated in the current pool When the current pool is full, execution pauses and the collector: copies all live objects from the current pool to the empty pool swaps the designations current and empty Unreachable objects are not copied, so the new pool has free space Current Pool HEAP Empty Pool BEFORE Objects left in the empty pool are discarded en masse Empty Pool HEAP Current Pool AFTER

33 Copying Collector Tradeoffs Good: very low cell allocation overhead Out-of-space check requires just an addr comparison Can efficiently allocate variable-sized cells Good: compacting Eliminates fragmentation, good locality of reference Bad: twice the memory footprint When copying, pages of both spaces need to be swapped in Could lead to lots of page faults

34 Generational Garbage Collector Java uses a slightly more complex copying collector All new objects are allocated into Eden Eden is copied, when full, into one of Stable 0 or Stable 1 When Stable is too full, it is added to the Long Term Pool minor swap This is an example of a Generational Garbage Collector HEAP Eden Stable 0 Stable 1 Long Term Pool Key insight: most objects that die, die young Divide heap into generations, GC the younger object more frequently major Periodically reap the older generations Minor collection Major collection Promote young objects to older pool if they survive several garbage collections

35 Implications for Programming If you want performance, pay attention to garbage collection When you are done with an object, make sure you re not referencing it anymore Leaving a reference to the heap object will keep it live Storage can leak, or become un-recyclable Leaving a reference to a large data structure on the stack, or in a global Leads to extra collections and, eventually, an out of memory error

36 Inline Cashing IList<String> emptylist = List.Empty.create(); IList<String> list = emptylist.add( Alice").add("Bob").add("Charlie");... assertequals(list.head(), Charlie );

37 Inline Cashing IList<String> emptylist = List.Empty.create(); IList<String> list = emptylist.add( Alice").add("Bob").add("Charlie");... assertequals(list.head(), Charlie ); IList.head()

38 Inline Cashing IList<String> emptylist = List.Empty.create(); IList<String> list = emptylist.add( Alice").add("Bob").add("Charlie");... assertequals(list.head(), Charlie ); IList.head() List.head()

39 Inline Cashing IList<String> emptylist = List.Empty.create(); IList<String> list = emptylist.add( Alice").add("Bob").add("Charlie");... assertequals(list.head(), Charlie ); + check List.head() Inline cashing of this method in HotSpot JVM

40 Java Profiling Find where in the code execution is spending the most time Improving program hot path could have big impact on overall performance Don t waste time trying to improve performance in rarely executed code Use optimization techniques to improve performance of hot path JIT compilation: compile at runtime to native code and run directly on hardware Static optimizations during compile time (e.g. tail call optimization)

41 Java Profiling

42 Engineering does matter Use efficient data structures Example: Use treap instead of a tree Avoid unnecessary indirection Makes the garbage collector s job more difficult Optimize the common path 80% of work is done by 20% of code

Habanero Extreme Scale Software Research Project

Habanero Extreme Scale Software Research Project Habanero Extreme Scale Software Research Project Comp215: Java Method Dispatch Zoran Budimlić (Rice University) Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead

More information

Garbage Collection in the Java HotSpot Virtual Machine

Garbage Collection in the Java HotSpot Virtual Machine http://www.devx.com Printed from http://www.devx.com/java/article/21977/1954 Garbage Collection in the Java HotSpot Virtual Machine Gain a better understanding of how garbage collection in the Java HotSpot

More information

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions Slide 1 Outline Principles for performance oriented design Performance testing Performance tuning General

More information

General Introduction

General Introduction Managed Runtime Technology: General Introduction Xiao-Feng Li (xiaofeng.li@gmail.com) 2012-10-10 Agenda Virtual machines Managed runtime systems EE and MM (JIT and GC) Summary 10/10/2012 Managed Runtime

More information

The Design of the Inferno Virtual Machine. Introduction

The Design of the Inferno Virtual Machine. Introduction The Design of the Inferno Virtual Machine Phil Winterbottom Rob Pike Bell Labs, Lucent Technologies {philw, rob}@plan9.bell-labs.com http://www.lucent.com/inferno Introduction Virtual Machine are topical

More information

Java Garbage Collection Basics

Java Garbage Collection Basics Java Garbage Collection Basics Overview Purpose This tutorial covers the basics of how Garbage Collection works with the Hotspot JVM. Once you have learned how the garbage collector functions, learn how

More information

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc. Tuning WebSphere Application Server ND 7.0 Royal Cyber Inc. JVM related problems Application server stops responding Server crash Hung process Out of memory condition Performance degradation Check if the

More information

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters Interpreters and virtual machines Michel Schinz 2007 03 23 Interpreters Interpreters Why interpreters? An interpreter is a program that executes another program, represented as some kind of data-structure.

More information

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert Ubiquitous Computing Ubiquitous Computing The Sensor Network System Sun SPOT: The Sun Small Programmable Object Technology Technology-Based Wireless Sensor Networks a Java Platform for Developing Applications

More information

Using jvmstat and visualgc to Solve Memory Management Problems

Using jvmstat and visualgc to Solve Memory Management Problems Using jvmstat and visualgc to Solve Memory Management Problems java.sun.com/javaone/sf 1 Wally Wedel Sun Software Services Brian Doherty Sun Microsystems, Inc. Analyze JVM Machine Memory Management Problems

More information

picojava TM : A Hardware Implementation of the Java Virtual Machine

picojava TM : A Hardware Implementation of the Java Virtual Machine picojava TM : A Hardware Implementation of the Java Virtual Machine Marc Tremblay and Michael O Connor Sun Microelectronics Slide 1 The Java picojava Synergy Java s origins lie in improving the consumer

More information

2 2011 Oracle Corporation Proprietary and Confidential

2 2011 Oracle Corporation Proprietary and Confidential The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material,

More information

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation Dynamic Storage Allocation CS 44 Operating Systems Fall 5 Presented By Vibha Prasad Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need

More information

CSCI E 98: Managed Environments for the Execution of Programs

CSCI E 98: Managed Environments for the Execution of Programs CSCI E 98: Managed Environments for the Execution of Programs Draft Syllabus Instructor Phil McGachey, PhD Class Time: Mondays beginning Sept. 8, 5:30-7:30 pm Location: 1 Story Street, Room 304. Office

More information

Jonathan Worthington Scarborough Linux User Group

Jonathan Worthington Scarborough Linux User Group Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.

More information

An Oracle White Paper September 2013. Advanced Java Diagnostics and Monitoring Without Performance Overhead

An Oracle White Paper September 2013. Advanced Java Diagnostics and Monitoring Without Performance Overhead An Oracle White Paper September 2013 Advanced Java Diagnostics and Monitoring Without Performance Overhead Introduction... 1 Non-Intrusive Profiling and Diagnostics... 2 JMX Console... 2 Java Flight Recorder...

More information

Monitoring Java enviroment / applications

Monitoring Java enviroment / applications Monitoring Java enviroment / applications Uroš Majcen uros@quest-slo.com Java is Everywhere You Can Expect More. Java in Mars Rover With the help of Java Technology, and the Jet Propulsion Laboratory (JPL),

More information

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu 1. Introduction The Java virtual machine s heap stores all objects created by a running Java application. Objects are created by

More information

Mission-Critical Java. An Oracle White Paper Updated October 2008

Mission-Critical Java. An Oracle White Paper Updated October 2008 Mission-Critical Java An Oracle White Paper Updated October 2008 Mission-Critical Java The Oracle JRockit family of products is a comprehensive portfolio of Java runtime solutions that leverages the base

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android MTAT.03.262 Satish Srirama satish.srirama@ut.ee Goal Give you an idea of how to start developing Android applications Introduce major Android application concepts

More information

The Advantages of Dan Grossman CSE303 Spring 2005, Lecture 25

The Advantages of Dan Grossman CSE303 Spring 2005, Lecture 25 CSE 303: Concepts and Tools for Software Development Dan Grossman Spring 2005 Lecture 25 Memory-Management Idioms Dan Grossman CSE303 Spring 2005, Lecture 25 1 No tools or rule today Review: Java and C

More information

Organization of Programming Languages CS320/520N. Lecture 05. Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.

Organization of Programming Languages CS320/520N. Lecture 05. Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio. Organization of Programming Languages CS320/520N Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.edu Names, Bindings, and Scopes A name is a symbolic identifier used

More information

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. buford@alum.mit.edu Oct 2003 Presented to Gordon College CS 311

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. buford@alum.mit.edu Oct 2003 Presented to Gordon College CS 311 The Java Virtual Machine and Mobile Devices John Buford, Ph.D. buford@alum.mit.edu Oct 2003 Presented to Gordon College CS 311 Objectives Review virtual machine concept Introduce stack machine architecture

More information

Memory Management in the Java HotSpot Virtual Machine

Memory Management in the Java HotSpot Virtual Machine Memory Management in the Java HotSpot Virtual Machine Sun Microsystems April 2006 2 Table of Contents Table of Contents 1 Introduction.....................................................................

More information

11.1 inspectit. 11.1. inspectit

11.1 inspectit. 11.1. inspectit 11.1. inspectit Figure 11.1. Overview on the inspectit components [Siegl and Bouillet 2011] 11.1 inspectit The inspectit monitoring tool (website: http://www.inspectit.eu/) has been developed by NovaTec.

More information

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program

More information

Virtual Machine Learning: Thinking Like a Computer Architect

Virtual Machine Learning: Thinking Like a Computer Architect Virtual Machine Learning: Thinking Like a Computer Architect Michael Hind IBM T.J. Watson Research Center March 21, 2005 CGO 05 Keynote 2005 IBM Corporation What is this talk about? Virtual Machines? 2

More information

Eclipse Visualization and Performance Monitoring

Eclipse Visualization and Performance Monitoring Eclipse Visualization and Performance Monitoring Chris Laffra IBM Ottawa Labs http://eclipsefaq.org/chris Chris Laffra Eclipse Visualization and Performance Monitoring Page 1 Roadmap Introduction Introspection

More information

Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc()

Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc() CS61: Systems Programming and Machine Organization Harvard University, Fall 2009 Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc() Prof. Matt Welsh October 6, 2009 Topics for today Dynamic

More information

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate

More information

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16 Advanced compiler construction Michel Schinz 2007 03 16 General course information Teacher & assistant Course goals Teacher: Michel Schinz Michel.Schinz@epfl.ch Assistant: Iulian Dragos INR 321, 368 64

More information

Performance Improvement In Java Application

Performance Improvement In Java Application Performance Improvement In Java Application Megha Fulfagar Accenture Delivery Center for Technology in India Accenture, its logo, and High Performance Delivered are trademarks of Accenture. Agenda Performance

More information

Extreme Performance with Java

Extreme Performance with Java Extreme Performance with Java QCon NYC - June 2012 Charlie Hunt Architect, Performance Engineering Salesforce.com sfdc_ppt_corp_template_01_01_2012.ppt In a Nutshell What you need to know about a modern

More information

Garbage Collection in NonStop Server for Java

Garbage Collection in NonStop Server for Java Garbage Collection in NonStop Server for Java Technical white paper Table of contents 1. Introduction... 2 2. Garbage Collection Concepts... 2 3. Garbage Collection in NSJ... 3 4. NSJ Garbage Collection

More information

The Hotspot Java Virtual Machine: Memory and Architecture

The Hotspot Java Virtual Machine: Memory and Architecture International Journal of Allied Practice, Research and Review Website: www.ijaprr.com (ISSN 2350-1294) The Hotspot Java Virtual Machine: Memory and Architecture Prof. Tejinder Singh Assistant Professor,

More information

The Java Virtual Machine (JVM) Pat Morin COMP 3002

The Java Virtual Machine (JVM) Pat Morin COMP 3002 The Java Virtual Machine (JVM) Pat Morin COMP 3002 Outline Topic 1 Topic 2 Subtopic 2.1 Subtopic 2.2 Topic 3 2 What is the JVM? The JVM is a specification of a computing machine Instruction set Primitive

More information

Replication on Virtual Machines

Replication on Virtual Machines Replication on Virtual Machines Siggi Cherem CS 717 November 23rd, 2004 Outline 1 Introduction The Java Virtual Machine 2 Napper, Alvisi, Vin - DSN 2003 Introduction JVM as state machine Addressing non-determinism

More information

Lecture 32: The Java Virtual Machine. The Java Virtual Machine

Lecture 32: The Java Virtual Machine. The Java Virtual Machine The University of North Carolina at Chapel Hill Spring 2002 Lecture 32: The Java Virtual Machine April 12 1 The Java Virtual Machine Java Architecture Java Programming Language Java Virtual Machine (JVM)

More information

x64 Servers: Do you want 64 or 32 bit apps with that server?

x64 Servers: Do you want 64 or 32 bit apps with that server? TMurgent Technologies x64 Servers: Do you want 64 or 32 bit apps with that server? White Paper by Tim Mangan TMurgent Technologies February, 2006 Introduction New servers based on what is generally called

More information

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 3, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts

More information

Restraining Execution Environments

Restraining Execution Environments Restraining Execution Environments Segurança em Sistemas Informáticos André Gonçalves Contents Overview Java Virtual Machine: Overview The Basic Parts Security Sandbox Mechanisms Sandbox Memory Native

More information

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University Operating Systems CSE 410, Spring 2004 File Management Stephen Wagner Michigan State University File Management File management system has traditionally been considered part of the operating system. Applications

More information

Review of Hashing: Integer Keys

Review of Hashing: Integer Keys CSE 326 Lecture 13: Much ado about Hashing Today s munchies to munch on: Review of Hashing Collision Resolution by: Separate Chaining Open Addressing $ Linear/Quadratic Probing $ Double Hashing Rehashing

More information

Practical Performance Understanding the Performance of Your Application

Practical Performance Understanding the Performance of Your Application Neil Masson IBM Java Service Technical Lead 25 th September 2012 Practical Performance Understanding the Performance of Your Application 1 WebSphere User Group: Practical Performance Understand the Performance

More information

Virtual vs Physical Addresses

Virtual vs Physical Addresses Virtual vs Physical Addresses Physical addresses refer to hardware addresses of physical memory. Virtual addresses refer to the virtual store viewed by the process. virtual addresses might be the same

More information

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM IBM SDK, Java Technology Edition Version 1 IBM JVM messages IBM IBM SDK, Java Technology Edition Version 1 IBM JVM messages IBM Note Before you use this information and the product it supports, read the

More information

The Fundamentals of Tuning OpenJDK

The Fundamentals of Tuning OpenJDK The Fundamentals of Tuning OpenJDK OSCON 2013 Portland, OR Charlie Hunt Architect, Performance Engineering Salesforce.com sfdc_ppt_corp_template_01_01_2012.ppt In a Nutshell What you need to know about

More information

Validating Java for Safety-Critical Applications

Validating Java for Safety-Critical Applications Validating Java for Safety-Critical Applications Jean-Marie Dautelle * Raytheon Company, Marlborough, MA, 01752 With the real-time extensions, Java can now be used for safety critical systems. It is therefore

More information

Monitors and Exceptions : How to Implement Java efficiently. Andreas Krall and Mark Probst Technische Universitaet Wien

Monitors and Exceptions : How to Implement Java efficiently. Andreas Krall and Mark Probst Technische Universitaet Wien Monitors and Exceptions : How to Implement Java efficiently Andreas Krall and Mark Probst Technische Universitaet Wien 1 Outline Exceptions in CACAO Exception implementation techniques CACAO s implementation

More information

Holly Cummins IBM Hursley Labs. Java performance not so scary after all

Holly Cummins IBM Hursley Labs. Java performance not so scary after all Holly Cummins IBM Hursley Labs Java performance not so scary after all So... You have a performance problem. What next? Goals After this talk you will: Not feel abject terror when confronted with a performance

More information

Profiling Java Applications. Kostis Kapelonis - Agilis SA

Profiling Java Applications. Kostis Kapelonis - Agilis SA Profiling Java Applications Kostis Kapelonis - Agilis SA The need for speed Topics Software Quality with FindBugs Using Jconsole Monitoring with Netbeans 6 Profiling CPU with Netbeans 6 Profiling Memory

More information

Cloud Computing. Up until now

Cloud Computing. Up until now Cloud Computing Lecture 11 Virtualization 2011-2012 Up until now Introduction. Definition of Cloud Computing Grid Computing Content Distribution Networks Map Reduce Cycle-Sharing 1 Process Virtual Machines

More information

System Software Prof. Dr. H. Mössenböck

System Software Prof. Dr. H. Mössenböck System Software Prof. Dr. H. Mössenböck 1. Memory Management 2. Garbage Collection 3. Linkers and Loaders 4. Debuggers 5. Text Editors Marks obtained by end-term exam http://ssw.jku.at/misc/ssw/ 1. Memory

More information

DATA STRUCTURES USING C

DATA STRUCTURES USING C DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give

More information

Linked Lists, Stacks, Queues, Deques. It s time for a chainge!

Linked Lists, Stacks, Queues, Deques. It s time for a chainge! Linked Lists, Stacks, Queues, Deques It s time for a chainge! Learning Goals After this unit, you should be able to... Differentiate an abstraction from an implementation. Define and give examples of problems

More information

Java's garbage-collected heap

Java's garbage-collected heap Sponsored by: This story appeared on JavaWorld at http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html Java's garbage-collected heap An introduction to the garbage-collected heap of the Java

More information

Trace-Based and Sample-Based Profiling in Rational Application Developer

Trace-Based and Sample-Based Profiling in Rational Application Developer Trace-Based and Sample-Based Profiling in Rational Application Developer This document is aimed at highlighting the importance of profiling in software development and talks about the profiling tools offered

More information

Effective Java Programming. efficient software development

Effective Java Programming. efficient software development Effective Java Programming efficient software development Structure efficient software development what is efficiency? development process profiling during development what determines the performance of

More information

How Java Software Solutions Outperform Hardware Accelerators

How Java Software Solutions Outperform Hardware Accelerators How Java Software Solutions Outperform Hardware Accelerators MIPS Technologies, Inc. April 2005 Java is a programming language which has one big advantage and one big disadvantage: the big advantage is

More information

ProTrack: A Simple Provenance-tracking Filesystem

ProTrack: A Simple Provenance-tracking Filesystem ProTrack: A Simple Provenance-tracking Filesystem Somak Das Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology das@mit.edu Abstract Provenance describes a file

More information

Tool - 1: Health Center

Tool - 1: Health Center Tool - 1: Health Center Joseph Amrith Raj http://facebook.com/webspherelibrary 2 Tool - 1: Health Center Table of Contents WebSphere Application Server Troubleshooting... Error! Bookmark not defined. About

More information

- Applet java appaiono di frequente nelle pagine web - Come funziona l'interprete contenuto in ogni browser di un certo livello? - Per approfondire

- Applet java appaiono di frequente nelle pagine web - Come funziona l'interprete contenuto in ogni browser di un certo livello? - Per approfondire - Applet java appaiono di frequente nelle pagine web - Come funziona l'interprete contenuto in ogni browser di un certo livello? - Per approfondire il funzionamento della Java Virtual Machine (JVM): -

More information

What s Cool in the SAP JVM (CON3243)

What s Cool in the SAP JVM (CON3243) What s Cool in the SAP JVM (CON3243) Volker Simonis, SAP SE September, 2014 Public Agenda SAP JVM Supportability SAP JVM Profiler SAP JVM Debugger 2014 SAP SE. All rights reserved. Public 2 SAP JVM SAP

More information

Habanero Extreme Scale Software Research Project

Habanero Extreme Scale Software Research Project Habanero Extreme Scale Software Research Project Comp215: Evolution of Java Zoran Budimlić (Rice University) The Beginnings Sun Microsystems 1990 - Create a language for delivering programs on small electronic

More information

Programming Embedded Systems

Programming Embedded Systems Programming Embedded Systems Lecture 13 Overview of memory management Monday Feb 27, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/32 Lecture outline Memory architecture of microcontrollers,

More information

Online Recruitment System 1. INTRODUCTION

Online Recruitment System 1. INTRODUCTION 1. INTRODUCTION This project Online Recruitment System is an online website in which jobseekers can register themselves online and apply for job and attend the exam. Online Recruitment System provides

More information

Understanding Java Garbage Collection

Understanding Java Garbage Collection TECHNOLOGY WHITE PAPER Understanding Java Garbage Collection And What You Can Do About It Table of Contents Executive Summary... 3 Introduction.... 4 Why Care About the Java Garbage Collector?.... 5 Classifying

More information

Can You Trust Your JVM Diagnostic Tools?

Can You Trust Your JVM Diagnostic Tools? Can You Trust Your JVM Diagnostic Tools? Isaac Sjoblom, Tim S. Snyder, and Elena Machkasova Computer Science Discipline University of Minnesota Morris Morris, MN 56267 sjobl014@umn.edu, snyde479@umn.edu,

More information

How to create/avoid memory leak in Java and.net? Venkat Subramaniam venkats@durasoftcorp.com http://www.durasoftcorp.com

How to create/avoid memory leak in Java and.net? Venkat Subramaniam venkats@durasoftcorp.com http://www.durasoftcorp.com How to create/avoid memory leak in Java and.net? Venkat Subramaniam venkats@durasoftcorp.com http://www.durasoftcorp.com Abstract Java and.net provide run time environment for managed code, and Automatic

More information

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra January 2014 Legal Notices Apache Cassandra, Spark and Solr and their respective logos are trademarks or registered trademarks

More information

Code Sharing among Virtual Machines

Code Sharing among Virtual Machines Code Sharing among Virtual Machines Grzegorz Czajkowski 1, Laurent Daynès 1, and Nathaniel Nystrom 2 1 Sun Microsystem Laboratories, 2600 Casey Avenue, Mountain View CA 94043, USA, Grzegorz.Czajkowski@sun.com,

More information

Recent Advances in Financial Planning and Product Development

Recent Advances in Financial Planning and Product Development Memory Management in Java and Ada Language for safety software development SARA HOSSEINI-DINANI, MICHAEL SCHWARZ & JOSEF BÖRCSÖK Computer Architecture & System Programming University Kassel Wilhelmshöher

More information

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation Track Name: Application Infrastructure Topic : WebSphere Application Server Top 10 Performance Tuning Recommendations. Presenter Name : Vishal A Charegaonkar WebSphere Architect (Performance and Monitoring)

More information

7.1 Our Current Model

7.1 Our Current Model Chapter 7 The Stack In this chapter we examine what is arguably the most important abstract data type in computer science, the stack. We will see that the stack ADT and its implementation are very simple.

More information

Chapter 5 Names, Bindings, Type Checking, and Scopes

Chapter 5 Names, Bindings, Type Checking, and Scopes Chapter 5 Names, Bindings, Type Checking, and Scopes Chapter 5 Topics Introduction Names Variables The Concept of Binding Type Checking Strong Typing Scope Scope and Lifetime Referencing Environments Named

More information

enterprise professional expertise distilled

enterprise professional expertise distilled Oracle JRockit The Definitive Guide Develop and manage robust Java applications with Oracle's high-performance Java Virtual Machine Marcus Hirt Marcus Lagergren PUBLISHING enterprise professional expertise

More information

2 Introduction to Java. Introduction to Programming 1 1

2 Introduction to Java. Introduction to Programming 1 1 2 Introduction to Java Introduction to Programming 1 1 Objectives At the end of the lesson, the student should be able to: Describe the features of Java technology such as the Java virtual machine, garbage

More information

Angelika Langer www.angelikalanger.com. The Art of Garbage Collection Tuning

Angelika Langer www.angelikalanger.com. The Art of Garbage Collection Tuning Angelika Langer www.angelikalanger.com The Art of Garbage Collection Tuning objective discuss garbage collection algorithms in Sun/Oracle's JVM give brief overview of GC tuning strategies GC tuning (2)

More information

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

More information

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. 1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated

More information

MID-TIER DEPLOYMENT KB

MID-TIER DEPLOYMENT KB MID-TIER DEPLOYMENT KB Author: BMC Software, Inc. Date: 23 Dec 2011 PAGE 1 OF 16 23/12/2011 Table of Contents 1. Overview 3 2. Sizing guidelines 3 3. Virtual Environment Notes 4 4. Physical Environment

More information

Developing Embedded Software in Java Part 1: Technology and Architecture

Developing Embedded Software in Java Part 1: Technology and Architecture Developing Embedded Software in Java Part 1: Technology and Architecture by Michael Barr Embedded Systems Conference Europe The Netherlands November 16-18, 1999 Course #300 Sun s introduction of the Java

More information

Oracle JRockit Mission Control Overview

Oracle JRockit Mission Control Overview Oracle JRockit Mission Control Overview An Oracle White Paper June 2008 JROCKIT Oracle JRockit Mission Control Overview Oracle JRockit Mission Control Overview...3 Introduction...3 Non-intrusive profiling

More information

Java Performance. Adrian Dozsa TM-JUG 18.09.2014

Java Performance. Adrian Dozsa TM-JUG 18.09.2014 Java Performance Adrian Dozsa TM-JUG 18.09.2014 Agenda Requirements Performance Testing Micro-benchmarks Concurrency GC Tools Why is performance important? We hate slow web pages/apps We hate timeouts

More information

Memory management. Announcements. Safe user input. Function pointers. Uses of function pointers. Function pointer example

Memory management. Announcements. Safe user input. Function pointers. Uses of function pointers. Function pointer example Announcements Memory management Assignment 2 posted, due Friday Do two of the three problems Assignment 1 graded see grades on CMS Lecture 7 CS 113 Spring 2008 2 Safe user input If you use scanf(), include

More information

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java

More information

NetBeans Profiler is an

NetBeans Profiler is an NetBeans Profiler Exploring the NetBeans Profiler From Installation to a Practical Profiling Example* Gregg Sporar* NetBeans Profiler is an optional feature of the NetBeans IDE. It is a powerful tool that

More information

Azul Pauseless Garbage Collection

Azul Pauseless Garbage Collection TECHNOLOGY WHITE PAPER Azul Pauseless Garbage Collection Providing continuous, pauseless operation for Java applications Executive Summary Conventional garbage collection approaches limit the scalability

More information

PHP vs. Java. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities:

PHP vs. Java. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities: PHP vs. Java *This document reflects my opinion about PHP and Java. I have written this without any references. Let me know if there is a technical error. --Hasari Tosun It isn't correct to compare Java

More information

Java Performance Tuning

Java Performance Tuning Summer 08 Java Performance Tuning Michael Finocchiaro This white paper presents the basics of Java Performance Tuning for large Application Servers. h t t p : / / m f i n o c c h i a r o. w o r d p r e

More information

Data on Kernel Failures and Security Incidents

Data on Kernel Failures and Security Incidents Data on Kernel Failures and Security Incidents Ravishankar K. Iyer (W. Gu, Z. Kalbarczyk, G. Lyle, A. Sharma, L. Wang ) Center for Reliable and High-Performance Computing Coordinated Science Laboratory

More information

Enterprise Manager Performance Tips

Enterprise Manager Performance Tips Enterprise Manager Performance Tips + The tips below are related to common situations customers experience when their Enterprise Manager(s) are not performing consistent with performance goals. If you

More information

Java and Real Time Storage Applications

Java and Real Time Storage Applications Java and Real Time Storage Applications Gary Mueller Janet Borzuchowski 1 Flavors of Java for Embedded Systems Software Java Virtual Machine(JVM) Compiled Java Hardware Java Virtual Machine Java Virtual

More information

Stack Allocation. Run-Time Data Structures. Static Structures

Stack Allocation. Run-Time Data Structures. Static Structures Run-Time Data Structures Stack Allocation Static Structures For static structures, a fixed address is used throughout execution. This is the oldest and simplest memory organization. In current compilers,

More information

PC Based Escape Analysis in the Java Virtual Machine

PC Based Escape Analysis in the Java Virtual Machine PC Based Escape Analysis in the Java Virtual Machine Manfred Jendrosch, Gerhard W. Dueck, Charlie Gracie, and AndréHinkenjann Abstract Current computer architectures are multi-threaded and make use of

More information

Object Instance Profiling

Object Instance Profiling Object Instance Profiling Lubomír Bulej 1,2, Lukáš Marek 1, Petr Tůma 1 Technical report No. 2009/7, November 2009 Version 1.0, November 2009 1 Distributed Systems Research Group, Department of Software

More information

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface File Management Two Parts Filesystem Interface Interface the user sees Organization of the files as seen by the user Operations defined on files Properties that can be read/modified Filesystem design Implementing

More information

CSE373: Data Structures & Algorithms Lecture 14: Hash Collisions. Linda Shapiro Spring 2016

CSE373: Data Structures & Algorithms Lecture 14: Hash Collisions. Linda Shapiro Spring 2016 CSE373: Data Structures & Algorithms Lecture 14: Hash Collisions Linda Shapiro Spring 2016 Announcements Friday: Review List and go over answers to Practice Problems 2 Hash Tables: Review Aim for constant-time

More information

Memory Profiling using Visual VM

Memory Profiling using Visual VM Memory Profiling using Visual VM What type of profiling is most important? Clear answer: memory profiling! The speed of your application typically is something that you feel throughout your whole development

More information