Java Virtual Machine, JVM

Size: px
Start display at page:

Download "Java Virtual Machine, JVM"

Transcription

1 Java Virtual Machine, JVM a Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science a These slides have been developed by Teodor Rus. They are copyrighted materials and may not be used in other course settings outside of the University of Iowa in their current form or modified form without the express written permission of the copyright holder. During this course, students are prohibited from selling notes to or being paid for taking notes by any person or commercial firm without the express written permission of the copyright holder. Introduction to System Software p.1/64

2 Target of the assembler The target of the assembler in this class is the language of a virtual machines (VM): V M = Processor, Program, ExecutionModel Note: 1. The VM should be such that it can be used to simulate the computation of real machines; 2. Java Virtual Machine is such a machines. Introduction to System Software p.2/64

3 Rationale 1. JVM (under the name of P-machine) was successfully used as target in many projects on compiler design and implementation; 2. JVM is successfully used as an abstract machine simulating the computation performed by current real machines in Java language environments; 3. Interpreters simulating the execution of JVM programs on real hardware are extensively implemented and accepted; 4. Oolong, the assembly language of the JVM is available; 5. Finally, this provides a good educational experience. Introduction to System Software p.3/64

4 Processor abstraction A processor abstraction needs to represent any concrete hardware; hence it should be a virtual computer and an implementation. Once the virtual computer is implemented on a particular system all programs written for the virtual computer will run on that system. This allows programmers to write programs once (for the virtual computer) and run them anywhere. (Java slogan) Introduction to System Software p.4/64

5 Fact The virtual computer operates on an abstract memory handling objects rather than bits and bytes. That is, the virtual computer hides the complexities of a real hardware such as: 1. Memory structure and addressing; 2. Intricacies of instruction patterns; 3. Program control and data flows. Introduction to System Software p.5/64

6 JVM specification JVM is a computer abstraction defined by: The set of operations that it performs, called bytecodes; The structure of the program JVM can execute called the class file format, (CFF); The verification algorithm that ensures the integrity of JVM program. Introduction to System Software p.6/64

7 Program execution 1. JVM takes its instructions from the CFF; 2. Operations performed by JVM take their operands from a stack and generate their results on the stack. Hence address computation is not a problem; 3. JVM operates on objects rather than operating on bits and bytes. Hence, interpretation is the same for all instructions Introduction to System Software p.7/64

8 JVM instructions JVM instructions are classified in 6 groups: 1. instructions whose operands are in top of the stack Examples: add, mul, div, etc.; 2. instructions for object allocation; 3. instructions for method invocation; 4. instruction for retrieving and modifying fields in the objects; 5. instructions for moving information between stack and objects. Examples: load n (moves the value of local variable n onto stack); store n (store the value on top of the stack into variable n) Introduction to System Software p.8/64

9 Example Consider the following JVM code: getstatic java/lang/system/out Ljava/io/PrintStream; ldc "Hello, world" invokevirtual java/io/printstream/println (Ljava/lang/String;)V Introduction to System Software p.9/64

10 Example, continuation The meaning of this code is: 1. Retrieve the value of out field in the class java/lang/system and push it on the stack; this is an object of the class java/io/printstream 2. Push the constant "Hello, world" on the stack 3. Invoke the method println, which is defined in the class java/lang/printstream and expects stack to contain an object of java/lang/string and a reference to out, an object of the class java/io/printstream Introduction to System Software p.10/64

11 Class File Format, CFF Represents a Java class as a stream of bytes; Java platform has methods for converting Java class files into classes in JVM CFF is not necessarily a file, it can be stored in a database, across the network, as part of Java archive file, JAR, etc. CFF is standardized and is manipulated by the ClassLoader, part of Java platform Introduction to System Software p.11/64

12 Note If one stores CFF in a nonstandard form then one needs to construct an appropriate ClassLoader to handle it. Introduction to System Software p.12/64

13 Verification algorithm Purpose: ensures that programs follow a set of rules that are designed to protect the integrity of JVM programs; The verification algorithm perform an abstract interpretation of CFF. If this fails the JVM program in the CFF is aborted. Note: this doesn t mean that one cannot write a JVM program that while conforming to the rules implemented by the verification algorithm violates the integrity of the JVM. Introduction to System Software p.13/64

14 Java Platform JVM perform fundamental computational tasks but it lacks features for doing computer-oriented things like graphics, Internet communications, etc Java platform includes JVM and a collection of classes that are collected into the package java. Examples of such classes:java.applet, java.io, java.awt (abstract window toolkit), java.security, etc. Introduction to System Software p.14/64

15 Assumptions JVM cannot function independent of Java platform. We assume further that Java platform contain java.lang.object, java.lang.classloader, java.lang.string, java.lang.class Note the dot-notation for Java and slash notation for JVM Introduction to System Software p.15/64

16 JVM architecture JVM is divided into four conceptual data spaces: Class area, where the JVM program (consisting of byte codes and constants) is kept; Java stack, which keeps track of which methods have been called and the data associated with each method invocation; Heap, where objects are kept; Native method stacks, for supporting native methods. Introduction to System Software p.16/64

17 Class area Stores the classes loaded into the system; each class is defined in terms of the properties: Its superclasses; List of interfaces (possibly empty); List of fields; List of methods and their implementations stored in the method area; List of constants, stored in the constant pool. All properties of a class are immutable (i.e., are unchangeable) Introduction to System Software p.17/64

