Title of Invention

A METHOD FOR UPDATING A SET OF DATA IN A MEMORY

Abstract A computer-readable medium storing a data structure for supporting persistant storage of a set of data, the data structure including: (a) at least an oldest version of the set of data in a first memory area, the first memory area including at least one first tag for uniquely identifying the oldest version, and (b) at least a most recently updated version of the set of data in a second, distinct memory area, the second memory area including at least one second tag for uniquely identifying the most recently updated version. The invention also relates to a computer arrangement including a processor and such a computer-readable medium, as well as to a method of updating sets of data having such tagged-data structures.
Full Text Arrangements storing different versions of a set of data in separate memory areas and method for updating a set of data in a memory.
FIELD OF THE INVENTION
The present invention relates to memory means comprising at least one set of data in a memory area. The memory means may be implemented with volatile RAM devices or with non-volatile silicon devices, such as EEPROM, Flash-EPROM or ROM. Usually, such memory stores operating system software modules, application program^, and application data. In areas where such computer systems according to the invention may be particularly applicable, some or all of the operating system software modules are stored in ROM.
DESCRIPTION OF PRIOR ART
In some applications, typically facial transaction processes, storing must be done very safely. Such safe storage applications are known as requiring "Atomicity of Update" in "persistent" storage means. In order to canny out such safe updating, the use of update logs is known from the prior art. Such update logs register which parts of a set of lATA has to be changed during an update session. Only when the set of data together with its updated parts has been stored in memory, all references to the former version of the set jf data may be removed.
OBJECT OF THE INVENTION
The object of the present invention is to support persistent application-data stories by providing a mechanism for atomicity of update for data stored in non-volatile memory devices, especially in silicon storage devices such as EEPROM or Flash-legroom.

SUMMARY OF THE INVENTION
Therefore, the invention is directed to a computer-readable medium storing a data structure for supporting persistent storage of a set of data, said data structure comprising:
(a) at least an oldest version of said set of data in a first memory area, said first memory area including at least one first tag for uniquely identifying said oldest version, and
(b) at least a most recently updated version of said set of data in a second, distinct memory area, said second memory area including at least one second tag For uniquely identifying said most recently updated version.
The application of such unique tags related to the different memory areas allows to uniquely identify which one of the versions are older versions. Moreover, the applica¬tion of such tags allows for identifying which versions relate to the same original set of data. Thus, in a memory, different versions of different sets of data may be present at the same time. Moreover, during updating the most resend updated version the older ver¬sions, as well as the most recently updated version, are not removed from memory. Only after an update action of the most recently updated version has been entirely completed the oldest version of the set of data may be removed from memory.
When, during an update action the updating is interrupted, the most recently up¬dated version is still present in de memory, thus guaranteeing the presence of at least one valid version of the set of data. Thus, "Atomicity of Update" is guaranteed. Such atomic updates guarantee either a complete replacement of the data or unmodified previously stored data, even if the update operation is disrupted.
In one embodiment, each of the versions of the set of data are stored in one or more memory pages, and each of the memory pages includes one tag, each tag comprising references to the set of data, a version number and a page number.
A page is defined as a memory area of consecutive memory locations which are dealt with as a unity such as appropriate for the storage technology concerned. Each page may correspond to one word line, thus facilitating memory imits read and write operations. Version numbers are assigned to the different generations of the set of data. Thus, differ¬ent version numbers relate to different generations. Different page numbers refer to differ¬ent pages within the same generation of the set of data.

The invention also relates to a computer arrangement including a processor and at least one computer-readable medium as defined above.
Preferably, the processor is arranged to write tags with redundancy as to the con¬tent and, after having read tags food the memory means, to analyze food the redimdancy whether or not write errors have occurred. Such a redimdancy can be used as an indication whether or not the tags concerned and the set of data to which the tags refer have valid values.
Preferably, the most recently updated version comprises a plurality of pages, each page having a unique tag, and the processor is arranged for updating said most recently updated version of said set of data and to write a predetermined tag of a predetennined one of said plurality of pages into said memory means as a last step of said updating. The predetermined tag, which is written last, can be read by the processor. If the processor detects the presence of this predetermined tag in the memory means, the processor can conclude that the updating action has been completed entirely.
The application of such tags provides for several new options. For instance, at least one of the tags may include additional data as to indicate ownership and use-rights, the processor being arranged to recognize ownership and use-rights from these additional data.
The use-rights may differ for different parts of the set of data and the processor may be arranged to recognize these different use-rights for these different parts.
Preferably, the processor is arranged to analyze tag values and is only allowed to access the versions of the set of data by reference through the tag values. Thus, access to the different versions of the set of data is not controlled by a usual program counter but by the tag values. In other words, the memory has become content addressable memory.
In the latter embodiment, the processor preferably comprises a central processing unit and a distinct memory managing unit, where the tag voltages are only known to the memory managing unit. Then, the physical address space of the memory means is not included in the address space of the central processing unit, especially not in the address space where application program or operating system software instructions are stored. In this manner, additional protection against "probing" can be obtained. To realize this potential protection, the memory managing unit may provide to the central processing unit additional interface functionality with a tag-size address register.
In order to increase the safety of stored data, the memory managing unit may

