KR20110081723A - Hybrid Java Compilation System for Digital TV Software Platforms - Google Patents

Hybrid Java Compilation System for Digital TV Software Platforms Download PDF

Info

Publication number
KR20110081723A
KR20110081723A KR1020100002026A KR20100002026A KR20110081723A KR 20110081723 A KR20110081723 A KR 20110081723A KR 1020100002026 A KR1020100002026 A KR 1020100002026A KR 20100002026 A KR20100002026 A KR 20100002026A KR 20110081723 A KR20110081723 A KR 20110081723A
Authority
KR
South Korea
Prior art keywords
java
xlet
application
module
compilation
Prior art date
Application number
KR1020100002026A
Other languages
Korean (ko)
Other versions
KR101088517B1 (en
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 KR1020100002026A priority Critical patent/KR101088517B1/en
Publication of KR20110081723A publication Critical patent/KR20110081723A/en
Application granted granted Critical
Publication of KR101088517B1 publication Critical patent/KR101088517B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/30101Special purpose registers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30134Register stacks; shift registers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/3017Runtime instruction translation, e.g. macros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06F9/45516Runtime code conversion or optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE: A hybrid JAVA compile system for a DTV(Digital Television) software platform is provided to apply a different compile mode to a system, a middleware class, and an xlet application according to each characteristic of the system, the middleware class, and the xlet application. CONSTITUTION: A system and middleware method administration module(100) administrates a machine code which is previously compiled and installed. An xlet application receiving module(200) receives an xlet application from a broadcast station. An xlet application compile module(300) compiles the received xlet application using a JITC(Just-In-Time Compile) mode. A JAVA application execution module(400) executes a JAVA application using the machine code for the complied xlet application.

Description

디지털 티브이 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템{omitted}Hybrid Java Compilation System for Digital TV Software Platforms

본 발명은 디지털 TV 소프트웨어 플랫폼을 위한 자바 컴파일 시스템에 관한 것으로서, 특히 시스템 및 미들웨어 클래스와 xlet 애플리케이션에 대하여 상이한 컴파일 방식을 적용하는 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템에 관한 것이다.The present invention relates to a Java compilation system for a digital TV software platform, and more particularly to a hybrid Java compilation system for a digital TV software platform that applies different compilation schemes for the system and middleware classes and xlet applications.

기존의 아날로그 TV와 달리 디지털 TV는 디지털 신호를 통해 방송 신호를 수신받는다. 디지털 방송 기술은 비디오 압축 기술을 이용하여 적은 주파수 대역폭을 사용하여 신호를 전달할 수 있게 되어 고화질(High-Definition) 화면을 재생할 수 있다. 그리고 남는 대역폭을 활용하여 데이터 전송을 하는데, 이를 통하여 교통, 날씨, 뉴스, 주식과 같은 일반적인 정보에서부터 방송에 특화된 서비스를 제공하거나, 시청자가 서비스를 요청할 수 있는 양방향 TV(interact TV, iTV) 환경을 구축할 수 있게 되었다.
Unlike conventional analog TV, digital TV receives broadcast signals through digital signals. Digital broadcasting technology can transmit a signal using a low frequency bandwidth using video compression technology to reproduce a high-definition screen. It uses the remaining bandwidth to transmit data, which provides an interactive TV (i.e., interactive TV, iTV) environment where general information such as traffic, weather, news, and stocks can be provided, or viewers can request services. I can build it.

이러한 데이터 방송을 위한 중요한 기술이 자바로, 많은 iTV의 표준이 자바를 이용하고 있다. 데이터 방송을 위해 자바 xlet 애플리케이션을 활용하는데, xlet 애플리케이션은 xlet 클래스와 이미지 및 텍스트 파일로 구성된다. 자바 xlet 애플리케이션은 디지털 방송 신호를 통해 DTV 셋톱박스로 수신이 되고 셋톱박스 내의 시스템 및 미들웨어 클래스와 함께 수행되어 화면에 정보를 출력한다. 따라서 DTV의 소프트웨어 플랫폼은 셋톱박스에 미리 설치되어 있는 시스템 및 미들웨어 클래스와 방송을 통해서 전달받는 xlet 클래스로 나눠진다.
Java is an important technology for data broadcasting, and many iTV standards use Java. It uses Java xlet applications to broadcast data, which consists of xlet classes and image and text files. Java xlet applications are received by DTV set-top boxes via digital broadcast signals and run with the system and middleware classes in the set-top box to output information to the screen. Therefore, DTV's software platform is divided into system and middleware class pre-installed in set-top box and xlet class delivered through broadcasting.

이러한 DTV 플랫폼의 성능 향상을 위해 일반적으로는 just-in-time 컴파일러(JITC)를 통해 실행 중에 자바 바이트코드를 머신코드로 변환하여 수행하는 방식을 사용한다. 하지만, DTV 플랫폼의 보다 큰 성능 향상을 위하여, JITC과 비교해 볼 때 실행중의 오버헤드가 없고 더 많은 최적화를 적용해 좋은 코드를 생성할 수 있는 ahead-of-time 컴파일러(AOTC)를 DTV 플랫폼에 적용해 볼 필요성이 있다.In order to improve the performance of such a DTV platform, a general method of converting Java bytecode into machine code is executed by a just-in-time compiler (JITC). However, for the greater performance of the DTV platform, compared to JITC, the DTV platform has a ahead-of-time compiler (AOTC) that can generate good code with no running overhead and more optimization. There is a need to apply it.

본 발명은 기존에 제안된 방법들의 상기와 같은 문제점들을 해결하기 위해 제안된 것으로서, 시스템 및 미들웨어 클래스와 xlet 애플리케이션에 대하여 각각의 특성에 맞는 상이한 컴파일 방식을 적용함으로써 기존의 컴파일 시스템에 비하여 성능 향상을 얻을 수 있는, 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템을 제공하는 것을 그 목적으로 한다.The present invention has been proposed to solve the above problems of the conventionally proposed methods, and improves performance compared to the existing compilation system by applying different compilation schemes for the characteristics of the system and the middleware class and the xlet application. Its purpose is to provide a hybrid Java compilation system for the digital TV software platform that can be obtained.

상기한 목적을 달성하기 위한 본 발명의 특징에 따른, 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템은,According to a feature of the present invention for achieving the above object, a hybrid Java compilation system for a digital TV software platform,

(1) 시스템 및 미들웨어 메소드에 대하여, 서버 측에서 AOTC(Ahead-Of-Time Compile) 방식을 이용하여 미리 컴파일되어 설치된 머신코드를 관리하는 시스템 및 미들웨어 메소드 관리 모듈;(1) a system and middleware method management module that manages machine code precompiled and installed on the server side using an Ahead-Of-Time Compile (AOTC) method for the system and middleware methods;

(2) 방송국으로부터 xlet 애플리케이션을 수신하는 xlet 애플리케이션 수신 모듈;(2) an xlet application receiving module for receiving an xlet application from a broadcast station;

(3) 상기 xlet 애플리케이션 수신 모듈을 통해 수신된 xlet 애플리케이션에 대하여, 미리 지정된 조건을 만족할 경우 JITC(Just-In-Time Compile) 방식을 이용하여 수행 중 컴파일하는 xlet 애플리케이션 컴파일 모듈; 및(3) an xlet application compilation module that compiles an xlet application received through the xlet application receiving module during execution using a Just-In-Time Compile (JITC) scheme when a predetermined condition is satisfied; And

(4) 상기 시스템 및 미들웨어 메소드 관리 모듈에 의해 관리되는 시스템 및 미들웨어 메소드에 대한 머신코드와, 상기 xlet 애플리케이션 컴파일 모듈에 의해 컴파일되는 xlet 애플리케이션에 대한 머신코드를 이용하여, 자바 애플리케이션을 수행하는 자바 애플리케이션 수행 모듈을 포함하는 것을 그 구성상의 특징으로 한다.
(4) a Java application that executes a Java application using machine code for a system and middleware method managed by the system and middleware method management module and machine code for an xlet application compiled by the xlet application compilation module. Including the execution module is characterized by its configuration.

바람직하게는, 상기 xlet 애플리케이션 컴파일 모듈에서,Preferably, in the xlet application compilation module,

미리 지정된 조건을 만족하는 경우는, 상기 수신된 xlet 애플리케이션에 대하여 메소드의 호출 횟수를 카운트하여, 카운트 된 호출 횟수가 미리 결정된 임계값을 초과할 경우일 수 있다.
When the predetermined condition is satisfied, the number of invocations of the method may be counted with respect to the received xlet application, and the counted number of invocations may exceed a predetermined threshold.

바람직하게는, 서버 측에서 AOTC 방식 중, 바이트코드를 C 코드로 변환하여 C 컴파일러를 활용하는 Bytecode-to-C AOTC 방식을 이용할 수 있다.Preferably, the Bytecode-to-C AOTC method which converts bytecode into C code and utilizes a C compiler among the AOTC methods may be used.

본 발명의 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템에 따르면, 시스템 및 미들웨어 클래스와 xlet 애플리케이션에 대하여 각각의 특성에 맞는 상이한 컴파일 방식을 적용함으로써 기존의 컴파일 시스템에 비하여 상당한 성능 향상을 얻을 수 있다.According to the hybrid Java compilation system for the digital TV software platform of the present invention, a significant performance improvement can be obtained compared to the existing compilation system by applying different compilation schemes for the respective characteristics to the system and the middleware class and the xlet application.

도 1은 본 발명의 일 실시예에 따른 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템의 구성을 나타내는 도면.
도 2는 xlet 애플리케이션이 수행될 때 호출되는 메소드의 개수에 대한 분포를 나타내는 도면.
도 3은 xlet 애플리케이션이 수행될 때 JITC가 수행되는 메소드의 분포를 나타내는 도면.
도 4 및 도 5는 본 발명에서 제안한 하이브리드 환경에서 실제 xlet 애플리케이션을 수행한 결과를 나타내는 도면.
1 is a diagram showing the configuration of a hybrid Java compilation system for a digital TV software platform according to an embodiment of the present invention.
2 is a diagram illustrating the distribution of the number of methods invoked when an xlet application is run.
3 illustrates the distribution of methods in which JITC is performed when an xlet application is run.
4 and 5 are views showing the result of performing the actual xlet application in the hybrid environment proposed in the present invention.

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

도 1은 본 발명의 일 실시예에 따른 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템의 구성을 나타내는 도면이다. 도 1에 도시된 바와 같이, 본 발명의 일 실시예에 따른 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템은, 시스템 및 미들웨어 메소드 관리 모듈(100), xlet 애플리케이션 수신 모듈(200), xlet 애플리케이션 컴파일 모듈(300) 및 자바 애플리케이션 수행 모듈(400)을 포함하여 구성될 수 있다. 또한, 도 1에 도시된 바와 같이, 오브젝트 캐러셀 파일 관리 모듈(500)을 추가로 더 포함할 수 있다.
1 is a diagram illustrating a configuration of a hybrid Java compilation system for a digital TV software platform according to an embodiment of the present invention. As shown in FIG. 1, a hybrid Java compilation system for a digital TV software platform according to an embodiment of the present invention includes a system and middleware method management module 100, an xlet application receiving module 200, and an xlet application compilation module. It may be configured to include a 300 and the Java application execution module 400. In addition, as shown in FIG. 1, the object carousel file management module 500 may further include.

본 발명에서는, 시스템 및 미들웨어 메소드에 대하여, 클라이언트 측에서 수행 중 실시간으로 컴파일 하는 JITC 방식을 이용하는 것이 아니라 서버 측에서 미리 컴파일 한 후 변환된 머신코드를 셋톱박스에 설치하는 AOTC(Ahead-Of-Time Compile) 방식을 이용한다. 이와 같이 변환되어 셋톱박스에 설치되는 시스템 및 미들웨어 메소드에 대한 머신코드는 시스템 및 미들웨어 메소드 관리 모듈(100)에 의해 관리된다. 본 발명에서는, AOTC 방식 중, 바이트코드를 C 코드로 변환하여 C 컴파일러를 활용하는 Bytecode-to-C AOTC 방식을 이용한다.
In the present invention, AOTC (Ahead-Of-Time) that installs the converted machine code in the set-top box after pre-compilation on the server side, rather than using a JITC method for compiling in real time during execution on the client side for the system and middleware methods Compile) method is used. The machine code for the system and the middleware method that is converted and installed in the set-top box is managed by the system and the middleware method management module 100. In the present invention, the Bytecode-to-C AOTC method which converts bytecode into C code and utilizes the C compiler is used.