18 Class descriptors Each field is defined by a descriptor that shows the properties of the object occupying that field such as static or not; For nonstatic fields there is a copy in each object of the class; for static fields there is a single copy for the entire class of objects; Each method is defined by a descriptor that shows method type and method modifiers which are abstract, static, etc.; An abstract method has no implementation; a non-abstract method has an implementation defined in terms of JVM instructions. Introduction to System Software p.18/64

19 Example of class representation Figures 1 and 2 depict two class areas ClassName: GamePlayer Superclass: java/lang/object Fields: name dscrptr: Ljava/lang/String; modifs: none Methods: main dscrptr:ljava/lang/string; modifs:public, static main method implementation Figure 1: The GamePlayer class representation Introduction to System Software p.19/64

20 Example, continuation ClassName: Superclass: ChessPlayer GamePlayer Fields: color dscrptr: I modifs: private piece dscrptr: I modifs: static Methods: getmove dscrptr:()lmove; modifs:public getmove method implementation Figure 2: The ChessPlayer class representation Introduction to System Software p.20/64

21 JVM stack JVM operates on a stack of stack frames. A stack frame consists of three elements: 1. The operand stack, which contains the operands of the operations performed by JVM; 2. The array of local variables of the method; 3. Program counter PC, shows first instruction of the method. Introduction to System Software p.21/64

22 Execution model Each time a method is invoked a new stack frame is created and is pushed on the JVM stack; When a method terminates its stack frame is popped out. The JVM performs the loop: while (PC.opcode!= Halt) { Execute (PC); PC := Next(PC); } Introduction to System Software p.22/64

23 More on execution model The top frame of JVM stack shows the currently executing method and is called active frame (AF); Only the operand stack and the local variable array in the active frame can be used during JVM program execution; Each operation performed by JVM evaluates an expression whose operands are on the operand stacks and leave the result on the operand stack; When a method calls another method the PC of the caller is saved in the active frame; when callee completes the result is in top of the operand stack and the caller is resumed using the PC from callee stack frame and caller array of local variables. Introduction to System Software p.23/64

24 The Heap Each object is associated with a class (its type) in the class area and is stored in the heap. Each object has a number of slots for storing fields; there is one slot for each nonstatic field in the class associated with the object. Each object has a number of slots storing methods that operate on that object; there is one method for each abstract method of the class associated with the object. Introduction to System Software p.24/64

25 Example object Figure 3 shows the heap representation of an object of the class ChessPlayer. ToTheClass ChessPlayer Superclass color:1 pieces:16 GamePlayer ToTheName java/lang/string Player s name C Pooky Figure 3: An object of the class ChessPlayer Introduction to System Software p.25/64

26 Native method stacks Native methods are methods implemented using other languages than JVM; Native methods allow programmer to handle situations that cannot be handled completely by Java, such as interfacing with platform dependent features or legacy code; Native methods are executed using C-like stacks; Native methods do not exist on all JVM implementations; moreover, different JVM implementations may have different standards for native methods; The standard Java Native Interface, JNI, should be available for native method documentation. Introduction to System Software p.26/64

27 Garbage collection Each object consumes some memory from the heap; Eventually the memory allocated to JVM object is reclaimed; JVM reclaims object s memory automatically through a process called garbage collection; An object is ready to be garbage collected when it is no longer alive". Introduction to System Software p.27/64

28 Object liveness Rules that determining if an object is alive are: 1. If there is a reference to the object on the stack then the object is alive; 2. If there is a reference to the object in a local variable on the stack or in a static field, then the object is alive; 3. If a field of an alive object contains a reference to the object then the object is alive; 4. JVM may internally keep references to certain objects, for example to support native methods. These objects are alive. Introduction to System Software p.28/64

29 Verification process Ensures that class files follow certain rules; Allows JVM to assume that a class has certain safety properties and to make optimizations based on this; Makes it possible to safely download Java applets from Internet; Java compiler generates correct code. However JVM programmer can bypass the restrictions. Verification algorithm checks this. Introduction to System Software p.29/64

30 How does it work? It asks questions about CFF, such as: Is it a structurally valid class? Are all constant references correct? Are all instructions valid? Will stack and locals contain values of appropriate type? Do classes used really exist and are correct? Introduction to System Software p.30/64

31 JVM machine language syntax Level 0: byte codes, indices in CFF (integers), indices in the array of local variable, constant tags. Level 1: constants and instructions; Level 2: Class File Format, CFF. Introduction to System Software p.31/64

32 JVM codes 1. JVM uses Unicode character codes (rather than ASCCI or EBCDIC). The Unicode Consortium manages this codes; 2. The Unicode was designed such that it can accommodate any known character set used by people s alphabets; 3. Unicode Transformation Format, UTF-8, UTF-16, UTF-32 are Unicode character representations on byte, 2-bytes (half-word), 4-bytes (word). Introduction to System Software p.32/64

33 Constant tags Table 1: Constant tags Tag Type Format Interpretation 1 UTF8 2+n First 2 bytes encode length n followed by n bytes of the text of the constant 2 undefined 3 Integer 4 bytes Text of a signed integer 4 Float 4 bytes Text of IEEE 754 floating-point number 5 Long 8 bytes Text of long signed integer 6 Double 8 bytes Text of IEEE 754 double-precision number 7 Class 2 bytes Reference to class name, a UTF8 constant 8 String 2 bytes Reference to string name, a UTF8 constant 9 FieldRef 4 bytes First 2 show a Class constant, second 2 a NameAndType constant (tag 12 below) Introduction to System Software p.33/64