encode tags with a cryptographic key prior to writing them into the memory, the crypto¬graphic key being only known to the memory managing unit. Such a cryptographic key may relate to a cryptographic one-way function.
The present invention also relates to a method for supporting persistent storage of a set of data, comprising the steps of:
(a) storing an oldest version of said set of data in a first memory area, wherein said first memory area includes a fu^ tag for uniquely identifying said oldest version, and
(b) storing a most recently updated version of said set of data in a second distinct memory area, wherein said second memory area includes a second tag-for. uniquely identifying said most recently updated version.
BRIEF DESCRIPTION OF THE DRAWINGS
Hereinafter, the present invention will be described in detail with reference to some drawings which are intended only to illustrate the present invention and not to limit its scope.
Figure 1 shows an example of an embodiment according to the present invention.
Figure 2 shows a possible layout of a memory in accordance with the present in¬vention.
Figure 3 shows the content of memory pages in a possible embodiment of the arrangement according to figure 2.
Figure 4 illustrates a method in accordance with the present invention, and
Figure 5 illustrates a possible arrangement of a memory managing unit in accordeince with the present invention.
DESCRIPTION OF THE PREFERRED EMBODIMENT
Figure 1 shows one possible arrangement in accordance with the present inven¬tion. A central processing unit 2 is connected to input/output means 12 and to memor>" which may comprise ROM 6, RAM 8, and non-volatile memor\" 10. Arranged apart from

or within the central processing imit 2 there may be a memory manager 4. The manager 4 is arranged for carrying out memory functions which respect to the non-volatile memgry 10 and preferably also the other memory sections ROM 6 and RAM 8. The embodiment shown in figure 1 relates to all kinds of management systems of data storage. However, the invention is especially beneficial with resf>ect to data storage in non-volatile silicon devices rather than on hard disks. The important applications are in the field of embedded computer systems, and in single chip computers such as smart cards.
Figure 2 shows one possible arrangement of data storage in a memory in accordance with the present invention. The non-volatile data memory 10 may be parti¬tioned in storage units. Here, these units of memoiy storage are called "pages".XQn-, veniently, these pages may be of equal size, e.g. equal to the size of a "word-line" in sili¬con devices used to implement the memory. However, the pages may be of different sizes. The content of the memory is managed by the memory manager 4 page by page: alloca¬tion, updates, and de-allocation of application data storage involve manipulating one or more pages.
The memory comprises different generations (or versions) of a set of application data elements. Each generation may be stored in one or more pages. In figure 2, the situa¬tion is shown in which the memory comprises three different generations k, k+1, k+2 of one set of application data elements. The example shows that generation k occupies three pages 1, 2, and 3, generation k+1 occupies two pages i, i+1, and generation k+2 occupies two pages n, n+1. Generation k is the oldest version of the set of application data elements in the memory, whereas generation k+2 is the most recently updated version of the set of application data elements. Each of the generations k, k+1, k+2 may, e.g., relate to different versions of a software object.
The generations k, k+1, and k+2 are indicated to form a "data chunk" which term is used here as a reference to one single set of application data elements. Pages required for storage are allocated from any location in memory that is not occupied by a page as determined by the memor>" manager 4. The different generations k, k+I, k+2 of the data chunk shown in figure 2 may or may not be stored in memory in consecutive memory locations. The memory manager 4 is the unit to decide where to store the different genera¬tions. Even the pages within one generation need not be stored in consecutive pages. To illustrate this, pages n and n+1 are shown as being located remote from one another (indi¬cated by dots between them).