xlet 애플리케이션 수신 모듈(200)은, 방송국으로부터 xlet 애플리케이션을 수신한다. 특히, 본 발명에서 제안하고 있는 xlet 애플리케이션 수신 모듈(200)은, xlet 애플리케이션을 중간부터 수신하기 시작하더라도 전체를 복원할 수 있도록 하는 오브젝트 캐러셀 파일 관리 모듈을 더 포함할 수 있다.
The xlet application receiving module 200 receives an xlet application from a broadcast station. In particular, the xlet application receiving module 200 proposed by the present invention may further include an object carousel file management module which enables the entirety of the xlet application to be restored even if the xlet application starts to be received from the middle.

xlet 애플리케이션 컴파일 모듈(300)은, xlet 애플리케이션 수신 모듈(200)을 통해 수신된 xlet 애플리케이션에 대하여, 미리 지정된 조건을 만족할 경우 JITC(Just-In-Time Compile) 방식을 이용하여 수행 중 컴파일한다. 여기서, 미리 지정된 조건을 만족하는 경우는, 예컨대 수신된 xlet 애플리케이션에 대하여 메소드의 호출 횟수를 카운트하여, 카운트 된 호출 횟수가 미리 결정된 임계값을 초과하는 경우일 수 있다.
The xlet application compilation module 300 compiles the xlet application received through the xlet application receiving module 200 during the execution using the Just-In-Time Compile (JITC) method when a predetermined condition is satisfied. Here, the case where the predetermined condition is satisfied may be, for example, a case in which the number of calls of the method is counted for the received xlet application, and the counted number of calls exceeds the predetermined threshold.

