[go: up one dir, main page]

KR101393152B1 - Apparatus having java virturl machine and selective compile method from java bytecodes to native codes for the apparatus having java virtual machine - Google Patents

Apparatus having java virturl machine and selective compile method from java bytecodes to native codes for the apparatus having java virtual machine Download PDF

Info

Publication number
KR101393152B1
KR101393152B1 KR1020130003423A KR20130003423A KR101393152B1 KR 101393152 B1 KR101393152 B1 KR 101393152B1 KR 1020130003423 A KR1020130003423 A KR 1020130003423A KR 20130003423 A KR20130003423 A KR 20130003423A KR 101393152 B1 KR101393152 B1 KR 101393152B1
Authority
KR
South Korea
Prior art keywords
basic
basic block
basic blocks
execution
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
KR1020130003423A
Other languages
Korean (ko)
Inventor
김강희
홍성길
Original Assignee
숭실대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 숭실대학교산학협력단 filed Critical 숭실대학교산학협력단
Priority to KR1020130003423A priority Critical patent/KR101393152B1/en
Application granted granted Critical
Publication of KR101393152B1 publication Critical patent/KR101393152B1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

자바 가상 머신이 탑재된 장치 및 상기 자바 가상 머신이 탑재된 장치에서 바이트코드를 네이티브 코드로 선택적으로 컴파일하는 방법이 개시된다. 개시된 자바 가상 머신이 탑재된 장치는 자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 상기 자바 애플리케이션의 실행 전에 프리-컴파일(Pre-compile)할 하나 이상의 베이직 블록을 선택하는 선택부 - 상기 베이직 블록은 하나 이상의 바이트코드로 구성됨 -; 상기 선택된 하나 이상의 베이직 블록을 상기 자바 애플리케이션의 실행 전에 프리-컴파일하고, 상기 다수의 베이직 블록 중 상기 하나 이상의 베이직 블록을 제외한 나머지 베이직 블록을 런타임(runtime)으로 컴파일하는 컴파일부; 및 상기 프리-컴파일된 하나 이상의 베이직 블록 및 상기 런타임으로 컴파일된 나머지 베이직 블록을 실행(execution)하는 실행부;를 포함한다. A method for selectively compiling bytecode into native code in a device on which a Java virtual machine is mounted and a device on which the Java virtual machine is mounted is disclosed. A device equipped with the disclosed Java virtual machine includes a selection unit for selecting one or more basic blocks to be precompiled from among a plurality of basic blocks constituting a Java application before execution of the Java application, Consists of bytecode -; A compiling unit for precompiling the selected one or more basic blocks before execution of the Java application and compiling remaining basic blocks excluding the one or more basic blocks among the plurality of basic blocks into a runtime; And an execution unit that executes the precompiled one or more basic blocks and the remaining basic blocks compiled with the runtime.

Description

자바 가상 머신이 탑재된 장치 및 상기 자바 가상 머신이 탑재된 장치에서 바이트코드를 네이티브 코드로 선택적으로 컴파일하는 방법{APPARATUS HAVING JAVA VIRTURL MACHINE AND SELECTIVE COMPILE METHOD FROM JAVA BYTECODES TO NATIVE CODES FOR THE APPARATUS HAVING JAVA VIRTUAL MACHINE}TECHNICAL FIELD [0001] The present invention relates to a method for selectively compiling a bytecode into native code in a device on which a Java virtual machine is mounted, and a device on which the Java virtual machine is mounted. [0002] Japanese Patent Application Laid- MACHINE}

본 발명의 실시예들은 자바 가상 머신의 사용 시 발생하는 시스템 오버헤드를 감소시켜 사용자 입력에 대한 응답 시간의 만족도를 향상시킬 수 있는 자바 가상 머신이 탑재된 장치 및 이에서의 컴파일 방법에 관한 것이다. Embodiments of the present invention relate to a device equipped with a Java virtual machine capable of improving the satisfaction of a response time to user input by reducing a system overhead incurred when using a Java virtual machine, and a compiling method therefor.

자바 애플리케이션(Java Application)은 바이트코드(Bytecode)로 구성된 실행 파일의 형태로 타겟 시스템(일례로, 모바일 장치)에 배포되며, 타겟 시스템에 탑재된 자바 가상 머신(Java Virtual Machine)에 의해 실행된다. 타겟 시스템은 자바 가상 머신을 이용하여 수신된 바이트코드를 인터프리팅 하거나 네이티브 코드로 번역(컴파일)함으로써 해당 자바 애플리케이션을 실행하며, 컴파일은 하나 이상의 바이트코드로 구성되는 베이직 블록(Basic Block) 단위로 수행될 수 있다. A Java application is distributed to a target system (for example, a mobile device) in the form of an executable file composed of Bytecode, and is executed by a Java Virtual Machine mounted on the target system. The target system executes the Java application by interpreting the received bytecode using the Java virtual machine or by translating (compiling) the native code into a native code, and the compilation is performed in a basic block unit composed of one or more bytecodes .

이와 관련하여, 종래의 바이트코드의 컴파일 방법으로, 자바 애플리케이션의 실행 이전 즉, 최초의 자바 애플리케이션의 설치 시점에 바이트코드 전체를 타겟 시스템에 맞는 네이티브 코드로 번역하는 AOT(Ahead OF Time) 방법과, 프로파일링(Profiling)을 통해 검색된 중요한 일부의 바이트코드를 실시간(Runtime)으로 타겟 시스템에 맞는 네이티브 코드로 번역하여 사용하되, 번역된 네이티브 코드를 캐쉬(Cache)에 보관하여 추후 컴파일 시 활용하는 JIT(Just In Time) 방법이 존재한다. In this regard, the conventional method of compiling byte code is a method of AOT (Ahead OF Time) for translating the entire bytecode into native code suitable for the target system before execution of the Java application, that is, at the time of installation of the first Java application, Some of the bytecodes retrieved through profiling are translated into native code that matches the target system in real-time (Runtime), but the translated native code is kept in the cache and used in JIT Just In Time) method.

그러나, AOT 방법의 경우, 번역된 모든 네이티브 코드가 시스템 내에 저장되어 있어야 하고, 충분한 주 메모리가 확보되어야 한다는 점에서 공간적인 오버헤드의 문제가 발생하는 단점이 있다. 또한, JIT 방법의 경우, 컴파일의 대상이 되는 바이트코드를 실시간으로 검색(프로파일링)하여야 하고, 프로파일링된 바이트코드를 실시간으로 컴파일하여야 한다는 점에서 시간적인 오버헤드의 문제가 발생하는 단점이 있다. However, in the case of the AOT method, all translated native codes must be stored in the system, and sufficient main memory must be secured, which causes a problem of spatial overhead. In the case of the JIT method, the bytecode to be compiled must be searched (profiled) in real time, and the profiled byte code must be compiled in real time, resulting in a time overhead problem .

상기한 바와 같은 종래기술의 문제점을 해결하기 위해, 본 발명에서는 자바 가상 머신의 사용 시 발생하는 시스템 오버헤드를 감소시켜 사용자 입력에 대한 응답 시간의 만족도를 향상시킬 수 있는 자바 가상 머신이 탑재된 장치 및 이에서의 프리-컴파일 방법을 제안하고자 한다. In order to solve the problems of the prior art as described above, in the present invention, a system equipped with a Java virtual machine capable of reducing the system overhead incurred in using the Java virtual machine, And a pre-compilation method therefor.