In-practice, the memory will contain several "data chunks", i.e., several sets of generations of different sets of data.
In a memory organized and managed in accordance with the present invention, atomicity of update is provided by the management policy carried out by the memory manager 4. After being stored, data related to a version of the set of application data ele¬ments will never be modified in the same memory area. In other words, a page once cre¬ated is never modified. When the last updated set of application data elements needs to be amended in accordance with an application program running on the central processing unit 2, a new memory area, e.g., a new set of pages, is allocated by the memory manager 4. In this new memoiy area any changed values together with values of data elements of , the set of application data elements that have not been changed are stored by the memory manager 4. In this way, the memory 10 will hold at any time at least one consistent, valid version of the data chunk.
Such an updating action may, e.g., relate to a smart card. Although updating of data in a smart card only takes a very short time (for instance about 3 msec) there is a small chance that the smart card is removed fk)m a commimicating terminal prior to com¬pleting the data transaction with the terminal. Thus, the updating may be interrupted prior to completion. When this happens, at least the last updated version is still present in the memory of the smart card.
In one embodiment, after completing the update of the set of data, the memory manager 4 proceeds by de-allocating the memory area storing the oldest version of the set 3f data. The memory manager 4 may, e.g., control the presence of no more than 10 ver¬sions of one set of application data elements. In a practical realization the application pro¬gram rurming on the central processing unit 2 will interact with the memory manager 4 to :ontrol the process of updating its data, e.g., to indicate completion of the update. The ipplication program will notify the completion of the update to the memory manager 4, ifter which the memory manager 4 completes the writing operations in the memory 10. 5uch update process signaling is customary in transaction processing systems.
When several versions of the set of application data elements are present in the nemory the modification history of the data may be analyzed through the memory man¬ger 4. The memory manager 4 does this by providing means for the application program mining in the central processing unit 2 to inspect, but not modify, data values in previous ersions.

Figure 3 shows a possible memory page structure in accordance with the present invention. It is assumed that the memory is divided into pages. Figure 3 shows two pages i, i+1. Each page i, i+1, contains application program data and a tag i, i+1. Preferably, the tag value consists of three parts: a "chunk identifier" chid, a generation count gen#, and a page count pg#. The chimk identifier serves as a unique reference to a programmer"s unit of stored data. The generation counter gen# identifies the version number of the data stored. At least two generations will be indicated by the feneration counters gen#. The page counter pg# indicates the page number of the page concerned within the generation of the set of program data to which the page belongs. The page counter pg# does allow that data of a generation of a set of data is stored as a multiple number of pages.
In one specific realization of the invention the tag value is stored in the memory using a special encoding, e.g., using redundancy for instance with a qualifying number of bits set to one. This special encoding is used by the memory manager 4 to detect cor¬rect/incorrect data write operations. Only if the qualified number of bits is detected to be one (or high) the memory manager 4 decides that the tag value is valid. If this qualified number of bits is not set to one, the memory manager 4 decides that the tag value is in¬valid. Such a situation may, e.g., be caused by interrupting the power supplied to the memory device, for instance when a user of a smart card removes his smart card fi-om a terminal prior to completion of a financial transaction.
In such an embodiment, prior to removing the oldest generation of the set of data, the memory manager 4 will determine the validity of the most recently updated genera¬tion. The specific tag encoding method may be determined from the physical characteris¬tics of the silicon storage device used. It should be chosen to have a very high likelihood of resulting in an invalid encoding if that memory device fails to write the page in its entirety. In dependence on the memory chip design (i.e. the transistor technology used), before writing new data in a page, some memories will first change all memory location values of a specified page into either zeros or ones. Therefore, as indicated above it is sometimes better to check whether a qualified number of bits in a tag is one whereas in other cases it might be better to check the presence of a qualified number of bits to be zero. Then, if the check on the tag is found to be correct it is a matter of known chance whether or not the content of the remainder of the page related to the tag is also written correctly.
Figure 4 summarizes the sequence of operations carried out by the memor\"