자바 애플리케이션 수행 모듈(400)은, 시스템 및 미들웨어 메소드 관리 모듈(100)에 의해 관리되는 시스템 및 미들웨어 메소드에 대한 머신코드와, xlet 애플리케이션 컴파일 모듈(300)에 의해 컴파일되는 xlet 애플리케이션에 대한 머신코드를 이용하여, 자바 애플리케이션을 수행한다.
The Java application execution module 400 may include machine code for system and middleware methods managed by the system and middleware method management module 100, and machine code for xlet applications compiled by the xlet application compilation module 300. To execute a Java application.

이와 같이, 본 발명에서 제안하고 있는 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템은, 시스템 및 미들웨어 클래스와 xlet 애플리케이션에 대하여 각각의 특성에 맞는 상이한 컴파일 방식을 적용함으로써 기존의 컴파일 시스템에 비하여 상당한 성능 향상을 얻을 수 있다.
As described above, the hybrid Java compilation system for the digital TV software platform proposed in the present invention is considerably improved in performance compared to the existing compilation system by applying different compilation methods to the system and the middleware class and the xlet application. Can be obtained.

이하에서는, 본 발명에서 제안하고 있는 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템에 대하여, DTV 자바 소프트웨어 플랫폼 일반, 본 발명에서 제안하고 있는 하이브리드 자바 컴파일 시스템, 및 본 발명의 하이브리드 자바 컴파일 시스템에 대한 실험 결과 순으로 보다 상세히 설명하기로 한다.
Hereinafter, the hybrid Java compilation system for the digital TV software platform proposed by the present invention, the experiments on the general DTV Java software platform, the hybrid Java compilation system proposed in the present invention, and the hybrid Java compilation system of the present invention. The results will be described in more detail.

