KR20060098639A - Method for garbage collection having individual period for each application program and terminal thereof - Google Patents
Method for garbage collection having individual period for each application program and terminal thereof Download PDFInfo
- Publication number
- KR20060098639A KR20060098639A KR1020050017862A KR20050017862A KR20060098639A KR 20060098639 A KR20060098639 A KR 20060098639A KR 1020050017862 A KR1020050017862 A KR 1020050017862A KR 20050017862 A KR20050017862 A KR 20050017862A KR 20060098639 A KR20060098639 A KR 20060098639A
- Authority
- KR
- South Korea
- Prior art keywords
- garbage collection
- count
- collection period
- application program
- cycle
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0253—Garbage collection, i.e. reclamation of unreferenced memory
Abstract
본 발명은 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법 및 이를 위한 단말기에 관한 것으로, 특히 응용프로그램 실행을 위한 초기화시 이동통신단말기의 플래시메모리에 상기 응용프로그램을 위한 가비지컬렉션주기를 저장하고 파일시스템매니저가 주기적인 전역 가비지 컬렉션 수행시 상기 플래시메모리에 저장된 주기에 의하여 가비지 컬렉션 수행 여부를 결정하도록 하여 불필요한 가비지 컬렉션 시간을 줄이는 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법 및 이를 위한 단말기에 관한 것이다.The present invention relates to a garbage collection method having an individual cycle according to an application program and a terminal therefor. In particular, the present invention relates to a garbage collection cycle for storing an application program in a flash memory of a mobile communication terminal upon initialization for execution of an application program. The present invention relates to a garbage collection method having a separate cycle according to an application program which reduces unnecessary garbage collection time by allowing a manager to determine whether to perform garbage collection based on a cycle stored in the flash memory when performing periodic global garbage collection.
이를 위해 본 발명은 각 응용 프로그램에 따라 개별적으로 설정된 제1 가비지 컬렉션 주기를 저장하는 제1 단계; 상기 응용 프로그램에 상관없이 전역적으로 설정된 가비지 컬렉션 주기가 도래하면 상기 저장된 각각의 제1 가비지 컬렉션 주기를 읽어들이는 제2 단계; 상기 제1 가비지 컬렉션 주기와 상기 전역 가비지 컬렉션 주기에 의하여 각 응용 프로그램 별로 가비지 컬렉션의 실행여부를 판단하는 제3 단계;를 포함하는 것을 특징으로 하는 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법을 제공한다.To this end, the present invention includes a first step of storing a first garbage collection period set individually according to each application program; A second step of reading each stored first garbage collection period when a globally set garbage collection period arrives regardless of the application program; And a third step of determining whether to execute garbage collection for each application based on the first garbage collection cycle and the global garbage collection cycle. The garbage collection method having a separate cycle according to the application program comprises a; do.
가비지 컬렉션, 플래쉬 메모리 Garbage Collection, Flash Memory
Description
도 1은 종래의 가비지 컬렉션 방법의 순서도이다.1 is a flowchart of a conventional garbage collection method.
도 2는 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법의 순서도이다.2 is a flowchart of a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 3은 본 발명의 일 실시예에 따른 가비지컬렉션주기를 레지스터값에 의해 조절하는 방법의 순서도이다.3 is a flowchart illustrating a method of adjusting a garbage collection period by a register value according to an embodiment of the present invention.
도 4는 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법의 순서도이다.4 is a flowchart of a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 5는 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법의 흐름도이다.5 is a flowchart of a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 6은 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법을 위한 이동통신단말기의 블록도이다.6 is a block diagram of a mobile communication terminal for a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 7은 본 발명의 일 실시예에 따른 이동통신단말기의 데이터 흐름에 따른 개략적인 구성도이다.7 is a schematic configuration diagram according to a data flow of a mobile communication terminal according to an embodiment of the present invention.
<도면 주요 부분에 대한 설명><Description of main parts of drawing>
100: 이동통신단말기 103: 입력부100: mobile communication terminal 103: input unit
106: 표시부 109: 메모리106: display unit 109: memory
110: 일반메모리 111: 플래쉬 메모리110: general memory 111: flash memory
112: 무선통신부 115: 제어부112: wireless communication unit 115: control unit
116: 이동통신처리부 117: 응용프로그램처리부116: mobile communication processing unit 117: application program processing unit
118: 파일시스템매니저부118: file system manager
본 발명은 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법 및 이를 위한 단말기에 관한 것으로, 특히 응용 프로그램 실행을 위한 초기화시 이동통신단말기의 플래시 메모리에 상기 응용 프로그램을 위한 가비지 컬렉션 주기를 저장하고 파일 시스템 매니저가 주기적인 전역 가비지 컬렉션 수행시 상기 플래시 메모리에 저장된 주기에 의하여 가비지 컬렉션 수행 여부를 결정하도록 하여 불필요한 가비지 컬렉션 시간을 줄이는 것을 특징으로 하는 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법 및 이를 위한 단말기에 관한 것이다.The present invention relates to a garbage collection method having an individual cycle according to an application program and a terminal therefor. In particular, the present invention relates to a garbage collection cycle for the application program in a flash memory of a mobile communication terminal during initialization for executing an application program. Garbage collection method having an individual cycle according to an application, characterized by reducing the unnecessary garbage collection time by allowing a manager to determine whether to perform garbage collection according to the cycle stored in the flash memory when performing periodic global garbage collection, and a terminal therefor It is about.
동적 메모리 시스템에서는 응용 프로그램이 운영체계에 필요한 메모리 영역을 요구하여 사용할 수 있다. 그러나 상기 응용 프로그램이 할당된 메모리 영역의 사용을 종료한 후에도 상기 메모리 영역을 반환하지 않는다면 상기 메모리 영역은 실제로 사용되지도 않으면서 다른 응용 프로그램도 사용할 수 없는 상태가 된다. 이러한 메모리 영역을 가비지(garbage)라고 하는데, 많은 프로그램들이 복잡하게 실행되다 보면 이러한 가비지가 쌓여서 프로그램들이 이용할 수 있는 메모리 영역이 부족하게 된다. 이를 해결하기 위해서 응용 프로그램에서 명시적으로 사용이 종료된 메모리 영역을 반납하도록 하면 되지만, 이는 프로그래머 입장에서 상당한 부담이 되는 일이다. 따라서 이러한 작업을 시스템에서 주는 것이 가비지 컬렉션(garbage collection)이다.In a dynamic memory system, an application program can request and use a memory area required by the operating system. However, if the memory area is not returned even after the application program terminates the use of the allocated memory area, the memory area is not actually used and other applications cannot be used. Such a memory area is called garbage, and when many programs are executed in a complicated manner, such garbage accumulates and there is a shortage of memory area available to programs. To solve this problem, the application program should return the memory area that has been explicitly used, but this is a significant burden for the programmer. Therefore, it is garbage collection that gives this task to the system.
이러한 가비지 컬렉션은 대개 리스프(LISP)나 프롤로그(PROLOG) 등 인터프리터로 수행되는 리스트 처리용 시스템에서 주로 사용되며, 최근 그 사용이 폭발적으로 늘어나고 있는 자바 시스템에서도 많이 사용되고 있다.These garbage collections are mostly used in list processing systems that are performed by interpreters such as LISP and PROLOG, and they are also used in Java systems, which are exploding in recent years.
종래의 가비지 컬렉션 방법의 경우, 파일 시스템에서 사용하는 파일 매니저인 파일 시스템 매니저에서 현재 실행되고 있는 응용 프로그램의 종류와 상관없이 전역으로 설정되어 있는 가비지 컬렉션 주기값인 전역 가비지 컬렉션 주기에 의해서 주기적으로 메모리에 가비지 컬렉션을 실행한다. 예를 들어, 전역 가비지 컬렉션 주기가 30초로 설정되어 있는 경우, 파일 시스템 매니저는 현재 실행되고 있는 응용 프로그램의 종류와 무관하게 매 30초마다 주기적으로 메모리에 가비지 컬렉션을 수행한다.In the conventional garbage collection method, the memory is periodically set by the global garbage collection cycle, which is a garbage collection cycle value that is set globally regardless of the type of application currently running in the file system manager, which is a file manager used by the file system. Run garbage collection on. For example, if the global garbage collection cycle is set to 30 seconds, the file system manager periodically garbage collects in memory every 30 seconds, regardless of the type of application currently running.
도 1은 종래의 가비지 컬렉션 방법의 순서도이다.1 is a flowchart of a conventional garbage collection method.
도 1을 참조하여 설명하면, 파일 시스템 매니저는 미리 설정된 전역 가비지 컬렉션 주기가 도래했는지 여부를 판단한다(S100).Referring to FIG. 1, the file system manager determines whether a preset global garbage collection period has arrived (S100).
상기 S100 판단결과 미리 설정된 전역 가비지 컬렉션 주기가 도래한 경우, 플래쉬 메모리(flash memory, FM)에 가비지 컬렉션을 수행하고 절차를 종료한다(S102).As a result of the determination of S100, when a preset global garbage collection cycle arrives, garbage collection is performed in a flash memory (FM) and the procedure is terminated (S102).
한편, 상기 S100 판단결과 미리 설정된 전역 가비지 컬렉션 주기가 도래하지 않은 경우, 상술한 S100단계로 되돌아 간다.On the other hand, if the predetermined global garbage collection period has not arrived as a result of the determination of S100, the process returns to the above-described step S100.
그러나, 종래의 가비지 컬렉션 방법과 같이 가비지 컬렉션을 주기적으로 실행하는 경우, 이로 인해 파일 시스템에서 시도하는 일부작업의 속도가 느려지는 현상이 발생한다. 예를 들어 자바에서 게임 프로그램을 실행하는 경우, 게임을 진행하는 중에 가비지 컬렉션이 주기적으로 실행될때 마다 게임이 잠시 멈추는 현상이 발생하는 것을 관찰할 수 있다. However, when garbage collection is periodically executed as in the conventional garbage collection method, this causes a phenomenon that some operations attempted by the file system are slowed down. For example, if you run a game program in Java, you can see that the game freezes every time garbage collection is executed periodically during the game.
특히, 자바게임과 같이 파일 시스템에서 주로 데이터를 읽어오는 프로그램의 경우 가비지 컬렉션을 자주 수행할 필요가 없다. 그렇다고, 상기 문제점을 해결하기 위해서 주기적 가비지 컬렉션 수행 자체를 포기할 수는 없다. 주기적 가비지 컬렉션은 파일 시스템의 동작을 좀 더 자동화하고 정확하게 하기 위해서 필요하기 때문이다.In particular, programs that read mainly data from the file system, such as Java games, do not need frequent garbage collection. However, in order to solve the above problem, periodic garbage collection execution cannot be abandoned. This is because periodic garbage collection is necessary to make the file system's behavior more automated and accurate.
본 발명의 목적은, 상기 문제점을 해결하기 위해 안출된 것으로, 각 응용 프로그램에 따라 가비지 컬렉션 수행 주기를 달리하여 필요없는 가비지 컬렉션 수행으로 인한 성능저하를 방지할 수 있는 방법을 제공함에 있다.Disclosure of Invention An object of the present invention is to provide a method of preventing performance degradation due to unnecessary garbage collection by varying the cycle of performing garbage collection according to each application program.
본 발명의 다른 목적은, 각 응용 프로그램에 따른 가비지 컬렉션 수행 주기를 플래시 메모리에 저장하여 파일 시스템 매니저 자체가 상기 가비지 컬렉션 수행 주기를 조절할 필요가 없게 하여 프로그램 알고리즘의 복잡도를 낮출 수 있는 방법을 제공하는데 있다.Another object of the present invention is to provide a method for reducing the complexity of a program algorithm by storing garbage collection execution cycles according to each application program in flash memory so that the file system manager does not need to adjust the garbage collection execution cycle. have.
상기 목적을 달성하기 위한 본 발명의 일측면에 의하면, 각 응용 프로그램에 따라 개별적으로 설정된 제1 가비지 컬렉션 주기를 저장하는 제1 단계; 상기 응용 프로그램에 상관없이 전역적으로 설정된 가비지 컬렉션 주기가 도래하면 상기 저장된 각각의 제1 가비지 컬렉션 주기를 읽어들이는 제2 단계; 상기 제1 가비지 컬렉션 주기와 상기 전역 가비지 컬렉션 주기에 의하여 각 응용 프로그램 별로 가비지 컬렉션의 실행여부를 판단하는 제3 단계;를 포함하는 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법인 것을 특징으로 한다.According to an aspect of the present invention for achieving the above object, a first step of storing a first garbage collection period set individually according to each application program; A second step of reading each stored first garbage collection period when a globally set garbage collection period arrives regardless of the application program; And a third step of determining whether to execute garbage collection for each application program based on the first garbage collection cycle and the global garbage collection cycle. The method may include a garbage collection method having individual cycles according to an application program.
상기 목적을 달성하지 위한 본 발명의 다른 측면에 의하면, 응용 프로그램, 프로그램 파일의 물리적 배치와 그들에 대한 접근을 제어하는 파일 시스템 매니저 프로그램 및 가비지 컬렉션의 수행시기에 관한 가비지 컬렉션 주기를 저장하는 메모리; 상기 각 응용 프로그램에 따라 개별적으로 설정된 제1 가비지 컬렉션 주기를 저장하고 상기 응용 프로그램에 상관없이 전역적으로 설정된 가비지 컬렉션 주기가 도래하면 상기 저장된 각각의 제1 가비지 컬렉션 주기를 읽어들이며 상기 제1 가비지 컬렉션 주기와 상기 전역 가비지 컬렉션 주기에 의하여 각 응용 프로그램 별로 가비지 컬렉션의 실행여부를 판단하도록 제어하는 제어부;를 포함하는 단말기인 것을 특징으로 한다.According to another aspect of the present invention for achieving the above object, a memory for storing a garbage collection cycle for the execution time of the garbage collection and the file system manager program for controlling the physical arrangement of the application files and access to them; Store the first garbage collection period set individually according to the respective applications, and when the globally set garbage collection period arrives regardless of the application, the stored first garbage collection period is read and the first garbage collection period is read. And a controller configured to determine whether to execute garbage collection for each application program based on a cycle and the global garbage collection cycle.
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명한 다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 2는 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법의 순서도이다.2 is a flowchart of a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 2를 참조하여 설명하면, 파일 시스템 매니저(file system manager, FSM)는 자바 응용 프로그램(application program, APP)을 실행하기 위한 초기화시에 상기 응용 프로그램에서 생성된 가비지 컬렉션(garbage collection, GC) 모드설정명령을 수신받은 후, 상기 모드에 대응하는 가비지 컬렉션 주기를 플래쉬 메모리(flash memory, FM)의 레지스터에 저장시킨다(S200). 상기 가비지 컬렉션 주기는 상기 가비지 컬렉션 모드설정명령에 포함되어 있는 것이거나 상기 파일 시스템 매니저가 가지고 있는 상기 가비지 컬렉션 모드설정명령에 대응하는 가비지 컬렉션 주기일 수 있다.Referring to FIG. 2, a file system manager (FSM) is a garbage collection (GC) mode generated by the application at the time of initialization for executing a Java application (APP). After receiving the setting command, the garbage collection period corresponding to the mode is stored in a register of a flash memory (FM) (S200). The garbage collection period may be included in the garbage collection mode setting command or may be a garbage collection period corresponding to the garbage collection mode setting command of the file system manager.
그 후, 파일 시스템 매니저는 미리 설정된 전역 가비지 컬렉션 주기가 도달했는지 여부를 판단한다(S202). 상기 전역 가비지 컬렉션 주기는 상기 자바 응용 프로그램과는 상관없이 주기적으로 가비지 컬렉션을 수행하는 주기를 정하는 값이다.Thereafter, the file system manager determines whether a preset global garbage collection cycle has been reached (S202). The global garbage collection period is a value that defines a period in which garbage collection is performed periodically regardless of the Java application.
상기 S202 판단결과, 미리 설정된 전역 가비지 컬렉션 주기가 도달한 경우, 상기 플래시 메모리의 레지스터에 저장된 상기 모드에 대응하는 가비지 컬렉션 주기, 즉 레지스터값을 읽어들인다(S204).As a result of the determination in step S202, when a preset global garbage collection period has been reached, a garbage collection period corresponding to the mode stored in the register of the flash memory, that is, a register value, is read (S204).
그 후, 가비지 컬렉션 주기를 상기 플래쉬 메모리의 레지스터값에 의해 조절하고 절차를 종료한다(S206).Thereafter, the garbage collection period is adjusted by the register value of the flash memory and the procedure ends (S206).
한편, 상기 S202 단계 판단결과 상기 전역 가비지 컬렉션 주기가 도달하지 않은 경우, 상기 S202 단계로 되돌아 간다.On the other hand, if the global garbage collection period has not reached as a result of the determination in step S202, the process returns to step S202.
도 3은 본 발명의 일 실시예에 따른 가비지 컬렉션 주기를 레지스터값에 의해 조절하는 방법의 순서도이다.3 is a flowchart of a method of adjusting a garbage collection period by a register value according to an embodiment of the present invention.
먼저, 레지스터값과 전역 가비지 컬렉션 주기를 비교하여 가비지 컬렉션을 수행할지 여부를 판단하는데 사용되는 카운값인 CNT는 1로 설정되어 있다.First, CNT, which is a count value used to determine whether to perform garbage collection by comparing a register value with a global garbage collection period, is set to 1.
도 3을 참조하여 설명하면, 파일 시스템 매니저는 플래쉬 메모리의 레지스터값을 전역 가비지 컬렉션 주기로 나눈 값을 최대 카운트, 즉 MAX_CNT로 설정한다(S300).Referring to FIG. 3, the file system manager sets a value obtained by dividing a register value of a flash memory by a global garbage collection period to a maximum count, that is, MAX_CNT (S300).
그 후, 레지스터값과 전역 가비지 컬렉션 주기를 비교하여 가비지 컬렉션을 수행할지 여부를 판단하는데 사용되는 카운값인 CNT가 상기 MAX_CNT보다 크거나 같은지 여부를 판단한다(S302).Thereafter, it is determined whether the CNT, which is a count value used to determine whether to perform garbage collection by comparing the register value and the global garbage collection period, is greater than or equal to the MAX_CNT (S302).
상기 S302 판단결과, CNT가 상기 MAX_CNT보다 크거나 같은 경우, CNT를 1로 초기화시키고(S304), 플래쉬 메모리에 가비지 컬렉션을 수행한다(S306).As a result of the determination of S302, when the CNT is greater than or equal to the MAX_CNT, the CNT is initialized to 1 (S304), and garbage collection is performed in the flash memory (S306).
한편 상기 S302 판단결과, CNT가 상기 MAX_CNT보다 작은 경우, 상기 CNT에 1을 더한 값을 CNT로 설정하고 절차를 종료한다(S303).On the other hand, if the CNT is smaller than the MAX_CNT as a result of the determination of S302, the value obtained by adding 1 to the CNT is set to CNT and the procedure ends (S303).
도 4는 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법의 순서도이다.4 is a flowchart of a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 4를 참조하여 설명하면, 파일 시스템 매니저(file system manager, FSM)는 자바 응용 프로그램(application program, APP)을 실행하기 위한 초기화시에 상 기 응용 프로그램에서 생성된 가비지 컬렉션(garbage collection, GC) 모드설정명령을 수신받은 후, 상기 모드에 대응하는 가비지 컬렉션 주기를 플래쉬 메모리(flash memory, FM)의 레지스터에 저장시킨다(S400). 상기 가비지 컬렉션 주기는 상기 가비지 컬렉션 모드설정명령에 포함되어 있는 것이거나 상기 파일 시스템 매니저가 가지고 있는 상기 가비지 컬렉션 모드설정명령에 대응하는 가비지 컬렉션 주기일 수 있다.Referring to FIG. 4, the file system manager (FSM) is a garbage collection (GC) generated by the application at the time of initialization for executing a Java application (application program, APP). After receiving the mode setting command, the garbage collection cycle corresponding to the mode is stored in a register of a flash memory (FM) (S400). The garbage collection period may be included in the garbage collection mode setting command or may be a garbage collection period corresponding to the garbage collection mode setting command of the file system manager.
그 후, 레지스터값과 전역 가비지 컬렉션 주기를 비교하여 가비지 컬렉션을 수행할지 여부를 판단하는데 사용되는 카운값인 CNT를 1로 설정한다(S402).Thereafter, the CNT, which is a count value used to determine whether to perform garbage collection by comparing the register value and the global garbage collection period, is set to 1 (S402).
그 후, 파일 시스템 매니저는 미리 설정된 전역 가비지 컬렉션 주기가 도달했는지 여부를 판단한다(S404). 상기 전역 가비지 컬렉션 주기는 상기 자바 응용 프로그램과는 상관없이 주기적으로 가비지 컬렉션을 수행하는 주기를 정하는 값이다.Thereafter, the file system manager determines whether a preset global garbage collection cycle has been reached (S404). The global garbage collection period is a value that defines a period in which garbage collection is performed periodically regardless of the Java application.
상기 S404 판단결과, 미리 설정된 전역 가비지 컬렉션 주기가 도달한 경우, 상기 플래시 메모리의 레지스터에 저장된 상기 모드에 대응하는 가비지 컬렉션 주기, 즉 레지스터값을 읽어들인다(S406).As a result of the determination of S404, when a preset global garbage collection period has been reached, a garbage collection period corresponding to the mode stored in the register of the flash memory, that is, a register value, is read (S406).
그 후, 파일 시스템 매니저는 플래쉬 메모리의 레지스터값을 전역 가비지 컬렉션 주기로 나눈 값을 최대 카운트, 즉 MAX_CNT로 설정한다(S408).Thereafter, the file system manager sets the value obtained by dividing the register value of the flash memory by the global garbage collection period to the maximum count, that is, MAX_CNT (S408).
그 후, 상기 CNT가 상기 MAX_CNT보다 크거나 같은지 여부를 판단한다(S410).Thereafter, it is determined whether the CNT is greater than or equal to the MAX_CNT (S410).
상기 S410 판단결과, 상기 CNT가 상기 MAX_CNT보다 크거나 같은 경우, 상기 CNT를 1로 초기화시키고(S412), 플래쉬 메모리에 가비지 컬렉션을 수행한다(S414).As a result of the determination in S410, when the CNT is greater than or equal to the MAX_CNT, the CNT is initialized to 1 (S412), and garbage collection is performed in the flash memory (S414).
한편 상기 S410 판단결과, 상기 CNT가 상기 MAX_CNT보다 작은 경우, 상기 CNT에 1을 더한 값을 CNT로 설정하고 S404단계로 이동한다(S411).On the other hand, if the CNT is smaller than the MAX_CNT as a result of the determination, the value of 1 plus the CNT is set to CNT and the process moves to step S404 (S411).
한편, 상기 S404 단계 판단결과 상기 전역 가비지 컬렉션 주기가 도달하지 않은 경우, 상기 S404 단계로 이동한다.On the other hand, if the global garbage collection period has not reached as a result of the determination of step S404, the flow moves to step S404.
도 5는 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법의 흐름도이다.5 is a flowchart of a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 5를 참조하여 설명하면, 자바 응용 프로그램 모듈은 프로그램 실행을 위한 초기화시에 가비지 컬렉션 주기와 관련된 가비지 컬렉션 모드설정명령을 파일 시스템 매니저에 전달한다(1-1). 상기 가비지 컬렉션 모드설정명령을 받은 파일 시스템 매니저는 상기 가비지 컬렉션 모드설정명령에서 지시하는 모드에 대응하는 값을 플래쉬 메모리의 레지스터에 저장시킨다(1-2).Referring to FIG. 5, the Java application module delivers a garbage collection mode setting command related to a garbage collection cycle to the file system manager upon initialization for program execution (1-1). The file system manager receiving the garbage collection mode setting command stores a value corresponding to the mode indicated by the garbage collection mode setting command in a register of the flash memory (1-2).
그 후, 파일 시스템 매니저는 미리 설정된 전역 가비지 컬렉션 주기에 도달한 경우, 상기 플래쉬 메모리의 레지스터값을 읽어들인다(2-1, 2-2).Thereafter, when the file system manager reaches a preset global garbage collection period, the file system manager reads register values of the flash memory (2-1 and 2-2).
그 후, 상기 전역 가비지 컬렉션 주기와 상기 레지스터값을 이용해 상기 자바 응용 프로그램을 위한 가비지 컬렉션의 수행주기를 정하고 해당 주기마다 가비지 컬렉션을 수행한다(3). 이의 구현을 위해서 여러가지 방법이 채용될 수 있으며, 도 3에 도시된 바와 같이 카운터를 이용하는 방법을 사용할 수 있다.Thereafter, the garbage collection period for the Java application program is determined using the global garbage collection period and the register value, and garbage collection is performed every corresponding period (3). Various methods may be employed for the implementation thereof, and a method using a counter as shown in FIG. 3 may be used.
응용 프로그램 모듈이 프로그램 초기화시에 미리 플래쉬 메모리의 레지스터에 자신이 원하는 가비지 컬렉션 주기를 저장해 놓고, 그 후 파일매니저시스템은 상기 레지스터에 저장된 값을 이용하여 가비지 컬렉션 수행여부를 결정하고 별도로 응용 프로그램 모듈과의 알고리즘을 추가할 필요가 없기 때문에 응용 프로그램 실행시 그 성능이 향상될 뿐만 아니라 프로그램 개발절차를 단순화시킬 수 있는 장점이 있다.When an application module initializes a program, it stores the desired garbage collection cycle in a register of flash memory in advance. Then, the file manager system determines whether to perform garbage collection using the value stored in the register. Since there is no need to add a new algorithm, the performance of the application can be improved and the program development process can be simplified.
도 6은 본 발명의 일 실시예에 따른 응용 프로그램에 따라 개별적인 주기를 갖는 가비지 컬렉션 방법을 위한 이동통신단말기의 블록도이다.6 is a block diagram of a mobile communication terminal for a garbage collection method having individual periods according to an application program according to an embodiment of the present invention.
도 6을 참조하여 설명하면, 본 발명의 일 실시예에 따른 이동통신단말기(100)는 입력부(103), 표시부(106), 메모리(109), 무선통신부(112), 및 제어부(115)를 포함한다.Referring to FIG. 6, the
상기 입력부(103)는 다수의 숫자 키와 메뉴 키 및 각종 기능을 수행하기 위한 기능 키로 이루어지며, 사용자가 입력하는 키에 대응하는 키입력 신호를 발생시켜 제어부(115)로 키입력 정보를 출력한다. 특히, 자바 응용 프로그램의 실행에 있어 필요한 사용자의 키입력을 입력받아 제어부(115)로 출력한다.The
상기 표시부(106)는 액정표시장치(LCD) 등과 같은 표시장치로서, 제어부(115)의 제어를 받아 상기 이동통신단말기(100)의 상태나 상기 응용 프로그램의 진행 상황을 표시한다.The
상기 메모리(109)는 제어부(115)의 제어시에 필요한 동작 프로그램, 시스템 프로그램이 저장되고, 특히 상기 응용 프로그램, 상기 파일 시스템 매니저에 관한 프로그램 및 가비지 컬렉션 주기가 저장된다.The
상기 무선통신부(112)는 제어부(115)의 제어를 받으며, 상대 통화자와의 전화통화를 위해 음성신호를 송, 수신하고, 프로그램을 무선인터넷망을 통해 수신하 는 역할을 수행한다.The
상기 제어부(115)는 이동통신단말기(100)의 전반적인 동작을 제어함과 동시에 상기 응용 프로그램을 상기 메모리(109)에 로드하고 상기 응용 프로그램이 요구하는 호(call)을 처리하며, 상기 응용 프로그램에 따른 제1 가비지 컬렉션 주기를 상기 메모리(109)에 저장시키고, 상기 응용 프로그램과 상관없이 적용되는 미리 설정된 전역 가비지 컬렉션 주기가 도래하면 상기 메모리(109)로부터 제1 가비지 컬렉션 주기를 읽어들여, 상기 제1 가비지 컬렉션 주기와 상기 전역 가비지 컬렉션 주기에 의하여 가비지 컬렉션의 실행여부를 판단하도록 제어한다.The
도 7은 본 발명의 일 실시예에 따른 이동통신단말기의 데이터 흐름에 따른 개략적인 구성도이다.7 is a schematic configuration diagram according to a data flow of a mobile communication terminal according to an embodiment of the present invention.
도 7을 참조하여 설명하면, 메모리(109)는 일반메모리(110)와 플래쉬메모리(111)로 구성되고, 제어부(115)는 이동통신 처리부(116), 응용 프로그램 처리부(117) 및 파일 시스템 매니저부(118)로 구성된다.Referring to FIG. 7, the
상기 일반메모리(110)는 SRAM(static random access memory) 및 EEPROM(electrically erasable programmable read-only memory)를 포함하며 플래그(flag)정보, 호 처리 데이터 등이 저장된다.The
상기 플래쉬메모리(111)는 기본적인 실시간 처리 OS(operating system)와 이동통신단말기의 호 처리 소프트웨어 등이 저장되어 있다.The
상기 이동통신 처리부(116)는 이동통신단말기에서 무선자원을 활용하여 이동통신서비스를 수행하기 위한 모듈로서 공지의 이동통신기술을 사용하여 구성되어 동작함에 따라 여기에서는 상세한 설명을 생략하기로 한다.The mobile
상기 응용 프로그램 처리부(117)는 상기 응용 프로그램을 상기 메모리(106)에 로드하고 처리하며 상기 파일 시스템 매니저부(118)에 가비지 컬렉션의 주기를 설정하기 위한 모드설정명령을 전달한다.The application
상기 파일 시스템 매니저부(118)는 상기 응용 프로그램 처리부(117)로부터 가비지 컬렉션의 주기를 설정하기 위한 모드설정명령을 수신받아 해당 모드설정명령에 대한 제1 가비지 컬렉션 주기를 상기 메모리(109)에 저장시키고, 상기 응용 프로그램과 상관없이 적용되는 미리 설정된 전역 가비지 컬렉션 주기가 도래하면 상기 메모리(109)로부터 제1 가비지 컬렉션 주기를 읽어들여, 상기 제1 가비지 컬렉션 주기와 상기 전역 가비지 컬렉션 주기에 의하여 가비지 컬렉션의 실행여부를 판단하도록 제어한다.The
즉, 상기 파일 시스템 매니저부(118)는 상기 전역 가비지 컬렉션 주기를 상기 제1 가비지 컬렉션 주기로 나눈 값을 가비지 컬렉션의 실행여부를 판단하기 위한 최대카운트로 설정하고, 상기 최대카운트보다 미리 설정된 카운트가 크거나 같은지 여부를 판단하여 상기 판단결과 상기 최대카운트보다 상기 카운트가 크거나 같은 경우, 상기 카운트를 초기화하고 상기 메모리(109)에 가비지 컬렉션을 수행하며, 상기 판단결과 상기 최대카운트보다 상기 카운트가 작은 경우 카운트에 1을 더한 값을 카운트로 설정하도록 제어한다.That is, the
이상의 본 발명은 상기에 기술된 실시예들에 의해 한정되지 않고, 당업자들에 의해 다양한 변형 및 변경들을 가져올 수 있으며, 이는 첨부된 청구항에서 정의 된 본 발명의 취지와 범위에 포함된다.The present invention is not limited to the embodiments described above, and various modifications and changes can be made by those skilled in the art, which are included in the spirit and scope of the present invention as defined in the appended claims.
상기와 같은 본 발명에 따르면, 각 응용 프로그램에 따라 가비지 컬렉션 수행 주기를 달리하여 필요없는 가비지 컬렉션 수행으로 인한 성능저하를 방지하는 효과가 있다.According to the present invention as described above, there is an effect of preventing performance degradation due to unnecessary garbage collection by changing the garbage collection execution cycle according to each application.
또한 상기와 같은 본 발명에 따르면, 각 응용 프로그램에 따른 가비지 컬렉션 수행 주기를 플래시 메모리에 저장하여 파일 시스템 매니저 자체가 상기 가비지 컬렉션 수행 주기를 조절할 필요가 없게 하여 프로그램 알고리즘의 복잡도를 낮추는 효과도 있다.In addition, according to the present invention as described above, the garbage collection execution cycle for each application program is stored in the flash memory, so that the file system manager does not need to adjust the garbage collection execution cycle, thereby reducing the complexity of the program algorithm.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020050017862A KR100671692B1 (en) | 2005-03-03 | 2005-03-03 | Method for garbage collection having individual period for each application program and terminal thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020050017862A KR100671692B1 (en) | 2005-03-03 | 2005-03-03 | Method for garbage collection having individual period for each application program and terminal thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20060098639A true KR20060098639A (en) | 2006-09-19 |
KR100671692B1 KR100671692B1 (en) | 2007-01-19 |
Family
ID=37630028
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020050017862A KR100671692B1 (en) | 2005-03-03 | 2005-03-03 | Method for garbage collection having individual period for each application program and terminal thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100671692B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8051265B2 (en) | 2007-12-11 | 2011-11-01 | Samsung Electronics Co., Ltd. | Apparatus for managing memory in real-time embedded system and method of allocating, deallocating and managing memory in real-time embedded system |
US20210064523A1 (en) * | 2019-08-30 | 2021-03-04 | Micron Technology, Inc. | Adjustable garbage collection suspension interval |
-
2005
- 2005-03-03 KR KR1020050017862A patent/KR100671692B1/en not_active IP Right Cessation
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8051265B2 (en) | 2007-12-11 | 2011-11-01 | Samsung Electronics Co., Ltd. | Apparatus for managing memory in real-time embedded system and method of allocating, deallocating and managing memory in real-time embedded system |
US20210064523A1 (en) * | 2019-08-30 | 2021-03-04 | Micron Technology, Inc. | Adjustable garbage collection suspension interval |
US11580016B2 (en) * | 2019-08-30 | 2023-02-14 | Micron Technology, Inc. | Adjustable garbage collection suspension interval |
Also Published As
Publication number | Publication date |
---|---|
KR100671692B1 (en) | 2007-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2015229885B2 (en) | Resource management based on device-specific or user-specific resource usage profiles | |
US8095930B2 (en) | System and method for priority-based selection of applications for termination | |
JP5049141B2 (en) | Communication terminal and program | |
US7827395B2 (en) | Update-startup apparatus and update-startup control method | |
US20060195847A1 (en) | Task scheduling device, method, program, recording medium, and transmission medium for priority-driven periodic process scheduling | |
WO2015138150A1 (en) | Dynamic resource management for multi-process applications | |
WO2007020735A1 (en) | Conflict solving device | |
US20020083160A1 (en) | Method and apparatus for managing applications and data in a mobile device | |
CN101354629A (en) | Method and apparatus for controlling display of windows | |
US20040015960A1 (en) | Method for loading and executing an application in an embedded environment | |
WO2009087866A1 (en) | Information processing device and program | |
CN102144219B (en) | Information processing device and program | |
KR100671692B1 (en) | Method for garbage collection having individual period for each application program and terminal thereof | |
CN113031996A (en) | OTA (over the air) upgrading method and device of electronic equipment, control terminal and medium | |
JPWO2009028106A1 (en) | Information processing device | |
US20080320490A1 (en) | Method, apparatus and computer program product for providing sub-process resource management | |
KR20090034140A (en) | Mobile phone having multi-port memory and booting control method thereof | |
CN113377396B (en) | Upgrading method and device, electronic equipment and storage medium | |
CN113032290B (en) | Flash memory configuration method, flash memory configuration device, electronic equipment and storage medium | |
KR100662291B1 (en) | Module program realization method in mobile terminal | |
JP3961301B2 (en) | Digital device, task management method and program thereof | |
KR100581402B1 (en) | Method and system for providing virtual machine application program on terminal | |
WO2008054132A1 (en) | Terminal having platform library dynamic linking function and method of controlling the same | |
KR100641573B1 (en) | Method for processing interrupt of external memory in mobile phone and the mobile phone thereof | |
KR100617859B1 (en) | Method for allocation of heap memory in embedded and system thereof |
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 | ||
LAPS | Lapse due to unpaid annual fee |