Method and apparatus for transactional writing of data into...

Electrical computers and digital processing systems: memory – Storage accessing and control – Control technique

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C711S103000, C711S165000, C235S492000

Reexamination Certificate

active

06272607

ABSTRACT:

TECHNICAL FIELD
The present invention relates to transaction support in computer systems with constrained resources. More specifically, the present invention relates to the minimization of the amount of memory and the number of write-operations required for transaction support in a resource-constrained environment such as a smartcard, particularly a smartcard such as a Javacard offering a Java environment.
BACKGROUND OF THE INVENTION
A number of problems exist in smartcards that are to be updated after they have been issued to the customer. In such smartcards, the computing time, communication bandwidth, and transient memory (RAM) are limited. In addition, writing to persistent memory is much more expensive than writing to temporary memory, and finally no assumptions about the integrity of the communications infrastructure can be made.
One problem that exists is the overall time required to load code and linkage information into the smartcard, perform cryptographic decryption and integrity checks over the loaded data, and finally relocate the newly loaded code to prepare it for execution. Another problem that exists, is the amount of temporary data required to perform the above operations, and a further problem that exists, is that systems with state information residing in a persistent memory such as EEPROM are required to ensure that this information stays consistent even in case of unexpected power losses and other failures.
A transition from one consistent system state to another may involve updates of several cells of persistent memory. These updates should be performed atomically, where either all memory cells are updated or none of them. The atomicity of several memory updates is supported by the so called “transaction model” in which the system can designate the beginning of an atomic set of updates by issuing the begin-of-transaction command. This command may be given explicitly or implicitly, i.e. be contained in the atomic set command itself. For instance primitive commands, like the data types “byte” and “short” have to be atomically updated and their mere appearance may serve as begin-of-transaction command. Each persistent memory cell is then updated only conditionally by a transaction support system. That means that a memory cell appears to be updated and reading that memory cell returns its latest conditional value, but the update is not yet committed, i.e. guaranteed to remain in a subsequent start of the system. To commit all performed updates, the transaction-commit command is used. When this operation returns, all updates are guaranteed to be written to the persistent memory. If power is lost or some other system failure occurs prior to the completion of the transaction-commit operation, all conditional updates are discarded.
The implementation of the transaction model is generally based on maintaining a transaction buffer, part of which is in the persistent memory. There are two different modes of operation of the transaction support system. One mode is to maintain in the transaction buffer information allowing restoration of the original state of the memory cells updated in a transaction. Before updating a memory cell in a transaction, the transaction support system stores, in the transaction buffer, the cell's address and the previous value of that cell. This information allows to roll-back to that previous value in case of failure. If power is lost during a transaction, the data stored in the transaction buffer is used to recreate the old system state when power supply is established again.
An alternative approach is to write to the transaction buffer the conditional values of updated memory cells and their address/location instead of the old values. The memory cells themselves keep their old values. When a value is read, the transaction support system first inspects the transaction buffer; if a conditional value of the selected memory cell is in the transaction buffer, this value is returned. If this technique is used, no action is required in case of failure since the persistent system memory is unchanged before the transaction commits. The transaction-commit operation writes the values stored in the transaction buffer to their destinations.
In a resource-constrained environment, such as a smartcard, the size of the transaction buffer is highly critical. The goal of the transaction support system is to make most effective use of the transaction buffer to allow a higher number of updates to be executed within one transaction. Writing persistent memory is time-consuming compared to reading. The other goal is to reduce the number of expensive write-operations to persistent storage needed for transaction support.
Therefore, it is an object of the invention to provide a method and a device for transactional writing of data into a data space in persistent memory using a persistent intermediate buffer with a minimum number of write-operations.
It is another object of the invention to have the consistency of transactional writing guaranteed using a small persistent intermediate buffer (also called a transaction buffer).
SUMMARY OF THE INVENTION
A memory management system supporting dynamic allocation of persistent memory, maintains in persistent memory, information about which blocks are allocated and which are free. This memory state information shall be updated under transaction-control to ensure its consistency. Memory state information is maintained for each memory object. If a new object is allocated in a transaction, memory state information is written to the transaction buffer. Only if the transaction commits, does the memory state information indicate that the memory allocation state is effective. Otherwise, the memory block is marked as free by the memory state information. The invention exploits the fact that the content of free memory is not critical to the system and can be changed arbitrarily.
One scenario is that an application requests the presence of an object, which requests leads to an allocation of the object. The persistent memory comprises allocated and free blocks, whereby an allocated block, called data space, consists of a header, referred to as data header, and a payload area. The data header holds information to be used for memory management. The payload area contains application data that is critical to the application, i.e. the application relies on the consistency of this data.
A free block consists of a data space header and a free area, also called a free data space. The data space header holds information to be used for memory management, namely to signal to the memory management system that this block is free, and to indicate the blocks size, garbage collection status, etc. The content of the free area is not critical to any application, which means that the content of this area is of invisible to and inaccessible by the application and can be changed arbitrarily. Only the memory management system knows that this area exists and it knows via the data space header that no application cares about the contents.
The memory with the above described characteristics could be e.g. an object heap of an object-based system which is located e.g. in an EEPROM, FlashRAM, or a disk storage.
To allocate a new object, comprising an object header and an object payload, the memory management system inspects free memory space. If a free memory block, i.e. data space, with sufficient size is found, that block is allocated. The allocation comprises writing into the memory cells of the data space header to make it an object header and mark it respectively. The writing into this header is performed under transaction-control to ensure consistency of the memory management information. Furthermore, the data space is filled with the object payload. After the allocation, the application gets access to the written object payload area.
For performing the transaction-control, the transaction support system maintains a transaction buffer, also referred to as persistent intermediate memory buffer, in which are stored either the old values, i.e. the valu

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and apparatus for transactional writing of data into... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and apparatus for transactional writing of data into..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for transactional writing of data into... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2510198

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.