1. DTV 자바 소프트웨어 플랫폼
1. DTV Java Software Platform

(1) DTV 소프트웨어 구조와 xlet 수행(1) DTV software structure and xlet execution

우리가 대상으로 삼는 DTV 자바 플랫폼은 ACAP으로, 이는 국내 DTV 및 IPTV 플랫폼의 표준 규격이다. DTV의 셋톱박스에 설치된 ACAP은 GEM(Globally Executable MHP)를 기반으로 하고 있으며, MHP 기반 플랫폼으로 Java 기반 애플리케이션 환경을 제공한다.
Our target DTV Java platform is ACAP, which is the standard specification of domestic DTV and IPTV platforms. ACAP, installed on DTV's set-top box, is based on the Globally Executable MHP (GEM) and provides a Java-based application environment as an MHP-based platform.

ACAP에서는 데이터 방송을 위해 DTV가 자바 xlet 애플리케이션을 수신할 수 있도록 하였다. 자바 xlet 애플리케이션은 일반적으로 프로그램 수행을 위한 xlet 클래스 파일, 화면 구성을 위한 이미지 파일 및 실제 정보를 담은 텍스트 파일로 구성된다. 자바 xlet 애플리케이션의 송수신을 위해서 방송국에서는 애플리케이션을 분할한 뒤 각 부분을 순차적으로 반복하여 송신하는 캐러셀(carousel) 방식을 사용한다. DTV 셋톱박스에서는 애플리케이션 조각을 순차적으로 수신하여 중간부터 수신하기 시작하더라도 전체를 복원할 수 있도록 하는 ‘오브젝트 캐러셀 파일 관리자(object carousel file manager)’가 필요하게 된다. 이 파일 관리자는 애플리케이션 내의 파일들의 이름, 특성, 디렉토리 위치 및 버전 정보를 관리하게 된다.
ACAP allows DTV to receive Java xlet applications for data broadcasting. Java xlet applications typically consist of xlet class files for running programs, image files for screen composition, and text files with actual information. In order to transmit and receive Java xlet applications, a broadcasting station uses a carousel method that divides an application and transmits each part sequentially. DTV set-top boxes require an object carousel file manager that can receive application fragments sequentially and restore the whole even if they start receiving in the middle. This file manager manages the names, properties, directory locations, and version information of the files in the application.

데이터 방송은 각 방송국별로 고유의 자바 xlet 애플리케이션을 송신하고, 해당 채널을 시청할 때 화면과 함께 TV 화면을 통해 제공되어 xlet 수행 대기 상태가 된다. 사용자가 xlet 수행을 선택하면 화면에 메뉴 등 사용자 인터페이스가 활성화되어 수신된 정보 및 양방향 서비스를 제공할 수 있게 된다. 만약 채널이 변경되거나 방송 신호 상의 xlet 애플리케이션의 버전이 갱신될 경우에는 xlet이 중단되고 새로운 xlet 애플리케이션을 수신하게 된다.
Data broadcasting transmits a unique Java xlet application for each broadcasting station, and is provided through a TV screen along with a screen when watching a corresponding channel, thereby waiting for xlet execution. When the user selects to execute the xlet, the user interface such as a menu is activated on the screen to provide the received information and the interactive service. If the channel is changed or the version of the xlet application on the broadcast signal is updated, the xlet is stopped and a new xlet application is received.

