JP2006126975A - Information terminal equipment and its program - Google Patents

Information terminal equipment and its program Download PDF

Info

Publication number
JP2006126975A
JP2006126975A JP2004311517A JP2004311517A JP2006126975A JP 2006126975 A JP2006126975 A JP 2006126975A JP 2004311517 A JP2004311517 A JP 2004311517A JP 2004311517 A JP2004311517 A JP 2004311517A JP 2006126975 A JP2006126975 A JP 2006126975A
Authority
JP
Japan
Prior art keywords
garbage collection
executed
processing
operation mode
execution
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.)
Granted
Application number
JP2004311517A
Other languages
Japanese (ja)
Other versions
JP3908760B2 (en
Inventor
Masayoshi Arai
雅恵 新井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2004311517A priority Critical patent/JP3908760B2/en
Publication of JP2006126975A publication Critical patent/JP2006126975A/en
Application granted granted Critical
Publication of JP3908760B2 publication Critical patent/JP3908760B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Memory System (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide information terminal equipment for performing garbage collection processing by fixed frequency or more without having any adverse influence on task processing in an original operation mode, and for performing proper memory management while securing the original task processing and its program. <P>SOLUTION: When data writing processing in a storage part 13 is performed, the necessity of garbage collection processing to the storage part 13 is decided, and when the garbage collection processing is necessary, a task which is being performed or a task which is scheduled to be performed is decided. Then, a parameter expressing the performance frequency of the garbage collection processing is set according to the relation of the decided task which is being performed or scheduled to be performed and the priority order of the garbage collection processing, and the garbage collection processing is performed according to the set parameter. Also, even when a residual amount of a battery is decreased, and charging is not operated, the parameter is set so that the execution frequency of the garbage collection processing can be set to be low, and the garbage collection processing is executed. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、携帯電話機やPDA(Personal Digital Assistants)等の携帯通信端末、パーソナル・コンピュータ等の情報端末装置に係わり、特にメモリに対するガーベッジコレクション機能を備えた情報端末装置とそのプログラムに関する。   The present invention relates to a mobile communication terminal such as a mobile phone or PDA (Personal Digital Assistants), and an information terminal device such as a personal computer, and more particularly to an information terminal device having a garbage collection function for a memory and a program thereof.

一般に、携帯電話機やPDA、パーソナル・コンピュータ等のように種々のタスク処理にメモリを使用する情報端末装置では、メモリに対するガーベッジコレクション機能を備えている。ガーベッジコレクション機能は、メモリ内において使用済みとなった記憶領域を多く含むメモリブロックを検索し、この検索されたメモリブロック内の必要データを他のメモリブロックの空き記憶領域にコピーすると共に、使用済みとなった記憶領域の不要データを消去する機能である。この機能を備えることで、容量の限られたメモリを有効に使用してデータの記憶を行うことが可能となる。   In general, an information terminal device that uses a memory for various task processing, such as a mobile phone, a PDA, a personal computer, etc., has a garbage collection function for the memory. The garbage collection function searches memory blocks that contain a lot of used storage areas in memory, copies the necessary data in the searched memory blocks to free storage areas in other memory blocks, and uses them. This is a function for erasing unnecessary data in the storage area. By providing this function, it is possible to store data by effectively using a memory having a limited capacity.

ところで、従来のガーベッジコレクション機能は、例えばJava(登録商標)プログラムの実行過程において、スレッドの処理が中断されるごとにこの中断された期間にガーベッジコレクション処理を実行するものとなっている(例えば、特許文献1を参照。)。
特開2004−234546号公報
By the way, the conventional garbage collection function, for example, executes the garbage collection process during the suspended period every time the thread process is suspended in the execution process of the Java (registered trademark) program (for example, (See Patent Document 1).
JP 2004-234546 A

ところが、このような従来のガーベッジコレクション機能では、CPUにおいてスレッドが実行されている期間にはガーベッジコレクション処理が実行されない。このため、装置本来のタスクが頻繁に実行される装置では、ガーベッジコレクション処理の実行頻度が低下してメモリの未使用領域が枯渇し、その結果タスクの実行に支障が生じるおそれがある。   However, in such a conventional garbage collection function, garbage collection processing is not executed during a period in which a thread is executed in the CPU. For this reason, in an apparatus in which the original task of the apparatus is frequently executed, the frequency of executing the garbage collection process is reduced, and the unused area of the memory is depleted, and as a result, the execution of the task may be hindered.

この発明は上記事情に着目してなされたもので、その目的とするところは、ガーベッジコレクション処理を本来の動作モードにおけるタスク処理に悪影響を及ぼすことなく一定以上の頻度で実行できるようにし、これにより本来のタスク処理を保障しつつ適切なメモリ管理を実現可能とした情報端末装置とそのプログラムを提供することにある。   The present invention has been made paying attention to the above circumstances, and the object of the present invention is to enable the garbage collection processing to be executed at a certain frequency without adversely affecting the task processing in the original operation mode. An object of the present invention is to provide an information terminal device and its program capable of realizing appropriate memory management while guaranteeing original task processing.

上記目的を達成するためにこの発明は、複数の動作モードの処理及びメモリに対するガーベッジコレクション処理を選択的に実行する情報端末装置にあって、上記メモリに対するデータの書き込み処理が行われた場合に、当該メモリに対するガーベッジコレクション処理の要否を判定し、ガーベッジコレクション処理が必要と判定された場合に実行中又は実行予定の動作モードを判定する。そして、上記判定された実行中又は実行予定の動作モードに応じてガーベッジコレクション処理の実行頻度を設定し、この設定された実行頻度に従い、上記メモリに対しガーベッジコレクション処理を実行するようにしたものである。   In order to achieve the above object, the present invention provides an information terminal device that selectively executes a plurality of operation mode processes and a garbage collection process for a memory, and when a data write process to the memory is performed, The necessity of the garbage collection process for the memory is determined, and when it is determined that the garbage collection process is necessary, the operation mode being executed or scheduled to be executed is determined. Then, an execution frequency of the garbage collection process is set according to the determined operation mode being executed or scheduled to be executed, and the garbage collection process is executed on the memory according to the set execution frequency. is there.

したがってこの発明によれば、実行中又は実行予定の動作モードに応じてガーベッジコレクション処理の実行頻度が設定され、この設定された実行頻度でガーベッジコレクション処理が実行される。すなわち、動作モードごとにそのときのプロセッサの負荷に応じた適切な実行頻度でガーベッジコレクション処理が行われる。このため、プロセッサの負荷を考慮せずにガーベッジコレクション処理を実行する場合に比べ、プロセッサの負荷の増加を抑制して本来のタスク処理を支障なくガーベッジコレクション処理を実行させることができる。また、プロセッサで他のタスクが実行されている期間には一切のガーベッジコレクション処理を停止する場合に比べ、ガーベッジコレクション処理の実行頻度が一定値以上確保され、これによりメモリの未使用領域の枯渇を極力回避することができる。   Therefore, according to the present invention, the execution frequency of the garbage collection process is set according to the operation mode being executed or scheduled to be executed, and the garbage collection process is executed at the set execution frequency. That is, the garbage collection process is performed at an appropriate execution frequency corresponding to the load on the processor at that time for each operation mode. For this reason, compared with the case where the garbage collection process is executed without considering the processor load, the increase in the processor load can be suppressed and the original task process can be executed without any trouble. In addition, the garbage collection processing frequency is secured above a certain value compared to when all garbage collection processing is stopped during the period when other tasks are being executed by the processor, thereby depleting unused memory space. It can be avoided as much as possible.

また、この発明は次のような具体的な種々構成を備えることを特徴とする。
第1の構成は、ガーベッジコレクション処理が必要データの再配置処理及び不要データの消去処理を含む場合に、判定された実行中又は実行予定の動作モードに応じて、必要データの再配置処理の頻度と不要データの消去処理の頻度とを独立に設定するものである。一般に、必要データの再配置処理と不要データの消去処理とでは処理に要する時間が異なる。このため、必要データの再配置処理の頻度と不要データの消去処理の頻度とを独立に設定すると、必要データの再配置処理と不要データの消去処理とをそれぞれ最適な頻度で実行することが可能となり、結果としてきわめて効率の良いガーベッジコレクション処理を実行することができる。
In addition, the present invention is characterized by having the following specific various configurations.
In the first configuration, when the garbage collection process includes a necessary data rearrangement process and an unnecessary data erasure process, the frequency of the necessary data rearrangement process is determined according to the determined operation mode to be executed or scheduled to be executed. And the frequency of unnecessary data erasure processing are set independently. Generally, the time required for processing differs between the relocation processing of necessary data and the erasing processing of unnecessary data. For this reason, if the frequency of necessary data relocation processing and the frequency of unnecessary data erasure processing are set independently, the necessary data relocation processing and unnecessary data erasure processing can be executed at the optimum frequency. As a result, an extremely efficient garbage collection process can be executed.

第2の構成は、上記メモリが複数の単位記憶領域を備える場合に、上記実行中又は実行予定の動作モードの判定結果に応じて、上記必要データ再配置処理の実行周期と、1回の必要データ再配置処理において実行対象とする単位記憶領域の数を設定するものである。このようにすると、データ再配置処理の実行頻度を、実行中の動作モードに応じたより適切な値に設定することができる。   In the second configuration, when the memory includes a plurality of unit storage areas, an execution cycle of the necessary data rearrangement process and one time required according to the determination result of the operation mode being executed or scheduled to be executed The number of unit storage areas to be executed in the data rearrangement process is set. In this way, the execution frequency of the data rearrangement process can be set to a more appropriate value according to the operation mode being executed.

第3の構成は、上記メモリが複数の単位記憶領域を備える場合に、判定された実行中又は実行予定の動作モードに応じて、不要データを間欠的に消去するための周期と、1回の消去処理の時間又は1回の消去処理において消去対象とする単位記憶領域の数を設定するものである。このようにすると、データ再配置処理の実行頻度についても、実行中の動作モードに応じたより適切な値に設定することができる。   According to a third configuration, when the memory includes a plurality of unit storage areas, a cycle for erasing unnecessary data intermittently according to the determined operation mode during execution or scheduled execution, The time of the erasing process or the number of unit storage areas to be erased in one erasing process is set. In this way, the execution frequency of the data rearrangement process can also be set to a more appropriate value according to the operation mode being executed.

第4の構成は、上記実行頻度を設定する際に、複数の動作モード及びガーベッジコレクション処理に対し予め付与された優先順位を記憶しておき、判定された実行中又は実行予定の動作モードに付与された優先順位と、上記ガーベッジコレクション処理に付与された優先順位との関係に基づいて、ガーベッジコレクション処理の実行頻度を設定するものである。このようにすると、優先順位に従い比較的簡単に実行頻度を設定することができる。また、動作モードの変更や追加に対し優先順位を変更又は付加するだけで容易に対応できる利点がある。   In the fourth configuration, when the execution frequency is set, the priorities given in advance to the plurality of operation modes and the garbage collection process are stored, and given to the determined operation mode being executed or scheduled to be executed. The execution frequency of the garbage collection process is set based on the relationship between the assigned priority order and the priority order assigned to the garbage collection process. In this way, the execution frequency can be set relatively easily according to the priority order. Further, there is an advantage that it is possible to easily cope with the change or addition of the operation mode only by changing or adding the priority order.

第5の構成は、ガーベッジコレクション処理を実行する際に、実行中又は実行予定の動作モードの実行処理に必要なメモリの空き記憶容量を推定し、この推定された空き記憶容量をもとにガーベッジコレクション処理の対象となる記憶ブロック数を設定する。そして、この設定された記憶ブロック数の記憶ブロックに対しガーベッジコレクション処理を実行するものである。このようにすると、動作モードの実行に必要十分な記憶ブロック数についてガーベッジコレクション処理が行われる。このため、プロセッサの処理能力を必要以上にガーベッジコレクション処理に割くことなく、動作モードの実行処理をガーベッジコレクション処理と並行して効率良く行うことができる。   In the fifth configuration, when the garbage collection process is executed, the free storage capacity of the memory necessary for the execution process in the operation mode that is being executed or scheduled to be executed is estimated, and the garbage is based on the estimated free storage capacity. Sets the number of storage blocks to be collected. Then, the garbage collection process is executed for the storage blocks of the set number of storage blocks. In this way, garbage collection processing is performed for the number of storage blocks necessary and sufficient for execution of the operation mode. For this reason, the operation mode execution process can be efficiently performed in parallel with the garbage collection process, without allocating the processing capacity of the processor to the garbage collection process more than necessary.

第6の構成は、上記ガーベッジコレクション処理の実行期間中に、動作モードの遷移を監視し、動作モードの遷移が検出された場合に当該遷移後の動作モードに応じて上記ガーベッジコレクション処理の実行頻度を変更するものである。このようにすると、ガーベッジコレクション処理期間中に動作モードが遷移しても、この動作モードのタスク処理に悪影響を及ぼすことなく、またプロセッサに過度の処理負荷をかけることなく、常に最適な実行頻度でガーベッジコレクション処理を実行することができる。   In the sixth configuration, during the execution period of the garbage collection process, the transition of the operation mode is monitored, and when the transition of the operation mode is detected, the frequency of execution of the garbage collection process according to the operation mode after the transition Is to change. In this way, even if the operation mode changes during the garbage collection process, task processing in this operation mode will not be adversely affected, and an excessive processing load will not be imposed on the processor. A garbage collection process can be executed.

要するにこの発明によれば、ガーベッジコレクション処理を本来の動作モードによるタスク処理に悪影響を及ぼすことなく一定以上の頻度で実行することが可能となり、これにより本来のタスク処理を保障しつつ適切なメモリ管理を実現可能とした情報端末装置とそのプログラムを提供することができる。   In short, according to the present invention, it is possible to execute garbage collection processing at a certain frequency without adversely affecting task processing in the original operation mode, thereby ensuring proper memory management while ensuring original task processing. It is possible to provide an information terminal device and a program for realizing the above.

図1は、この発明に係わる情報端末装置の一実施形態である移動通信端末の構成を示すブロック図である。
同図において、図示しない基地局から送信された無線信号は、アンテナ1で受信されたのちアンテナ共用器(DUP)2を介して受信回路(RX)3に入力される。受信回路3は、上記受信された無線信号を周波数シンセサイザ(SYN)4から出力された局部発振信号とミキシングして中間周波信号に周波数変換(ダウンコンバート)する。そして、この中間周波信号を直交復調して受信ベースバンド信号を出力する。なお、上記周波数シンセサイザ4から発生される局部発振信号の周波数は、制御部12から出力される制御信号SYCによって指示される。
FIG. 1 is a block diagram showing a configuration of a mobile communication terminal which is an embodiment of an information terminal device according to the present invention.
In the figure, a radio signal transmitted from a base station (not shown) is received by an antenna 1 and then input to a receiving circuit (RX) 3 via an antenna duplexer (DUP) 2. The receiving circuit 3 mixes the received radio signal with the local oscillation signal output from the frequency synthesizer (SYN) 4 and converts the frequency into an intermediate frequency signal (down-conversion). Then, the intermediate frequency signal is orthogonally demodulated and a received baseband signal is output. The frequency of the local oscillation signal generated from the frequency synthesizer 4 is indicated by a control signal SYC output from the control unit 12.

上記受信ベースバンド信号はCDMA信号処理部6に入力される。CDMA信号処理部6はRAKE受信機を備える。RAKE受信機では、上記受信ベースバンド信号に含まれる複数のパスがそれぞれ拡散符号により逆拡散処理される。そして、この逆拡散処理された各パスの信号が位相を調整されたのち合成される。この結果、所定の伝送フォーマットの受信パケットデータが得られる。そして、この受信パケットデータは圧縮伸長処理部(以後コンパンダと称する)7に入力される。   The received baseband signal is input to the CDMA signal processing unit 6. The CDMA signal processing unit 6 includes a RAKE receiver. In the RAKE receiver, the plurality of paths included in the received baseband signal are each subjected to despreading processing using spreading codes. Then, the signals of the paths subjected to the despreading process are combined after the phase is adjusted. As a result, received packet data in a predetermined transmission format is obtained. The received packet data is input to a compression / decompression processing unit (hereinafter referred to as a compander) 7.

コンパンダ7は、上記CDMA信号処理部6から出力された受信パケットデータを多重分離部によりメディアごとに分離する。そして、この分離されたメディアデータごとに復号処理を行う。例えば受信パケットデータにオーディオデータが含まれていれば、このオーディオデータをスピーチコーデックにより復号する。また受信パケットデータにビデオデータが含まれていれば、このビデオデータをビデオコーデックにより復号する。この復号処理により得られたディジタルオーディオ信号はPCM符号処理部(以後PCMコーデックと称する)8へ、またディジタルビデオ信号は制御部12へそれぞれ入力される。さらに、受信パケットデータにメールやアプリケーション等のテキストデータが含まれている場合には、このテキストデータは制御部12に入力される。   The compander 7 separates the received packet data output from the CDMA signal processing unit 6 for each medium by the demultiplexing unit. Then, a decryption process is performed for each separated media data. For example, if audio data is included in the received packet data, the audio data is decoded by a speech codec. If the received packet data includes video data, the video data is decoded by a video codec. A digital audio signal obtained by this decoding process is input to a PCM code processing unit (hereinafter referred to as a PCM codec) 8, and a digital video signal is input to a control unit 12. Further, when the received packet data includes text data such as mail or application, the text data is input to the control unit 12.

PCMコーデック8は、コンパンダ7から出力されたディジタルオーディオ信号をPCM復号してアナログオーディオ信号を出力する。このアナログオーディオ信号は、受話増幅器9にて増幅されたのちスピーカ10より出力される。   The PCM codec 8 performs PCM decoding on the digital audio signal output from the compander 7 and outputs an analog audio signal. This analog audio signal is amplified by the receiving amplifier 9 and then output from the speaker 10.

制御部12は、上記コンパンダ7から出力されたディジタルビデオ信号を、ビデオRAMを介して表示部15のLCD(Liquid Crystal Devise)に表示する。なお、制御部12は、受信されたビデオデータばかりでなく、カメラ19により撮像されたビデオデータについてもビデオRAMを介して表示部15のLCDに表示する。また、メールやアプリケーション等のテキストデータは記憶部13に保存される。そして、入力部14における表示操作に応じて記憶部13から読み出されて表示部15のLCDに表示される。なお、上記オーディオデータ及びビデオデータについても、必要に応じて記憶部13に記憶される。   The control unit 12 displays the digital video signal output from the compander 7 on an LCD (Liquid Crystal Devise) of the display unit 15 via the video RAM. The control unit 12 displays not only the received video data but also the video data captured by the camera 19 on the LCD of the display unit 15 via the video RAM. Further, text data such as mails and applications is stored in the storage unit 13. Then, it is read from the storage unit 13 and displayed on the LCD of the display unit 15 according to the display operation in the input unit 14. Note that the audio data and video data are also stored in the storage unit 13 as necessary.

一方、マイクロホン11に入力された話者の音声信号は、送話増幅器20により適正レベルまで増幅されたのち、PCMコーデック8にてPCM符号化処理が施され、ディジタルオーディオ信号となってコンパンダ7に入力される。また、カメラ19から出力されるビデオ信号は、制御部12によりディジタル化されてコンパンダ7に入力される。なお、制御部12において作成されたメール等のテキストデータも、制御部12からコンパンダ7に入力される。   On the other hand, the voice signal of the speaker input to the microphone 11 is amplified to an appropriate level by the transmission amplifier 20 and then subjected to PCM encoding processing by the PCM codec 8 to become a digital audio signal to the compander 7. Entered. The video signal output from the camera 19 is digitized by the control unit 12 and input to the compander 7. Note that text data such as e-mail created by the control unit 12 is also input from the control unit 12 to the compander 7.

コンパンダ7は、PCMコーデック8から出力されたディジタルオーディオ信号より入力音声のエネルギ量を検出し、この検出結果に基づいて送信データレートを決定する。そして、上記ディジタルオーディオ信号を上記送信データレートに応じたフォーマットの信号に符号化し、これによりオーディオデータを生成する。また、制御部12から出力されたディジタルビデオ信号を符号化してビデオデータを生成する。そして、これらの音声データ及び画像データを多重分離部で所定の伝送フォーマットに従いパケット化し、この送信パケットデータをCDMA信号処理部6へ出力する。なお、制御部12からメール等のテキストデータが出力された場合にも、このテキストデータを上記送信パケットデータに多重化する。   The compander 7 detects the energy amount of the input voice from the digital audio signal output from the PCM codec 8, and determines the transmission data rate based on the detection result. Then, the digital audio signal is encoded into a signal having a format corresponding to the transmission data rate, thereby generating audio data. The digital video signal output from the control unit 12 is encoded to generate video data. These audio data and image data are packetized in accordance with a predetermined transmission format by the demultiplexing unit, and this transmission packet data is output to the CDMA signal processing unit 6. Even when text data such as mail is output from the control unit 12, the text data is multiplexed with the transmission packet data.

CDMA信号処理部6は、上記コンパンダ7から出力された送信パケットデータに対し、送信チャネルに割り当てられた拡散符号を用いてスペクトラム拡散処理を施す。そして、その出力信号を送信回路(TX)5へ出力する。送信回路5は、上記スペクトラム拡散された信号をQPSK(Quadrature Phase Shift Keying)方式等のディジタル変調方式を使用して変調する。そして、この変調により生成された送信信号を、周波数シンセサイザ4から発生される局部発振信号と合成して無線信号に周波数変換する。そして、制御部12により指示される送信電力レベルとなるように上記無線信号を高周波増幅する。この増幅された無線信号は、アンテナ共用器2を介してアンテナ1に供給され、このアンテナ1から基地局へ向けて送信される。   The CDMA signal processing unit 6 performs spread spectrum processing on the transmission packet data output from the compander 7 using a spreading code assigned to the transmission channel. Then, the output signal is output to the transmission circuit (TX) 5. The transmission circuit 5 modulates the spread spectrum signal using a digital modulation method such as a QPSK (Quadrature Phase Shift Keying) method. Then, the transmission signal generated by this modulation is combined with the local oscillation signal generated from the frequency synthesizer 4 and frequency-converted into a radio signal. Then, the radio signal is amplified at a high frequency so that the transmission power level instructed by the control unit 12 is obtained. The amplified radio signal is supplied to the antenna 1 via the antenna duplexer 2 and transmitted from the antenna 1 to the base station.

入力部14には、ダイヤルキーに加え、送信キー、終了キー、電源キー、音量調節キー、モード指定キー等の機能キーが設けられている。また表示部15には、LCD及びLEDが設けられている。LCDには、先に述べた送受信データや装置の動作モードを表すデータが表示される。また、電話帳データや送受信履歴等も表示される。またLEDは、着信の報知やバッテリ16の充電状態を表示するために使用される。なお、17は電源回路であり、バッテリ17の出力をもとに所定の動作電源電圧Vccを生成して各回路部に供給する。また18は充電回路であり、商用電源出力(AC100V)をもとに充電電流を生成して上記バッテリ16を充電する。   In addition to the dial keys, the input unit 14 is provided with function keys such as a transmission key, an end key, a power key, a volume adjustment key, and a mode designation key. The display unit 15 is provided with an LCD and an LED. On the LCD, the above-described transmission / reception data and data representing the operation mode of the apparatus are displayed. In addition, phone book data, transmission / reception history, and the like are also displayed. Further, the LED is used for notifying incoming calls and displaying the state of charge of the battery 16. Reference numeral 17 denotes a power supply circuit, which generates a predetermined operating power supply voltage Vcc based on the output of the battery 17 and supplies it to each circuit unit. Reference numeral 18 denotes a charging circuit, which charges the battery 16 by generating a charging current based on the commercial power output (AC 100 V).

ところで、記憶部13は例えばフラッシュメモリからなり、図2に示すように複数(同図では例えば254個)の記憶ブロックB1〜B253により構成される。またこれらの記憶記憶ブロックB1〜B253はさらにそれぞれ複数(同図では例えば254個)のサブブロックVSB1〜VSB253により構成され、これらのサブブロック単位でデータの書き込み、読み出し及び消去が行われる。   By the way, the memory | storage part 13 consists of flash memory, for example, and is comprised by several (for example, 254 pieces) storage blocks B1-B253 as shown in FIG. Each of the storage storage blocks B1 to B253 is further composed of a plurality of (for example, 254 in the figure) subblocks VSB1 to VSB253, and data is written, read and erased in units of these subblocks.

制御部12は、例えばマイクロコンピュータを主制御部として備え、この発明に係わる新たな制御機能としてガーベッジパラメータ設定機能12aと、ガーベッジコレクション処理機能12bを有している。これらの機能12a,12bはいずれもCPUでプログラムを実行することにより実現される。   The control unit 12 includes, for example, a microcomputer as a main control unit, and has a garbage parameter setting function 12a and a garbage collection processing function 12b as new control functions according to the present invention. Both of these functions 12a and 12b are realized by executing a program on the CPU.

ガーベッジパラメータ設定機能12aは、記憶部13に対するデータの書き込み処理が行われた場合に、当該記憶部13に対するガーベッジコレクション処理の要否を判定し、ガーベッジコレクション処理が必要と判定された場合に、実行中又は実行予定のタスクを判定する。そして、上記判定された実行中又は実行予定のタスク処理とガーベッジコレクション処理の優先順位の関係に応じて、ガーベッジコレクション処理の実行頻度を設定する。   The garbage parameter setting function 12a determines whether or not the garbage collection process is required for the storage unit 13 when the data writing process to the storage unit 13 is performed, and is executed when the garbage collection process is determined to be necessary. Determine the tasks that are in progress or will be executed. Then, the execution frequency of the garbage collection process is set according to the relationship between the determined task process being executed or scheduled to be executed and the priority order of the garbage collection process.

具体的には、ガーベッジコレクション処理は必要データの再配置処理と不要データの消去処理とに分けて実行されるため、これらの処理に対応して実行頻度が別々に設定される。実行頻度は、処理の実行周期と1回の処理において実行対象となるサブブロック数とにより定義される。なお、図3は優先順位テーブルの一例を示すものであり、ガーベッジコレクション処理に対しては優先順位「10」が付与されている。   Specifically, since the garbage collection process is executed separately for the necessary data rearrangement process and the unnecessary data erasure process, the execution frequency is set separately corresponding to these processes. The execution frequency is defined by the execution cycle of the process and the number of sub blocks to be executed in one process. FIG. 3 shows an example of the priority table, and a priority “10” is assigned to the garbage collection process.

ガーベッジコレクション処理機能12bは、上記ガーベッジパラメータ設定機能12aにより設定された実行頻度に従い、記憶部13に対するガーベッジコレクション処理を必要データの再配置処理と不要データの消去処理とに分けて実行する。また必要データの再配置処理及び不要データの消去処理期間中に動作モードの遷移を監視し、動作モードが遷移したことを検出すると上記上記ガーベッジパラメータ設定機能12aに実行頻度の変更を指示する機能も有する。   The garbage collection processing function 12b executes the garbage collection processing for the storage unit 13 by dividing it into necessary data relocation processing and unnecessary data erasing processing according to the execution frequency set by the garbage parameter setting function 12a. In addition, there is a function of monitoring the transition of the operation mode during the necessary data rearrangement process and the unnecessary data erasing process, and instructing the garbage parameter setting function 12a to change the execution frequency when the transition of the operation mode is detected. Have.

次に、以上のように構成された装置によるガーベッジコレクション動作を説明する。図4乃至図6は制御部12の動作手順と制御内容を示すフローチャートである。
制御部12は、待機状態において、図4に示すようにステップ4aで記憶部(メモリ)13に対するデータ書き込みが発生したか否かを監視している。そして、この状態で記憶部13に対しデータ書き込みが行われると、続いてこのデータ書き込みにより記憶部13に不要データが発生したか否かをステップ4jで判定する。
Next, a garbage collection operation by the apparatus configured as described above will be described. 4 to 6 are flowcharts showing the operation procedure and control contents of the control unit 12.
In the standby state, the control unit 12 monitors whether or not data writing to the storage unit (memory) 13 has occurred in step 4a as shown in FIG. When data is written to the storage unit 13 in this state, it is subsequently determined in step 4j whether or not unnecessary data is generated in the storage unit 13 by this data writing.

上記判定の結果、不要データが発生すると制御部12は、ステップ4bに移行してここで先ず端末装置の動作モードを解析する。解析対象の動作モードには、各種アプリケーションの実行状態に加え、バッテリ16の残量や充電中か否か等の装置の動作状態、制御部12におけるCPUの処理負荷の状態等が含まれる。アプリケーションとしては、ゲームの実行タスクやカメラ19の撮像制御タスク、オーディオデータやビデオデータの再生タスク、Java(登録商標)の実行タスク等がある。   If unnecessary data is generated as a result of the determination, the control unit 12 proceeds to step 4b and first analyzes the operation mode of the terminal device. The operation mode to be analyzed includes, in addition to the execution state of various applications, the operation state of the apparatus such as the remaining amount of the battery 16 and whether or not the battery 16 is being charged, the processing load state of the CPU in the control unit 12, and the like. The application includes a game execution task, an imaging control task of the camera 19, a reproduction task of audio data and video data, a Java (registered trademark) execution task, and the like.

次に制御部12は、上記動作モードの判定結果に基づいてガーベッジコレクション処理のパラメータを設定する。例えば、いまJava(登録商標)が起動され、これによりダウンロードデータの表示タスクが実行されているものとする。この場合制御部12は、優先順位テーブルを参照して表示タスクとガーベッジコレクション処理タスクの優先順位の関係を判定する。そして、表示タスクの優先順位がガーベッジコレクション処理タスクの優先順位より高ければ、表示タスクの処理を優先するべく、ステップ4fにおいてガーベッジコレクションの回数mをm=2に設定する。また、ステップ4gにおいて、ガーベッジコレクションの実行周期tをt=50msecに設定する。そして、ステップ4hに移行して次のようにガーベッジコレクション処理を実行する。   Next, the control unit 12 sets a garbage collection processing parameter based on the determination result of the operation mode. For example, it is assumed that Java (registered trademark) is activated and a download data display task is executed. In this case, the control unit 12 refers to the priority table and determines the relationship between the priority of the display task and the garbage collection processing task. If the priority of the display task is higher than the priority of the garbage collection processing task, the number m of garbage collection is set to m = 2 in step 4f to prioritize the processing of the display task. In step 4g, the garbage collection execution period t is set to t = 50 msec. Then, the process proceeds to step 4h to execute the garbage collection process as follows.

すなわち、制御部12は図6に示すように先ずステップ6aにより使用済みサブブロック数の割合が最も大きいブロックをガーベッジコレクション処理対象のブロックとして検索する。またステップ6bにより、未使用のサブブロックを有するブロックを再配置先ブロックとして検索する。   That is, as shown in FIG. 6, the control unit 12 first searches for a block having the largest ratio of the number of used sub-blocks as a garbage collection process target block in step 6a. In step 6b, a block having an unused sub-block is searched as a rearrangement destination block.

次に制御部12はコピー期間となり、ステップ6cにおいて、上記検索されたガーベッジコレクション処理対象のブロックから使用中のサブブロックを一つ選択し、この選択されたサブブロックに記憶された必要データを、上記検索された再配置先ブロック中の未使用のサブブロックの一つにコピーする。例えば、図7に示すように記憶ブロックB1のサブブロックVSB100が使用中だとすれば、このサブブロックVSB100に記憶された必要データを再配置先記憶ブロックB3の未使用のサブブロックVSB1にコピーする。   Next, the control unit 12 enters a copy period. In step 6c, the control unit 12 selects one sub-block in use from the searched garbage collection processing target block, and the necessary data stored in the selected sub-block is Copy to one of the unused sub-blocks in the searched relocation destination block. For example, as shown in FIG. 7, if the subblock VSB100 of the storage block B1 is in use, the necessary data stored in the subblock VSB100 is copied to the unused subblock VSB1 of the relocation destination storage block B3. .

そうして1個のサブブロックのデータコピーが終了すると、制御部12はステップ6dでコピーの実行回数が実行回数の設定値mに達したか否かを判定する。この判定の結果、コピー回数が実行回数の設定値mに達していなければステップ6cに戻り、上記ガーベッジコレクション処理対象の記憶ブロックB1の他の使用中のサブブロックを選択し、この選択されたサブブロックに記憶された必要データを再配置先記憶ブロックB3の未使用のサブブロックにコピーする。   When the data copy of one sub-block is thus completed, the control unit 12 determines whether or not the copy execution count has reached the execution count set value m in step 6d. As a result of this determination, if the number of copies has not reached the set value m of the number of executions, the process returns to step 6c to select another in-use sub-block of the storage block B1 subject to the garbage collection process, and this selected sub-block The necessary data stored in the block is copied to an unused sub-block of the relocation destination storage block B3.

以後同様に、コピー回数が実行回数の設定値mに達するまで、上記ガーベッジコレクション処理対象の記憶ブロックB1のその他の使用中のサブブロックに記憶された必要データのコピーが繰り返し行われる。すなわち、1つのコピー期間に、m回の必要データのコピーが行われる。例えば、上記したように実行回数m=2に設定された場合には、1つのコピー期間に、ガーベッジコレクション処理対象の記憶ブロックB1に存在する使用中のサブブロックのうちの2個のサブブロックの必要データがコピーされる。   Thereafter, similarly, the necessary data stored in the other used sub-blocks of the storage block B1 to be garbage collected is repeatedly copied until the copy count reaches the execution count setting value m. That is, m required data is copied in one copy period. For example, when the number of executions m = 2 is set as described above, two sub-blocks of the sub-blocks in use existing in the storage block B1 subject to the garbage collection process are stored in one copy period. Necessary data is copied.

上記コピー回数が実行回数の設定値mに達し、これにより1つのコピー期間が終了すると、制御部12は続いてステップ6eにおいてガーベッジコレクション処理対象の記憶ブロックB1に存在する全ての使用中のサブブロックのコピーが終了したか否かを判定する。そして、まだ未コピーのサブブロックが残っている場合には、ステップ6fに移行してここでコピー待機期間に移行する。コピー待機期間は、先に図4のステップ4gで設定された周期tに従い設定される。   When the number of times of copying reaches the set value m of the number of times of execution and thus one copy period ends, the control unit 12 subsequently continues to all the used sub-blocks existing in the storage block B1 subject to garbage collection in step 6e. It is determined whether or not copying of the file has been completed. If there is still an uncopied sub-block, the process proceeds to step 6f, where a copy standby period is entered. The copy standby period is set according to the cycle t previously set in step 4g of FIG.

上記コピー待機期間において制御部12は、ステップ6hで待機期間の終了を監視しながら、ステップ6gで装置の動作モードの遷移を検出する。そして、動作モードが遷移しないまま待機期間(例えばt=50msec)が経過すると、ステップ6c及びステップ6dに戻って、上記ガーベッジコレクション処理対象の記憶ブロックB1に残っている使用中のm個のサブブロックの必要データを、再配置先記憶ブロックB3の未使用のサブブロックに順次コピーする。以後、ガーベッジコレクション処理対象の記憶ブロックB1に存在する全ての使用中のサブブロックのコピーが終了するまで、上記周期tでm個ずつ使用中のサブブロックのデータコピーが繰り返し行われる。   In the copy standby period, the control unit 12 detects transition of the operation mode of the apparatus in step 6g while monitoring the end of the standby period in step 6h. When a standby period (for example, t = 50 msec) elapses without changing the operation mode, the process returns to step 6c and step 6d, and the m sub-blocks in use remaining in the storage block B1 that is the garbage collection processing target. Are sequentially copied to unused sub-blocks of the relocation destination storage block B3. Thereafter, data copying of the m sub-blocks in use at the cycle t is repeatedly performed until copying of all the sub-blocks in use existing in the storage block B1 to be garbage collected is completed.

なお、上記使用中のサブブロックのデータコピー処理中に、ステップ6gで動作モードの遷移が検出されたとする。そうすると制御部12は、上記ガーベッジコレクション処理対象のブロックについてのコピー処理を一旦中断し、上記図4のステップ4bに戻る。そして、このステップ4bで上記遷移後の新たな動作モードの解析を行い、その解析結果に応じてガーベッジコレクション処理のためのパラメータを設定し直す。そして、以後この設定し直された新たなパラメータに従い、上記ガーベッジコレクション処理対象のブロックについてのコピー処理を継続する。   It is assumed that an operation mode transition is detected in step 6g during the data copy process of the sub-block being used. Then, the control unit 12 temporarily stops the copy process for the garbage collection process target block, and returns to step 4b in FIG. In step 4b, the new operation mode after the transition is analyzed, and parameters for garbage collection processing are reset according to the analysis result. Then, the copy process for the garbage collection process target block is continued in accordance with the newly reset parameter.

上記ガーベッジコレクション処理対象の記憶ブロックB1に存在する全ての使用中のサブブロックのコピーが終了したとする。そうすると制御部12は、ステップ6eからステップ6iに移行し、ここで使用済みサブブロックに記憶された不要データの消去処理を実行する。例えば図8に示すように、全て使用済みにされた記憶ブロックB1の各サブブロックVSB1〜VSB253を1つずつ選択して、この選択されたサブブロックに記憶されている不要データを消去する。かくして、ガーベッジコレクション処理対象の記憶ブロックB1は全て未使用の状態に再生される。   It is assumed that copying of all in-use sub-blocks existing in the storage block B1 to be garbage collected is completed. Then, the control unit 12 proceeds from step 6e to step 6i, and executes an erasing process of unnecessary data stored in the used sub-block here. For example, as shown in FIG. 8, each of the sub-blocks VSB1 to VSB253 of the storage block B1 that has been used is selected one by one, and unnecessary data stored in the selected sub-block is erased. Thus, all the storage blocks B1 subject to garbage collection processing are reproduced in an unused state.

ところで、上記不要データの消去処理は、上記した必要データの再配置(コピー)処理とは別個に設定されたパラメータに従い行われる。例えば、消去処理はコピー処理よりも所要時間が短くて済むので、1度の消去期間に消去するサブブロックの数は必要データの再配置処理を行うときの実行回数m=2よりも大きな値に設定可能である。図9は、上記不要データの消去処理を間欠的に行う場合の処理タイミングの一例を示したもので、1回目の消去期間を1000msecに設定し、2回目以降の消去期間を100secに設定している。このように設定すると、1回目及び2回目以降の各消去期間においてm=2よりも多くのサブブロックについて不要データを消去することが可能となり、特に1回目の消去期間ではきわめて多数のサブブロックについて不要データを消去することができる。   The unnecessary data erasing process is performed in accordance with parameters set separately from the above-described necessary data rearrangement (copying) process. For example, since the erasing process requires less time than the copying process, the number of sub-blocks to be erased in one erasing period is larger than the number of executions m = 2 when the necessary data rearrangement process is performed. It can be set. FIG. 9 shows an example of processing timing when the unnecessary data is erased intermittently. The first erase period is set to 1000 msec, and the second and subsequent erase periods are set to 100 sec. Yes. With this setting, unnecessary data can be erased for more subblocks than m = 2 in each of the first and second and subsequent erase periods. Particularly, in the first erase period, an extremely large number of subblocks are erased. Unnecessary data can be erased.

なお、上記不要データの消去期間においても、制御部12はステップ6kで全サブブロックの消去終了を監視しながら、ステップ6jにおいて装置の動作モードの遷移を監視している。そして、上記使用済みのサブブロックの消去処理中に、ステップ6jで動作モードの遷移が検出されると、制御部12は上記ガーベッジコレクション処理対象のブロックについての消去処理を一旦中断し、上記図4のステップ4bに戻る。そして、このステップ4bで上記遷移後の新たな動作モードの解析を行い、その解析結果に応じてガーベッジコレクション処理のためのパラメータを設定し直す。そして、以後この設定し直された新たなパラメータに従い、上記ガーベッジコレクション処理対象のブロックについての消去処理を継続する。   Even during the unnecessary data erasing period, the control unit 12 monitors the transition of the operation mode of the apparatus at step 6j while monitoring the end of erasing of all sub-blocks at step 6k. When a transition of the operation mode is detected in step 6j during the erasing process of the used sub-block, the control unit 12 temporarily suspends the erasing process for the garbage collection processing target block, and the above FIG. Return to step 4b. In step 4b, the new operation mode after the transition is analyzed, and parameters for garbage collection processing are reset according to the analysis result. Thereafter, the erasure process for the garbage collection process target block is continued according to the newly set new parameter.

一方、図4のステップ4cにおいて表示タスクが実行されていないと判定されたとする。この場合制御部12は、ガーベッジコレクション処理タスクを優先するべく、ステップ4dにおいてガーベッジコレクションの回数mをm=最大(max)に設定する。また、ステップ4eにおいて、ガーベッジコレクションの実行周期tをt=0に設定する。そして、ステップ4hに移行して、図6に示したフローチャートに従いガーベッジコレクション処理を実行する。   On the other hand, assume that it is determined in step 4c in FIG. 4 that the display task is not executed. In this case, the control unit 12 sets the number m of garbage collection to m = maximum (max) in step 4d so as to give priority to the garbage collection processing task. In step 4e, the garbage collection execution cycle t is set to t = 0. Then, the process proceeds to step 4h, and the garbage collection process is executed according to the flowchart shown in FIG.

したがってこの場合には、1つのコピー期間において、ガーベッジコレクション処理対象として選択された1個のブロックの全ての必要データがコピーされる。また、消去処理についても、1つの消去期間において、ガーベッジコレクション処理対象として選択された1個のブロックの全ての不必要データが消去される。すなわち、ガーベッジコレクション処理対象として選択されたブロックが短時間に集中してガーベッジコレクション処理される。   Therefore, in this case, all necessary data of one block selected as a garbage collection process target is copied in one copy period. As for the erasure process, all unnecessary data of one block selected as a garbage collection process target is erased in one erasure period. That is, the blocks selected as the garbage collection process target are concentrated in a short time and garbage collected.

以上述べたガーベッジコレクション制御動作では、Java(登録商標)が起動されてダウンロードデータの表示タスクが実行される場合、つまり実行中のアプリケーションのタスクに応じて最適パラメータを設定し、ガーベッジコレクション処理を実行する場合を例にとって説明した。しかしこの実施形態の移動通信端末は、バッテリ16の残量の有無や充電中か否かに応じて最適なパラメータを設定し、ガーベッジコレクション処理を実行する機能も備えている。   In the garbage collection control operation described above, when Java (registered trademark) is activated and the download data display task is executed, that is, the optimum parameter is set according to the task of the application being executed, and the garbage collection process is executed. The case of doing this was described as an example. However, the mobile communication terminal of this embodiment also has a function of setting an optimum parameter according to whether the battery 16 is remaining or whether it is being charged, and executing a garbage collection process.

すなわち、制御部12はバッテリ16の残量検出機能と充電回路18による充電動作の有無を検出する機能を標準機能として備えている。バッテリ16の残量検出機能は、図示しないバッテリ電圧検出器から出力されるバッテリ電圧検出信号VDETを定期的に取り込んでしきい値と比較することにより実現される。また充電動作の有無を検出する機能は、充電回路18から出力される充電動作の有無を表す信号CHGを取り込むことにより実現される。   That is, the control unit 12 includes a function for detecting the remaining amount of the battery 16 and a function for detecting the presence or absence of a charging operation by the charging circuit 18 as standard functions. The remaining amount detection function of the battery 16 is realized by periodically taking a battery voltage detection signal VDET output from a battery voltage detector (not shown) and comparing it with a threshold value. The function of detecting the presence / absence of the charging operation is realized by taking in the signal CHG indicating the presence / absence of the charging operation output from the charging circuit 18.

制御部12は、図5に示すようにステップ5aでバッテリ残量の低下が検出され、さらにステップ5bにおいて充電回路18による充電動作が行われていないことが検出されると、CPUの処理負荷を軽減するために、ステップ5eにおいてガーベッジコレクションの回数mをm=2に設定する。また、ステップ5fにおいて、ガーベッジコレクションの実行周期tをt=50msecに設定する。そして、ステップ5gに移行してガーベッジコレクション処理を実行する。なお、このガーベッジコレクション処理の手順と内容は、先に図6で述べた場合と同じである。   As shown in FIG. 5, the controller 12 detects a decrease in the remaining battery level in Step 5a, and further detects that the charging operation by the charging circuit 18 is not performed in Step 5b. In order to reduce this, the number m of garbage collection is set to m = 2 in step 5e. In step 5f, the garbage collection execution cycle t is set to t = 50 msec. Then, the process proceeds to step 5g to execute the garbage collection process. The procedure and contents of the garbage collection process are the same as those described above with reference to FIG.

したがってこの場合には、ガーベッジコレクション処理対象のブロックについて、必要データのコピー処理及び不必要データの消去処理が、1回の処理期間に2個ずつ50msec周期で実行される。このため、制御部12のCPUの処理負荷は軽減され、これにのよりバッテリ残量が残り少ない状態で動作停止状態に至らしめることなくガーベッジコレクション処理を行うことが可能となる。   Therefore, in this case, for the garbage collection processing target block, a copy process of necessary data and an erase process of unnecessary data are executed at a cycle of 50 msec, two for each process period. For this reason, the processing load on the CPU of the control unit 12 is reduced, and the garbage collection process can be performed without reaching the operation stop state in a state where the remaining amount of the battery is less than that.

これに対しバッテリ残量がしきい値を超えているか、或いはバッテリ残量がしきい値以下に低下していても充電動作が行われている場合には、制御部12はCPUが高速処理可能と判断してステップ5cに移行し、ここでガーベッジコレクションの回数mをm=最大(max)に設定する。また、ステップ5dにおいて、ガーベッジコレクションの実行周期tをt=0に設定する。そして、ステップ5gに移行して、図6に示したフローチャートに従いガーベッジコレクション処理を実行する。   On the other hand, when the battery remaining amount exceeds the threshold value or the charging operation is performed even when the battery remaining amount falls below the threshold value, the control unit 12 can be processed at high speed by the CPU. The process proceeds to step 5c, where the number m of garbage collection is set to m = maximum (max). In step 5d, the garbage collection execution cycle t is set to t = 0. Then, the process proceeds to step 5g, and the garbage collection process is executed according to the flowchart shown in FIG.

したがってこの場合には、1つのコピー期間において、ガーベッジコレクション処理対象として選択された1個のブロックの全ての必要データがコピーされる。また、消去処理についても、1つの消去期間において、ガーベッジコレクション処理対象として選択された1個のブロックの全ての不必要データが消去される。すなわち、ガーベッジコレクション処理対象として選択されたブロックが短時間に集中してガーベッジコレクション処理される。   Therefore, in this case, all necessary data of one block selected as a garbage collection process target is copied in one copy period. As for the erasure process, all unnecessary data of one block selected as a garbage collection process target is erased in one erasure period. That is, the blocks selected as the garbage collection process target are concentrated in a short time and garbage collected.

以上述べたようにこの実施形態では、記憶部13に対するデータの書き込み処理が行われた場合に、当該記憶部13に対するガーベッジコレクション処理の要否を判定し、ガーベッジコレクション処理が必要と判定された場合に、実行中又は実行予定のタスクを判定する。そして、上記判定された実行中又は実行予定のタスクとガーベッジコレクション処理の優先順位の関係に応じてガーベッジコレクション処理の実行頻度を表すパラメータを設定し、設定されたパラメータに従いガーベッジコレクション処理を実行する。また、バッテリ残量が低下しかつ充電が行われていない場合にも、ガーベッジコレクション処理の実行頻度を低く設定すべくパラメータを設定してガーベッジコレクション処理を実行するようにしている。   As described above, in this embodiment, when the data writing process to the storage unit 13 is performed, it is determined whether the garbage collection process to the storage unit 13 is necessary, and it is determined that the garbage collection process is necessary. Next, a task being executed or scheduled to be executed is determined. Then, a parameter representing the execution frequency of the garbage collection process is set according to the determined relationship between the task being executed or scheduled to be executed and the priority of the garbage collection process, and the garbage collection process is executed according to the set parameter. In addition, even when the remaining battery level is low and charging is not being performed, the garbage collection process is executed by setting parameters to set the execution frequency of the garbage collection process low.

したがって、タスクごとに或いはバッテリ残量に応じて適切な実行頻度でガーベッジコレクション処理が行われる。このため、CPUの処理負荷を考慮せずにガーベッジコレクション処理を実行する場合に比べてCPUの処理負荷の増加を抑制し、これにより本来のタスク処理に支障を生じさせることなく、またCPUが動作不能状態に陥ることなく、ガーベッジコレクション処理を実行させることができる。また、CPUで他のタスクが実行されている期間に無条件にガーベッジコレクション処理を停止する場合に比べ、ガーベッジコレクション処理の実行頻度を一定値以上に確保することができ、これにより記憶部13の未使用領域の枯渇を極力回避することができる。   Therefore, the garbage collection process is performed at an appropriate execution frequency for each task or according to the remaining battery level. For this reason, an increase in the CPU processing load is suppressed as compared with the case where the garbage collection process is executed without considering the CPU processing load, thereby preventing the original task processing from being hindered and the operation of the CPU. Garbage collection processing can be executed without falling into an impossible state. In addition, compared with the case where the garbage collection process is unconditionally stopped during a period when another task is being executed by the CPU, the garbage collection process can be executed at a certain frequency or more. Depletion of unused areas can be avoided as much as possible.

またこの実施形態では、必要データ再配置処理の実行頻度と不要データ消去処理の実行頻度とを独立して設定するようにしている。このため、必要データの再配置処理と不要データの消去処理とをそれぞれ最適な頻度で実行することが可能となり、これにより必要データ再配置処理と不要データ消去処理の所要時間の違いを考慮して、効率の良いガーベッジコレクション処理を実行することができる。   In this embodiment, the execution frequency of the necessary data rearrangement process and the execution frequency of the unnecessary data erasure process are set independently. For this reason, it is possible to execute necessary data relocation processing and unnecessary data erasure processing at the optimum frequency, and in consideration of the difference in required time between necessary data relocation processing and unnecessary data erasing processing. , Efficient garbage collection processing can be executed.

さらにこの実施形態では、実行頻度を設定する際に、各種タスク及びガーベッジコレクション処理タスクに対し優先順位を付して記憶しておき、実行中又は実行予定のタスクに付与された優先順位とガーベッジコレクション処理に付与された優先順位との関係に基づいて、ガーベッジコレクション処理の実行頻度を設定するようにしている。このようにすると、優先順位に従い比較的簡単に実行頻度を設定することができる。また、動作モードの変更や追加に対し優先順位を変更又は付加するだけで容易に対応できる利点がある。   Furthermore, in this embodiment, when setting the execution frequency, priorities are assigned and stored for various tasks and garbage collection processing tasks, and the priorities assigned to the tasks being executed or scheduled to be executed and the garbage collection. The execution frequency of the garbage collection process is set based on the relationship with the priority given to the process. In this way, the execution frequency can be set relatively easily according to the priority order. Further, there is an advantage that it is possible to easily cope with the change or addition of the operation mode only by changing or adding the priority order.

さらにこの実施形態では、必要データ再配置処理及び不要データ消去処理の待機期間中に動作モードの遷移を監視し、動作モードの遷移が検出された場合にガーベッジコレクション処理のパラメータを新たな動作モードに応じた値に変更するようにしている。このため、ガーベッジコレクション処理期間中に動作モードが遷移しても、この動作モードのタスク処理に悪影響を及ぼすことなく、またCPUに過度の処理負荷をかけることなく、常に最適なパラメータに従いガーベッジコレクション処理を実行することができる。   Further, in this embodiment, the transition of the operation mode is monitored during the standby period of the necessary data rearrangement process and the unnecessary data erasure process, and the parameter of the garbage collection process is changed to the new operation mode when the transition of the operation mode is detected. It changes to the value according to. Therefore, even if the operation mode transitions during the garbage collection processing period, the garbage collection processing is always performed according to the optimum parameters without adversely affecting the task processing of this operation mode and without applying excessive processing load on the CPU. Can be executed.

なお、この発明は上記実施形態に限定されるものではない。例えば、ガーベッジコレクション処理を実行する際に、実行中又は実行予定の動作モードの実行処理に必要なメモリの空き記憶容量を推定し、この推定された空き記憶容量をもとにガーベッジコレクション処理の対象となるブロック数を設定する。そして、この設定された数のブロックに対しガーベッジコレクション処理を実行するようにしてもよい。このようにすると、動作モードの実行に必要十分なブロック数についてガーベッジコレクション処理が行われる。このため、プロセッサの処理能力を必要以上にガーベッジコレクション処理に割くことなく、動作モードの実行処理をガーベッジコレクション処理と並行して効率良く行うことができる。   The present invention is not limited to the above embodiment. For example, when executing the garbage collection process, the free storage capacity of the memory required for the execution process of the operation mode that is being executed or scheduled to be executed is estimated, and the target of the garbage collection process is based on the estimated free storage capacity. Set the number of blocks. The garbage collection process may be executed for the set number of blocks. In this way, the garbage collection process is performed for the number of blocks necessary and sufficient for execution of the operation mode. For this reason, the operation mode execution process can be efficiently performed in parallel with the garbage collection process, without allocating the processing capacity of the processor to the garbage collection process more than necessary.

その他、ガーベッジコレクション処理の実行頻度を設定する際に参照する動作モードの種類や、実行頻度の設定処理手順とその内容、ガーベッジコレクション処理の実行手順とその内容、ガーベッジコレクションの回数m及び実行周期tの設定値、優先順位テーブルの構成、記憶部の構成、情報端末装置の種類等についても、この発明の要旨を逸脱しない範囲で種々変形して実施できる。   In addition, the type of operation mode to be referred to when setting the execution frequency of the garbage collection process, the execution frequency setting process procedure and its contents, the garbage collection process execution procedure and its contents, the number m of garbage collection and the execution cycle t The set value, the configuration of the priority table, the configuration of the storage unit, the type of the information terminal device, and the like can be variously modified and implemented without departing from the gist of the present invention.

要するにこの発明は、上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態に亘る構成要素を適宜組み合せてもよい。   In short, the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine suitably the component covering different embodiment.

この発明に係わる情報端末装置の一実施形態である移動通信端末の構成を示すブロック図。The block diagram which shows the structure of the mobile communication terminal which is one Embodiment of the information terminal device concerning this invention. 図1に示す移動通信端末で使用されるメモリの構造を示す図。The figure which shows the structure of the memory used with the mobile communication terminal shown in FIG. 図1に示す移動通信端末に設けられる優先度テーブルの一例を示す図。The figure which shows an example of the priority table provided in the mobile communication terminal shown in FIG. 図1に示す移動通信端末において実行されるガーベッジパラメータ設定制御の一例を示すフローチャート。The flowchart which shows an example of the garbage parameter setting control performed in the mobile communication terminal shown in FIG. 図1に示す移動通信端末において実行されるガーベッジパラメータ設定制御の他の例を示すフローチャート。The flowchart which shows the other example of the garbage parameter setting control performed in the mobile communication terminal shown in FIG. 図1に示す移動通信端末において実行されるガーベッジコレクション処理の手順と内容を示すフローチャート。The flowchart which shows the procedure and content of the garbage collection process performed in the mobile communication terminal shown in FIG. 図6に示すガーベッジコレクション処理における必要データの再配置処理を説明するための図。The figure for demonstrating the rearrangement process of the required data in the garbage collection process shown in FIG. 図6に示すガーベッジコレクション処理における不要データの消去処理を説明するための図。The figure for demonstrating the deletion process of the unnecessary data in the garbage collection process shown in FIG. 不要データ消去タイミングの一例を示す図。The figure which shows an example of an unnecessary data erasing timing.

符号の説明Explanation of symbols

1…アンテナ、2…アンテナ共用器(DUP)、3…受信回路(RX)、4…周波数シンセサイザ(SYN)、5…送信回路(TX)、6…CDMA信号処理部、7…圧縮伸長処理部(コンパンダ)、8…PCM符号処理部(PCMコーデック)、9…受話増幅器、10…スピーカ、11…マイクロホン、12…制御部、12a…ガーベッジパラメータ設定制御機能、12b…ガーベッジコレクション制御機能、13…記憶部、14…入力部、15…表示部、16…バッテリ、17…電源回路、18…充電回路、19…カメラ、20…送話増幅器。   DESCRIPTION OF SYMBOLS 1 ... Antenna, 2 ... Duplexer (DUP), 3 ... Reception circuit (RX), 4 ... Frequency synthesizer (SYN), 5 ... Transmission circuit (TX), 6 ... CDMA signal processing part, 7 ... Compression / decompression processing part (Compander), 8 ... PCM code processing unit (PCM codec), 9 ... Receive amplifier, 10 ... Speaker, 11 ... Microphone, 12 ... Control unit, 12a ... Garbage parameter setting control function, 12b ... Garbage collection control function, 13 ... Storage unit, 14 ... input unit, 15 ... display unit, 16 ... battery, 17 ... power supply circuit, 18 ... charging circuit, 19 ... camera, 20 ... transmission amplifier.

Claims (8)

複数の動作モードの処理及びメモリに対するガーベッジコレクション処理を選択的に実行する情報端末装置であって、
前記メモリに対するデータの書き込み処理が行われた場合に、当該メモリに対するガーベッジコレクション処理の要否を判定する手段と、
前記ガーベッジコレクション処理が必要と判定された場合に、実行中又は実行予定の動作モードを判定する手段と、
前記判定された実行中又は実行予定の動作モードに応じて、前記ガーベッジコレクション処理の実行頻度を設定する手段と、
前記設定された実行頻度に従い、前記メモリに対しガーベッジコレクション処理を実行する手段と
を具備することを特徴とする情報端末装置。
An information terminal device that selectively executes processing in a plurality of operation modes and garbage collection processing for a memory,
Means for determining whether or not garbage collection processing is required for the memory when data is written to the memory;
Means for determining an operation mode being executed or scheduled to be executed when it is determined that the garbage collection process is necessary;
Means for setting an execution frequency of the garbage collection process in accordance with the determined operation mode being executed or scheduled to be executed;
An information terminal device comprising: means for executing a garbage collection process on the memory according to the set execution frequency.
前記ガーベッジコレクション処理が必要データの再配置処理及び不要データの消去処理を含む場合に、
前記実行頻度を設定する手段は、前記判定された実行中又は実行予定の動作モードに応じて、必要データの再配置処理の頻度と不要データの消去処理の頻度とを独立に設定することを特徴とする請求項1記載の情報端末装置。
When the garbage collection processing includes relocation processing of necessary data and erasure processing of unnecessary data,
The means for setting the execution frequency independently sets the frequency of necessary data rearrangement processing and the frequency of unnecessary data erasure processing according to the determined operation mode during execution or scheduled execution. The information terminal device according to claim 1.
前記メモリが複数の単位記憶領域を備える場合に、
前記実行頻度を設定する手段は、前記判定された実行中又は実行予定の動作モードに応じて、前記必要データ再配置処理の実行周期と、1回の必要データ再配置処理において実行対象とする単位記憶領域の数を設定することを特徴とする請求項2記載の情報端末装置。
When the memory includes a plurality of unit storage areas,
The means for setting the execution frequency includes an execution cycle of the necessary data rearrangement process and a unit to be executed in one necessary data rearrangement process according to the determined operation mode being executed or scheduled to be executed. 3. The information terminal device according to claim 2, wherein the number of storage areas is set.
前記メモリが複数の単位記憶領域を備える場合に、
前記実行頻度を設定する手段は、前記判定された実行中又は実行予定の動作モードに応じて、前記不要データを間欠的に消去するための周期と、1回の消去処理の時間又は1回の消去処理において消去対象とする単位記憶領域の数を設定することを特徴とする請求項2記載の情報端末装置。
When the memory includes a plurality of unit storage areas,
The means for setting the execution frequency includes a period for erasing the unnecessary data intermittently and a time for one erasing process or one time according to the determined operation mode being executed or scheduled to be executed. 3. The information terminal device according to claim 2, wherein the number of unit storage areas to be erased in the erasing process is set.
前記実行頻度を設定する手段は、
前記複数の動作モード及び前記ガーベッジコレクション処理に対し予め付与された優先順位を記憶する手段と、
前記判定された実行中又は実行予定の動作モードに付与された優先順位と、前記ガーベッジコレクション処理に付与された優先順位との関係に基づいて、ガーベッジコレクション処理の実行頻度を設定する手段と
を備えることを特徴とする請求項1記載の情報端末装置。
The means for setting the execution frequency includes:
Means for storing priorities given in advance to the plurality of operation modes and the garbage collection process;
Means for setting the execution frequency of the garbage collection process based on the relationship between the priority assigned to the determined operation mode being executed or scheduled to be executed and the priority assigned to the garbage collection process. The information terminal device according to claim 1.
前記メモリが複数の単位記憶領域を備える場合に、
前記ガーベッジコレクション処理を実行する手段は、
実行中又は実行予定の動作モードの実行処理に必要なメモリの空き記憶容量を推定する手段と、
前記推定された空き記憶容量をもとに、ガーベッジコレクション処理の対象とする単位記憶領域の数を設定する手段と、
前記設定された数の単位記憶領域に対しガーベッジコレクション処理を実行する手段と
を備えることを特徴とする請求項1記載の情報端末装置。
When the memory includes a plurality of unit storage areas,
The means for executing the garbage collection process includes:
Means for estimating the free storage capacity of the memory required for execution processing of the operation mode being executed or scheduled to be executed;
Based on the estimated free storage capacity, means for setting the number of unit storage areas targeted for garbage collection processing;
The information terminal apparatus according to claim 1, further comprising: a unit that executes a garbage collection process on the set number of unit storage areas.
前記ガーベッジコレクション処理の実行期間中に、動作モードの遷移を監視する手段と、
前記動作モードの遷移が検出された場合に、当該遷移後の動作モードに応じて前記ガーベッジコレクション処理の実行頻度を変更する手段と
を、さらに具備することを特徴とする請求項1記載の情報端末装置。
Means for monitoring the transition of the operation mode during the execution period of the garbage collection process;
The information terminal according to claim 1, further comprising means for changing the frequency of execution of the garbage collection process according to the operation mode after the transition when the operation mode transition is detected. apparatus.
複数の動作モードの処理及びメモリに対するガーベッジコレクション処理をプロセッサにより選択的に実行する情報端末装置で使用されるガーベッジコレクション処理のためのプログラムであって、
前記メモリに対するデータの書き込み処理が行われた場合に、当該メモリに対するガーベッジコレクション処理の要否を判定する処理と、
前記ガーベッジコレクション処理が必要と判定された場合に、実行中又は実行予定の動作モードを判定する処理と、
前記判定された実行中又は実行予定の動作モードに応じて、前記ガーベッジコレクション処理の実行頻度を設定する処理と、
前記設定された実行頻度に従い、前記メモリに対しガーベッジコレクション処理を実行する処理と
を、前記プロセッサに実行させるプログラム。
A program for garbage collection processing used in an information terminal device that selectively executes processing of a plurality of operation modes and garbage collection processing for a memory by a processor,
A process for determining whether or not a garbage collection process for the memory is necessary when a data write process is performed on the memory;
When it is determined that the garbage collection process is necessary, a process for determining an operation mode being executed or scheduled to be executed;
A process for setting the execution frequency of the garbage collection process according to the determined operation mode being executed or scheduled to be executed,
A program that causes the processor to execute a garbage collection process on the memory in accordance with the set execution frequency.
JP2004311517A 2004-10-26 2004-10-26 Information terminal device and program thereof Expired - Fee Related JP3908760B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004311517A JP3908760B2 (en) 2004-10-26 2004-10-26 Information terminal device and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004311517A JP3908760B2 (en) 2004-10-26 2004-10-26 Information terminal device and program thereof

Publications (2)

Publication Number Publication Date
JP2006126975A true JP2006126975A (en) 2006-05-18
JP3908760B2 JP3908760B2 (en) 2007-04-25

Family

ID=36721703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004311517A Expired - Fee Related JP3908760B2 (en) 2004-10-26 2004-10-26 Information terminal device and program thereof

Country Status (1)

Country Link
JP (1) JP3908760B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100122260A1 (en) * 2008-11-07 2010-05-13 International Business Machines Corporation Preventing Delay in Execution Time of Instruction Executed by Exclusively Using External Resource
JP2010532061A (en) * 2007-06-27 2010-09-30 サンディスク コーポレイション Staged garbage collection and housekeeping operations in flash memory systems
CN102163179A (en) * 2010-02-16 2011-08-24 株式会社东芝 Semiconductor memory device
JP2012141944A (en) * 2010-12-16 2012-07-26 Toshiba Corp Memory system
JP2013541750A (en) * 2010-08-12 2013-11-14 クアルコム,インコーポレイテッド System and method for initiating a housekeeping operation in a mobile device
JP2014006657A (en) * 2012-06-22 2014-01-16 Fujitsu Ltd Job management program, job management method, and job management device
JP2015022504A (en) * 2013-07-18 2015-02-02 富士通株式会社 Information processing device, method, and program
CN114303125A (en) * 2019-08-20 2022-04-08 美光科技公司 Garbage collection in a memory subsystem during low battery states

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010532061A (en) * 2007-06-27 2010-09-30 サンディスク コーポレイション Staged garbage collection and housekeeping operations in flash memory systems
US8201178B2 (en) 2008-11-07 2012-06-12 International Business Machines Corporation Preventing delay in execution time of instruction executed by exclusively using external resource
US20100122260A1 (en) * 2008-11-07 2010-05-13 International Business Machines Corporation Preventing Delay in Execution Time of Instruction Executed by Exclusively Using External Resource
US8392476B2 (en) 2010-02-16 2013-03-05 Kabushiki Kaisha Toshiba Semiconductor memory device
JP2011192260A (en) * 2010-02-16 2011-09-29 Toshiba Corp Semiconductor storage device
CN102163179A (en) * 2010-02-16 2011-08-24 株式会社东芝 Semiconductor memory device
CN102163179B (en) * 2010-02-16 2015-05-06 株式会社东芝 Semiconductor memory device
JP2013541750A (en) * 2010-08-12 2013-11-14 クアルコム,インコーポレイテッド System and method for initiating a housekeeping operation in a mobile device
US9014749B2 (en) 2010-08-12 2015-04-21 Qualcomm Incorporated System and method to initiate a housekeeping operation at a mobile device
JP2012141944A (en) * 2010-12-16 2012-07-26 Toshiba Corp Memory system
JP2014006657A (en) * 2012-06-22 2014-01-16 Fujitsu Ltd Job management program, job management method, and job management device
JP2015022504A (en) * 2013-07-18 2015-02-02 富士通株式会社 Information processing device, method, and program
CN114303125A (en) * 2019-08-20 2022-04-08 美光科技公司 Garbage collection in a memory subsystem during low battery states
EP4018316A4 (en) * 2019-08-20 2023-08-16 Micron Technology, Inc. Garbage collection in a memory sub-system during a low battery state

Also Published As

Publication number Publication date
JP3908760B2 (en) 2007-04-25

Similar Documents

Publication Publication Date Title
JP3866735B2 (en) Multifunction mobile communication terminal
US8539503B2 (en) Apparatus for displaying a multi-window system having an active application and an inactive application
US7836446B2 (en) Conflict management program, storage medium for conflict management program storage, conflict management method, and electronic apparatus for terminal devices
US7937119B2 (en) Mobile terminal with TV and radio and power conservation
KR20120049604A (en) Method and apparatus for managing memory of a mobile device
EP2675222A2 (en) Method for saving power consumption and an electronic device thereof
JPH10304578A (en) Electric equipment, and operation and control therefor
JP3908760B2 (en) Information terminal device and program thereof
JP2007184771A (en) Mobile communication terminal
JP2010039791A (en) Portable terminal device
EP2175450A1 (en) Mobile information terminal, information processing method and information processing program
JP4681965B2 (en) Communication terminal
JP4961986B2 (en) Mobile device
JP2009089104A (en) Portable terminal device
JP4783646B2 (en) Portable electronic devices
JP2007019774A (en) Mobile terminal and program
JP4601435B2 (en) Mobile terminal device
JP4669823B2 (en) Portable electronic device and program
JP4642573B2 (en) Portable terminal device and program
JP2009284263A (en) Mobile phone, method of controlling mobile phone, control program of mobile phone, and computer readable recording medium
US8868138B2 (en) Method for controlling low-power state in mobile handset
JP2003179673A (en) Portable electronic appliance
JP2007156986A (en) Terminal device and data management method
JPH118873A (en) Portable radio terminal
JP2007213682A (en) Portable electronic equipment

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070112

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070118

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110126

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110126

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110126

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120126

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130126

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140126

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140126

Year of fee payment: 7

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

LAPS Cancellation because of no payment of annual fees