Interaction of JVM with x86, Sparc and MIPS

Size: px
Start display at page:

Download "Interaction of JVM with x86, Sparc and MIPS"

Transcription

1 Interaction of JVM with x86, Sparc and MIPS Sasikanth Avancha, Dipanjan Chakraborty, Dhiral Gada, Tapan Kamdar {savanc1, dchakr1, dgada1, Department of Computer Science and Electrical Engineering University of Maryland Baltimore County 1 Hilltop Circle, Baltimore, MD 2125 ABSTRACT A Java class is a perfect example of architecture independent code. A Java program can be compiled on a MIPS R44 based Indy workstation running Irix 6.5 and the generated class executed on an Intel Pentium III based Windows 95 system with no problems. This independence is possible, because any system claiming to support Java implements a Java Virtual Machine (JVM). This paper presents a detailed analysis of the interaction of a JVM with three popular processor architectures the Intel x86, the Sun UltraSparc and the SGI MIPS. The analysis shows that each architecture performs better than the other two in some aspects, but no one architecture is the best for Java programs. 1 Introduction The Java Virtual Machine (JVM) is a powerful concept that allows platform and architecture independent program development. This independence is achieved chiefly by compiling a Java program into JVM instructions, called bytecodes, rather than native (of the underlying architecture) instruction code. The JVM executes these bytecodes by first translating them into native code and then executing the native code. It is possible to immediately ask certain questions regarding the native code generated and executed by the JVM. In this paper, we have asked the following questions and attempted to answer them through analysis of the generated data. Q1. What is the instruction mix for different native instruction classes (ALU, data transfers and control) on different architectures? Q2. What is the average native instruction length? Q3. What is the bytecode complexity (i.e., the number of native instructions generated per bytecode) on different architectures? Q4. Which architecture causes the overall executable native executable code size (in bytes) to be the largest? Q5. On a particular architecture, in which JVM mode (JIT or interpreter) do Java programs execute faster? The rest of this paper is organized as follows. Section 2 provides an overview of the JVM architecture. The components of the heart of the JVM the JIT and the Interpreter are described in section 3. In section 4, we discuss our performance metrics in detail. Section 5 contains details of the data generation process. Section 6 describes the analysis of the data generated. We discuss the results of our analysis in section 7. Conclusions of this work are drawn in section 8. The 1

2 graphs plotted for various data generated with respect to the five performance metrics are shown in section 1. 2 JVM Structure Class files, containing bytecodes and linkage information are assembled from a variety of sources and are executed on a host machine by the implementation of the JVM. The execution speed is increased by using a verifier that performs a static examination and does not consume many timeconsuming run time checks. Features of the Architecture The JVM is a stack-based machine that manipulates data represented by words. A JVM stack comprises a collection of frames, each associated with the execution of a single method. A frame consists of two components: a collection of local variables and an operand stack. Local variables are accessed directly by index. An operand stack contains a number of words that are accessed on a LIFO basis by the JVM bytecodes. In addition, the VM incorporates a heap that contains objects. The Java Virtual Machine (JVM) consists of two environments: Compiler Environment: A java source is compiled using the javac compiler in the optimizing mode to produce bytecodes in Java classes. Bytecodes are platform independent and a java program can be ported to different platforms by simply moving the classes. Figure 1: Structure of JVM 2

3 Run-time Environment: The run-time environment consists of the Class Loaders, Java Interpreter/JIT, Runtime System and interaction with the Operating System and the Hardware. Class Loaders: They enable the JVM to load classes without apriori knowledge about the underlying file system semantics, and they allow applications to dynamically load Java classes as extension modules. Java Interpreter/JIT: Java uses the interpreter or Just in Time Compiler. Runtime System: The runtime system communicates with the Operating System, which in turn interacts with the underlying hardware. 3 JIT and Interpreter 3. 1 JIT A Just-In-Time (JIT) Java compiler produces native code from Java byte code instructions during program execution. Compilation speed is more important in a Java JIT compiler requiring optimization algorithms to be lightweight and effective. The JIT consists of five major phases. The pre-pass phase performs a linear-time traversal of byte codes to collect information needed for global register allocation and for implementing garbage collection. The global register allocation phase assigns physical registers to local variables. The code generation phase generates instructions and performs optimizations like common sub-expression elimination, array bounds check elimination, frame pointer elimination etc. The code emission phase copies the generated code and data sections to their final locations in memory. The patching phase fixes up relocations in the code and data sections i.e. offsets of forward branches, addresses of code labels in switch table entries etc. With the exception of global register allocation phase, all phases are linear in time and space. 3.2 Interpreter Interpreters play a crucial role as binary emulators, enabling code to port directly from one architecture to another. The execution time of an interpreted program depends upon the number of commands interpreted and the time to decode and execute each command. The number of commands and execution time directly depends on the complexity of the virtual machine implemented [Romer]. The virtual machine defines a set of virtual commands, which provide a portable interface between the program and the processor. The implementer of the virtual machine executes one virtual command on each trip through the main interpreter loop. The interpreter hence incurs an overhead for fetching and decoding each virtual command before performing the work specified by the command. Hence, the execution time of an interpreted command depends on number of commands interpreted, fetching and decoding of each command and the actual time spent of execution of the operation specified by the command. 4 Metrics In order to study the interaction of the JVM with the underlying architectures, we selected the following metrics: 3

4 Instruction Count: This is the number of instructions of a particular category generated on a specific architecture. Instructions were categorized into different instruction classes such as ALU, Data transfer, Control and miscellaneous. Average Instruction Length: The instruction sets for the platforms were analyzed to obtain the size in bytes of the individual instruction. RISC platforms (Sun Sparc and MIPS) have a constant size of instruction length for all instructions; x86 has a variable instruction length. Bytecode Complexity: The bytecodes are translated into native instructions on each architecture. A particular bytecode may translate to different number and type of native instructions on different architectures. Hence, the complexity of translation of a particular bytecode to native instructions indicates, to a certain degree, the complexity of the JVM generating the native code on the particular platform. Native executable code size: Depending on the instructions generated for a particular architecture, for a particular program, the native executable code size was generated as the product of the number of instructions of a particular type and the average instruction length of that type of instruction. The native executable code size denotes the size of code generated in bytes on the three different architectures. This allows us to analyze possible effects of program size on the execution time of the JIT or Interpreter on different architecture. Execution time: In order to compare the JIT and interpreter, the execution time of programs in our test suite was determined. The source code of the programs was analyzed to understand the conditions under which JIT/Interpreter out performed each other. 5 Data Generation Kaffe Source Code Analysis: As a first step in obtaining the required data for our analysis, the current version of the Kaffe Virtual Machine [Wilkinson] was obtained. The source code of the Kaffe JIT engine and the Kaffe interpreter engine was analyzed to understand their functional aspects. This code analysis explained, to a certain extent, how the JIT and interpreter might perform bytecode optimizations. Test Programs: The next step was to obtain a set of real test programs that evaluated the JVM. The test programs in the regression test suite designed to test the Kaffe JVM were examined and a set of 25 programs was chosen. These programs test all the capabilities of the JVM and are not intended to be a set of benchmark programs. Important features of the JVM such as class loading, thread handling, garbage collection, exception handling, integer computations, floating point computations, loops, etc., are tested by the programs. These programs were used to perform experiments and compare the performance of the JVM on the three architectures, based on the results of the metrics. Software Tools for Data Generation: In order to evaluate JVM performance, the analysis of the native code generated on each architecture was necessary. A software tool called Toba [Toba], developed in the CS department at the University of Arizona was used for this purpose. Toba converts a java program or a java class file into C source file(s) or native code source file(s), as required. For the analysis, both C and native code source files were obtained. In order to install Toba, the JDK version is required to be or greater. The Linux Redhat 6., SunOS 5.6 and Irix 6.5 versions of the JDK were installed on three systems based on the x86, Sparc and MIPS architectures, respectively. Toba was then built, installed and configured on each system. 4

5 6 Data Analysis Instruction Count (Frequency of instructions): The possible native instructions were determined and instruction counts were generated for each architecture by examining their instruction sets. Perl scripts were written to analyze and generate the instruction counts for individual native source files generated by Toba. Average Instruction Length:RISC machines consist of constant length instructions. The Sparc and MIPS, which represent the RISC machines, have a constant length of 4 bytes per instruction. CISC machines (e.g. x86) generate instructions with length varying from 1 to 6 bytes. The occurrence of instructions with 1 byte length is quite rare, in our test environment (32-bit mode on the Linux OS). Instructions with lengths 2, 4 and 6 were observed quite frequently. Bytecode Complexity: Optimized class files (generated by javac with the optimization flag) were used to generate bytecodes using javap. A java program consisting of a single occurrence of each bytecode in the program was used for analysis. The bytecodes generated were mapped manually to the native instructions generated on each architecture. This enabled us to calculate the number of native instructions generated for a particular bytecode on different architectures. Native executable code size: The total contribution of all native instructions to the overall executable code is defined as the native executable code size of the program. Execution time: The optimized class files were executed on each platform, in JIT mode. The execution time was computed as an average of ten runs of each program. The programs were then executed using the interpreter. The interpreter execution times were also computed as an average of ten runs of each program. Similar tests were carried out on all the platforms. We used the java tool from the JDK version 1.2 on each platform using our test programs as inputs. We used the UNIX time command to generate the overall execution time data per program in JIT and interpreter modes. 7 Results Frequency of instructions: Instructions were grouped into Data transfer, ALU, Control or miscellaneous categories. Frequency of instructions was generated on calculating the fraction of the class of the instruction over the total instruction count of the program. Graphs 1,2 and 3 show the following information. x86 MIPS Sparc Data Transfers 6% 75% 2% ALU 2% 1% 45% Control 2% 15% 3% Sparc also contains 5% of miscellaneous instructions, which do not fall in either category. Average Instruction Length: As noted above average instruction for Sparc and MIPS architectures is 4 bytes. The average instruction length for x86 was calculated as follows: the frequency of instructions for each type of instruction and the average instruction length for that type was used. The contribution of each particular type of instruction to the overall native executable code size was determined. Various contributions were then added and average of the sum over the total 5

6 number of instructions in the program was calculated. The average instruction length for x86 was thus determined to be 4.14 bytes/instruction. Bytecode Complexity: Graphs 7 and 8 represent the distribution of native instructions for a Java program, which consists of one instance of every bytecode of the particular category. We observe that MIPS has the highest number of native instructions generated for data transfers as well as Control instructions. Also, MIPS generates the least number of instructions for ALU bytecodes whereas x86 and Sparc generate nearly the same number of native instructions. Sparc generates the maximum number of instructions for miscellaneous bytecodes. As can be observed from the table, x86 (CISC) generates the least number of instructions while the MIPS generates the most number of native instructions for a particular program. x86 MIPS Sparc Data Transfers ALU Control Miscellaneous Total Native executable code size: From Figure 2, it is quite evident that the MIPS generates the maximum native executable code size for a particular program when compared to the same program on x86 and Sparc. Between x86 and Sparc, x86 (CISC) has a greater native executable code size than the Sparc Bytes x86 MIPS Sun Figure 2: Native executable code size Execution time: From Graph 4, it is quite evident that the Interpreter on x86 outperforms the JIT on majority of the occasions. Graphs 5 and 6 show that the JIT outperforms the Interpreter on more occasions on the MIPS and Sparc than on the x86. JIT is slower in programs, which include creation of object/array (the use of new operator), synchronous calls to classes like I/O and also include more inline code. JIT is faster in programs, which include loop overhead and increment and assignment operations. Similar observations were made when the source code of the programs was investigated to obtain the reason as to why the interpreter and the JIT outperformed each other. 8 Conclusions 6

7 We analyzed the interaction of JVM with underlying architectures and arrived at the following conclusions. Data transfer performance is critical to MIPS & x86. Hence, it is very important to improve the performance of these units to improve execution time on these architectures. Branch performance affects execution time on Sparc the most, since a major percentage of translated instructions fall into the category of control instructions. ALU intensive programs execute faster on MIPS, since the bytecode translation for ALU instructions generates the least number of native instructions. Hence, ALU intensive java applications would run best on the MIPS, though the overall bytecode complexity for the MIPS is the highest. Hence, programs having a proportionate mix of instructions would be slower on MIPS than on the other platforms. Interpreter is faster than JIT in many cases. The x86 JIT behaves quite differently from the other JITs and hence indicates that it does not perform equivalent optimizations on the x86 than the other platforms. 9 References [Krall] Krall, A., et al., CACAO - A 64 bit JavaVM Just-In-Time Compiler. In Proc. ACM PPoPP'97 Workshop on Java for Science and Engineering Computation. [Lindholm] Lindholm, T. and Yellin, F., The JavaTM Virtual Machine Specification, Second Edition, [Romer] Romer, T., et al. The Structure and Performance of Interpreters. In Proc. Seventh International Conference on Architectural Support for Programming Languages and Operating Systems (Cambridge, Massachusetts), ACM, [Tabatabai] Adi-Tabatabai, A., et al. Fast, Effective Code Generation in a Just-In-Time Compiler. In Proceedings SIGPLAN 98 Montreal, Canada. [Transvirtual] [Toba] [Yelland] Yelland, P. A Compositional Account of the Java Virtual Machine. In Proc. 26th Annual Symposium on Principles of Programming Languages (San Antonio, Texas), ACM,

8 1 Appendix %Frequency 1% 8% 6% 4% 2% % Control% ALU % Transfer % 1% 9% 8% 7% 6% 5% 4% 3% 2% 1% %Control %ALU %Transfers Programs % Programs Figure 1. Instruction counts on x86 Figure 2. Instruction counts on MIPS 1.6 1% 1.4 8% 6% 4% 2% % %Frequency Misc% ALU% Control% Data Transfers Interpreter JIT Figure 3. Instruction counts on Sparc Figure 4. Execution time on x Interpreter JIT Interpreter JIT Figure 5. Execution time on MIPS Figure 6. Execution time on Sparc 8

9 ALU Transfers Control Misc Figure 7.Bytecode Distribution by class on x86,sparc and MIPS Figure 8. Total Bytecode Distribution on x86,sparc and MIPS 9

CSc 453 Interpreters & Interpretation

CSc 453 Interpreters & Interpretation CSc 453 Interpreters & Interpretation Saumya Debray The University of Arizona Tucson Interpreters An interpreter is a program that executes another program. An interpreter implements a virtual machine,

More information

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1 SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine David Bélanger dbelan2@cs.mcgill.ca Sable Research Group McGill University Montreal, QC January 28, 2004 SABLEJIT: A Retargetable

More information

Virtual Machines and Dynamic Translation: Implementing ISAs in Software

Virtual Machines and Dynamic Translation: Implementing ISAs in Software Virtual Machines and Dynamic Translation: Implementing ISAs in Software Krste Asanovic Laboratory for Computer Science Massachusetts Institute of Technology Software Applications How is a software application

More information

VM instruction formats. Bytecode translator

VM instruction formats. Bytecode translator Implementing an Ecient Java Interpreter David Gregg 1, M. Anton Ertl 2 and Andreas Krall 2 1 Department of Computer Science, Trinity College, Dublin 2, Ireland. David.Gregg@cs.tcd.ie 2 Institut fur Computersprachen,

More information

Introduction to Java Programming

Introduction to Java Programming Introduction to Java Programming Lecture 1 CGS 3416 Spring 2017 1/9/2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer ISA - Instruction Set Architecture: the specific

More information

CHAPTER 5 A Closer Look at Instruction Set Architectures

CHAPTER 5 A Closer Look at Instruction Set Architectures CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 199 5.2 Instruction Formats 199 5.2.1 Design Decisions for Instruction Sets 200 5.2.2 Little versus Big Endian 201 5.2.3 Internal

More information

Untyped Memory in the Java Virtual Machine

Untyped Memory in the Java Virtual Machine Untyped Memory in the Java Virtual Machine Andreas Gal and Michael Franz University of California, Irvine {gal,franz}@uci.edu Christian W. Probst Technical University of Denmark probst@imm.dtu.dk July

More information

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017 Introduction to Java Lecture 1 COP 3252 Summer 2017 May 16, 2017 The Java Language Java is a programming language that evolved from C++ Both are object-oriented They both have much of the same syntax Began

More information

Java On Steroids: Sun s High-Performance Java Implementation. History

Java On Steroids: Sun s High-Performance Java Implementation. History Java On Steroids: Sun s High-Performance Java Implementation Urs Hölzle Lars Bak Steffen Grarup Robert Griesemer Srdjan Mitrovic Sun Microsystems History First Java implementations: interpreters compact

More information

Compiling Techniques

Compiling Techniques Lecture 10: Introduction to 10 November 2015 Coursework: Block and Procedure Table of contents Introduction 1 Introduction Overview Java Virtual Machine Frames and Function Call 2 JVM Types and Mnemonics

More information

Advanced Computer Architecture

Advanced Computer Architecture ECE 563 Advanced Computer Architecture Fall 2007 Lecture 14: Virtual Machines 563 L14.1 Fall 2009 Outline Types of Virtual Machine User-level (or Process VMs) System-level Techniques for implementing all

More information

Exploiting Hardware Resources: Register Assignment across Method Boundaries

Exploiting Hardware Resources: Register Assignment across Method Boundaries Exploiting Hardware Resources: Register Assignment across Method Boundaries Ian Rogers, Alasdair Rawsthorne, Jason Souloglou The University of Manchester, England {Ian.Rogers,Alasdair.Rawsthorne,Jason.Souloglou}@cs.man.ac.uk

More information

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1 CSE P 501 Compilers Java Implementation JVMs, JITs &c Hal Perkins Winter 2008 3/11/2008 2002-08 Hal Perkins & UW CSE V-1 Agenda Java virtual machine architecture.class files Class loading Execution engines

More information

Hierarchical PLABs, CLABs, TLABs in Hotspot

Hierarchical PLABs, CLABs, TLABs in Hotspot Hierarchical s, CLABs, s in Hotspot Christoph M. Kirsch ck@cs.uni-salzburg.at Hannes Payer hpayer@cs.uni-salzburg.at Harald Röck hroeck@cs.uni-salzburg.at Abstract Thread-local allocation buffers (s) are

More information

Chapter 13 Reduced Instruction Set Computers

Chapter 13 Reduced Instruction Set Computers Chapter 13 Reduced Instruction Set Computers Contents Instruction execution characteristics Use of a large register file Compiler-based register optimization Reduced instruction set architecture RISC pipelining

More information

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 GBI0001@AUBURN.EDU ELEC 6200-001: Computer Architecture and Design Silicon Technology Moore s law Moore's Law describes a long-term trend in the history

More information

JOP: A Java Optimized Processor for Embedded Real-Time Systems. Martin Schoeberl

JOP: A Java Optimized Processor for Embedded Real-Time Systems. Martin Schoeberl JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schoeberl JOP Research Targets Java processor Time-predictable architecture Small design Working solution (FPGA) JOP Overview 2 Overview

More information

CS Computer Architecture

CS Computer Architecture CS 35101 Computer Architecture Section 600 Dr. Angela Guercio Fall 2010 Structured Computer Organization A computer s native language, machine language, is difficult for human s to use to program the computer

More information

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Instruction Set Principles The Role of Compilers MIPS 2 Main Content Computer

More information

Lecture 4: Instruction Set Architecture

Lecture 4: Instruction Set Architecture Lecture 4: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation Reading: Textbook (5 th edition) Appendix A Appendix B (4 th edition)

More information

For our next chapter, we will discuss the emulation process which is an integral part of virtual machines.

For our next chapter, we will discuss the emulation process which is an integral part of virtual machines. For our next chapter, we will discuss the emulation process which is an integral part of virtual machines. 1 2 For today s lecture, we ll start by defining what we mean by emulation. Specifically, in this

More information

Real instruction set architectures. Part 2: a representative sample

Real instruction set architectures. Part 2: a representative sample Real instruction set architectures Part 2: a representative sample Some historical architectures VAX: Digital s line of midsize computers, dominant in academia in the 70s and 80s Characteristics: Variable-length

More information

Run-time Program Management. Hwansoo Han

Run-time Program Management. Hwansoo Han Run-time Program Management Hwansoo Han Run-time System Run-time system refers to Set of libraries needed for correct operation of language implementation Some parts obtain all the information from subroutine

More information

CS252 Spring 2017 Graduate Computer Architecture. Lecture 18: Virtual Machines

CS252 Spring 2017 Graduate Computer Architecture. Lecture 18: Virtual Machines CS252 Spring 2017 Graduate Computer Architecture Lecture 18: Virtual Machines Lisa Wu, Krste Asanovic http://inst.eecs.berkeley.edu/~cs252/sp17 WU UCB CS252 SP17 Midterm Topics ISA -- e.g. RISC vs. CISC

More information

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1 Agenda CSE P 501 Compilers Java Implementation JVMs, JITs &c Hal Perkins Summer 2004 Java virtual machine architecture.class files Class loading Execution engines Interpreters & JITs various strategies

More information

Practical Malware Analysis

Practical Malware Analysis Practical Malware Analysis Ch 4: A Crash Course in x86 Disassembly Revised 1-16-7 Basic Techniques Basic static analysis Looks at malware from the outside Basic dynamic analysis Only shows you how the

More information

Garbage Collected. Methods Area. Execution Engine. Program Counter. Heap. Operand. Optop. Execution Environment. Frame. Local Variables.

Garbage Collected. Methods Area. Execution Engine. Program Counter. Heap. Operand. Optop. Execution Environment. Frame. Local Variables. Techniques for Obtaining High Performance in Java Programs Iat H. Kazi y Howard H. Chen z Berdenia Stanley y David J. Lilja y y Department of Electrical and Computer Engineering z Department of Computer

More information

Lecture 1: Overview of Java

Lecture 1: Overview of Java Lecture 1: Overview of Java What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed for easy Web/Internet applications Widespread

More information

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam Assembly Language Lecture 2 - x86 Processor Architecture Ahmed Sallam Introduction to the course Outcomes of Lecture 1 Always check the course website Don t forget the deadline rule!! Motivations for studying

More information

Notes of the course - Advanced Programming. Barbara Russo

Notes of the course - Advanced Programming. Barbara Russo Notes of the course - Advanced Programming Barbara Russo a.y. 2014-2015 Contents 1 Lecture 2 Lecture 2 - Compilation, Interpreting, and debugging........ 2 1.1 Compiling and interpreting...................

More information

What do Compilers Produce?

What do Compilers Produce? What do Compilers Produce? Pure Machine Code Compilers may generate code for a particular machine, not assuming any operating system or library routines. This is pure code because it includes nothing beyond

More information

Chapter 14 Performance and Processor Design

Chapter 14 Performance and Processor Design Chapter 14 Performance and Processor Design Outline 14.1 Introduction 14.2 Important Trends Affecting Performance Issues 14.3 Why Performance Monitoring and Evaluation are Needed 14.4 Performance Measures

More information

Chapter 5. A Closer Look at Instruction Set Architectures. Chapter 5 Objectives. 5.1 Introduction. 5.2 Instruction Formats

Chapter 5. A Closer Look at Instruction Set Architectures. Chapter 5 Objectives. 5.1 Introduction. 5.2 Instruction Formats Chapter 5 Objectives Understand the factors involved in instruction set architecture design. Chapter 5 A Closer Look at Instruction Set Architectures Gain familiarity with memory addressing modes. Understand

More information

Optimization Techniques

Optimization Techniques Smalltalk Implementation: Optimization Techniques Prof. Harry Porter Portland State University 1 Optimization Ideas Just-In-Time (JIT) compiling When a method is first invoked, compile it into native code.

More information

High-Level Language VMs

High-Level Language VMs High-Level Language VMs Outline Motivation What is the need for HLL VMs? How are these different from System or Process VMs? Approach to HLL VMs Evolutionary history Pascal P-code Object oriented HLL VMs

More information

Executing Legacy Applications on a Java Operating System

Executing Legacy Applications on a Java Operating System Executing Legacy Applications on a Java Operating System Andreas Gal, Michael Yang, Christian Probst, and Michael Franz University of California, Irvine {gal,mlyang,probst,franz}@uci.edu May 30, 2004 Abstract

More information

1.3 Data processing; data storage; data movement; and control.

1.3 Data processing; data storage; data movement; and control. CHAPTER 1 OVERVIEW ANSWERS TO QUESTIONS 1.1 Computer architecture refers to those attributes of a system visible to a programmer or, put another way, those attributes that have a direct impact on the logical

More information

Chapter 5. A Closer Look at Instruction Set Architectures

Chapter 5. A Closer Look at Instruction Set Architectures Chapter 5 A Closer Look at Instruction Set Architectures Chapter 5 Objectives Understand the factors involved in instruction set architecture design. Gain familiarity with memory addressing modes. Understand

More information

Designing for Performance. Patrick Happ Raul Feitosa

Designing for Performance. Patrick Happ Raul Feitosa Designing for Performance Patrick Happ Raul Feitosa Objective In this section we examine the most common approach to assessing processor and computer system performance W. Stallings Designing for Performance

More information

A Study of Cache Performance in Java Virtual Machines

A Study of Cache Performance in Java Virtual Machines A Study of Cache Performance in Java Virtual Machines by Anand Sunder Rajan, B.E., M.Sc Report Presented to the Faculty of the Graduate School of The University of Texas at Austin in Partial Fulfillment

More information

Java Performance Analysis for Scientific Computing

Java Performance Analysis for Scientific Computing Java Performance Analysis for Scientific Computing Roldan Pozo Leader, Mathematical Software Group National Institute of Standards and Technology USA UKHEC: Java for High End Computing Nov. 20th, 2000

More information

Lecture 4: RISC Computers

Lecture 4: RISC Computers Lecture 4: RISC Computers Introduction Program execution features RISC characteristics RISC vs. CICS Zebo Peng, IDA, LiTH 1 Introduction Reduced Instruction Set Computer (RISC) represents an important

More information

17. Instruction Sets: Characteristics and Functions

17. Instruction Sets: Characteristics and Functions 17. Instruction Sets: Characteristics and Functions Chapter 12 Spring 2016 CS430 - Computer Architecture 1 Introduction Section 12.1, 12.2, and 12.3 pp. 406-418 Computer Designer: Machine instruction set

More information

Assembly Language. Lecture 2 x86 Processor Architecture

Assembly Language. Lecture 2 x86 Processor Architecture Assembly Language Lecture 2 x86 Processor Architecture Ahmed Sallam Slides based on original lecture slides by Dr. Mahmoud Elgayyar Introduction to the course Outcomes of Lecture 1 Always check the course

More information

Jupiter: A Modular and Extensible JVM

Jupiter: A Modular and Extensible JVM Jupiter: A Modular and Extensible JVM Patrick Doyle and Tarek Abdelrahman Edward S. Rogers, Sr. Department of Electrical and Computer Engineering University of Toronto {doylep tsa}@eecg.toronto.edu Outline

More information

55:132/22C:160, HPCA Spring 2011

55:132/22C:160, HPCA Spring 2011 55:132/22C:160, HPCA Spring 2011 Second Lecture Slide Set Instruction Set Architecture Instruction Set Architecture ISA, the boundary between software and hardware Specifies the logical machine that is

More information

Approaches to Capturing Java Threads State

Approaches to Capturing Java Threads State Approaches to Capturing Java Threads State Abstract This paper describes a range of approaches to capturing the state of Java threads. The capture and restoration of Java threads state have two main purposes:

More information

CHAPTER 5 A Closer Look at Instruction Set Architectures

CHAPTER 5 A Closer Look at Instruction Set Architectures CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 293 5.2 Instruction Formats 293 5.2.1 Design Decisions for Instruction Sets 294 5.2.2 Little versus Big Endian 295 5.2.3 Internal

More information

The SURE Architecture

The SURE Architecture The SURE Architecture David May: December 11, 2016 Background Computer programming is changing. Object-oriented languages, functional languages and others have accelerated software development. But these

More information

JamaicaVM Java for Embedded Realtime Systems

JamaicaVM Java for Embedded Realtime Systems JamaicaVM Java for Embedded Realtime Systems... bringing modern software development methods to safety critical applications Fridtjof Siebert, 25. Oktober 2001 1 Deeply embedded applications Examples:

More information

Sista: Improving Cog s JIT performance. Clément Béra

Sista: Improving Cog s JIT performance. Clément Béra Sista: Improving Cog s JIT performance Clément Béra Main people involved in Sista Eliot Miranda Over 30 years experience in Smalltalk VM Clément Béra 2 years engineer in the Pharo team Phd student starting

More information

Jazelle ARM. By: Adrian Cretzu & Sabine Loebner

Jazelle ARM. By: Adrian Cretzu & Sabine Loebner Jazelle ARM By: Adrian Cretzu & Sabine Loebner Table of Contents Java o Challenge o Acceleration Techniques ARM Overview o RISC o ISA o Background Jazelle o Background o Jazelle mode o bytecode execution

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1

More information

On the Design of the Local Variable Cache in a Hardware Translation-Based Java Virtual Machine

On the Design of the Local Variable Cache in a Hardware Translation-Based Java Virtual Machine On the Design of the Local Variable Cache in a Hardware Translation-Based Java Virtual Machine Hitoshi Oi The University of Aizu June 16, 2005 Languages, Compilers, and Tools for Embedded Systems (LCTES

More information

CS 252 Graduate Computer Architecture. Lecture 15: Virtual Machines

CS 252 Graduate Computer Architecture. Lecture 15: Virtual Machines CS 252 Graduate Computer Architecture Lecture 15: Virtual Machines Krste Asanovic Electrical Engineering and Computer Sciences University of California, Berkeley http://www.eecs.berkeley.edu/~krste http://inst.eecs.berkeley.edu/~cs252

More information

Introduction. CS 2210 Compiler Design Wonsun Ahn

Introduction. CS 2210 Compiler Design Wonsun Ahn Introduction CS 2210 Compiler Design Wonsun Ahn What is a Compiler? Compiler: A program that translates source code written in one language to a target code written in another language Source code: Input

More information

Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture

Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture Australian Computer Science Communications, Vol.21, No.4, 1999, Springer-Verlag Singapore Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture Kenji Watanabe and Yamin Li Graduate

More information

Java Internals. Frank Yellin Tim Lindholm JavaSoft

Java Internals. Frank Yellin Tim Lindholm JavaSoft Java Internals Frank Yellin Tim Lindholm JavaSoft About This Talk The JavaSoft implementation of the Java Virtual Machine (JDK 1.0.2) Some companies have tweaked our implementation Alternative implementations

More information

OPERATING SYSTEM. Chapter 4: Threads

OPERATING SYSTEM. Chapter 4: Threads OPERATING SYSTEM Chapter 4: Threads Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples Objectives To

More information

COMPUTER ORGANIZATION & ARCHITECTURE

COMPUTER ORGANIZATION & ARCHITECTURE COMPUTER ORGANIZATION & ARCHITECTURE Instructions Sets Architecture Lesson 5a 1 What are Instruction Sets The complete collection of instructions that are understood by a CPU Can be considered as a functional

More information

Computer Systems A Programmer s Perspective 1 (Beta Draft)

Computer Systems A Programmer s Perspective 1 (Beta Draft) Computer Systems A Programmer s Perspective 1 (Beta Draft) Randal E. Bryant David R. O Hallaron August 1, 2001 1 Copyright c 2001, R. E. Bryant, D. R. O Hallaron. All rights reserved. 2 Contents Preface

More information

point in worrying about performance. The goal of our work is to show that this is not true. This paper is organised as follows. In section 2 we introd

point in worrying about performance. The goal of our work is to show that this is not true. This paper is organised as follows. In section 2 we introd A Fast Java Interpreter David Gregg 1, M. Anton Ertl 2 and Andreas Krall 2 1 Department of Computer Science, Trinity College, Dublin 2, Ireland. David.Gregg@cs.tcd.ie 2 Institut fur Computersprachen, TU

More information

REDUCED INSTRUCTION SET COMPUTERS (RISC)

REDUCED INSTRUCTION SET COMPUTERS (RISC) Datorarkitektur Fö 5/6-1 Datorarkitektur Fö 5/6-2 What are RISCs and why do we need them? REDUCED INSTRUCTION SET COMPUTERS (RISC) RISC architectures represent an important innovation in the area of computer

More information

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1...

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1... Instruction-set Design Issues: what is the format(s) Opcode Dest. Operand Source Operand 1... 1) Which instructions to include: How many? Complexity - simple ADD R1, R2, R3 complex e.g., VAX MATCHC substrlength,

More information

Topics Power tends to corrupt; absolute power corrupts absolutely. Computer Organization CS Data Representation

Topics Power tends to corrupt; absolute power corrupts absolutely. Computer Organization CS Data Representation Computer Organization CS 231-01 Data Representation Dr. William H. Robinson November 12, 2004 Topics Power tends to corrupt; absolute power corrupts absolutely. Lord Acton British historian, late 19 th

More information

History of Compilers The term

History of Compilers The term History of Compilers The term compiler was coined in the early 1950s by Grace Murray Hopper. Translation was viewed as the compilation of a sequence of machine-language subprograms selected from a library.

More information

Performance measurement. SMD149 - Operating Systems - Performance and processor design. Introduction. Important trends affecting performance issues

Performance measurement. SMD149 - Operating Systems - Performance and processor design. Introduction. Important trends affecting performance issues Performance measurement SMD149 - Operating Systems - Performance and processor design Roland Parviainen November 28, 2005 Performance measurement Motivation Techniques Common metrics Processor architectural

More information

Java Jitters - The Effects of Java on Jitter in a Continuous Media Server

Java Jitters - The Effects of Java on Jitter in a Continuous Media Server Introduction Java Jitters - The Effects of Java on Jitter in a Continuous Media Server Mark Claypool and Jonathan Tanner Computer Science Department, Worcester Polytechnic Institute {claypool,jtanner}@cs.wpi.edu

More information

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. OS and Computer Architecture Last class: OS and Architecture OS and Computer Architecture OS Service Protection Interrupts System Calls IO Scheduling Synchronization Virtual Memory Hardware Support Kernel/User Mode Protected Instructions

More information

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

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components Last class: OS and Architecture Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation

More information

Chapter 4: Threads. Chapter 4: Threads. Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues

Chapter 4: Threads. Chapter 4: Threads. Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues 4.2 Silberschatz, Galvin

More information

picojava I Java Processor Core DATA SHEET DESCRIPTION

picojava I Java Processor Core DATA SHEET DESCRIPTION picojava I DATA SHEET DESCRIPTION picojava I is a uniquely designed processor core which natively executes Java bytecodes as defined by the Java Virtual Machine (JVM). Most processors require the JVM to

More information

Run time environment of a MIPS program

Run time environment of a MIPS program Run time environment of a MIPS program Stack pointer Frame pointer Temporary local variables Return address Saved argument registers beyond a0-a3 Low address Growth of stack High address A translation

More information

Java and C II. CSE 351 Spring Instructor: Ruth Anderson

Java and C II. CSE 351 Spring Instructor: Ruth Anderson Java and C II CSE 351 Spring 2017 Instructor: Ruth Anderson Teaching Assistants: Dylan Johnson Kevin Bi Linxing Preston Jiang Cody Ohlsen Yufang Sun Joshua Curtis Administrivia Lab 5 Due TONIGHT! Fri 6/2

More information

Lecture 4: MIPS Instruction Set

Lecture 4: MIPS Instruction Set Lecture 4: MIPS Instruction Set No class on Tuesday Today s topic: MIPS instructions Code examples 1 Instruction Set Understanding the language of the hardware is key to understanding the hardware/software

More information

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store. IT 3123 Hardware and Software Concepts February 11 and Memory II Copyright 2005 by Bob Brown The von Neumann Architecture 00 01 02 03 PC IR Control Unit Command Memory ALU 96 97 98 99 Notice: This session

More information

CS 152 Computer Architecture and Engineering. Lecture 22: Virtual Machines

CS 152 Computer Architecture and Engineering. Lecture 22: Virtual Machines CS 152 Computer Architecture and Engineering Lecture 22: Virtual Machines Krste Asanovic Electrical Engineering and Computer Sciences University of California, Berkeley http://www.eecs.berkeley.edu/~krste

More information

An Overview of the BLITZ System

An Overview of the BLITZ System An Overview of the BLITZ System Harry H. Porter III Department of Computer Science Portland State University Introduction The BLITZ System is a collection of software designed to support a university-level

More information

More on Conjunctive Selection Condition and Branch Prediction

More on Conjunctive Selection Condition and Branch Prediction More on Conjunctive Selection Condition and Branch Prediction CS764 Class Project - Fall Jichuan Chang and Nikhil Gupta {chang,nikhil}@cs.wisc.edu Abstract Traditionally, database applications have focused

More information

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

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management Last class: OS and Architecture OS and Computer Architecture OS Service Protection Interrupts System Calls IO Scheduling Synchronization Virtual Memory Hardware Support Kernel/User Mode Protected Instructions

More information

Global Scheduler. Global Issue. Global Retire

Global Scheduler. Global Issue. Global Retire The Delft-Java Engine: An Introduction C. John Glossner 1;2 and Stamatis Vassiliadis 2 1 Lucent / Bell Labs, Allentown, Pa. 2 Delft University oftechnology, Department of Electrical Engineering Delft,

More information

Performance Profiling. Curtin University of Technology Department of Computing

Performance Profiling. Curtin University of Technology Department of Computing Performance Profiling Curtin University of Technology Department of Computing Objectives To develop a strategy to characterise the performance of Java applications benchmark to compare algorithm choices

More information

Administration CS 412/413. Why build a compiler? Compilers. Architectural independence. Source-to-source translator

Administration CS 412/413. Why build a compiler? Compilers. Architectural independence. Source-to-source translator CS 412/413 Introduction to Compilers and Translators Andrew Myers Cornell University Administration Design reports due Friday Current demo schedule on web page send mail with preferred times if you haven

More information

CHAPTER 1 Introduction to Computers and Java

CHAPTER 1 Introduction to Computers and Java CHAPTER 1 Introduction to Computers and Java Copyright 2016 Pearson Education, Inc., Hoboken NJ Chapter Topics Chapter 1 discusses the following main topics: Why Program? Computer Systems: Hardware and

More information

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker Computers in Engineering COMP 208 Computer Structure Michael A. Hawker Computer Structure We will briefly look at the structure of a modern computer That will help us understand some of the concepts that

More information

History Introduction to Java Characteristics of Java Data types

History Introduction to Java Characteristics of Java Data types Course Name: Advanced Java Lecture 1 Topics to be covered History Introduction to Java Characteristics of Java Data types What is Java? An Object-Oriented Programming Language developed at Sun Microsystems

More information

Operating System: Chap2 OS Structure. National Tsing-Hua University 2016, Fall Semester

Operating System: Chap2 OS Structure. National Tsing-Hua University 2016, Fall Semester Operating System: Chap2 OS Structure National Tsing-Hua University 2016, Fall Semester Outline OS Services OS-Application Interface OS Structure Chapter2 OS-Structure Operating System Concepts NTHU LSA

More information

CHAPTER 5 A Closer Look at Instruction Set Architectures

CHAPTER 5 A Closer Look at Instruction Set Architectures CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 5.2 Instruction Formats 5.2.1 Design Decisions for Instruction Sets 5.2.2 Little versus Big Endian 5.2.3 Internal Storage in the

More information

Pointer Analysis in the Presence of Dynamic Class Loading. Hind Presented by Brian Russell

Pointer Analysis in the Presence of Dynamic Class Loading. Hind Presented by Brian Russell Pointer Analysis in the Presence of Dynamic Class Loading Martin Hirzel, Amer Diwan and Michael Hind Presented by Brian Russell Claim: First nontrivial pointer analysis dealing with all Java language features

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures Chapter 3: Operating-System Structures System Components Operating System Services System Calls POSIX System Programs System Structure Virtual Machines System Design and Implementation System Generation

More information

Hardware-Supported Pointer Detection for common Garbage Collections

Hardware-Supported Pointer Detection for common Garbage Collections 2013 First International Symposium on Computing and Networking Hardware-Supported Pointer Detection for common Garbage Collections Kei IDEUE, Yuki SATOMI, Tomoaki TSUMURA and Hiroshi MATSUO Nagoya Institute

More information

Typical Processor Execution Cycle

Typical Processor Execution Cycle Typical Processor Execution Cycle Instruction Fetch Obtain instruction from program storage Instruction Decode Determine required actions and instruction size Operand Fetch Locate and obtain operand data

More information

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program.

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program. Language Translation Compilation vs. interpretation Compilation diagram Step 1: compile program compiler Compiled program Step 2: run input Compiled program output Language Translation compilation is translation

More information

COS 140: Foundations of Computer Science

COS 140: Foundations of Computer Science COS 140: Foundations of Computer Science CPU Organization and Assembly Language Fall 2018 CPU 3 Components of the CPU..................................................... 4 Registers................................................................

More information

Understand the factors involved in instruction set

Understand the factors involved in instruction set A Closer Look at Instruction Set Architectures Objectives Understand the factors involved in instruction set architecture design. Look at different instruction formats, operand types, and memory access

More information

Evolution of Virtual Machine Technologies for Portability and Application Capture. Bob Vandette Java Hotspot VM Engineering Sept 2004

Evolution of Virtual Machine Technologies for Portability and Application Capture. Bob Vandette Java Hotspot VM Engineering Sept 2004 Evolution of Virtual Machine Technologies for Portability and Application Capture Bob Vandette Java Hotspot VM Engineering Sept 2004 Topics Virtual Machine Evolution Timeline & Products Trends forcing

More information

Intermediate Representations

Intermediate Representations Intermediate Representations Intermediate Representations (EaC Chaper 5) Source Code Front End IR Middle End IR Back End Target Code Front end - produces an intermediate representation (IR) Middle end

More information

CPE300: Digital System Architecture and Design

CPE300: Digital System Architecture and Design CPE300: Digital System Architecture and Design Fall 2011 MW 17:30-18:45 CBC C316 Arithmetic Unit 10032011 http://www.egr.unlv.edu/~b1morris/cpe300/ 2 Outline Recap Chapter 3 Number Systems Fixed Point

More information

Advanced Object-Oriented Programming Introduction to OOP and Java

Advanced Object-Oriented Programming Introduction to OOP and Java Advanced Object-Oriented Programming Introduction to OOP and Java Dr. Kulwadee Somboonviwat International College, KMITL kskulwad@kmitl.ac.th Course Objectives Solidify object-oriented programming skills

More information

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

ASSEMBLY LANGUAGE MACHINE ORGANIZATION ASSEMBLY LANGUAGE MACHINE ORGANIZATION CHAPTER 3 1 Sub-topics The topic will cover: Microprocessor architecture CPU processing methods Pipelining Superscalar RISC Multiprocessing Instruction Cycle Instruction

More information