(2) DTV 자바 실행 환경(2) DTV Java execution environment

DTV 자바의 특징은 서로 다른 곳으로부터 받은 두 가지 타입의 자바 클래스를 실행한다는 것이다. 한 가지는 원래 DTV 셋톱박스에 미리 설치되어 있던 시스템 및 미들웨어 클래스이고, 다른 한 가지는 방송국으로부터 동적으로 다운로드 받아 실행하는 xlet 클래스이다. 한편으로 이러한 시스템에서 사용되는 애플리케이션은 점점 복잡한 연산을 수행하게 되었다. 단순히 정보를 화면에 표시하는 것을 넘어서, 게임이나 양방향 서비스와 같이 실행시간을 많이 필요로 하는 콘텐츠를 제공하고 있다.
The special feature of DTV Java is that it executes two types of Java classes from different places. One is the system and middleware classes that were originally pre-installed in the DTV set-top box, and the other is the xlet class that dynamically downloads and executes from broadcast stations. On the one hand, the applications used in these systems have become increasingly complex. Beyond simply displaying information on the screen, it provides content that requires a lot of runtime, such as games and interactive services.

따라서 DTV 자바 실행을 가속화하는 기술이 필요하게 되었다. 자바는 기본적으로 다양한 플랫폼에 독립적으로 동작할 수 있도록 바이트코드로 불리는 실행 포맷으로 컴파일되어 인터프리터를 통해 수행된다. 이런 수행방식은 일반적인 머신코드 수행에 비해 매우 느리기 때문에, just-in-time 컴파일러(JITC)나 ahead-of-time 컴파일러(AOTC)를 통해 바이트코드를 머신코드로 변환하여 사용한다. JITC는 실행 중에 클래스를 동적으로 컴파일하며, AOTC는 컴파일을 미리 수행한 후, 변환한 머신코드를 클라이언트에 미리 설치한다.
Thus, there is a need for technology that accelerates DTV Java execution. Java is basically compiled into an executable format called bytecode and executed by the interpreter so that it can operate independently on various platforms. Since this implementation is very slow compared to normal machine code execution, the bytecode is converted into machine code using the just-in-time compiler (JITC) or ahead-of-time compiler (AOTC). JITC dynamically compiles classes during execution, and AOTC precompiles and installs the converted machine code on the client.

일반적으로 DTV 환경에서는 JITC를 사용할 수 있다. 이는 xlet을 동적으로 다운받아 사용하기 때문에 여기에 AOTC를 적용할 수 없기 때문이다. 하지만 AOTC는 실행 중 오버헤드가 없고 이로 인해 클라이언트 자원의 제약을 벗어나 다양한 최적화를 적용한 머신코드를 사용할 수 있다. 따라서 다운로드 받는 xlet에 대해서는 JITC를 사용하고 미리 설치되는 시스템 및 미들웨어 클래스는 AOTC를 적용하는 하이브리드 컴파일 환경을 구축할 필요성이 있다.
In general, JITC can be used in DTV environment. This is because AOTC cannot be applied here because xlet is downloaded and used dynamically. However, AOTC has no running overhead and can use machine code with various optimizations beyond the constraints of client resources. Therefore, there is a need to build a hybrid compilation environment using JITC for downloaded xlets and preinstalled systems and middleware classes applying AOTC.

2. 하이브리드 자바 컴파일 환경
2. Hybrid Java compilation environment

(1) 자바 xlet 수행을 위한 JITC(1) JITC for running Java xlets

우리가 타깃으로 하는 DTV 플랫폼은 Sun’s Connected Device Configuration(CDC) JVM의 공개 소스 버전인 phoneMe Advance를 사용한다. 이 VM은 Sun’s HotSpot 기술을 기반으로 하는 적응형 JITC를 사용한다.
The DTV platform we target uses phoneMe Advance, an open source version of Sun's Connected Device Configuration (CDC) JVM. The VM uses adaptive JITC based on Sun's HotSpot technology.

HotSpot 기술은 우선 자바 메소드를 인터프리터로 수행하다가 메소드가 핫스팟으로 판단되면 메소드의 바이트코드를 머신코드로 변환한 뒤 코드 캐시에 저장하여 머신코드로 수행하는 방식이다.
HotSpot technology executes Java method as an interpreter first, and when the method is determined as a hot spot, it converts the method's bytecode into machine code and stores it in the code cache.

우리가 구축한 하이브리드 자바 컴파일 환경에서는 xlet 메소드에 phoneme Advance의 JITC를 적용한다.
In our hybrid Java compilation environment, we apply phoneme Advance's JITC to the xlet method.