본 발명의 다른 목적들은 하기의 실시예를 통해 당업자에 의해 도출될 수 있을 것이다.Other objects of the invention will be apparent to those skilled in the art from the following examples.

상기한 목적을 달성하기 위해 본 발명의 바람직한 일 실시예에 따르면, 자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 상기 자바 애플리케이션의 실행 전에 프리-컴파일(Pre-compile)할 하나 이상의 베이직 블록을 선택하는 선택부 - 상기 베이직 블록은 하나 이상의 바이트코드로 구성됨 -; 상기 선택된 하나 이상의 베이직 블록을 상기 자바 애플리케이션의 실행 전에 프리-컴파일하고, 상기 다수의 베이직 블록 중 상기 하나 이상의 베이직 블록을 제외한 나머지 베이직 블록을 런타임(runtime)으로 컴파일하는 컴파일부; 및 상기 프리-컴파일된 하나 이상의 베이직 블록 및 상기 런타임으로 컴파일된 나머지 베이직 블록을 실행(execution)하는 실행부;를 포함하는 자바 가상 머신이 탑재된 장치가 제공된다. In order to achieve the above object, according to a preferred embodiment of the present invention, among a plurality of basic blocks constituting a Java application, selection of one or more basic blocks to be pre-compiled before execution of the Java application - the basic block consists of one or more bytecodes; A compiling unit for precompiling the selected one or more basic blocks before execution of the Java application and compiling remaining basic blocks excluding the one or more basic blocks among the plurality of basic blocks into a runtime; And an execution unit that executes the pre-compiled one or more basic blocks and the remaining basic blocks compiled with the runtime.

또한, 본 발명의 다른 실시예에 따르면, 자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 상기 자바 애플리케이션의 실행 전에 프리-컴파일할 하나 이상의 베이직 블록을 선택하는 단계 - 상기 베이직 블록은 하나 이상의 바이트코드로 구성됨 -; 및 상기 선택된 하나 이상의 베이직 블록을 상기 자바 애플리케이션의 실행 전에 프리-컴파일하고, 상기 다수의 베이직 블록 중 상기 하나 이상의 베이직 블록을 제외한 나머지 베이직 블록을 런타임으로 컴파일하는 단계;를 포함하는 자바 가상 머신이 탑재된 장치에서의 컴파일 방법이 제공된다. In accordance with another embodiment of the present invention, there is provided a method for executing a Java application, the method comprising: selecting one or more basic blocks to be precompiled before execution of the Java application from among a plurality of basic blocks constituting a Java application, -; And precompiling the selected one or more basic blocks before execution of the Java application and compiling the remaining basic blocks excluding the one or more basic blocks among the plurality of basic blocks at runtime. A method of compiling in a device is provided.

본 발명에 따르면, 자바 가상 머신의 사용 시 발생하는 시스템 오버헤드를 감소시켜 사용자 입력에 대한 응답 시간의 만족도를 향상시킬 수 있는 장점이 있다. According to the present invention, there is an advantage in that the system overhead occurring when the Java virtual machine is used is reduced, and the satisfaction of the response time with respect to the user input is improved.

도 1 내지 도 3은 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치에서의 자바 애플리케이션의 실행(execution)의 개념을 설명하기 위한 도면이다.
도 4는 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치의 개략적인 구성을 도시한 도면이다.
도 5는 부모-자식 태스크간의 프리-컴파일된 공유 베이직 블록의 사용 개념을 도시한 도면이다.
도 6은 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치에서의 컴파일 방법의 전체적인 흐름을 도시한 도면이다.
1 to 3 are views for explaining the concept of execution of a Java application in an apparatus on which a Java virtual machine is installed according to an embodiment of the present invention.
FIG. 4 is a diagram showing a schematic configuration of an apparatus mounted with a Java virtual machine according to an embodiment of the present invention.
5 is a diagram illustrating a concept of using a precompiled shared basic block between parent and child tasks.
FIG. 6 is a diagram illustrating an overall flow of a compiling method in an apparatus mounted with a Java virtual machine according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다. While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

이하에서, 본 발명에 따른 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다.
Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

도 1 내지 도 3은 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치에서의 자바 애플리케이션의 실행(execution)의 개념을 설명하기 위한 도면이다. 1 to 3 are views for explaining the concept of execution of a Java application in an apparatus on which a Java virtual machine is installed according to an embodiment of the present invention.

도 1 내지 도 3을 참조하면, 자바 애플리케이션은 잡(J, Job) 단위로 구분되어 실행된다. 여기서, 잡은 하나의 사용자 입력(UE, User Event)에 대응하여 실행되는 일련의 프로세스를 의미하는 것으로서, 잡의 실행시간(e)은 |사용자 입력 시간 - 일련의 프로세스의 최종 종료 시간|으로 정의된다. Referring to FIGS. 1 to 3, a Java application is divided into job (Job) units. Here, a job means a series of processes executed corresponding to one user input (UE, User Event), and the execution time (e) of a job is defined as | user input time - final end time | of a series of processes .

사용자의 요구를 만족시키기 위해서는 자바 애플리케이션을 구성하는 다수의 잡 각각이 소정의 마감시간(D, Deadline) 내에 실행이 완료되는 것이 바람직하다. 잡의 실행이 마감시간 전에 완료되는 경우 여유시간(s, Stack Time)이 발생한다. 따라서, 여유시간이 0보다 큰 경우 마감시간이 만족되고(Deadline Meet), 여유시간이 0보다 작은 경우 마감시간이 위반된다(Deadline Miss). In order to satisfy the user's request, it is preferable that each of the plurality of jobs constituting the Java application is completed within a predetermined deadline (D). If the job is completed before the deadline, the slack time (s) occurs. Therefore, if the allowance is greater than 0, the deadline is met, and if the allowance is less than 0, the deadline is missed.

한편, 다수의 잡 각각은 도 1 내지 도 3에 도시된 바와 같이 하나 또는 2 이상의 태스크 인스턴스(Task Instance)를 포함할 수 있다. 세부적으로, 하나의 잡은 도 1에 도시된 바와 같이 하나의 태스크 인스턴스만을 포함할 수 있고, 도 2에 도시된 바와 같이 체인 형태로 직렬 실행되는 2 이상의 태스크 인스턴스를 포함할 수도 있고(즉, 하나의 태스크 인스턴스의 실행이 종료되면 다음 태스크 인스턴스가 순차적으로 실행됨), 도 3에 도시된 바와 같이 직병렬로 실행되는 2 이상의 태스크 인스턴스를 포함할 수도 있다(즉, 체인으로 실행되는 태스크 인스턴스가 2 이상의 서브 체인으로 분할되어 실행된 후 다시 하나의 체인으로 합쳐져서 실행됨). 각각의 태스크 인스턴스는 적어도 하나의 베이직 블록의 실행에 기초하여 수행된다. On the other hand, each of the plurality of jobs may include one or two or more task instances (Task Instance) as shown in FIGS. In particular, one job may include only one task instance as shown in FIG. 1, and may include two or more task instances that are executed serially in a chain form as shown in FIG. 2 (i.e., one (I.e., when the execution of the task instance is terminated, the next task instance is executed sequentially), or may include two or more task instances executed in serial / parallel as shown in FIG. 3 Divided into sub-chains, executed, and then combined into one chain again). Each task instance is performed based on execution of at least one basic block.

