Method Manipulation in an Object-Oriented Processor.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Threads, SMP, and Microkernels
Chapter 16 Java Virtual Machine. To compile a java program in Simple.java, enter javac Simple.java javac outputs Simple.class, a file that contains bytecode.
CPU Review and Programming Models CT101 – Computing Systems.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /17/2013 Lecture 12: Procedures Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Prof. Necula CS 164 Lecture 141 Run-time Environments Lecture 8.
PART 4: (2/2) Central Processing Unit (CPU) Basics CHAPTER 13: REDUCED INSTRUCTION SET COMPUTERS (RISC) 1.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Computer Systems/Operating Systems - Class 8
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
CS 536 Spring Run-time organization Lecture 19.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
3/17/2008Prof. Hilfinger CS 164 Lecture 231 Run-time organization Lecture 23.
The Procedure Abstraction Part I: Basics Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412.
Intro to Computer Architecture
Run time vs. Compile time
OS Spring’03 Introduction Operating Systems Spring 2003.
Run-time Environment and Program Organization
Reduced Instruction Set Computers (RISC) Computer Organization and Architecture.
David Evans CS201j: Engineering Software University of Virginia Computer Science Lecture 18: 0xCAFEBABE (Java Byte Codes)
A Portable Virtual Machine for Program Debugging and Directing Camil Demetrescu University of Rome “La Sapienza” Irene Finocchi University of Rome “Tor.
Computer Organization and Architecture Reduced Instruction Set Computers (RISC) Chapter 13.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
Compiler Construction
CPSC 388 – Compiler Design and Construction Runtime Environments.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
C++ Programming Basic Learning Prepared By The Smartpath Information systems
MIT’s Exokernel Presented by Victoria Barrow Kyle Safford Sean Sommers.
MAL 3 - Procedures Lecture 13. MAL procedure call The use of procedures facilitates modular programming. Four steps to transfer to and return from a procedure:
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
RUN-Time Organization Compiler phase— Before writing a code generator, we must decide how to marshal the resources of the target machine (instructions,
Runtime Organization (Chapter 6) 1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture.
Lecture 5 Page 1 CS 111 Online Processes CS 111 On-Line MS Program Operating Systems Peter Reiher.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Processes and Virtual Memory
CS412/413 Introduction to Compilers and Translators Spring ’99 Lecture 11: Functions and stack frames.
ITEC 352 Lecture 19 Functions in Assembly. Functions + Assembly Review Questions? Project due on Friday Stacks Function activation / deactivation.
Programming Languages and Paradigms Activation Records in Java.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
1 n Object Oriented Programming. 2 Introduction n procedure-oriented programming consists of writing a list of instructions and organizing these instructions.
LECTURE 19 Subroutines and Parameter Passing. ABSTRACTION Recall: Abstraction is the process by which we can hide larger or more complex code fragments.
RealTimeSystems Lab Jong-Koo, Lim
7-Nov Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Oct lecture23-24-hll-interrupts 1 High Level Language vs. Assembly.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Design issues for Object-Oriented Languages
Chapter Overview General Concepts IA-32 Processor Architecture
Storage Classes There are three places in memory where data may be placed: In Data section declared with .data in assembly language in C - Static) On the.
Processes and threads.
Computer Science 210 Computer Organization
Assembly language.
Interpreted languages Jakub Yaghob
COMPILERS Activation Records
Run-time organization
Intro to Processes CSSE 332 Operating Systems
Introduction to Compilers Tim Teitelbaum
Chapter 9 :: Subroutines and Control Abstraction
Lecture 4: MIPS Instruction Set
Threads, SMP, and Microkernels
Chap. 8 :: Subroutines and Control Abstraction
Chap. 8 :: Subroutines and Control Abstraction
What time is it?. What time is it? Major Concepts: a data structure model: basic representation of data, such as integers, logic values, and characters.
Lecture 13: The Procedure Abstraction; Run-Time Storage Organisation
Chapter 12 Pipelining and RISC
Where is all the knowledge we lost with information? T. S. Eliot
Presentation transcript:

Method Manipulation in an Object-Oriented Processor

“An Object Oriented Processor should provide a fast and secure method- manipulation procedure.” “Data Structures should be defined in an object-oriented processor for the storage of context information and local variables” “OOP coding style, requires lots of method invocation and revocation”, so optimize OO Process Requirements with Instruction Analysis of Java Programs

Software approaches to OOP introduce inefficiency & insecurity Translation from OOP objects to hardware instructions and Data takes time Method invocations require locating the method code, access control checking, and passing control etc. Security brought by OOP is lost by the translation because the hardware does not manipulate objects directly