(2) 시스템 및 미들웨어 메소드를 위한 AOTC(2) AOTC for system and middleware methods

본 발명에서는 AOTC를 적용하기 위해 바이트코드를 C 코드로 변환하여 변환된 코드를 CVM 소스 코드와 gcc를 이용하여 함께 컴파일하여 실행 파일을 생성하는 방식을 사용하였다.
In the present invention, in order to apply AOTC, a method of generating an executable file by converting byte code into C code and compiling the converted code using CVM source code and gcc is used.

이처럼 바이트코드를 C 코드로 변환하여 C 컴파일러를 활용하는 방식을 bytecode-to-C AOTC 라고 한다. Bytecode-to-C 방식은 기존의 컴파일러를 이용하여 기계어 코드를 생성함으로 인해 컴파일러에 이미 구현된 최적화 기법을 손쉽게 활용할 수 있다. 변환된 C 코드는 JVM 코드와 함께 컴파일하여 하나의 실행파일이 된다.
This method of converting bytecode to C code and utilizing the C compiler is called bytecode-to-C AOTC. The Bytecode-to-C method can easily utilize optimization techniques already implemented in the compiler by generating machine code using an existing compiler. The translated C code is compiled with the JVM code and becomes one executable.

코드의 최적화를 위하여 메소드 인라이닝 등의 최적화와 반복된 null check 제거 등의 자바에 특화된 최적화를 구현하여 적용하였다. 또한 본 발명에서는 시스템 및 미들웨어 메소드 중에서 25회 이상 호출되는 메소드에 대해서만 컴파일을 수행하였다.
In order to optimize the code, Java-specific optimizations such as method inlining and repeated null check elimination are implemented and applied. In addition, in the present invention, the compile is performed only for a method that is called more than 25 times among system and middleware methods.

다만 Bytecode-to-C 방식의 AOTC는 함수 호출과정에서 오버헤드가 발생할 수 있다. 이는 인터프리터 및 JITC가 자바 스택을 사용한 함수 호출을 사용하지만 AOTC는 C 스택을 사용하게 되기 때문이다. 이러한 호출방식은 AOTC한 메소드 간의 호출은 최적화되지만 인터프리터 및 JITC를 사용한 메소드와 AOTC된 메소드 간의 함수 호출에서는 서로 다른 스택 사용으로 인해 추가 작업이 필요하게 된다.
However, Bytecode-to-C type AOTC may incur overhead during function call. This is because the interpreter and JITC use function calls using the Java stack, but AOTC uses the C stack. This call method is optimized between AOTC method calls, but the function calls between the interpreter and JITC and AOTC methods require additional work due to the use of different stacks.

3. 실험 결과
3. Experimental Results

(1) 실험 환경(1) experimental environment

본 발명에서 사용할 하이브리드 자바 컴파일 환경을 구축한 셋톱박스는 333MHz MIPS CPU와 128MB 메모리를 가지고 있다. 소프트웨어 플랫폼은 Sun’s phoneMe Advanced MR2 버전에 ATSC의 ACAP 미들웨어를 사용하며, Linux 커널에서 동작한다.
The set-top box constructed with the hybrid Java compilation environment for use in the present invention has a 333MHz MIPS CPU and 128MB of memory. The software platform uses ATSC's ACAP middleware for Sun's phoneMe Advanced MR2 version and runs on the Linux kernel.

자바 xlet 애플리케이션은 실제 방송사에서 전송하는 것을 사용하였고, 각각의 xlet 메뉴 아이템을 A~J로 명기하였다. 이 서비스는 뉴스, 날씨, 교통, 주식 정보 등을 출력한다. 수행시간은 메뉴를 통해 해당 서비스를 선택한 직후부터 화면이 출력될 때까지 걸리는 시간으로 측정하였다.
The Java xlet application uses what is actually broadcast from the broadcaster and specifies each xlet menu item as A to J. The service outputs news, weather, traffic, stock information, and more. Execution time was measured as the time taken from the selection of the corresponding service through the menu until the screen is displayed.

(2) DTV 자바 특성(2) DTV Java characteristics

우선 DTV 자바 애플리케이션의 특성을 알아보았다. 실험을 위해 JITC만을 사용하여 측정하였다. 도 2는 xlet 애플리케이션이 수행될 때 호출되는 메소드의 개수에 대한 분포를 나타내는 도면이다. 도 2에서, 짙은 흑색으로 표시된 부분이 xlet 메소드를, 짙은 회색으로 표시된 부분이 시스템 메소드를, 옅은 회색으로 표시된 부분이 미들웨어 메소드를 각각 나타낸다. 도 2로부터, 대부분의 DTV 자바 애플리케이션에서 xlet 메소드는 미미하고 대부분이 시스템 및 미들웨어 메소드임을 확인할 수 있다.
First, we looked at the characteristics of DTV Java applications. It was measured using JITC only for the experiment. 2 is a diagram illustrating a distribution of the number of methods called when an xlet application is executed. In FIG. 2, the parts shown in dark black represent xlet methods, the parts shown in dark gray represent system methods, and the parts shown in light gray represent middleware methods, respectively. From Figure 2, it can be seen that in most DTV Java applications, the xlet method is insignificant and most are system and middleware methods.

