Presentation is loading. Please wait.

Presentation is loading. Please wait.

Method Manipulation in an Object-Oriented Processor.

Similar presentations


Presentation on theme: "Method Manipulation in an Object-Oriented Processor."— Presentation transcript:

1 Method Manipulation in an Object-Oriented Processor

2 “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

3 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

4 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

5 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

6 www.ee.cityu.edu.hk/~hisc/architecture.html

7

8 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

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

10 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.

11 Parameter Passing & Java Methods Map to jHISC Assembly

12 Internal Method Invocation

13 HLL ASSEMBLY

14 Class Operand Descriptor Table (CODT)

15 After Internal Method Call Returns via RVK store result into glob_z

16 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_2 ------------------------------------------Context-Switch--------------------------------------------------- LVF_1 INOUTLOCAL #0#1 #0#1 #0#1 LOCAL Parameter Passing

17 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)

18 Three Types of Method Invocation

19 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

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

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

22 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) -

23 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.

24 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() !

25 Invoking Class Method

26 Invoking Instance Method

27 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

28 SR.MODE register

29 Typos

30 Conclusion www.ee.cityu.edu.hk/~hisc/ 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.

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

32 The End


Download ppt "Method Manipulation in an Object-Oriented Processor."

Similar presentations


Ads by Google