34 Constant tags, continuation Table 2: Constant tags Tag Type Format Interpretation 10 MethodRef 4 bytes Same as FieldRef 11 IntMetRef 4 bytes Same as FieldRef 12 NameAndType 4 bytes First 2 point to name, second 2 point to descriptor. Both are UTF8 constants Introduction to System Software p.34/64

35 Is CFF structurally valid? The first 4 bytes of CFF must contain the hex values: CA FE BA BE which is the magic number; Following the magic number are minor and major version; each take two bytes interpreted as a 16-bit unsigned: Example: JDK 1.0, 1.1: Major = 0X2D (45), Minor = 0X3(3); Java 2: Major: 0X2E(46); Minor: 0, if Major = 45 then Minor > 3 Figure 4 shows the structure of a CFF Introduction to System Software p.35/64

36 Structure of the CFF Magic# Minor Major CnstPool Class Super Interface Fields Methods Figure 4: Structure of a properly formatted CFF Introduction to System Software p.36/64

37 More on CFF structure Most sections begin with a count, which is a two-byte unsigned, followed by count instances of some pattern of bytes; Example: (see tags in Tables 1,2) 1. Constant pool start with a count followed by as many constant patterns as it specifies; 2. Each constant pattern consists of a one byte tag and a number of bytes on which constant is written; 3. The tag describes the kind of constant that follows and how many bytes does it take; 4. If any tag is invalid or file ends before correct number of constants is found then CFF is rejected. Introduction to System Software p.37/64

38 Check constant references Class and String constants must have references to UTF8; FieldRef,MethodRef, InterfaceMethodref must have a class index that is a class constant and a name-and-type index; NameAndType constants must have two indices pointing to UTF8. Introduction to System Software p.38/64

39 Example JVM code Figure 5 shows a portion of the code:.class Foo.super Bar.implements Baz.field field1 LFoo;.method iseven (I)Z ; ;....end method Introduction to System Software p.39/64