또한 자주 호출되어 JITC가 수행되는 메소드들의 분포를 알아보았다. 도 3에서 JITC에 의해 컴파일되는 메소드는 주로 시스템 및 미들웨어 메소드(클래스)이며 일부가 xlet 메소드라는 것을 보여준다. 이를 통해 시스템 및 미들웨어 클래스(메소드)에 AOTC를 적용하는 것이 효과적일 것이라는 것을 예상할 수 있다.
We also examined the distribution of methods that are frequently called and executed by JITC. 3 shows that the methods compiled by JITC are mainly system and middleware methods (classes) and some are xlet methods. This can be expected to apply AOTC to system and middleware classes (methods).

(3) 성능 향상(3) performance improvement

도 4 및 도 5는 본 발명에서 제안한 하이브리드 환경에서 실제 xlet 애플리케이션을 수행한 결과를 나타내는 도면이다. 도 4는 수행시간을 나타내는 그래프로서 단위는 ㎳이고, 도 5는 JITC만을 사용한 것을 100%로 두었을 때의 성능 비율을 나타낸 그래프이다. 도 4 및 도 5에서, 짙은 흑색 부분은 JITC만을 사용한 경우를, 옅은 회색 부분은 JITC와 AOTC(bytecode-to-C AOTC)를 함께 사용한 경우를 각각 나타낸다. 도 4 및 도 5로부터, 모든 애플리케이션에서 성능 향상을 확인할 수 있었으며, 성능 향상 비율은 평균 20% 정도였다. 이와 같은 결과로부터, bytecode-to-C AOTC를 적용하여 생긴 메소드 호출 오버헤드를 넘어서 AOTC의 최적화가 충분히 효과를 발휘한 것으로 판단해 볼 수 있다.
4 and 5 are diagrams showing the result of performing the actual xlet application in the hybrid environment proposed in the present invention. Figure 4 is a graph showing the execution time, the unit is ,, Figure 5 is a graph showing the performance ratio when using the JITC only 100%. In FIG. 4 and FIG. 5, the dark black part shows the case where JITC is used only, and the light gray part shows the case where JITC and AOTC (bytecode-to-C AOTC) are used together. 4 and 5, it can be seen that the performance improvement in all applications, the average rate of improvement was about 20%. From these results, it can be judged that the optimization of AOTC was sufficiently effective beyond the method call overhead caused by applying bytecode-to-C AOTC.

이상 설명한 본 발명은 본 발명이 속한 기술분야에서 통상의 지식을 가진 자에 의하여 다양한 변형이나 응용이 가능하며, 본 발명에 따른 기술적 사상의 범위는 아래의 특허청구범위에 의하여 정해져야 할 것이다.The present invention described above may be variously modified or applied by those skilled in the art, and the scope of the technical idea according to the present invention should be defined by the following claims.

100: 시스템 및 미들웨어 메소드 관리 모듈
200: xlet 애플리케이션 수신 모듈
300: xlet 애플리케이션 컴파일 모듈
400: 자바 애플리케이션 수행 모듈
500: 오브젝트 캐러셀 파일 관리 모듈
100: System and middleware method management module
200: xlet application receiving module
300: xlet application compilation module
400: Java application execution module
500: Object Carousel File Management Module

Claims (3)

디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템으로서,

(1) 시스템 및 미들웨어 메소드에 대하여, 서버 측에서 AOTC(Ahead-Of-Time Compile) 방식을 이용하여 미리 컴파일되어 설치된 머신코드를 관리하는 시스템 및 미들웨어 메소드 관리 모듈;
(2) 방송국으로부터 xlet 애플리케이션을 수신하는 xlet 애플리케이션 수신 모듈;
(3) 상기 xlet 애플리케이션 수신 모듈을 통해 수신된 xlet 애플리케이션에 대하여, 미리 지정된 조건을 만족할 경우 JITC(Just-In-Time Compile) 방식을 이용하여 수행 중 컴파일하는 xlet 애플리케이션 컴파일 모듈; 및
(4) 상기 시스템 및 미들웨어 메소드 관리 모듈에 의해 관리되는 시스템 및 미들웨어 메소드에 대한 머신코드와, 상기 xlet 애플리케이션 컴파일 모듈에 의해 컴파일되는 xlet 애플리케이션에 대한 머신코드를 이용하여, 자바 애플리케이션을 수행하는 자바 애플리케이션 수행 모듈

을 포함하는 것을 특징으로 하는 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템.
Hybrid Java compilation system for digital TV software platform,

