1 / 32

Method Manipulation in an Object-Oriented Processor

Method Manipulation in an Object-Oriented Processor. OO Process Requirements with Instruction Analysis of Java Programs. “An Object Oriented Processor should provide a fast and secure method-manipulation procedure.”

eithne
Download Presentation

Method Manipulation in an Object-Oriented Processor

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Method Manipulation in an Object-Oriented Processor

  2. OO Process Requirements with Instruction Analysis of Java Programs • “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

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

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

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

  10. Parameter Passing&Java Methods Map to jHISC Assembly

  11. Internal Method Invocation

  12. HLL ASSEMBLY

  13. Class Operand Descriptor Table (CODT)

  14. After Internal Method Call Returns via RVK store result into glob_z

  15. Parameter Passing IN LOCAL OUT Glob_x Glob_y Before IVK LVF_1 #0 #1 ---------------------------------------Context-Switch-------------------------------------------------------- IN LOCAL OUT LVF_2 Glob_x Glob_y Loc_z Loc_y Loc_x After IVK #0 #1 IN LOCAL After Mov Before RVK Loc_z Glob_y Loc_z Loc_y Loc_x #0 #1 ------------------------------------------Context-Switch--------------------------------------------------- IN LOCAL OUT Loc_z Glob_y LVF_1 #0 #1

  16. 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)

  17. Three Types of Method Invocation

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

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

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

  21. 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) -

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

  23. 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() !

  24. Invoking Class Method

  25. Invoking Instance Method

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

  27. SR.MODE register

  28. Typos

  29. Conclusionwww.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.

  30. Dreams Do Come TrueFrom Virtual Machine To Machine “Compile Once Run Anywhere” “jHISC Making a Virtual Reality a Reality”

  31. The End

More Related