본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치는 상기와 같은 자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 일부의 베이직 블록을 해당 자바 애플리케이션의 실행 전에 미리 컴파일(프리-컴파일(Pre-compile))하고, 나머지 일부의 베이직 블록을 런타임(runtime)으로 컴파일하며, 컴파일(프리-컴파일 및 런타임 컴파일을 포함함)된 베이직 블록을 실행하거나 바이트코드를 인터프리팅함으로써 자바 애플리케이션을 실행한다. A device equipped with a Java virtual machine according to an embodiment of the present invention may pre-compile (pre-compile) some basic blocks among a plurality of basic blocks constituting the Java application, )), Compiles some of the basic blocks into a runtime, executes a basic block (including pre-compilation and run-time compilation), or interprets bytecodes.

이하, 도 4를 참조하여 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치의 동작에 대해 보다 상세하게 설명하기로 한다.
Hereinafter, referring to FIG. 4, the operation of an apparatus mounted with a Java virtual machine according to an embodiment of the present invention will be described in detail.

도 4는 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치의 개략적인 구성을 도시한 도면이다. FIG. 4 is a diagram showing a schematic configuration of an apparatus mounted with a Java virtual machine according to an embodiment of the present invention.

도 4를 참조하면, 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치(400)는 선택부(410), 컴파일부(420), 저장부(430) 및 실행부(440)를 포함한다. 이하, 각 구성요소 별로 그 기능을 상세하게 설명한다. Referring to FIG. 4, an apparatus 400 including a Java virtual machine according to an exemplary embodiment of the present invention includes a selector 410, a compiler 420, a storage 430, and an execution unit 440 do. Hereinafter, the function of each component will be described in detail.

선택부(410)는 자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 자바 애플리케이션의 실행 전에 프리-컴파일할 하나 이상의 베이직 블록을 선택한다. The selection unit 410 selects one or more basic blocks to be precompiled before execution of the Java application from among a plurality of basic blocks constituting the Java application.

본 발명의 일 실시예에 따르면, 선택부(410)는 베이직 블록의 프리-컴파일에 의한 자바 애플리케이션의 실행시간의 감소 정도 및 베이직 블록의 실행 빈도를 고려하여 프리-컴파일할 하나 이상의 베이직 블록을 선택할 수 있다. 이에 대해서는 아래에서 보다 상세하게 설명하기로 한다. According to an embodiment of the present invention, the selector 410 selects one or more basic blocks to be pre-compiled in consideration of the degree of reduction of the execution time of the Java application by the pre-compilation of the basic block and the execution frequency of the basic block . This will be described in more detail below.

컴파일부(420)는 다수의 베이직 블록에 대한 컴파일(즉, 다수의 베이직 블록을 구성하는 바이트코드를 네이티브 코드로 번역)한다. 보다 상세하게, 컴파일부(420)는 선택부(410)에 의해 선택된 하나 이상의 베이직 블록을 자바 애플리케이션의 실행 전에 프리-컴파일하고, 다수의 베이직 블록 중 선택된 하나 이상의 베이직 블록을 제외한 나머지 베이직 블록을 런타임으로 컴파일한다. The compiling unit 420 compiles a plurality of basic blocks (i.e., translates the bytecodes constituting a plurality of basic blocks into native codes). More specifically, the compiling unit 420 precompiles one or more basic blocks selected by the selection unit 410 before execution of the Java application, and executes the remaining basic blocks excluding the selected one or more basic blocks among the plurality of basic blocks, .

