JP2003331239A - Ic card having memory rearrangement function - Google Patents

Ic card having memory rearrangement function

Info

Publication number
JP2003331239A
JP2003331239A JP2002139491A JP2002139491A JP2003331239A JP 2003331239 A JP2003331239 A JP 2003331239A JP 2002139491 A JP2002139491 A JP 2002139491A JP 2002139491 A JP2002139491 A JP 2002139491A JP 2003331239 A JP2003331239 A JP 2003331239A
Authority
JP
Japan
Prior art keywords
memory
card
fragmentation
application
area
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.)
Pending
Application number
JP2002139491A
Other languages
Japanese (ja)
Inventor
Akira Shibuya
彰 澁谷
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2002139491A priority Critical patent/JP2003331239A/en
Publication of JP2003331239A publication Critical patent/JP2003331239A/en
Pending legal-status Critical Current

Links

Landscapes

  • Credit Cards Or The Like (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an IC card capable of removing memory fragmentation or inconvenience on using at the empty memory coupling time. <P>SOLUTION: The memory fragmentation state is detected by a memory fragmentation detection means 11 at the IC card starting time, and the detected information is stored in a storage means 12 as management data in the IC card, and memory rearrangement is performed by a control means 13 by utilizing an idle time in the command waiting state from an external terminal, to thereby perform empty memory coupling automatically. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】 【0001】 【発明の属する技術分野】本発明はメモリ断片化状態を
自動的に解消できるICカードに関する。 【0002】 【従来の技術】複数のアプリケーションを搭載、削除可
能な不揮発性メモリ、CPU付きのICチップを備えた
ICカードにおいては、通常、不揮発性メモリの連続領
域に複数のアプリケーションをロードしている。図5は
複数のアプリケーションをロードする場合の説明図であ
る。ICカードにおいては作業用RAMの容量が小さい
ため、実行速度を落とさないためにアプリケーションの
格納は、不揮発性メモリの連続した領域に行われる。例
えば、図示するようにアプリケーション1、2、3をこ
の順番に不揮発性メモリ10にロードする場合には、連
続した領域に各アプリケーションが格納され、アプリケ
ーション3が格納された領域の後が空き領域となる。な
お、図のA、B、C、Dは各領域のサイズを表してい
る。このときOSの管理する不揮発性メモリ領域(図示
せず)には、各アプリケーションの先頭アドレスと領域
サイズが管理データとして書き込まれる。 【0003】このように連続領域にアプリケーションが
搭載されたICカードにおいてアプリケーションの削除
を行う場合、アプリケーションの搭載時と逆の順番に削
除される時にはメモリの断片化は発生しないが、例え
ば、図6に示すように、アプリケーション2を削除した
場合には、アプリケーション3の前後に空き領域が生じ
てしまう。このように、空き領域が2つの領域に分断さ
れた場合、空き領域の合計サイズでは搭載可能であって
も、分断された各領域サイズ以上のアプリケーションの
追加搭載は不可能になってしまう。 【0004】 【発明が解決しようとする課題】このため、分断化され
た領域を結合するためにアプリケーションの搭載位置を
変更する必要が生じるが、ICカードにおいては不揮発
性メモリへの書き込みに時間がかかるため、アプリケー
ションのサイズが大きくなると通常のICカード利用時
の前にメモリ再配置を実行するには処理時間が増え、利
用時に待たされるという不便を生じる。また、アプリケ
ーション削除時にメモリ再配置を実行することも考えら
れるが、新たにアプリケーションをロードしないかもし
れないのにメモリ再配置により長時間待たされるのは不
便であり、不合理である。 【0005】 【課題を解決するための手段】本発明は上記課題を解決
しようとするもので、メモリ断片化や、空きメモリ結合
時の利用上の不便さを解消できるICカードを提供する
ことを目的とする。そのために本発明は、複数のアプリ
ケーションを搭載、削除可能な不揮発性メモリ、CPU
付きのICチップを備えたICカードにおいて、ICカ
ード起動時に断片化した空きメモリを検出する断片化検
出手段と、前記断片化検出手段の検出情報が格納される
格納手段と、外部端末からのコマンド待ち状態時に前記
格納手段の内容を読み取り、メモリの再配置が必要であ
るときにメモリ再配置を実行するメモリ制御手段とを有
することを特徴とする。 【0006】 【発明の実施の形態】以下、本発明の実施の形態を図面
を参照しつつ説明する。図1は本発明のメモリ再配置機
能を有するICカードを説明する概念図、図2は本発明
のメモリ再配置機能を説明する図である。なお、本実施
形態では複数のアプリケーションを搭載、削除可能な不
揮発性メモリ、CPU付きのICチップ(図示省略)を
備えたICカードを対象としている。 【0007】図1において、ICカード内の不揮発性メ
モリ10には、図5の場合と同様にアプリケーション
1、2、3がこの順番で連続した領域に格納され、アプ
リケーション3の後が空き領域であり、各領域のサイズ
はA、B、C、Dであるものとする。ここで、図6の場
合と同様に、アプリケーション2が削除されたとする
と、アプリケーション3の前後に空き領域が生ずる。こ
の分断されたメモリ空き領域は、外部端末から電源が供
給されてOS部が起動したときに、例えば、OS部の制
御プログラムで構成される断片化検出手段11により検
出され、断片化検出情報は格納手段11に格納される。
断片化検出情報は、例えば、断片化の有無情報、断片化
有りの場合の各空きメモリ先頭アドレスと領域サイズで
あり、格納手段11はOSが管理するICカードの不揮
発性メモリ領域の一部である。 【0008】例えば、OS部の制御プログラムで構成さ
れる制御手段13は、外部端末からのコマンド待ち状態
の空き時間を利用して、格納手段11から断片化検出情
報を読み出し、断片化が生じている時はメモリ再配置を
行って空き領域を結合する。この例では、図2に示すよ
うに、アプリケーション3の前後にメモリサイズB、D
の空き領域があるので、アプリケーション3の先頭アド
レスがアプリケーション1に連続するように、アプリケ
ーション3を移動する。この移動処理は、アプリケーシ
ョン3の一部を空き領域に複写し(書き込み)、空き領
域Bが全部埋まるとアプリケーション3の複写済み部分
に自身を順次上書きする形で行われ、移動処理が終了す
ると、空き領域が結合されたことになり、そのサイズは
B+Dとなる。なお、空き領域の結合処理は時間がかか
るため、処理途中でコマンドを受信した場合には、処理
を中断し、コマンド待ち状態となるのを待って再度処理
を継続する。この場合、移動するアプリケーション3
は、自身の領域に対する上書きが起こらない間は旧領域
に完全な形で存在しているので利用可能である。 【0009】図3はICカード起動時に行われるメモリ
断片化検出処理フローを説明する図である。外部端末か
らICカードに対して電源が供給されてICカードのO
S部が起動すると(ステップS1)、断片化検出処理が
行われ(ステップS2)、検出した断片化情報を格納す
る(ステップS3)。 【0010】図4はコマンド待ち状態時に行われるメモ
リ再配置処理フローを説明する図である。外部端末から
のコマンド待ちか否か判断し(ステップS10)、コマ
ンド待ち状態のときに格納された断片化情報を読み出し
(ステップS11)、メモリ再配置処理を実行する(ス
テップS12)。 【0011】 【発明の効果】以上のように本発明によれば、ICカー
ド内のアプリケーションの再配置が自動的に行われるた
め、アプリケーション削除時やカード利用時の処理時間
の短縮が図れるため、利用者にとって利便性の高いIC
カードを提供可能である。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an IC card capable of automatically eliminating a memory fragmentation state. 2. Description of the Related Art In an IC card having a nonvolatile memory capable of loading and deleting a plurality of applications and an IC chip with a CPU, a plurality of applications are usually loaded in a continuous area of the nonvolatile memory. I have. FIG. 5 is an explanatory diagram when a plurality of applications are loaded. In the IC card, since the capacity of the working RAM is small, the application is stored in a continuous area of the nonvolatile memory so as not to reduce the execution speed. For example, when the applications 1, 2, and 3 are loaded into the non-volatile memory 10 in this order as shown in the figure, each application is stored in a continuous area, and the area after the area where the application 3 is stored is an empty area. Become. A, B, C, and D in the figure represent the sizes of the respective areas. At this time, the start address and area size of each application are written as management data in a non-volatile memory area (not shown) managed by the OS. When an application is deleted in an IC card in which an application is mounted in a continuous area, memory fragmentation does not occur when the application is deleted in a reverse order to that when the application is mounted. As shown in (2), when the application 2 is deleted, an empty area is generated before and after the application 3. As described above, when the free area is divided into two areas, even if the total size of the free area can be mounted, it is impossible to additionally install an application larger than each divided area size. [0004] For this reason, it is necessary to change the mounting position of the application in order to combine the divided areas. However, in the case of an IC card, it takes time to write data into the nonvolatile memory. For this reason, when the size of the application becomes large, the processing time for executing the memory rearrangement before the normal use of the IC card increases, and the inconvenience of having to wait for the use occurs. It is also conceivable to execute memory relocation at the time of deleting an application, but it is inconvenient and irrational to wait a long time due to memory relocation, although a new application may not be loaded. SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and has as its object to provide an IC card which can eliminate memory fragmentation and inconvenience in use when free memory is combined. Aim. Therefore, the present invention provides a nonvolatile memory, a CPU,
In an IC card provided with an attached IC chip, fragmentation detection means for detecting a fragmented free memory at the time of starting the IC card, storage means for storing detection information of the fragmentation detection means, and a command from an external terminal Memory control means for reading the contents of the storage means in a waiting state and executing memory relocation when memory relocation is required. Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a conceptual diagram illustrating an IC card having a memory relocation function of the present invention, and FIG. 2 is a diagram illustrating a memory relocation function of the present invention. This embodiment is directed to an IC card including a nonvolatile memory in which a plurality of applications can be installed and deleted, and an IC chip (not shown) with a CPU. In FIG. 1, in a nonvolatile memory 10 in an IC card, applications 1, 2, and 3 are stored in a continuous area in this order as in the case of FIG. It is assumed that the size of each area is A, B, C, D. Here, as in the case of FIG. 6, if the application 2 is deleted, an empty area is created before and after the application 3. The divided memory free area is detected by, for example, the fragmentation detection unit 11 configured by the control program of the OS unit when the power is supplied from the external terminal and the OS unit is started, and the fragmentation detection information is It is stored in the storage means 11.
The fragmentation detection information is, for example, the presence / absence information of fragmentation, the start address of each free memory and the area size when fragmentation is present, and the storage unit 11 is a part of the nonvolatile memory area of the IC card managed by the OS. is there. For example, the control means 13 constituted by a control program of the OS section reads out the fragmentation detection information from the storage means 11 using the idle time in a command waiting state from an external terminal, and the fragmentation occurs. If there is, relocate the memory and combine the free areas. In this example, as shown in FIG.
The application 3 is moved so that the start address of the application 3 is continuous with the application 1. This movement processing is performed by copying (writing) a part of the application 3 into the free area, and sequentially overwriting the copied part of the application 3 when the free area B is completely filled. When the movement processing is completed, The free areas are merged, and the size becomes B + D. It should be noted that since the process of combining free areas takes time, if a command is received during the process, the process is interrupted, and the process is continued again after waiting for a command waiting state. In this case, the moving application 3
Is available as long as it does not overwrite its own area, because it exists completely in the old area. FIG. 3 is a diagram for explaining a memory fragmentation detection processing flow performed when the IC card is activated. Power is supplied from an external terminal to the IC card, and the IC card
When the S unit is activated (step S1), fragmentation detection processing is performed (step S2), and the detected fragmentation information is stored (step S3). FIG. 4 is a diagram for explaining a memory relocation processing flow performed in a command waiting state. It is determined whether or not it is waiting for a command from an external terminal (step S10), the fragmentation information stored during the command waiting state is read (step S11), and memory relocation processing is executed (step S12). As described above, according to the present invention, the application time in the IC card is automatically rearranged, so that the processing time when deleting the application or using the card can be shortened. Highly convenient IC for users
Cards can be provided.

【図面の簡単な説明】 【図1】 本発明のメモリ再配置機能を有するICカー
ドの説明図である。 【図2】 本発明のメモリ再配置機能を説明する図であ
る。 【図3】 ICカード起動時の断片化検出処理フローの
説明図である。 【図4】 コマンド待ち状態時のメモリ再配置処理フロ
ーの説明図である。 【図5】 複数のアプリケーションをロードする場合の
説明図である。 【図6】 アプリケーションの削除を説明する図であ
る。 【符号の説明】 10……不揮発性メモリ、11…断片化検出手段、12
…格納手段、13…制御手段。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is an explanatory diagram of an IC card having a memory rearrangement function according to the present invention. FIG. 2 is a diagram illustrating a memory relocation function of the present invention. FIG. 3 is an explanatory diagram of a fragmentation detection processing flow when an IC card is activated. FIG. 4 is an explanatory diagram of a memory relocation processing flow in a command waiting state. FIG. 5 is an explanatory diagram when a plurality of applications are loaded. FIG. 6 is a diagram illustrating deletion of an application. [Description of Signs] 10 ... Non-volatile memory, 11 ... Fragmentation detection means, 12
... storage means, 13 ... control means.

Claims (1)

【特許請求の範囲】 【請求項1】 複数のアプリケーションを搭載、削除可
能な不揮発性メモリ、CPU付きのICチップを備えた
ICカードにおいて、ICカード起動時に断片化した空
きメモリを検出する断片化検出手段と、前記断片化検出
手段の検出情報が格納される格納手段と、外部端末から
のコマンド待ち状態時に前記格納手段の内容を読み取
り、メモリの再配置が必要であるときにメモリ再配置を
実行するメモリ制御手段と、を有することを特徴とする
メモリ再配置機能を有するICカード。
Claims: 1. An IC card equipped with a non-volatile memory capable of loading and deleting a plurality of applications and an IC chip with a CPU, and a fragmentation detecting a fragmented free memory when the IC card is activated. Detecting means, storing means for storing detection information of the fragmentation detecting means, reading the contents of the storing means in a state of waiting for a command from an external terminal, and executing memory relocation when memory relocation is necessary. An IC card having a memory rearrangement function, comprising: a memory control unit that executes.
JP2002139491A 2002-05-15 2002-05-15 Ic card having memory rearrangement function Pending JP2003331239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002139491A JP2003331239A (en) 2002-05-15 2002-05-15 Ic card having memory rearrangement function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002139491A JP2003331239A (en) 2002-05-15 2002-05-15 Ic card having memory rearrangement function

Publications (1)

Publication Number Publication Date
JP2003331239A true JP2003331239A (en) 2003-11-21

Family

ID=29700615

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002139491A Pending JP2003331239A (en) 2002-05-15 2002-05-15 Ic card having memory rearrangement function

Country Status (1)

Country Link
JP (1) JP2003331239A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011123639A (en) * 2009-12-10 2011-06-23 Toppan Printing Co Ltd Native type ic card, ic card os and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011123639A (en) * 2009-12-10 2011-06-23 Toppan Printing Co Ltd Native type ic card, ic card os and method

Similar Documents

Publication Publication Date Title
JP3986950B2 (en) CPU, information processing apparatus having the same, and control method of CPU
CN100394391C (en) Systems and methods for storing data on computer systems
JP3830886B2 (en) Method for storing data in nonvolatile memory
JP4279553B2 (en) Quick wakeup method for flash memory system
TWI512476B (en) Method for controlling operations in a non-volatile memory device and related computer program product, computer readable storage medium, memory device, and host device
US20050086551A1 (en) Memory optimization for a computer system having a hibernation mode
JP2549034B2 (en) Storage device
JP2006079543A (en) Memory management device
JP2007058840A5 (en)
KR101846612B1 (en) Load boot data
JPH04362717A (en) System restarting device
JPH10154101A (en) Data storage system and cache controlling method applying to the system
JP2004362426A (en) Information processing system, its control method, and computer program
JP2004295865A (en) Automatic booting system and automatic booting method
US6851012B2 (en) Information processing system, information processing method and readable-by-computer recording medium
KR101392062B1 (en) Fast speed computer system power-on & power-off method
JPH07295866A (en) Data processor
JP2011053930A (en) Information processing apparatus, program and method for controlling power supply of memory
JP2005243000A (en) Semiconductor memory device, memory controller and data recording method
US7107407B2 (en) Arithmetic unit with reduced startup time and method of loading data
KR101691091B1 (en) Computing system and hibernation method thereof
JP2009258925A (en) Computer system and memory management method of computer system
JP2003331239A (en) Ic card having memory rearrangement function
JP4334312B2 (en) Start-up time reduction computing device and data loading method
JPH08171622A (en) Pc card

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050511

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070530

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070622

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070821

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20071109