(1) a system and middleware method management module that manages machine code precompiled and installed on the server side using an Ahead-Of-Time Compile (AOTC) method for the system and middleware methods;
(2) an xlet application receiving module for receiving an xlet application from a broadcast station;
(3) an xlet application compilation module that compiles an xlet application received through the xlet application receiving module during execution using a Just-In-Time Compile (JITC) scheme when a predetermined condition is satisfied; And
(4) a Java application that executes a Java application using machine code for a system and middleware method managed by the system and middleware method management module and machine code for an xlet application compiled by the xlet application compilation module. Perform module

Hybrid Java compilation system for a digital TV software platform comprising a.
제1항에 있어서, 상기 xlet 애플리케이션 컴파일 모듈에서,
미리 지정된 조건을 만족하는 경우는, 상기 수신된 xlet 애플리케이션에 대하여 메소드의 호출 횟수를 카운트하여, 카운트 된 호출 횟수가 미리 결정된 임계값을 초과할 경우인 것을 특징으로 하는 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템.
The module of claim 1, wherein in the xlet application compilation module:
The hybrid Java for the digital TV software platform is characterized in that, when a predetermined condition is satisfied, the number of times of the method call is counted for the received xlet application, and the counted number of calls exceeds a predetermined threshold. Compilation system.
제1항에 있어서,
서버 측에서 AOTC 방식 중, 바이트코드를 C 코드로 변환하여 C 컴파일러를 활용하는 Bytecode-to-C AOTC 방식을 이용하는 것을 특징으로 하는 디지털 TV 소프트웨어 플랫폼을 위한 하이브리드 자바 컴파일 시스템.
The method of claim 1,
Hybrid Java compilation system for the digital TV software platform, characterized in that using the Bytecode-to-C AOTC method that converts bytecode to C code in the server side to utilize the C compiler.
KR1020100002026A 2010-01-08 2010-01-08 Hybrid Java Compilation System for Digital TV Software Platforms KR101088517B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100002026A KR101088517B1 (en) 2010-01-08 2010-01-08 Hybrid Java Compilation System for Digital TV Software Platforms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100002026A KR101088517B1 (en) 2010-01-08 2010-01-08 Hybrid Java Compilation System for Digital TV Software Platforms

Publications (2)

Publication Number Publication Date
KR20110081723A true KR20110081723A (en) 2011-07-14
KR101088517B1 KR101088517B1 (en) 2011-11-30

Family

ID=44920171

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100002026A KR101088517B1 (en) 2010-01-08 2010-01-08 Hybrid Java Compilation System for Digital TV Software Platforms

Country Status (1)

Country Link
KR (1) KR101088517B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100503077B1 (en) 2002-12-02 2005-07-21 삼성전자주식회사 A java execution device and a java execution method
KR100725386B1 (en) 2004-09-25 2007-06-07 삼성전자주식회사 Method for executing virtual machine application, and the digital broadcast receiver thereof

Also Published As

Publication number Publication date
KR101088517B1 (en) 2011-11-30

Similar Documents

Publication Publication Date Title
US7222336B2 (en) Method of compiling bytecode to native code
KR100422103B1 (en) Apparatus and method for preprocessing computer programs prior to transmission across a network
US7996826B2 (en) Method of executing virtual machine application program and digital broadcast receiver using the same
US7603719B2 (en) Resource access control
US6980979B2 (en) Method and apparatus for customizing Java API implementations
KR100503077B1 (en) A java execution device and a java execution method
CN102355603B (en) Middleware system based on wired digital television set top box middleware
US20020007357A1 (en) Method and apparatus for providing plug-in media decoders
CN1723696A (en) Interactive television system with partial character set generator
US20090070814A1 (en) Method and system for providing application service
US8615743B2 (en) Adaptive compiled code
US8230407B2 (en) Apparatus and method for accelerating Java translation
US6360195B1 (en) Television or radio control system development
KR101088517B1 (en) Hybrid Java Compilation System for Digital TV Software Platforms
AU742956B2 (en) Television or radio control system development
US7555746B2 (en) System and method for registering native libraries with non-native enterprise program code
CN113010178B (en) Application program operation control method, device, equipment and medium
US7685565B1 (en) Run time reconfiguration of computer instructions
CN105955786B (en) A kind of implementation method of the point of sales terminal based on HTML5
US6721949B1 (en) Kernel abstraction layer for digital television set-top box firmware
JP2007528048A (en) Software application execution method
CN113825008B (en) Active page display method and device
FI110973B (en) Procedure for transmitting applications in a digital broadcast network
KR20060019083A (en) Method and system for upgrading digital broadcast receiver
CN113296753A (en) Information acquisition method and system for compiling and executing encrypted script by remote instant memory

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20141103

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20151102

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20171101

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20191028

Year of fee payment: 9