프리-컴파일된 하나 이상의 베이직 블록은 저장부(430)에 저장된다. 일례로서, 프리-컴파일된 하나 이상의 베이직 블록은 태스크 인스턴스 별로 분류되어 저장부(430)에 저장될 수 있다. 즉, 각각의 태스크 인스턴스에 대응되어 저장부(430)의 일정 영역이 할당될 수 있고, 특정 태스크 인스턴스에 대한 프리-컴파일된 하나 이상의 베이직 블록은 해당 태스크 인스턴스와 대응되는 저장부(430)의 영역에 저장될 수 있다. 여기서의 저장부(430)의 영역은 논리적으로 구분된 영역일 수도 있고 물리적으로 구분된 영역일 수도 있다.The pre-compiled one or more basic blocks are stored in the storage unit 430. As an example, one or more basic blocks precompiled may be classified into task instances and stored in the storage unit 430. [ That is, a certain area of the storage unit 430 may be allocated to each task instance, and one or more basic blocks precompiled for the specific task instance may be allocated to the area of the storage unit 430 corresponding to the corresponding task instance Lt; / RTI > The area of the storage unit 430 may be a logically divided area or a physically divided area.

실행부(440)는 컴파일된 베이직 블록을 실행함으로써 해당 자바 애플리케이션을 실행한다. 여기서, 컴파일된 베이직 블록은 프리-컴파일된 하나 이상의 베이직 블록 및 런타임으로 컴파일된 나머지 베이직 블록을 모두 포함한다. The execution unit 440 executes the compiled basic block to execute the corresponding Java application. Here, the compiled basic block includes both one or more basic blocks precompiled and the remaining basic blocks compiled into the runtime.

이와 같이, 본 발명의 일 실시예에 따른 자바 가상 머신을 탑재한 장치(400)는 자바 애플리케이션을 구성하는 모든 베이직 블록(바이트코드)를 프리-컴파일하지 않고, 중요도가 높은 일부의 베이직 블록(바이트코드)만을 프리-컴파일하여 저장하므로, 종래의 AOT에 따른 컴파일 방법과 비교할 때 (프리-컴파일된 베이직 블록의 양이 적으므로) 공간적인 오버헤드를 낮출 수 있으며, 종래의 JIT에 따른 컴파일 방법과 비교할 때 (일부의 베이직 블록만을 런타임으로 컴파일하므로) 시간적인 오버헤드를 낮출 수 있는 장점이 있다. As described above, the device 400 equipped with the Java virtual machine according to the embodiment of the present invention does not precompile all the basic blocks (bytecodes) constituting the Java application, Compared to the conventional compiling method according to the AOT (since the amount of the precompiled basic blocks is small), it is possible to reduce the spatial overhead, and the compilation method according to the conventional JIT There is an advantage in that the time overhead can be lowered when comparing (since only some basic blocks are compiled at runtime).

이하에서는 프리-컴파일할 하나 이상의 베이직 블록을 선택하는 선택부(410)의 동작을 보다 상세하게 설명하기로 한다. Hereinafter, the operation of the selection unit 410 for selecting at least one basic block to be pre-compiled will be described in more detail.

본 발명의 일 실시예에 따르면, 선택부(410)는 다수의 베이직 블록 각각에 대한 유틸리티 값을 산출하고, 산출된 유틸리티 값과 비례하도록 다수의 베이직 블록 각각에 대해 우선순위를 부여하며, 우선순위를 이용하여 프리-컴파일할 하나 이상의 베이직 블록을 선택할 수 있다. According to an embodiment of the present invention, the selector 410 calculates a utility value for each of a plurality of basic blocks, assigns priority to each of the plurality of basic blocks in proportion to the calculated utility value, To select one or more basic blocks to be pre-compiled.

유틸리티 값은 앞서 설명한 베이직 블록의 프리-컴파일에 의한 자바 애플리케이션의 실행시간의 감소 정도 및 베이직 블록의 실행 빈도를 반영하는 값으로서, 특정 베이직 블록의 유틸리티 값이 클수록 해당 베이직 블록의 우선순위는 높아지게 되며, 우선순위가 높을수록 프리-컴파일될 베이직 블록으로 선택될 가능성이 높아진다. The utility value is a value reflecting the degree of reduction of the execution time of the Java application by the precompile of the basic block and the execution frequency of the basic block. The utility value of the specific basic block is higher, the priority of the corresponding basic block becomes higher , The higher the priority, the more likely it is to be selected as the basic block to be precompiled.

보다 상세하게, 선택부(410)는 다수의 잡 중에서 마감시간(Deadline)을 위반하지 않으면서 실행이 완료되는 잡의 비율인 마감시간 만족 확률(DMP: Deadline Meet Probability)이 기설정된 임계 확률 이하인 경우 우선순위가 높은 상위 n(1 이상의 정수임)개의 베이직 블록을 프리-컴파일할 하나 이상의 베이직 블록으로 선택할 수 있다(아래의 수학식 1 참조). 이 경우, 마감시간 만족 확률은 프리-컴파일되는 베이직 블록의 개수와 비례하여 증가하며, n은 마감시간 만족 확률이 임계 확률 이상이 되도록 하는 최소의 정수일 수 있다. 즉, 선택부(410)는 마감시간 만족 확률(DMP: Deadline Meet Probability)이 기설정된 임계 확률보다 작은 경우, 프리-컴파일할 베이직 블록을 우선순위가 높은 순서대로 하나씩 늘려가면서 임계 확률을 만족시키는 최소한의 베이직 블록의 집합을 선택한다.
More specifically, if the Deadline Meet Probability (DMP), which is the ratio of jobs whose execution is completed without violating deadlines among a plurality of jobs, is less than or equal to a predetermined threshold probability It is possible to select one or more basic blocks to be precompiled as the higher-order n (higher or higher integer) basic blocks having higher priority (see Equation 1 below). In this case, the deadline satisfaction probability increases in proportion to the number of basic blocks to be precompiled, and n may be a minimum integer such that the deadline satisfaction probability is equal to or greater than the threshold probability. That is, when the Deadline Meet Probability (DMP) is smaller than a preset threshold probability, the selector 410 increases the number of the basic blocks to be precompiled in order of decreasing priority, And selects a set of basic blocks.

Figure 112013003045167-pat00001
Figure 112013003045167-pat00001

여기서, N은 잡의 총 개수, Probth는 임계 확률, si는 i번째 잡의 여유시간을 각각 의미함. Where N is the total number of jobs, Prob th is the threshold probability, and s i is the free time of the ith job, respectively.

그리고, 프리-컴파일할 베이직 블록의 선택에 사용되는 유틸리티 값에 대해 보다 상세하게 설명하면, 다수의 베이직 블록 중 l번째 베이직 블록에 대한 유틸리티 값은 l번째 베이직 블록이 인터프리테이션 모드(Interpretation Mode)에 따라 실행되는 경우에 소요되는 시간인 제1 소요시간과 l번째 베이직 블록이 네이티브 모드(Native Mode)에 따라 실행되는 경우에 소요되는 시간인 제2 소요시간의 비(ratio), 및 다수의 잡에서 l번째 베이직 블록이 실행된 비율과 관련된 실행 비율 파라미터 중에서 적어도 하나에 의해 정의될 수 있다. 일례로서, l번째 베이직 블록에 대한 유틸리티 값은 아래의 수학식 2와 같이 표현될 수 있다.
Then, the pre-In more detail about the utility values used for selection of the basic block, the utility value for the l-th basic block of the plurality of basic blocks (Interpretation Mode) yi l-th basic block interpretation mode compiled A ratio of a second required time which is a time required when the l < th > basic block is executed according to a native mode, and a ratio of a plurality of jobs May be defined by at least one of the execution rate parameters associated with the rate at which the lth basic block is executed. As an example, the utility value for the 1 < st > basic block may be expressed as Equation 2 below.

Figure 112013003045167-pat00002
Figure 112013003045167-pat00002

여기서, Utility(BB l )은 l번째 베이직 블록(BB l )에 대한 유틸리티 값, IE(BB l )는 제1 소요시간, NE(BB l )는 제2 소요시간, COC(BB l )는 l번째 베이직 블록의 실행 비율 파라미터를 각각 의미한다. Here, Utility (BB l) is the utility value for the l-th basic block (BB l), IE (BB l) is the first time, NE (BB l) is the second time, COC (BB l) is l Lt; th > basic block.

보다 상세하게, l번째 베이직 블록의 실행 비율 파라미터는, 다수의 잡 중에서 l번째 베이직 블록을 적어도 한번 이상 실행한 잡의 비율이 기설정된 임계 비율 미만인 경우, 0으로 설정되고, 다수의 잡 중에서 l번째 베이직 블록을 적어도 한번 이상 실행한 잡의 비율이 기설정된 임계 비율 이상인 경우, 아래의 수학식 3과 같이 표현될 수 있다.
More specifically, l execution rate parameter for the second basic block is, if the number of the l-th basic block in the job rate for the job-performing at least one prescribed threshold percentage is less than set, is set to 0, the l-th among the plurality of job When the ratio of the job that has executed the basic block at least once is equal to or greater than a predetermined threshold ratio, it can be expressed as Equation (3) below.

Figure 112013114198338-pat00013
Figure 112013114198338-pat00013

여기서, COC(BB l )는 다수의 잡에서 l번째 베이직 블록(BB l )이 실행된 비율과 관련된 파라미터, OCj(BB l )은 l번째 베이직 블록이 j번째 잡에서 실행될 때의 l번째 베이직 블록의 실행 횟수, MIN( )은 최소의 값을 선택하는 함수, AVG( )는 평균 값을 산출하는 함수를 각각 의미한다. Here, COC (BB l) is the l-th basic block (BB l) is associated with the execution rate parameter, OC j (BB l) is the l-th basic when the l-th basic block to be executed in the j-th job in the plurality of job MIN () denotes a function to select a minimum value, and AVG () denotes a function to calculate an average value.

한편, 유틸리티 값이 동일한 베이직 블록이 2 이상이 존재할 수 있는데, 이 경우 선택부(410)는 OCj(BB l )의 표준 편차가 작은 베이직 블록에 대해 더 높은 우선순위를 부여할 수 있다. 이는 특정 베이직 블록을 한번이라도 실행하는 잡들이 해당 베이직 블록을 균일한 횟수로 실행하는 경우를 해당 베이직 블록이 프리-컴파일의 대상으로 더 선호되기 때문이다. On the other hand, there may be two or more basic blocks having the same utility value. In this case, the selector 410 may give a higher priority to a basic block having a small standard deviation of OC j (BB l ). This is because when a job that executes a specific basic block executes a corresponding basic block at a uniform number of times, the corresponding basic block is more pre-compiled.

이상에서 선택부(410)가 프리-컴파일을 수행할 하나 이상의 베이직 블록을 선택하는 동작을 설명하였으며, 이러한 선택부(410)의 동작은 잡이 하나의 태스크 인스턴스만을 포함하는 경우(도 1의 예), 체인 형태로 직렬 실행되는 이상의 태스크 인스턴스를 포함하는 경우(도 2의 예) 및 직병렬로 실행되는 2 이상의 태스크 인스턴스를 포함하는 경우(도 3의 예) 모두에 적용 가능하다. In the above description, the selecting unit 410 selects one or more basic blocks to be precompiled. When the selecting unit 410 includes only one task instance (the example of FIG. 1) , A case including more than one task instance serially executed in the form of a chain (example of FIG. 2), and a case including two or more task instances executed serially in parallel (the example of FIG. 3).

즉, 잡이 하나의 태스크 인스턴스만을 포함하는 경우에는 태스크 인스턴스의 차이로 인한 베이직 블록의 경계가 없으므로 상기와 같은 선택부(410)의 동작이 수행될 수 있고, 잡이 2 이상의 태스크 인스턴스를 포함하는 경우에는 태스크 인스턴스에 의한 베이직 블록의 경계를 무시하고 하나의 잡 내의 모든 태스크 인스턴스를 하나의 태스크 인스턴스로 가정함으로써 상기와 같은 선택부(410)의 동작이 수행될 수 있다. That is, when the job includes only one task instance, the operation of the selector 410 can be performed because there is no boundary of the basic block due to the difference of the task instances. If the job includes two or more task instances The operation of the selector 410 as described above can be performed by ignoring the boundary of the basic block by the task instance and assuming that all the task instances in one job are one task instance.

한편, 자바 애플리케이션에서 특정 태스크는 컨테이너 태스크(Container Task)를 복제하여 실행된다. 여기서 컨테이너 태스크는 상기 특정 태스크에 대한 부모 태스크가 되며, 상기 특정 태스크는 컨테이너 태스크의 자식 태스크가 된다. 이 경우, 부모 태스크(또는 컨테이너 태스크)에는 복수개의 클래스 라이브러리들이 선적재되어 있다. In a Java application, a specific task is executed by duplicating a container task. Here, the container task becomes the parent task for the specific task, and the specific task becomes the child task of the container task. In this case, a plurality of class libraries are pre-loaded in the parent task (or container task).

따라서, 부모 태스크에 속하는 태스크 인스턴스(부모 태스크 인스턴스)와 자식 태스크에 속하는 자식 태스크 인스턴스는 동일한 하나 이상의 컴파일된 베이직 블록을 공유할 수 있다. Therefore, the task instance (parent task instance) belonging to the parent task and the child task instance belonging to the child task can share the same one or more compiled basic blocks.

이와 같은 경우, 공유되는 하나 이상의 컴파일된 베이직 블록 중에서 자식 태스크 인스턴스의 실행 시 프리-컴파일하기로 선택한 베이직 블록은 부모 태스크 인스턴스 실행 시 이미 프리-컴파일하여 공유되기 때문에, 자식 태스크 인스턴스의 실행시에는 해당 베이직 블록을 프리-컴파일하지 않고 이미 컴파일된 베이직 블록을 활용할 수 있다. In this case, of the shared one or more compiled basic blocks, the basic block selected to precompile the child task instance is already precompiled and shared when the parent task instance is executed. Therefore, when executing the child task instance, It is possible to utilize an already compiled basic block without precompiling the basic block.

다시 말해, 프리-컴파일할 베이직 블록으로 선택된 공유 베이직 블록이 프리-컴파일된 경우, 이는 부모 태스크 인스턴스에 대해 할당된 저장부(430)의 영역에 저장되고, 자식 태스크 인스턴스에 대해 할당된 저장부(430)의 영역에는 저장되지 않을 수 있다(자식 태스크 인스턴스에 대해 할당된 저장부(430)의 영역에는 프리-컴파일된 공유 베이직 블록 이외에 공유되지 않고 자식 태스크 인스턴스에만 속하는 프리-컴파일된 베이직 블록이 함께 저장됨). 이 경우, 자식 태스크 인스턴스의 실행 시 부모 태스크 인스턴스가 복제되어 실행되므로, 자식 태스크 인스턴스의 실행 시에도 프리-컴파일된 공유 베이직 블록이 동일하게 실행될 수 있다. 도 5는 이와 같은 부모-자식 태스크 인스턴스간의 프리-컴파일된 공유 베이직 블록의 사용 개념을 도시하고 있다. In other words, if the shared basic block selected as the basic block to be precompiled is precompiled, it is stored in the area of the storage 430 allocated for the parent task instance and stored in the storage unit 430). In the area of the storage unit 430 allocated to the child task instance, pre-compiled basic blocks belonging to the child task instance are not shared except for the precompiled shared basic block Stored). In this case, since the parent task instance is replicated and executed at the time of execution of the child task instance, the precompiled shared basic block can be executed even when the child task instance is executed. FIG. 5 illustrates the concept of using precompiled shared basic blocks between such parent-child task instances.