manager 4-in one embodiment of the invention when updating a version of stored applica¬tion data, as directed by an {^plication program running on the central processing unit^:
a. allocating a new set of pages in the memory 10, step 40;
b. defining the tag value of each new page of the new set of pages, step 42;
c. writing the application program data in its amended form and the corresponding
tags to memory 10 page by page, step 44;
d. verifying for each page written that the result is correct, step 46;
this verification step may be carried out by checking the tag value as indicated above;
e. de-ailocating pages that hold the oldest generation of the set of data, step 48* ..
The tag value for each new page is defmed v^th the assigned chtmk identifier
chid, the generation count value gen# of the most recently previous updated version in¬cremented by 1, and the page count pg#.
Preferably, the pages are written to memory 10 page by page as indicated in step c. above. Preferably one predetermined page of the set of pages for one set of data must be written last, ^^dle^eas all other pages can be written in any order. Conveniently, that pre¬determined page is the first page of the new set of pages. In practice, any of the pages may be written in parts. For example, a tag value of the page may be written separately fi-om the application program data in the page. Preferably, however, the tag of the predeter¬mined page, which is the last page to be written, is written in the last step of the updating action. This is a clear indication that the updating action has been completed. Until that tag of the predetermined page is written in memory, application program data written to any of the new pages may also be modified. However, it is to be noted that partial writes and modifications to page data may reduce the benefits obtainable with the invention, i.e., the total writing time may get longer. Writing the non-volatile memory 10, like EPROM, takes a relatively long time, nowadays about 3 msec. Therefore, it is best to write only once to memory 10, i.e., when the entire modified set of data is ready to be stored and not to write modified portions of the set of data in consecutive periods of time. Still, if time is available, as is often the case, it is common practice in the art to write modified portions of a set of data in non-volatile memory. However, this results in an increased number of write operations which leads to unnecessary wear of the non-volatile memory 10.
Therefore, in accordance with an embodiment of the invention, preferably, ail steps necessary to completely amend a set of data are carried out on a working copy of the

set of data-in RAM 8 prior to writing the amended set of data to non-volatile memory 10.
Writing the tag value of the predetemimed page as the last operation in an update session is an advantageous measure in realizing the atomicity of the multi-page update. The presence or absence of a valid tag in the predetermined page then serves as a "commit" flag: a valid tag in the predetermined page indicates both the validity of the written page and the irrevocable completion of the entire update process.
Memory storage of the application program data can be made even more secure when the date stored in the memory can only be addressed physically by the application using the chunk identifier chid. The memory 10 then has become a "content addressable memory" (CAM).
Although the memory manager 4 and the central processing unit 2 may be within one physical processing unit, it is especially advantageous for this latter feature that the ^central processing unit 2 and the memory manager 4 are two physically distinct imits arranged to communicate with one another. It is to be understood that "physically distinct" may still refer to units manufactured on a single chip. Then, the physical address space of the memory 10 is not included in the address space of the central processing imit 2, spe¬cifically not in the address space v/here application program or operating system software insU^ctions are stored. If, then, the memory manager 4 is also made tampjer-resistant (like in a smart card), additional protection against "probing" will be obtained.
To realize this potential additional protection for e.g. smart cards, the memory manager 4 may provide additional interface functionality, e.g., containing a tag-size address register 54 and a page-data size data register 52 (see figure 5). This interface 52, 54 is then complemented with a logic unit 50 to carry out logic functions for scaiming and matching tags stored in the memory 10. In other words, the logic imit 50 is able to read tags from memory 10 and to address the memory 10 by analyzing the value of the tags.
The interface 52, 54 and associated logic unit 50 may be implemented in hard¬ware.
In addition, specific hardware circuits 56. 58 will be present as interfaces between the memory 6, 8, 10 and the logic unit 50 and between the central processing unit 2 and the logic unit 50, respectively. The logic unit 50 may provide a dedicated address counter combined with a tag-comparing logic circuit. An alternative hardware circuit may contain content addressable memory logic circuits implemented per memory page at least for the storage bits reserved to contain the tag value.

Additional security benefits may be obtained with a memory managed according to the invention when in addition to the special detecting encoding the tag value is filler encoded using cryptographic techniques. Such cryptographic tag encoding intends to hide application data related to structural information like chunk identifier chid, generation count gen#, page count pg#, contained in the tag values. Cryptographic encoding may be done with any encoding technique known to a person skilled in the art. One advantageous method includes the use of secret cryptographic one-way functions in N^ch the one-way function steps are related to a secret key only known to the memory manager 4. In this way, the memory manager 4 is able to recognize a previous generation by applying the one-way function one or more times to the encoded tag value of that previous genjgfation and then comparing the resulting tag value with the tag value of the most recently updated generation. This will hamper reconstruction of application program data from an evil-in¬tended forced "dump" of the memory device content.
The tagged memory structure as explained hereinbefore provides several advan¬tageous options. For instance, the tag may include additional data to indicate ownership of the associated application program data. Moreover, such additional data in the tag value might indicate use-rights or sets of use-rights for different users of the application program data. Such different use-rights may, e.g., be related to different access conditions to differ¬ent parts of the (application) program data in the memory 10. One part of the (application) program data may, e.g., bs defined as read-only, whereas another part of the application program data may be defined to be read/write access.
The invention efficiently provides a transaction log stored in memory since the memory contains the history of updates to specific application data-elements in the form of consecutive generations.
As explained above, additionally, the number of write operations to memory devices managed in accordance with the present invention may be reduced using the memory-update/transaction logging mechanism disclosed. Additionally, a reduced num¬ber of write operations provided by the invention may result in reduced costs of the silicon storage device by extending its useful life. Security of data stored in, especially, the non¬volatile memory on tamper-resistant single chip computers, like smart cards, is increased. The increase of security may be entirely obtained by software measures. Hardware measures, like the distinct memory manager 4 apart from the central processing unit 2, may fiirther increase the security but are not strictly necessary.


WE CLAIM :
1. A method for updating a set of data in a memory, comprising the steps of
(a) storing an oldest version of said set of data in a first memory area, wherein said memory comprises at least one tag for identifying said oldest version, and
(b) storing a most recently updated version of said set of data in a second distinct memory area wherein said memory comprises at least one tag for identifying said most recently updated version.
said first memory area comprising a first set of one or more pages and said
second memory area comprising a second set of one or more pages comprising
consecutive memory locations which are dealty with as a unity during memory
operations like allocating, updating and de-allocating of application data
storage,
characterized in that
said method comprises providing each page with its own tag indicating a
version number (gem#) of said set of data and a page number (pg#) of said
page.
2. Method as claimed in claim 1, wherein each said tag comprises a reference (chide) to said set of data.
3. Method as claimed in claim 1, wherein each page corresponds to one word line.
4. Method as claimed in claim 1, comprising writing tags with redundancy as to their content and, after having read tags from the memory means, analyzing from said redundancy whether or not write errors have occurred.

5. Method as claimed in claim 1, comprising writing a predetermined tag of a
predetermined one of said plurality of pages into said memory as a last step of said
updating.
6. Method as claimed in claim 1, wherein at least one of said tags comprises
additional data as to indicate ownership and use-rights, and said method comprises
recognizing ownership and use-rights from these additional data.
7. Method as claimed in claim 6, wherein said use-rights differ for different parts of the set of data and the method comprises recognizing different use-rights for these different parts.
8. Method as claimed in claim 1, comprising analyzing tag values and only allowing to access said versions of said set of data by reference through said tag values..
9. A computer arrangement for updating a set of data in a memory by the method
claimed in any one of the proceeding claims.

Documents:

in-pct-2001-1740-che claims-duplicate.pdf

in-pct-2001-1740-che claims.pdf

in-pct-2001-1740-che correspondence-others.pdf

in-pct-2001-1740-che correspondence-po.pdf

in-pct-2001-1740-che description(complete)-duplicate.pdf

in-pct-2001-1740-che description(complete).pdf

in-pct-2001-1740-che drawings.pdf

in-pct-2001-1740-che form-1.pdf

in-pct-2001-1740-che form-19.pdf

in-pct-2001-1740-che form-26.pdf

in-pct-2001-1740-che form-3.pdf

in-pct-2001-1740-che form-5.pdf

in-pct-2001-1740-che others document.pdf

in-pct-2001-1740-che others.pdf

in-pct-2001-1740-che pct.pdf

in-pct-2001-1740-che petition.pdf


Patent Number 217030
Indian Patent Application Number IN/PCT/2001/1740/CHE
PG Journal Number 21/2008
Publication Date 23-May-2008
Grant Date 24-Mar-2008
Date of Filing 10-Dec-2001
Name of Patentee BELLE GATE INVESTMENT B.V
Applicant Address Parkweg 2, NL-2585 JJ Den Haag,
Inventors:
# Inventor's Name Inventor's Address
1 DE JONG, Eduard, Karel 522 S. Fremont Street, San Mateo, CA 94402,
2 BOS, Jurjen, Norbert, Eelco Deukelven 48, NL-1963 SR Heemskerk,
PCT International Classification Number G06F 11/14
PCT International Application Number PCT/NL99/00360
PCT International Filing date 1999-06-10
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 NA