Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
실기기에 KVM Porting 기술 소개 5/26/2000 Junbom Pyo ZUVIX technology, Co. Agenda Overview of Java 2 Platform Introduction to Kjava Profile (I-mode, MIDP, etc.) NTT DoCoMo DoJa VM and MIDP VM Porting Scopes (APIs) of KVM Accessing argument from native methods CDMA Software Architecture Where is mapping kvm layer? Java 2 Platform Java 2 Enterprise Edition Java 2 Standard Edition TV profile Screen Phone/ Commu nicator Profile PDA MID Profile Profile Java 2 Micro Edition HotSpot JVM KVM CDC CLDC Smart Card Profile CardVM Introduction to Kjava Profile Eg. Yellow pages, train schedules, Games... Applications JavaTV Profile JavaPhone Profile MIDP Profile Core APIs Core APIs “C” VM “K” VM Any Operating System Library of Industry Profiles e.g.: TV STB, Wireless Phone, PDA ... Set of base Configurations (eg. Supporting Threads, Floats) Activity in MIDP Expert Group Expert Group Sun, Motorola, Nokia Ericsson, Siemens, Telcordia, Symbian, RIM, NEC, Sharp, NTT/Docomo, Samsung, AOL, Matsushita, Fujitsu, Hitachi, Palm Tentative Schedule for Spec release March 10, 2000: draft 0.6 (candidate for participant draft) March 21, 2000: Participant Review start April 26, 2000: call for vote to move to public draft May 1, 2000: public review start June 1, 2000: Spec 1.0 Release Java in Asia J2ME Standard Version SK Telecom Shinsegi Telecom 2001. 5 2001. 6 Service Launch Kittyhawk Profile DoJa Profile LG Telecom 2000.10 KT F Soon… NTT-DoCoMo 2001. 1 KDDI, JPhone 2001. 6 Java enabled subscribers Service Launch What is the DoCoMo Java - iApply ? Overall i-mode network architecture High Level Architecture MIDP Application Iapply Application OEM-Specific Application OEM-Specific Classes MIDP, DoJa CLDC Native System Software RTOS Native Application Porting Scopes (APIs) of KVM Application (management) User interface Persistent Storage Networking Timers I18N/L10N Phone number “Dialer” KVM Application Manager Application packaging using JAR Application Descriptor set of attributes Title, version, Vendor, Jar-URL, Jar-Size, Data-Size, Application arguments, etc. Application Lifecycle Application interface initApp(), startApp(), pauseApp(), destroyApp() Application Context provides information about the application manager to application Application Manager install, de-install, application lifecycle management, etc mostly written in C (90%) CLDC Directory Java API Native MIDP Directory Features Eliminated from the Java VM No profile can require that a KVM support any of the following Java Native Interface (JNI) User-defined class loaders Reflection Thread groups and daemon threads Finalization Compiler Requirements You must have a C compiler capable of compiling ANSI – Compliant C files. The code compiles without any warnings using the following compilers Metrowerks C compiler, GNU C compiler, Solaris C compiler, Microsoft Visual Studio C compiler. Distribution directories api Contains the Java library class source code that is provided with the release. bin Contains all the binary executables and compiled Java library classes. build Contains makefiles for building the KVM. doc Contains documentation. jam Contains the source code of the optional Java Application Manager (JAM) component that is provided with the KVM. Directory kvm/VmCommon StartJVM.c Virtual machine startup and command line argument reading. cache.c Inline caching operations for speeding up method lookup. class.c Runtime data structures and operations for representing Java classes. events.c Implementation of a stream-based protocol for event handling. fields.c Runtime data structures and operations for representing fields of objects. frame.c Stack frame and exception handling operations. ETC… Example Accessing arguments from native methods Java code: static native void drawRectangle(int x, int y, int width, int height); Native implementation: C code static void Java_com_sun_kjava_Graphics_drawRectangle() { int height = popStack(); int width = popStack(); int y = popStack(); int x = popStack(); windowSystemDrawRectangle(x, y, width, height); } Example Accessing arguments from native methods const NativeImplementationType com_sun_midp_lcdui_DefaultDeviceCaps_natives] = { } { "drawLine", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawLine}, { "drawRect", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawRect}, { "drawArc", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawArc}, { "drawChar", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawChar}, { "drawChars", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawChars}, { "drawString", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawString}, { "drawImage", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawImage} Kauai VM Architecture >javac HelloWorld.java HelloWorld.class Class files Class loader Sub system Runtime data areas Execution engine Native method interface JNI Native method libraries, Code Where is target? J2ME for Wireless Carriers Software Architecture CDMA Software Architecture Diagnostic Task Diagnostic Monitor MSM Rx Task Layer2 Task Main Control Task Searcher Task Tx Task User Interface Task HS Task Non-Volatile Database Task Watchdog Task 80186 EEPROM Watchdog Timer EPROM (Flash) RAM Where is mapping kvm layer? Application KVM UI HS NV Management Main Control Layer 3 Layer 2 RxTx Multiplex Sublayer Rx Layer 1 Tx RF VOC Searcher Conclusion Why do you try porting job? personal career? Skill up? Money? Do not do the porting! But, It is the work for the human beings. Even if don’t like it, you must do it.