정리하면, 하나의 잡에 속하는 하나 이상의 태스크 인스턴스는 부모 태스크 인스턴스 및 자식 태스크 인스턴스 중 어느 하나에 속하고, 프리-컴파일된 하나 이상의 베이직 블록 중 부모 태스크 인스턴스-자식 태스크 인스턴스의 관계가 성립되는 2 이상의 태스크 인스턴스에 의해 공유되는 베이직 블록은 부모 태스크 인스턴스와 대응되는 저장부(430) 상의 영역에 저장되고, 자식 태스크 인스턴스와 대응되는 저장부(430) 상의 영역에는 저장되지 않을 수 있다. In summary, one or more task instances belonging to one job belong to one of the parent task instance and the child task instance, and two or more pre-compiled one or more basic blocks, The basic block shared by the task instance is stored in an area on the storage unit 430 corresponding to the parent task instance and may not be stored in the area on the storage unit 430 corresponding to the child task instance.

또한, 본 발명의 일 실시예에 따르면, 하나의 부모 태스크 인스턴스에 대한 자식 태스크 인스턴스는 2 이상일 수 있으며, 이 경우 공유 베이직 블록은 부모 태스크 인스턴스 및 2 이상의 자식 태스크 인스턴스 모두에서 공유되는 베이직 블록일 수 있다. 그런데, 부모 태스크 인스턴스에 할당된 저장부(430) 상의 영역에 크기의 제한이 있는 경우, 프리-컴파일된 공유 베이직 블록 모두가 부모 태스크 인스턴스에 할당된 저장부(430) 상의 영역에 저장되지 못할 수 있다. 따라서, 이러한 경우, 공유 베이직 블록에 대해 우선순위를 설정하고, 우선순위가 높은 일부의 공유 베이직 블록 만을 부모 태스크 인스턴스에 할당된 저장부(430) 상의 영역에 저장할 수 있다(나머지 공유 베이직 블록은 각 자식 태스크 인스턴스에 할당된 저장부(430) 상의 영역에 저장됨). In addition, according to an embodiment of the present invention, the number of child task instances for one parent task instance may be two or more, in which case the shared basic block may be a basic block shared by both the parent task instance and two or more child task instances have. However, if there is a size limitation on the area on the storage unit 430 allocated to the parent task instance, all of the precompiled shared basic blocks may not be stored in the area on the storage unit 430 allocated to the parent task instance have. Therefore, in this case, it is possible to set a priority for a shared basic block, and store only a part of shared basic blocks having a high priority in an area on the storage unit 430 allocated to the parent task instance Stored in the area on storage 430 allocated to the child task instance).