Java High Level Instruction Set Computer (jHISC) A research computer jHISC v3 with a 64-bit (possibly 32 bits) architecture is currently under development Performance on OOP applications running on HISC system is expected to be faster Memory allocations and deallocations are done by hardware Secure method manipulation for OOP by defining hardware readable data structures for method context

Java High Level Instruction Set Computer (jHISC) Security and Boundary checking put into hardware, moves the burden of security checking into some pipelined stages, increasing throughput of the processor Secure method invocation can safeguard errors produced by erroneous programming

Operand Desrcriptor (OD) - Hardware readable tables and a data structure that hold the information of objects Object Header (OH) - Contains information of the object such as object type, GC information and synchronization information. Data Space (DS) – Data spaces are storage for data, which include LVF Method Code Space – Stores instructions for the method Thread State Space (TSS)- For multithreading state information

State Registers – Store the current status of the system: running instance, class, and method context Stack- stores state changes upon method invocation and revocation

Method Space Data Structure Method Space – Hardware Readable structure. Stores Method Header (MH), Method Code Space (MCS), and Local Variable Frame for a particular method (LVF). Recall: MH - Object type, Synchronization MCS – Stores instructions for the method (Max 2^ 24 instructions), the only data structure that stores instructions in the jHISC architecture LVF – Dynamically created inside register file (can use up to 128 registers) upon method invocation and destroyed upon revocation, used for temporary storage of data.

Parameter Passing & Java Methods Map to jHISC Assembly

Internal Method Invocation

HLL ASSEMBLY

Class Operand Descriptor Table (CODT)

After Internal Method Call Returns via RVK store result into glob_z

Glob_xGlob_y Loc_yLoc_zLoc_xGlob_xGlob_y Loc_yLoc_zLoc_xLoc_zGlob_y Loc_z Glob_y LVF_1 OUT LOCALIN #0#1 Before IVK Context-Switch INLOCALOUT After IVK After Mov Before RVK IN LVF_ Context-Switch LVF_1 INOUTLOCAL #0#1 #0#1 #0#1 LOCAL Parameter Passing

Method Manipulation jHISC v3 processor excludes any direct pointer control transfer instruction Access Control - Method invocation and revocation is the only way to transfer control between objects OOP principles at the architectural level ensure security (helps prevent hacking/viruses trying to access protected information)

Three Types of Method Invocation

Method Invocation On invocation, the system pushes information about the current states into the machine stack More switching means pushing more information to the stack

Saving information in Stack based on the type of method invocation Method – 3 double words Class – 4 double words Instance – 2 double words (aberration?)

Two bits in SR.MODE register store which kind of methods are currently running

Invoking Internal Method Class Property Descriptor Table (CPDT) – Stores resources that class would probably access Class Data Space – Stores static class data Method Space (MS) -

Method Space Data Structure Method Space – Hardware Readable structure. Stores Method Header (MH), Method Code Space (MCS), and Local Variable Frame for a particular method (LVF). Recall: MH - Object type, Synchronization MCS – Stores instructions for the method (Max 2^ 24 instructions), the only data structure that stores instructions in the jHISC architecture LVF – Dynamically created inside register file (can use up to 128 registers) upon method invocation and destroyed upon revocation, used for temporary storage of data.

Invoking Internal Method Class Property Descriptor Table (CPDT) – Stores resources that class would probably access Class Data Space – Stores static class data Method Space (MS) - You Just Saw it! The Processor updates MS, Instruction resumes in public void DoSomething() !

Invoking Class Method

Invoking Instance Method

Method Revocation Return from current context to caller context Restores previously stored state information by popping from stack Based on the SR.MODE, which stored the callers context the context is restored appropriately

SR.MODE register

Typos

Conclusion JAVA is relatively a new Object-Oriented Programming (OOP) language. It has most of the advantages of object-oriented languages such as encapsulation, polymorphism, dynamic binding and inheritance. Consequently programs developed by JAVA are more reliable and secure. However, as traditional computer architectures RISC and CISC do not provide much hardware support for OOP, their performance for OOP is notoriously poor. jHISC is developed to target for JAVA and is based on High Level Instruction Set Computer (HISC) to support Object-Oriented Programming (OOP) in hardware level. With jHISC architecture, software developers can take the advantages of OOP without the performance penalty.

Dreams Do Come True From Virtual Machine To Machine “Compile Once Run Anywhere” “jHISC Making a Virtual Reality a Reality”

The End