40 Constant pool count 16 6 i s E v e n 2 = 256 UTF8 iseven ( I ) B UTF8 (I)B 6 f i e l d 1 UTF8 field L F o o ; UTF8 LFoo 3 B a z UTF8 Baz Class name index = B a r UTF8 Bar Class name index = F o o UTF8 Foo Clas: name index = 9 0 A This class index (10 = Foo 8 Superclas index (8 = Bar) 0 1 Interface count = 1 6 Interface index (6 = Baz) 0 1 Fields count = 1 0 There are no field flags 0 3 Field name index (3 = field1) 4 Field descriptor index (4 = LFoo) 0 0 Field attributes count = 0 1 Method count = There are no method flags 1 Method name index (1 = iseven) 0 2 Method descriptor index (2=(I)B). 1.. Method attributes count Method attributes Figure 5: Are all constants references correct? Introduction to System Software p.40/64

41 Are all instructions valid? Once we know that overall class structure is valid we can look at method bodies to check if the instructions are correctly formatted. Introduction to System Software p.41/64

42 Problem to be solved Does each instruction begin with a recognized opcode? If instruction takes a constant pool reference as argument, does it point to an actual constant pool entry with the correct type? If the instruction uses a local variable, is the local variable range within the correct range? If the instruction is a branch, does it point to the beginning of an instruction? Introduction to System Software p.42/64

43 A closer look at CFF Consider the Java "hello world" program: public class hello { public static void main(string argv[]) { System.out.println("Hello, world"); } } Note: the file hello.java, containing this program, is mapped by the java compiler (javac hello.java) into the CFF file hello.class that is interpreted by JVM. To understand CFF we look at the file hello.class Introduction to System Software p.43/64

44 Notation Represent CFF on three columns: 1. Left column: offset, in hex, into CFF 2. Middle column: bytes at the offset location in hex 3. Right column: interpretation of the middle column by JVM Introduction to System Software p.44/64

45 Example File header cafebabe Magic = ca fe ba be Minor version = d Major version = 2* = 45 Introduction to System Software p.45/64

46 Constant pool There are 2 * 16 = 32 constants in the pool 00000a 08001f 1:a string at index = 31 in CFF 00000d 07001d 2:a class name at index = 29 in CFF :a class name at index = 24 in CFF e 4:a class name at index 14 in CFF :a class name at index 19 in CFF a 6:FieldRef:class index 2,name-and-type index e 0a :MethodRef:class index 4,name-and-type index a b 8:MethodRef:class index 3,name-and-type index c000c0017 9:NameAndType:name index 12,descriptor index d 0c c 10:NameAndType:name index 22,descriptor index c001b001e 11:NameAndType:name index 27,descriptor index : UTF8, length a e746c6e println Introduction to System Software p.46/64

47 Constant pool, continuation d 13: UTF8, length f6e e c7565 ConstantValue : UTF8, length a f696f2f e java/io/printstream a 15: UTF8, length a f6e73 Exceptions a 16: UTF8, length c6c6f2e6a hello.java f 17: UTF8, length c696e654e756d c65 LineNumberTable a 18: UTF8, length f c65 SourceFile 0000a : UTF8, length a c6c6f hello Introduction to System Software p.47/64

48 Constant pool, continuation 0000a e 20: UTF8, length ab 4c6f63616c c6573 LocalVariables 0000b : UTF8, length bc 436f6465 Code 0000c : UTF8, length c3 6f7574 out 0000c : UTF8, length c6a f6c616e672f (Ljava/lang/String;)V 0000de : UTF8, length e1 6a f6c616e672f4f626a java/lang/object 0000f : UTF8, length f4 6d61696e main 0000f : UTF8, length fb 285b4c6a f6c616e672f ([Ljava/lang/String;)V Introduction to System Software p.48/64

49 Constant pool, continuation : UTF8, length c696e69743e <init> 00011a : UTF8, length d 4c6a f696f2f e Ljava/io/PrintStream; : UTF8, length a f6c616e672f d java/lang/system : UTF8, length ()V 00014b 01000c UTF8, length e 48656c6c6f2c20776f726c64 Hello, world Introduction to System Software p.49/64

50 Constant entries The first constants are strings codified as UTF8 entries Strings are followed by small constants, 3,4,5, etc (of which there is none in the example) codified on a byte These are followed by integer and long constants codified as two s complement signed integers on 32 and 64 bits respectively. Floating and double constants codified as shown in Table 3 Introduction to System Software p.50/64

51 Other fields Fields, Methods, and Class entries: Constants with tags 9, 10, 11 are identical. They are used to refer to fields and methods in field and method instructions such as getfield, putstatic, invokevirtual Example: constant 7 in constant pool is 0a i.e: 1. 0a = 10, it is a MethodRef 2. Class containing the method is at index 4 whose name is at index 14, i.e., java/io/printstream 3. Name and descriptor is at index 9: name index 12 (println), descriptor index 23 [(Ljava/lang/String;)V] This is enough info to call the method; Constant 7 is used to code the arguments of Oolong instructions Introduction to System Software p.51/64

52 Class information Following the constant pool is the information about the class itself which consists of: name, type, and access flags as seen below Example hello,java 00015b 0021 two bytes, access flags = d 0005 two bytes, index of this in constant pool, f 0003 two bytes, index of super in constant pool, two bytes, number of interfaces, 0 Introduction to System Software p.52/64

53 Access flags are interpreted as a bit-vector as seen below: Bit Name Meaning 1 ACC_PUBLIC The class is public 2-4 Not used 5 ACC_FINAL The class is final 6 ACC_SUPER The class is supper 7-9 Not used 10 ACC_INTERFACE The class is an interface 11 Not used 12 ACC_ABSTRACT The class is abstract Introduction to System Software p.53/64

54 Fields and Methods After class information comes four bytes that describe the number of fields and methods. In our example they are: Number of fields is zero There are two methods in this class Fields and methods have identical formats access flags of the method = name of the method is index 24 in constant pool (main) 00016b 001a descriptor of the method has index 26 in constant pool Introduction to System Software p.54/64

55 Method access flags Are specified in the table: Bit Name Meaning 1 ACC_PUBLIC The field/method is public 2 ACC_PRIVATE The field/method is private 3 ACC_PROTECTED The field/method is protected 4 ACC_STATIC The field/method is static 5 ACC_FINAL The field/method is final 6 ACC_SYNCHRONIZED The method id synchronized 7 ACC_VOLATILE The field is volatile 8 ACC_TRANSIENT The field is transient 9 ACC_NATIVE The method is native 10,11 Unused 12 ACC_ABSTRACT The method is abstract Introduction to System Software p.55/64

56 Attributes After the general method or field information the CFF contains a list of attributes Fields and methods have different kind of attributes. Methods have a single attribute giving the implementation of method; most fields have no attributes at all Only the ConstantValue attribute is defined for fields Attributes for the methods are represented as shown bellow Introduction to System Software p.56/64

57 Attributes for methods 00016d method attributes: method attribute 0 follows 00016f 0015 name: at index 21 in constant pool, Code Length of the code is Maximum stack is 2 slots Maximum space for locals is 1 Introduction to System Software p.57/64

58 The actual byte code Disp. Bytecode Addr Interpretation Code length: 9 bytes 00017d b getstatic #6, index in constant pool ldc #1, index 1 in constant pool b invokevirtual #7, index 7 in constant pool b return Note: code of length up to 4G bytes (2 32 ) is allowed; however, other constraints limit code size to 64K. Introduction to System Software p.58/64

59 Observations 1. There are two forms of ldc instruction, ldc and ldc w: ldc requires one byte argument interpreted as index in constant pool, ldc_w requires two bytes argument that may refer to any constant 2. In either case constant pool entry must be Integer, Float, Double, Long, or String Introduction to System Software p.59/64

60 Exception table Following byte code is an exception table entry which begins with two-byte count, the number of entries: there are no exceptions in this method Note: following the exception handler table, the code attribute may have attributes of its own, such as debugging info. Introduction to System Software p.60/64

61 Main method The main method has one attribute, LineNumberTable: code attributes: code attribute 0 follows 00018a 0011 Name: index 17 in CFF: LineNumberTable 00018c a Length of attribute Number of entries: Start PC: Line number: Start PC: Line number 3 Introduction to System Software p.61/64

62 Method 1 Starts after the code attribute of method a 0000 Access flags = c 001c Name: index 28 in constant pool (<init>) 00019e 001e Descriptor: index 30 in constant pool, ()V 0001a method attributes: method attribute a Name: index 21 in constant pool (Code) 0001a d length of the attribute a Maximum stack: aa 0001 Maximum locals: ac Code length: b0 2a aload_0 0001b1 b invokespecial # b4 b return Introduction to System Software p.62/64

63 Method 1, continuation 0001b exception table entries 0001b code attributes: code attribute 0: 0001b Name: index 17 in constant pool (LineNumberTable) 0001bb Length of attribute : bf 0001 Length of table c Start PC: 0, Line number: 1 Introduction to System Software p.63/64

64 Class attributes CFF ends with a list of class attributes A class can have any attributes it wants but only SourceFile attribute is defined in Java specification 0001c class file attributes Attribute 0: 0001c Name: index 18 in constant pool (SourceFile) 0001c Length: 2 bytes 0001cd 0010 Name: index 16 in constant pool (hello.java) Introduction to System Software p.64/64

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

Under the Hood: The Java Virtual Machine. Lecture 24 CS 2110 Fall 2011

Under the Hood: The Java Virtual Machine. Lecture 24 CS 2110 Fall 2011 Under the Hood: The Java Virtual Machine Lecture 24 CS 2110 Fall 2011 Compiling for Different Platforms Program written in some high-level language (C, Fortran, ML,...) Compiled to intermediate form Optimized

More information

02 B The Java Virtual Machine

02 B The Java Virtual Machine 02 B The Java Virtual Machine CS1102S: Data Structures and Algorithms Martin Henz January 22, 2010 Generated on Friday 22 nd January, 2010, 09:46 CS1102S: Data Structures and Algorithms 02 B The Java Virtual

More information

1 The Java Virtual Machine

1 The Java Virtual Machine 1 The Java Virtual Machine About the Spec Format This document describes the Java virtual machine and the instruction set. In this introduction, each component of the machine is briefly described. This

More information

Virtual Machines. Case Study: JVM. Virtual Machine, Intermediate Language. JVM Case Study. JVM: Java Byte-Code. JVM: Type System

Virtual Machines. Case Study: JVM. Virtual Machine, Intermediate Language. JVM Case Study. JVM: Java Byte-Code. JVM: Type System Case Study: JVM Virtual Machines What is a machine? does something (...useful) programmable concrete (hardware) What is a virtual machine? a machine that is not concrete a software emulation of a physical

More information

Chapter 7D The Java Virtual Machine

Chapter 7D The Java Virtual Machine This sub chapter discusses another architecture, that of the JVM (Java Virtual Machine). In general, a VM (Virtual Machine) is a hypothetical machine (implemented in either hardware or software) that directly

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

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

University of Twente. A simulation of the Java Virtual Machine using graph grammars

University of Twente. A simulation of the Java Virtual Machine using graph grammars University of Twente Department of Computer Science A simulation of the Java Virtual Machine using graph grammars Master of Science thesis M. R. Arends, November 2003 A simulation of the Java Virtual Machine

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

Caml Virtual Machine File & data formats Document version: 1.4 http://cadmium.x9c.fr

Caml Virtual Machine File & data formats Document version: 1.4 http://cadmium.x9c.fr Caml Virtual Machine File & data formats Document version: 1.4 http://cadmium.x9c.fr Copyright c 2007-2010 Xavier Clerc cadmium@x9c.fr Released under the LGPL version 3 February 6, 2010 Abstract: This

More information

Java Programming. Binnur Kurt binnur.kurt@ieee.org. Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0.

Java Programming. Binnur Kurt binnur.kurt@ieee.org. Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0. Java Programming Binnur Kurt binnur.kurt@ieee.org Istanbul Technical University Computer Engineering Department Java Programming 1 Version 0.0.4 About the Lecturer BSc İTÜ, Computer Engineering Department,

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

Security Vulnerability Notice

Security Vulnerability Notice Security Vulnerability Notice SE-2012-01-PUBLIC [Security vulnerabilities in Java SE, Issue 54] DISCLAIMER INFORMATION PROVIDED IN THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS

More information

Chapter 1 Java Program Design and Development

Chapter 1 Java Program Design and Development presentation slides for JAVA, JAVA, JAVA Object-Oriented Problem Solving Third Edition Ralph Morelli Ralph Walde Trinity College Hartford, CT published by Prentice Hall Java, Java, Java Object Oriented

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

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

C Compiler Targeting the Java Virtual Machine

C Compiler Targeting the Java Virtual Machine C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the

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

- 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

Crash Course in Java

Crash Course in Java Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is

More information

CSC 8505 Handout : JVM & Jasmin

CSC 8505 Handout : JVM & Jasmin CSC 8505 Handout : JVM & Jasmin Note: This handout provides you with the basic information about JVM. Although we tried to be accurate about the description, there may be errors. Feel free to check your

More information

Java Interview Questions and Answers

Java Interview Questions and Answers 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java

More information

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1 The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose

More information

A Low-Footprint Class Loading Mechanism for Embedded Java Virtual Machines

A Low-Footprint Class Loading Mechanism for Embedded Java Virtual Machines A Low-Footprint Class Loading Mechanism for Embedded Java Virtual Machines Christophe Rippert, Alexandre Courbot, Gilles Grimaud {Christophe.Rippert,Alexandre.Courbot,Gilles.Grimaud}@lifl.fr IRCICA/LIFL,

More information

Pemrograman Dasar. Basic Elements Of Java

Pemrograman Dasar. Basic Elements Of Java Pemrograman Dasar Basic Elements Of Java Compiling and Running a Java Application 2 Portable Java Application 3 Java Platform Platform: hardware or software environment in which a program runs. Oracle

More information

An Overview of Java. overview-1

An Overview of Java. overview-1 An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2

More information

Real-time Java Processor for Monitoring and Test

Real-time Java Processor for Monitoring and Test Real-time Java Processor for Monitoring and Test Martin Zabel, Thomas B. Preußer, Rainer G. Spallek Technische Universität Dresden {zabel,preusser,rgs}@ite.inf.tu-dresden.de Abstract This paper introduces

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

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

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T) Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating

More information

Hardware/Software Co-Design of a Java Virtual Machine

Hardware/Software Co-Design of a Java Virtual Machine Hardware/Software Co-Design of a Java Virtual Machine Kenneth B. Kent University of Victoria Dept. of Computer Science Victoria, British Columbia, Canada ken@csc.uvic.ca Micaela Serra University of Victoria

More information

Java Crash Course Part I

Java Crash Course Part I Java Crash Course Part I School of Business and Economics Institute of Information Systems HU-Berlin WS 2005 Sebastian Kolbe skolbe@wiwi.hu-berlin.de Overview (Short) introduction to the environment Linux

More information

Java CPD (I) Frans Coenen Department of Computer Science

Java CPD (I) Frans Coenen Department of Computer Science Java CPD (I) Frans Coenen Department of Computer Science Content Session 1, 12:45-14:30 (First Java Programme, Inheritance, Arithmetic) Session 2, 14:45-16:45 (Input and Programme Constructs) Materials

More information

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science

First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca

More information

Checking Access to Protected Members in the Java Virtual Machine

Checking Access to Protected Members in the Java Virtual Machine Checking Access to Protected Members in the Java Virtual Machine Alessandro Coglio Kestrel Institute 3260 Hillview Avenue, Palo Alto, CA 94304, USA Ph. +1-650-493-6871 Fax +1-650-424-1807 http://www.kestrel.edu/

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq Introduction to Programming using Java wertyuiopasdfghjklzxcvbnmqwertyui

More information

CSC 2405: Computer Systems II

CSC 2405: Computer Systems II CSC 2405: Computer Systems II Spring 2013 (TR 8:30-9:45 in G86) Mirela Damian http://www.csc.villanova.edu/~mdamian/csc2405/ Introductions Mirela Damian Room 167A in the Mendel Science Building mirela.damian@villanova.edu

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

An Introduction to Assembly Programming with the ARM 32-bit Processor Family

An Introduction to Assembly Programming with the ARM 32-bit Processor Family An Introduction to Assembly Programming with the ARM 32-bit Processor Family G. Agosta Politecnico di Milano December 3, 2011 Contents 1 Introduction 1 1.1 Prerequisites............................. 2

More information

Motorola 8- and 16-bit Embedded Application Binary Interface (M8/16EABI)

Motorola 8- and 16-bit Embedded Application Binary Interface (M8/16EABI) Motorola 8- and 16-bit Embedded Application Binary Interface (M8/16EABI) SYSTEM V APPLICATION BINARY INTERFACE Motorola M68HC05, M68HC08, M68HC11, M68HC12, and M68HC16 Processors Supplement Version 2.0

More information

Java Programming Fundamentals

Java Programming Fundamentals Lecture 1 Part I Java Programming Fundamentals Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Introduction to Java We start by making a few

More information

ASM 4.0 A Java bytecode engineering library. Eric Bruneton

ASM 4.0 A Java bytecode engineering library. Eric Bruneton ASM 4.0 A Java bytecode engineering library Eric Bruneton Copyright c 2007, 2011 Eric Bruneton All rights reserved. Redistribution and use in source (LYX format) and compiled forms (L A TEX, PDF, PostScript,

More information

Programmation 2. Introduction à la programmation Java

Programmation 2. Introduction à la programmation Java Programmation 2 Introduction à la programmation Java 1 Course information CM: 6 x 2 hours TP: 6 x 2 hours CM: Alexandru Costan alexandru.costan at inria.fr TP: Vincent Laporte vincent.laporte at irisa.fr

More information

Caching and the Java Virtual Machine

Caching and the Java Virtual Machine Caching and the Java Virtual Machine by M. Arthur Munson A Thesis Submitted in partial fulfillment of the requirements for the Degree of Bachelor of Arts with Honors in Computer Science WILLIAMS COLLEGE

More information

Lecture 1 Introduction to Android

Lecture 1 Introduction to Android These slides are by Dr. Jaerock Kwon at. The original URL is http://kettering.jrkwon.com/sites/default/files/2011-2/ce-491/lecture/alecture-01.pdf so please use that instead of pointing to this local copy

More information

Third AP Edition. Object-Oriented Programming and Data Structures. Maria Litvin. Gary Litvin. Phillips Academy, Andover, Massachusetts

Third AP Edition. Object-Oriented Programming and Data Structures. Maria Litvin. Gary Litvin. Phillips Academy, Andover, Massachusetts Third AP Edition Object-Oriented Programming and Data Structures Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Software, Inc. Skylight Publishing Andover, Massachusetts Skylight

More information

Glossary of Object Oriented Terms

Glossary of Object Oriented Terms Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

More information

Java and Java Virtual Machine Security

Java and Java Virtual Machine Security Java and Java Virtual Machine Security Vulnerabilities and their Exploitation Techniques by Last Stage of Delirium Research Group http://lsd-pl.net Version: 1.0.0 Updated: October 2nd, 2002 Copyright c

More information

Fundamentals of Java Programming

Fundamentals of Java Programming Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors

More information

1001ICT Introduction To Programming Lecture Notes

1001ICT Introduction To Programming Lecture Notes 1001ICT Introduction To Programming Lecture Notes School of Information and Communication Technology Griffith University Semester 2, 2015 1 3 A First MaSH Program In this section we will describe a very

More information

Instrumenting Java bytecode

Instrumenting Java bytecode Instrumenting Java bytecode Seminar work for the Compilers-course, spring 2005 Jari Aarniala Department of Computer Science University of Helsinki, Finland jari.aarniala@cs.helsinki.fi ABSTRACT Bytecode

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

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part... Part 1 Java Language Tools This beginning, ground-level part presents reference information for setting up the Java development environment and for compiling and running Java programs. This includes downloading

More information

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX Overview CISC Developments Over Twenty Years Classic CISC design: Digital VAX VAXÕs RISC successor: PRISM/Alpha IntelÕs ubiquitous 80x86 architecture Ð 8086 through the Pentium Pro (P6) RJS 2/3/97 Philosophy

More information

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine 7 Objectives After completing this lab you will: know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine Introduction Branches and jumps provide ways to change

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

Structural Typing on the Java Virtual. Machine with invokedynamic

Structural Typing on the Java Virtual. Machine with invokedynamic WRIGHT STATE UNIVERSITY Structural Typing on the Java Virtual Machine with invokedynamic by Brian Diekelman A thesis submitted in partial fulfillment for the degree of Bachelor of Science in the Department

More information

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine

Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine Chapter 4 Lecture 5 The Microarchitecture Level Integer JAVA Virtual Machine This is a limited version of a hardware implementation to execute the JAVA programming language. 1 of 23 Structured Computer

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

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

MPLAB TM C30 Managed PSV Pointers. Beta support included with MPLAB C30 V3.00

MPLAB TM C30 Managed PSV Pointers. Beta support included with MPLAB C30 V3.00 MPLAB TM C30 Managed PSV Pointers Beta support included with MPLAB C30 V3.00 Contents 1 Overview 2 1.1 Why Beta?.............................. 2 1.2 Other Sources of Reference..................... 2 2

More information

Java Virtual Machine Locks

Java Virtual Machine Locks Java Virtual Machine Locks SS 2008 Synchronized Gerald SCHARITZER (e0127228) 2008-05-27 Synchronized 1 / 13 Table of Contents 1 Scope...3 1.1 Constraints...3 1.2 In Scope...3 1.3 Out of Scope...3 2 Logical

More information

JVM Tool Interface. Michal Pokorný

JVM Tool Interface. Michal Pokorný JVM Tool Interface Michal Pokorný JVM TI Inspect & control execution on JVM (profiling, debugging, monitoring, thread analysis, coverage, ) Higher-level interface: Java Platform Debugger Architecture JVM

More information

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1 Divide: Paper & Pencil Computer Architecture ALU Design : Division and Floating Point 1001 Quotient Divisor 1000 1001010 Dividend 1000 10 101 1010 1000 10 (or Modulo result) See how big a number can be

More information

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution CSE 452: Programming Languages Java and its Evolution Acknowledgements Rajkumar Buyya 2 Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java

More information

Appendix C: Keyboard Scan Codes

Appendix C: Keyboard Scan Codes Thi d t t d ith F M k 4 0 2 Appendix C: Keyboard Scan Codes Table 90: PC Keyboard Scan Codes (in hex) Key Down Up Key Down Up Key Down Up Key Down Up Esc 1 81 [ { 1A 9A, < 33 B3 center 4C CC 1! 2 82 ]

More information

A Java Virtual Machine Architecture for Very Small Devices

A Java Virtual Machine Architecture for Very Small Devices A Java Virtual Machine Architecture for Very Small Devices Nik Shaylor Sun Microsystems Research Laboratories 2600 Casey Avenue Mountain View, CA 94043 USA nik.shaylor@sun.com Douglas N. Simon Sun Microsystems

More information

Adobe. ActionScript Virtual Machine 2 (AVM2) Overview

Adobe. ActionScript Virtual Machine 2 (AVM2) Overview Adobe ActionScript Virtual Machine 2 (AVM2) Overview May 2007 Copyright 2006 2007 Adobe Systems Incorporated. All rights reserved. NOTICE: All information contained herein is the property of Adobe Systems

More information

Introduction to Java

Introduction to Java Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high

More information

Portable Profiling of Memory Allocation in Java

Portable Profiling of Memory Allocation in Java Portable Profiling of Memory Allocation in Java Walter Binder Ecole Polytechnique Fédérale de Lausanne (EPFL) Artificial Intelligence Laboratory CH-1015 Lausanne, Switzerland walter.binder@epfl.ch Abstract.

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

Creating Carbon Menus. (Legacy)

Creating Carbon Menus. (Legacy) Creating Carbon Menus (Legacy) Contents Carbon Menus Concepts 4 Components of a Carbon Menu 4 Carbon Menu Tasks 6 Creating a Menu Using Nibs 6 The Nib File 7 The Menus Palette 11 Creating a Simple Menu

More information

1. Overview of the Java Language

1. Overview of the Java Language 1. Overview of the Java Language What Is the Java Technology? Java technology is: A programming language A development environment An application environment A deployment environment It is similar in syntax

More information

Numbering Systems. InThisAppendix...

Numbering Systems. InThisAppendix... G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal

More information

Fast Arithmetic Coding (FastAC) Implementations

Fast Arithmetic Coding (FastAC) Implementations Fast Arithmetic Coding (FastAC) Implementations Amir Said 1 Introduction This document describes our fast implementations of arithmetic coding, which achieve optimal compression and higher throughput by

More information

C# and Other Languages

C# and Other Languages C# and Other Languages Rob Miles Department of Computer Science Why do we have lots of Programming Languages? Different developer audiences Different application areas/target platforms Graphics, AI, List

More information

Prototyping Faithful Execution in a Java Virtual Machine

Prototyping Faithful Execution in a Java Virtual Machine SANDIA REPORT SAND2003-2327 Unlimited Release Printed July 2003 Prototyping Faithful Execution in a Java Virtual Machine Philip L. Campbell, Lyndon G. Pierson, Thomas D. Tarman Prepared by Sandia National

More information

CPU Organization and Assembly Language

CPU Organization and Assembly Language COS 140 Foundations of Computer Science School of Computing and Information Science University of Maine October 2, 2015 Outline 1 2 3 4 5 6 7 8 Homework and announcements Reading: Chapter 12 Homework:

More information

Hypercosm. Studio. www.hypercosm.com

Hypercosm. Studio. www.hypercosm.com Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks

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

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C Basic Java Constructs and Data Types Nuts and Bolts Looking into Specific Differences and Enhancements in Java compared to C 1 Contents Hello World Program Statements Explained Java Program Structure in

More information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java

More information

Number Representation

Number Representation Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data

More information

UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming

UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming 1 2 Foreword First of all, this book isn t really for dummies. I wrote it for myself and other kids who are on the team. Everything

More information

Java Obfuscation Salah Malik BSc Computer Science 2001/2002

Java Obfuscation Salah Malik BSc Computer Science 2001/2002 Java Obfuscation Salah Malik BSc Computer Science 2001/2002 Summary Java has become a popular language in both academia and industry. Its strength lies in the "Write Once Run Anywhere" paradigm. This is

More information

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9.

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9. Code Generation I Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9.7 Stack Machines A simple evaluation model No variables

More information

A JAVA VIRTUAL MACHINE FOR THE ARM PROCESSOR

A JAVA VIRTUAL MACHINE FOR THE ARM PROCESSOR A JAVA VIRTUAL MACHINE FOR THE ARM PROCESSOR A report submitted to the University of Manchester for the purpose of a Master of Science in the Faculty of Science and Engineering September 2004 By Ming Chen

More information

The programming language C. sws1 1

The programming language C. sws1 1 The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

Instruction Set Architecture (ISA) Design. Classification Categories

Instruction Set Architecture (ISA) Design. Classification Categories Instruction Set Architecture (ISA) Design Overview» Classify Instruction set architectures» Look at how applications use ISAs» Examine a modern RISC ISA (DLX)» Measurement of ISA usage in real computers

More information

Chapter 4: Computer Codes

Chapter 4: Computer Codes Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data

More information

Introduction to programming

Introduction to programming Unit 1 Introduction to programming Summary Architecture of a computer Programming languages Program = objects + operations First Java program Writing, compiling, and executing a program Program errors

More information

HVM TP : A Time Predictable and Portable Java Virtual Machine for Hard Real-Time Embedded Systems JTRES 2014

HVM TP : A Time Predictable and Portable Java Virtual Machine for Hard Real-Time Embedded Systems JTRES 2014 : A Time Predictable and Portable Java Virtual Machine for Hard Real-Time Embedded Systems JTRES 2014 Kasper Søe Luckow 1 Bent Thomsen 1 Stephan Erbs Korsholm 2 1 Department of Computer Science Aalborg

More information

Java programming for C/C++ developers

Java programming for C/C++ developers Skill Level: Introductory Scott Stricker (sstricke@us.ibm.com) Developer IBM 28 May 2002 This tutorial uses working code examples to introduce the Java language to C and C++ programmers. Section 1. Getting

More information

The Java(tm) Virtual Machine Specification

The Java(tm) Virtual Machine Specification The Java(tm) Virtual Machine Specification Next The Java(tm) Virtual Machine Specification Table of Contents Copyright Information Preface 1 - Java Virtual Machine Architecture 1.1 - Supported Data Types

More information

HOTPATH VM. An Effective JIT Compiler for Resource-constrained Devices

HOTPATH VM. An Effective JIT Compiler for Resource-constrained Devices HOTPATH VM An Effective JIT Compiler for Resource-constrained Devices based on the paper by Andreas Gal, Christian W. Probst and Michael Franz, VEE 06 INTRODUCTION INTRODUCTION Most important factor: speed

More information

How To Safely Insert In Joie (Java)

How To Safely Insert In Joie (Java) SOFTWARE PRACTICE AND EXPERIENCE Softw. Pract. Exper. 01; 34:1 12 [Version: 2000/03/06 v2.1] An architecture for safe bytecode insertion Geoff A. Cohen and Jeffrey S. Chase Department of Computer Science

More information