그리고, 공유 베이직 블록들 간의 우선순위의 선정은, 프리-컴파일할 베이직 블록을 선택하는데 이용되는 기준인 유틸리티 값을 그대로 사용하되, 자식 태스크 인스턴스 별로 가중치를 적용하여 수행될 수 있다. 여기서, 복수개의 태스크 인스턴스 체인이 존재할 경우, 각 태스크 인스턴스 체인 별로 가중치가 주어진다고 가정하고, 태스크 인스턴스 체인 i에서 l번째 베이직 블록의 COC를 COCi(BB l )라 하고, 가중치를 wi라 하고, 복수의 태스크 인스턴스 체인에서의 l번째 베이직 블록의 COC를 COC(BB l )라 정의한 후, 태스크 인스턴스 체인의 가중치와 COCi(BB l )를 곱하고 이들의 합을 통해 COC(BB l )를 산출한다(아래의 수학식 4 참조). 이를 통해, 각 태스크 인스턴스 체인이 수학식 1에 따른 조건을 만족시키도록 하면서 전체 시스템 메모리 사용량을 줄일 수 있게 된다.
The selection of the priority among the shared basic blocks can be performed by applying the weight values to the child task instances while using the utility value, which is a standard used for selecting the basic block to be precompiled, as it is. Here, when a plurality of task instances chain present, La COC a COC i (BB l) of the l-th basic block for each task instance chain that weight is given home by, and task instances chain i, and the weights w i d and calculated, then the l COC of the second basic block in a plurality of task instances chain defined La (BB l) COC, COC ( BB l) through their sum is multiplied by a weight and COC i (BB l) of the task instance chain (See Equation 4 below). This makes it possible to reduce the overall system memory usage while allowing each chain of task instances to satisfy the condition according to Equation (1).

Figure 112013003045167-pat00004
Figure 112013003045167-pat00004

도 6은 본 발명의 일 실시예에 따른 자바 가상 머신이 탑재된 장치에서의 컴파일 방법의 전체적인 흐름을 도시한 도면이다. 이하, 각 단계별로 수행되는 과정을 설명한다(각 단계는 자바 가상 머신이 탑재된 장치 내의 프로세서에 의해 수행될 수 있다). FIG. 6 is a diagram illustrating an overall flow of a compiling method in an apparatus mounted with a Java virtual machine according to an embodiment of the present invention. Hereinafter, a process performed in each step will be described (each step can be performed by a processor in a device on which the Java virtual machine is installed).

먼저, 단계(S610)에서 자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 자바 애플리케이션의 실행 전에 프리-컴파일할 하나 이상의 베이직 블록을 선택한다. First, in step S610, one or more basic blocks to be pre-compiled are selected from a plurality of basic blocks constituting a Java application before execution of the Java application.

본 발명의 일 실시예에 따르면, 단계(S610)에서는 베이직 블록의 프리-컴파일에 의한 자바 애플리케이션의 실행시간의 감소 정도 및 베이직 블록의 실행 빈도를 고려하여 하나 이상의 베이직 블록을 선택할 수 있다. According to an embodiment of the present invention, in step S610, one or more basic blocks may be selected in consideration of the degree of reduction of the execution time of the Java application by precompiling the basic block and the execution frequency of the basic block.

그리고, 단계(S620)에서는 선택된 하나 이상의 베이직 블록을 자바 애플리케이션의 실행 전에 프리-컴파일하고, 다수의 베이직 블록 중 하나 이상의 베이직 블록을 제외한 나머지 베이직 블록을 런타임으로 컴파일한다. In step S620, the selected one or more basic blocks are precompiled before execution of the Java application, and the remaining basic blocks excluding one or more of the plurality of basic blocks are compiled into the runtime.

지금까지 본 발명에 따른 자바 가상 머신이 탑재된 장치에서의 컴파일 방법의 실시예들에 대하여 설명하였고, 앞서 도 4에서 설명한 자바 가상 머신이 탑재된 장치(400) 에 관한 구성이 본 실시예에도 그대로 적용 가능하다. 이에, 보다 상세한 설명은 생략하기로 한다.The embodiments of the compiling method in the device mounted with the Java virtual machine according to the present invention have been described and the configuration related to the device 400 mounted with the Java virtual machine described in FIG. Applicable. Hereinafter, a detailed description will be omitted.

또한, 본 발명의 실시예들은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 일 실시예들의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.In addition, embodiments of the present invention may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the medium may be those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Examples of program instructions, such as magneto-optical and ROM, RAM, flash memory and the like, can be executed by a computer using an interpreter or the like, as well as machine code, Includes a high-level language code. The hardware devices described above may be configured to operate as one or more software modules to perform operations of one embodiment of the present invention, and vice versa.

이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.As described above, the present invention has been described with reference to particular embodiments, such as specific elements, and limited embodiments and drawings. However, it should be understood that the present invention is not limited to the above- Various modifications and variations may be made thereto by those skilled in the art to which the present invention pertains. Accordingly, the spirit of the present invention should not be construed as being limited to the embodiments described, and all of the equivalents or equivalents of the claims, as well as the following claims, belong to the scope of the present invention .

Claims (13)

자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 상기 자바 애플리케이션의 실행 전에 프리-컴파일(Pre-compile)할 하나 이상의 베이직 블록을 선택하는 선택부 - 상기 베이직 블록은 하나 이상의 바이트코드로 구성됨 -;
상기 선택된 하나 이상의 베이직 블록을 상기 자바 애플리케이션의 실행 전에 프리-컴파일하고, 상기 다수의 베이직 블록 중 상기 하나 이상의 베이직 블록을 제외한 나머지 베이직 블록을 런타임(runtime)으로 컴파일하는 컴파일부; 및
상기 프리-컴파일된 하나 이상의 베이직 블록 및 상기 런타임으로 컴파일된 나머지 베이직 블록을 실행(execution)하는 실행부;를 포함하는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치.
A selection unit for selecting at least one basic block to be pre-compiled among a plurality of basic blocks constituting a Java application before execution of the Java application, the basic block being composed of one or more bytecodes;
A compiling unit for precompiling the selected one or more basic blocks before execution of the Java application and compiling remaining basic blocks excluding the one or more basic blocks among the plurality of basic blocks into a runtime; And
And an execution unit that executes the pre-compiled one or more basic blocks and the remaining basic blocks compiled with the runtime.
제1항에 있어서,
상기 선택부는 베이직 블록의 프리-컴파일에 의한 상기 자바 애플리케이션의 실행시간의 감소 정도 및 베이직 블록의 실행 빈도를 고려하여 상기 하나 이상의 베이직 블록을 선택하는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치.
The method according to claim 1,
Wherein the selection unit selects the at least one basic block in consideration of the degree of reduction of the execution time of the Java application by the precompilation of the basic block and the execution frequency of the basic block.
제1항에 있어서,
상기 자바 애플리케이션은 하나의 사용자 입력에 대응하여 실행되는 하나 이상의 태스크 인스턴스가 포함된 다수의 잡(Job)을 포함하고, 상기 하나 이상의 태스크 인스턴스는 직렬 또는 직병렬로 수행되는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치.
The method according to claim 1,
Wherein the Java application includes a plurality of jobs including one or more task instances executed in response to a single user input, and the one or more task instances are executed in serial or serial-parallel manner. Mounted device.
제3항에 있어서,
상기 선택부는 상기 다수의 베이직 블록 각각에 대한 유틸리티 값을 산출하고, 상기 산출된 유틸리티 값과 비례하도록 상기 다수의 베이직 블록 각각에 대해 우선순위를 부여하며, 상기 우선순위를 이용하여 상기 프리-컴파일할 하나 이상의 베이직 블록을 선택하되,
상기 다수의 베이직 블록 중 l번째 베이직 블록에 대한 유틸리티 값은 상기 l번째 베이직 블록이 인터프리테이션 모드로 실행되는 경우에 소요되는 시간인 제1 소요시간과 상기 l번째 베이직 블록이 네이티브 모드로 실행되는 경우에 소요되는 시간인 제2 소요시간의 비(ratio), 및 상기 다수의 잡에서 상기 l번째 베이직 블록이 실행된 비율과 관련된 실행 비율 파라미터 중에서 적어도 하나에 의해 정의되는 것을 특징으로 하는 가상 머신이 탑재된 장치.
The method of claim 3,
Wherein the selector calculates a utility value for each of the plurality of basic blocks, assigns priority to each of the plurality of basic blocks to be proportional to the calculated utility value, Select one or more basic blocks,
Utility value for the l-th basic block of the plurality of the basic blocks to which the l-th basic block is an inter-free time of the first time and the l-th basic block takes when executed by the presentation mode running in native mode If in the time of rain (ratio), and a plurality of jobs wherein the second amount of time required for a virtual machine, characterized in that which is defined by at least one of the running rate parameter associated with said l-th basic block execution rate Mounted device.
제4항에 있어서,
상기 자바 애플리케이션은 하나의 사용자 입력에 대응하여 실행되는 하나 이상의 태스크 인스턴스가 포함된 다수의 잡(Job)을 포함하고,
상기 선택부는 상기 다수의 잡 중에서 마감시간(Deadline)을 위반하지 않으면서 실행이 완료되는 잡의 비율인 마감시간 만족 확률이 기설정된 임계 확률 이하인 경우, 상기 우선순위가 최대인 베이직 블록부터 상기 우선순위를 내림차순으로 정렬한 후, 상기 최대인 베이직 블록을 기준으로 내림차순으로 n(1 이상의 정수)개의 베이직 블록을 상기 프리-컴파일할 하나 이상의 베이직 블록으로 선택하는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치.
5. The method of claim 4,
Wherein the Java application comprises a plurality of jobs including one or more task instances executed in response to one user input,
Wherein the selection unit selects a priority block having a highest priority from a basic block having the highest priority to a predetermined priority probability when the deadline is not violated among the plurality of jobs, (N is an integer equal to or greater than 1) basic blocks in descending order from the maximum basic block as the at least one basic block to be precompiled, .
제5항에 있어서,
상기 마감시간 만족 확률은 프리-컴파일되는 베이직 블록의 개수와 비례하여 증가하되, 상기 n은 상기 마감시간 만족 확률이 상기 임계 확률 이상이 되도록 하는 최소의 정수인 것을 특징으로 하는 자바 가상 머신이 탑재된 장치.
6. The method of claim 5,
Wherein the deadline satisfaction probability is increased in proportion to the number of basic blocks to be precompiled, and n is a minimum integer such that the deadline satisfaction probability is equal to or greater than the threshold probability. .
제4항에 있어서,
상기 l번째 베이직 블록에 대한 유틸리티 값은 아래의 수학식과 같이 표현되는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치.

Figure 112013003045167-pat00005

여기서, 상기 Utility(BB l )은 상기 l번째 베이직 블록(BB l )에 대한 유틸리티 값, 상기 IE(BB l )는 상기 제1 소요시간, 상기 NE(BB l )는 상기 제2 소요시간, 상기 COC(BB l )는 상기 l번째 베이직 블록의 실행 비율 파라미터를 각각 의미함.
5. The method of claim 4,
Wherein the utility value for the 1 < st > basic block is expressed by the following equation.

Figure 112013003045167-pat00005

Here, the Utility (BB l) is the utility value, the IE (BB l) is the first time, the NE (BB l) for the l-th basic block (BB l) is the second time, the COC also (BB l) is meant the ratio, respectively the running parameters of the l-th basic block.
제4항에 있어서,
상기 다수의 잡 중에서 상기 l번째 베이직 블록을 적어도 한번 이상 실행한 잡의 비율이 기설정된 임계 비율 이상인 경우, 상기 실행 비율 파라미터는 아래의 수학식과 같이 표현되고,
상기 다수의 잡 중에서 상기 l번째 베이직 블록을 적어도 한번 이상 실행한 잡의 비율이 기설정된 임계 비율 미만인 경우, 상기 실행 비율 파라미터는 0으로 설정되는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치.
Figure 112013114198338-pat00014

여기서, 상기 COC(BB l )는 상기 다수의 잡에서 상기 l번째 베이직 블록(BB l )이 실행된 비율과 관련된 파라미터, 상기 OCj(BB l )은 상기 l번째 베이직 블록이 j번째 잡에서 실행될 때의 상기 l번째 베이직 블록의 실행 횟수, 상기 MIN( )은 최소의 값을 선택하는 함수, 상기 AVG( )는 평균 값을 산출하는 함수를 각각 의미함.
5. The method of claim 4,
If there is more than the l-th basic block in the job number of the ratio of the job-performing at least one prescribed threshold rate is set, the execution rate parameter is expressed by mathematical formula below,
Is less than the threshold from among a plurality of the job is the l-th basic block a proportion of the jobs executed at least once a predetermined ratio, the apparatus is equipped with a Java virtual machine, it characterized in that the execution rate parameter is set to zero.
Figure 112013114198338-pat00014

Here, the COC (BB l) is that the l-th basic block (BB l) this parameter, the OC j (BB l) is the l-th basic block associated with the execution rate in a number of the job to be executed in the j-th job l the number of executions, the MIN () of the second basic block is also a function of selecting the minimum value, the AVG () represents a function for calculating a mean value each time.
삭제delete 제3항에 있어서,
상기 가상 머신이 탑재된 장치는 상기 프리-컴파일된 하나 이상의 베이직 블록을 저장하는 저장부;를 더 포함하되,
상기 프리-컴파일된 하나 이상의 베이직 블록은 태스크 인스턴스 별로 분류되어 저장부에 저장되는 것을 특징으로 하는 가상 머신이 탑재된 장치.
The method of claim 3,
Wherein the apparatus on which the virtual machine is mounted further includes a storage unit for storing the pre-compiled one or more basic blocks,
Wherein the pre-compiled one or more basic blocks are classified into task instances and stored in a storage unit.
제10항에 있어서,
상기 하나 이상의 태스크 인스턴스는 부모 태스크 인스턴스 및 자식 태스크 인스턴스 중 어느 하나에 속하고, 상기 프리-컴파일된 하나 이상의 베이직 블록 중 부모 태스크 인스턴스-자식 태스크 인스턴스의 관계가 성립되는 2 이상의 태스크 인스턴스에 의해 공유되는 베이직 블록은 상기 부모 태스크 인스턴스와 대응되는 상기 저장부 상의 영역에 저장되고, 상기 자식 태스크 인스턴스와 대응되는 상기 저장부 상의 영역에는 저장되지 않는 것을 특징으로 하는 가상 머신이 탑재된 장치.
11. The method of claim 10,
Wherein the one or more task instances belong to one of a parent task instance and a child task instance and are shared by two or more task instances in which the relationship of the parent task instance-child task instance among the precompiled one or more basic blocks is established Wherein the basic block is stored in an area on the storage unit corresponding to the parent task instance, and is not stored in an area on the storage unit corresponding to the child task instance.
자바 애플리케이션을 구성하는 다수의 베이직 블록 중에서 상기 자바 애플리케이션의 실행 전에 프리-컴파일할 하나 이상의 베이직 블록을 선택하는 단계 - 상기 베이직 블록은 하나 이상의 바이트코드로 구성됨 -; 및
상기 선택된 하나 이상의 베이직 블록을 상기 자바 애플리케이션의 실행 전에 프리-컴파일하고, 상기 다수의 베이직 블록 중 상기 하나 이상의 베이직 블록을 제외한 나머지 베이직 블록을 런타임으로 컴파일하는 단계;를 포함하는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치에서의 컴파일 방법.
Selecting one or more basic blocks to be precompiled prior to execution of the Java application from among a plurality of basic blocks constituting a Java application, the basic block consisting of one or more bytecodes; And
Compiling the selected one or more basic blocks before execution of the Java application and compiling remaining basic blocks excluding the one or more basic blocks among the plurality of basic blocks into the runtime, How to compile on a machine with a machine.
제12항에 있어서,
상기 선택하는 단계는 베이직 블록의 프리-컴파일에 의한 상기 자바 애플리케이션의 실행시간의 감소 정도 및 베이직 블록의 실행 빈도를 고려하여 상기 하나 이상의 베이직 블록을 선택하는 것을 특징으로 하는 자바 가상 머신이 탑재된 장치에서의 컴파일 방법.
13. The method of claim 12,
Wherein the selecting step selects the at least one basic block in consideration of the degree of reduction of the execution time of the Java application by precompiling the basic block and the execution frequency of the basic block. How to compile in.
KR1020130003423A 2013-01-11 2013-01-11 Apparatus having java virturl machine and selective compile method from java bytecodes to native codes for the apparatus having java virtual machine Expired - Fee Related KR101393152B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130003423A KR101393152B1 (en) 2013-01-11 2013-01-11 Apparatus having java virturl machine and selective compile method from java bytecodes to native codes for the apparatus having java virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130003423A KR101393152B1 (en) 2013-01-11 2013-01-11 Apparatus having java virturl machine and selective compile method from java bytecodes to native codes for the apparatus having java virtual machine

Publications (1)

Publication Number Publication Date
KR101393152B1 true KR101393152B1 (en) 2014-05-08

Family

ID=50893577

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130003423A Expired - Fee Related KR101393152B1 (en) 2013-01-11 2013-01-11 Apparatus having java virturl machine and selective compile method from java bytecodes to native codes for the apparatus having java virtual machine

Country Status (1)

Country Link
KR (1) KR101393152B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018124621A1 (en) * 2016-12-27 2018-07-05 Hp Printing Korea Co., Ltd. Optimizing operating environment of virtual machine

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211187A (en) 2008-02-29 2009-09-17 Hitachi Ltd Information processor

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211187A (en) 2008-02-29 2009-09-17 Hitachi Ltd Information processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018124621A1 (en) * 2016-12-27 2018-07-05 Hp Printing Korea Co., Ltd. Optimizing operating environment of virtual machine
US10732909B2 (en) 2016-12-27 2020-08-04 Hewlett-Packard Development Company, L.P. Optimizing operating environment of virtual machine

Similar Documents

Publication Publication Date Title
US7987452B2 (en) Profile-driven lock handling
Duboscq et al. An intermediate representation for speculative optimizations in a dynamic compiler
EP2281236B1 (en) Just-ahead-of-time compilation
US8104030B2 (en) Mechanism to restrict parallelization of loops
US20120254888A1 (en) Pipelined loop parallelization with pre-computations
US9389889B2 (en) Application server for optimizing timing of performing dynamic compilation
US20070226698A1 (en) Method for improving performance of executable code
US20050050531A1 (en) System of benchmarking and method thereof
US20110246974A1 (en) Dynamic compiler program, dynamic compiling method and dynamic compiling device
US9424004B2 (en) Execution guards in dynamic programming
US10628223B2 (en) Optimized allocation of tasks in heterogeneous computing systems
EP4123461A1 (en) Intelligent query plan cache size management
EP4123473B1 (en) Intelligent query plan cache size management
US9740597B2 (en) Transactional execution of native methods
Luo et al. Harvesting memory-bound {CPU} stall cycles in software with {MSH}
Fonseca et al. Controlling the granularity of automatic parallel programs
KR101393152B1 (en) Apparatus having java virturl machine and selective compile method from java bytecodes to native codes for the apparatus having java virtual machine
Park et al. Concurrent JavaScript parsing for faster loading of Web apps
Popov et al. Piecewise holistic autotuning of parallel programs with cere
KR101636521B1 (en) Apparatus and Method for generating code overlay
CN108139929A (en) For dispatching the task dispatch of multiple tasks and method
Zhang et al. Improving the precision of abstract interpretation based cache persistence analysis
Senoussaoui et al. Allocation of real-time tasks onto identical core platforms under deferred fixed preemption-point model
US20220283927A1 (en) Compound conditional reordering for faster short-circuiting
Neelima et al. Communication and computation optimization of concurrent kernels using kernel coalesce on a GPU

Legal Events

Date Code Title Description
A201 Request for examination
PA0109 Patent application

St.27 status event code: A-0-1-A10-A12-nap-PA0109

PA0201 Request for examination

St.27 status event code: A-1-2-D10-D11-exm-PA0201

D13-X000 Search requested

St.27 status event code: A-1-2-D10-D13-srh-X000

D14-X000 Search report completed

St.27 status event code: A-1-2-D10-D14-srh-X000

E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

St.27 status event code: A-1-2-D10-D21-exm-PE0902

E13-X000 Pre-grant limitation requested

St.27 status event code: A-2-3-E10-E13-lim-X000

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

E13-X000 Pre-grant limitation requested

St.27 status event code: A-2-3-E10-E13-lim-X000

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

P13-X000 Application amended

St.27 status event code: A-2-2-P10-P13-nap-X000

PE0801 Dismissal of amendment

St.27 status event code: A-2-2-P10-P12-nap-PE0801

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

St.27 status event code: A-1-2-D10-D22-exm-PE0701

GRNT Written decision to grant
PR0701 Registration of establishment

St.27 status event code: A-2-4-F10-F11-exm-PR0701

PR1002 Payment of registration fee

St.27 status event code: A-2-2-U10-U11-oth-PR1002

Fee payment year number: 1

PG1601 Publication of registration

St.27 status event code: A-4-4-Q10-Q13-nap-PG1601

PN2301 Change of applicant

St.27 status event code: A-5-5-R10-R13-asn-PN2301

St.27 status event code: A-5-5-R10-R11-asn-PN2301

FPAY Annual fee payment

Payment date: 20170410

Year of fee payment: 4

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 4

P22-X000 Classification modified

St.27 status event code: A-4-4-P10-P22-nap-X000

FPAY Annual fee payment

Payment date: 20180409

Year of fee payment: 5

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 5

P22-X000 Classification modified

St.27 status event code: A-4-4-P10-P22-nap-X000

FPAY Annual fee payment

Payment date: 20190401

Year of fee payment: 6

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 6

PN2301 Change of applicant

St.27 status event code: A-5-5-R10-R11-asn-PN2301

PN2301 Change of applicant

St.27 status event code: A-5-5-R10-R14-asn-PN2301

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 7

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 8

PN2301 Change of applicant

St.27 status event code: A-5-5-R10-R13-asn-PN2301

St.27 status event code: A-5-5-R10-R11-asn-PN2301

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 9

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 10

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 11

PC1903 Unpaid annual fee

St.27 status event code: A-4-4-U10-U13-oth-PC1903

Not in force date: 20250501

Payment event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

H13 Ip right lapsed

Free format text: ST27 STATUS EVENT CODE: N-4-6-H10-H13-OTH-PC1903 (AS PROVIDED BY THE NATIONAL OFFICE); TERMINATION CATEGORY : DEFAULT_OF_REGISTRATION_FEE

Effective date: 20250501

PC1903 Unpaid annual fee

St.27 status event code: N-4-6-H10-H13-oth-PC1903

Ip right cessation event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

Not in force date: 20250501