|Publication number||US7024535 B2|
|Application number||US 10/471,322|
|Publication date||Apr 4, 2006|
|Filing date||Dec 20, 2001|
|Priority date||Dec 21, 2000|
|Also published as||DE60140208D1, EP1346287A2, EP1346287B1, US20040215913, WO2002050661A2, WO2002050661A3|
|Publication number||10471322, 471322, PCT/2001/4126, PCT/FR/1/004126, PCT/FR/1/04126, PCT/FR/2001/004126, PCT/FR/2001/04126, PCT/FR1/004126, PCT/FR1/04126, PCT/FR1004126, PCT/FR104126, PCT/FR2001/004126, PCT/FR2001/04126, PCT/FR2001004126, PCT/FR200104126, US 7024535 B2, US 7024535B2, US-B2-7024535, US7024535 B2, US7024535B2|
|Inventors||Nicolas Fougeroux, Patrice Hameau, Olivier Landier|
|Original Assignee||Cp8 Technologies|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (6), Referenced by (1), Classifications (11), Legal Events (11)|
|External Links: USPTO, USPTO Assignment, Espacenet|
The invention concerns a method for dynamically allocating memory workspace by elementary memory blocks to a data structure in an onboard computer system, or onboard system, and the corresponding onboard system.
The onboard systems, or current portable objects, such as the microprocessor cards or smartcards, PCMCIA cards and electronic assistants tend to perform more and more complex functions, due, in particular, to the installation of multiple application programs, the microprocessor or microcontroller cards being, in this case, known as multi-application cards.
A wide range of applications can be installed in this type of object, due to the flexibility of the current high level languages and their adaptability to the widest range of hardware elements through especially the implementation of virtual machines. In particular, in the framework of the developments in electronic cards with microprocessor or microcontroller, the installation of a large number of applications in this type of card is being considered, applications such as electronic purse, physical access control, access-control to services, for example pay TV programs or similar.
The installation of multiple applications on these portable objects is made possible, firstly, by the miniaturisation of electronic circuits and correlative increase in memory capacity of smartcards and, secondly, by the increase in computation power of the central processing units.
However, the multiplication of applications installed on this type of equipment raises the crucial problem of optimised dynamic memory allocation.
As shown on
The assembly is managed by an operating system OS, which can be installed in non volatile memory 18. In addition, in some cases, the multi-application portable object may include a cryptographic computation unit SI, referenced 20, itself connected to the microprocessor 14.
The microprocessor itself can be replaced or completed by logic circuits installed in a semiconductor chip, these logic circuits possibly being ASIC (Application Specific Integrated Circuit) type.
We know from document WO 01/16759 registered before this application but published after, a method for allocating memory divided into data blocks in a smartcard.
In order to rationalise the management of the memory workspace available on any computer system, in particular for an onboard system such as a microprocessor or a microcontroller card as shown on
This system also concerns, in the context of the above-mentioned rationalisation, finding out quickly to which application or data structure each byte stored in storage area belongs.
This system also concerns the implementation of a method for dynamically allocating memory by elementary memory blocks to a data structure in order to avoid or reduce any crumbling, or fragmentation, phenomenon, during the memory allocation/erasure process.
Lastly, this system also concerns the implementation of a method for dynamically allocating memory by elementary memory blocks, in which the memory integrity is guaranteed by checking the value of each elementary memory block allocated.
The method for dynamically allocating memory workspace to a data structure identified by an identification number and stored as digital information packets in the storage area of an onboard system, subject of this invention, is remarkable in that, the storage area being subdivided into elementary memory blocks, it is implemented from at least one elementary memory block erasure instruction and one elementary memory block allocation instruction, through which this elementary memory block is associated with a reference to this identification number. To allocate an elementary memory block, this method consists in assigning to the reference to the identification number the value of this identification number. To erase an elementary memory block, this method consists in assigning to the reference to the identification number an arbitrary value set a priori, different from any identification number.
The multi-application onboard system, subject of this invention, includes an operating system managing the input/output circuits, the arbitrary access memory and the non volatile memory via a microprocessor. It is remarkable in that it comprises in non volatile memory a table to manage the storage area by elementary memory blocks, this table comprising at least, for each elementary memory block, a reference to an identification number of the data structure to which the corresponding elementary memory block has been allocated and a value of memory workspace occupied in the corresponding elementary memory block assigned.
The method subject of the invention is applicable to dynamically allocating memory workspace in any onboard computer system, but more especially in any portable object such as a microprocessor or a microcontroller card, in which the memory resources are reduced, due to its limited size.
It will be easier to understand the method and the multi-application onboard system subject of the invention on reading the description below, written with reference to the accompanying drawings, apart from
We will now give a more detailed description of the method for dynamically allocating memory by elementary memory blocks to a data structure, subject of this invention, referring to
In particular, we see that step S corresponds to an initial state in which a data structure, formed by an application, by system data, if necessary specific numerical values or keys, must be stored, i.e. installed in the event of applications, for example in the storage area of an onboard system whose structure corresponds to that previously described in the description referring to
We see in particular that each data structure is identified by an identification number written ID_Aj where j can take values between 1 and n, n indicating the total number of data structures likely to be stored or installed in the above-mentioned memory workspace.
In addition, to implement the method subject of this invention, we indicate that the memory workspace subject to the method for dynamically allocating memory subject of this invention, is advantageously subdivided into memory blocks, each memory block written BL1, where 1 can vary from l=1 to l =L, consists of a given number of bytes.
In a non-limiting preferential mode of realisation, we indicate that the number of constituent bytes in each block BLl can be a power of 2 in order to simplify the addressing of each memory block and in each memory block so defined. In a mode of realisation given as a non-limiting example, we indicate that each block may comprise 256 bytes. In the initial step S, all identification numbers are written [ID—A j]j=1 n and all blocks [BLl]l=1 L.
Lastly, as part of the implementation of the method subject of this invention, we use an arbitrary numerical value, written AAAA, this arbitrary numerical value having a specific function which will be described below in the description, in order to implement the method for dynamically allocating memory subject of the invention.
Generally, remember that each data structure, i.e. applications, system data, specific numerical values or keys, identified by the identification number ID_Aj can be stored as packets of digital information in the storage area of the above-mentioned onboard system.
By packets of digital information, we mean firstly packets of digital data representative of an object code used to install and execute an application for example, system data or keys, or specific numerical values, representative of packets of application data generated by one or more applications installed on the corresponding onboard system, or intermediate digital data allowing the operating system to manage the assembly in order to execute the various features of the onboard system using the above-mentioned system data, keys or intermediate numerical values.
As shown on
In particular, and according to a remarkable aspect of the allocation method subject of this invention, the allocation operation A, to allocate an elementary memory block, consists in assigning the value of the identification number ID_Aj to the reference to the identification number associated with the elementary memory block considered.
Whereas in the memory allocation methods of the onboard systems according to the prior art, the storage areas of the data structures, such as the applications, have a simple reference to the identification number of the data structure or corresponding application taking the form of a pointer, pointer to the start of storage of the data structure or application and pointer to the end of storage of the data structure or application considered, the allocation step A according to the subject of this invention consists in fact in assigning as reference to the identification number of the data structure or application, the value of the above-mentioned identification number to each block BLl in which the packets of digital information of object code or data are stored. We see in particular, as shown on
We therefore see that the above-mentioned one to one correspondence can be achieved by associating with each block BLl a data field representative of the value of the above-mentioned identification number ID_Aj in a table to manage the dynamic memory allocation of the storage area of the above-mentioned onboard system.
The complete structure of the above-mentioned table will be given later in the description.
According to another remarkable aspect of the method for dynamically allocating memory by elementary memory blocks according to the subject of this invention, we indicate, in reference to
A more detailed description of a preferential mode of implementation of the method for dynamically allocating memory by elementary memory blocks according to the subject of this invention, will now be given in reference to
The method subject of this invention, in the mode of realisation of
We therefore write:
Under these conditions, the allocation operation A, as shown on
The above-mentioned test is written:
∃ BLl(ID_Aj) with ID_Aj=ID_Ak ? and j>j0
If a negative response is obtained to the test A1, which consists in looking for the next block belonging to the application whose identification number is ID_Ak, an instruction to allocate a free elementary memory block is called in step A3, none of the possible memory blocks already allocated to the application whose identification number is ID_Ak having sufficient free space to contain the information packet Qk.
BL a(AAAA)=BL a(ID — A k).
The above-mentioned instruction to allocate the next elementary block can therefore be used to allocate an elementary memory block of address a, a being any offset value, a∈N the set of natural integers. The elementary memory block chosen is of course an elementary block to which the arbitrary value AAAA was previously assigned and therefore corresponds to an erased block, i.e. a free block ready for any allocation and storage operation for the corresponding information packet Qk.
A positive response to test A1 indicates that the elementary memory block which has just been found is at least partly allocated to the data structure or application for which the allocation must be carried out.
If a positive response is obtained to the above-mentioned test A1, the allocation method then consists in checking, in a test A2, that there is sufficient memory workspace in the above-mentioned current elementary memory block BLl(ID_Aj) to store the above-mentioned digital information Qk.
LR j =LB j −LO j and Q k ≦LR j?
relation in which LRj designates the remaining memory workspace for the current elementary memory block, LBj designates the total memory workspace of each current elementary block, i.e. 256 bytes in the mode of realisation indicated above, and LOj designates the memory workspace occupied in the above-mentioned current elementary memory block.
If a positive response is obtained to the check test A2, the information packet Qk requiring memory workspace less than the memory workspace of the current elementary memory block, in a step A4, the above-mentioned current elementary memory block BLl(ID_Aj) can be allocated to the information packet Qk, it being possible to store the digital information packet Qk in the free storage area of the above-mentioned current elementary memory block. Consequently, the allocation step A4 consists in writing the information packet Qk in the block BLl(ID_Aj) and in updating the value of the memory workspace occupied in the block, written:
LO j =LO j +Q k.
If a negative response is obtained to the check test A2, the current block BL(ID_Aj0) not having enough free space to contain the information packet Qk, it is necessary to return to step A1 to look for a new block whose identification number is ID_Ak and which has not yet been analysed during this allocation.
Obviously, the allocation steps as such A3 and A4 are followed by a return to the initial state S.
In a non-limiting preferential mode of realisation, we indicate that after the allocation steps A3 and A4, and therefore after allocating an elementary memory block to an application and of course to the storage by writing digital information, i.e. the information packet Qk by writing this information in the elementary memory block allocated, the allocation method according to the subject of this invention may consist in addition in calculating, in a step A5, a checksum for the elementary memory block allocated, this operation being designated by calculation CKS on
Generally, we indicate that for the implementation of step A5, the checksum calculation can be carried out using traditional checksum calculation means, these calculation means may in fact correspond to the specialised calculation circuit 20 contained in the traditional onboard systems, as described previously in the description. A traditional error management step A6 can be planned.
A preferential mode of realisation of the elementary memory block checksum calculation is an asynchronous checking mode, as described on
As shown on the above-mentioned figure and preferably independently of any allocation of an elementary memory block to a data structure, the method for dynamically allocating memory subject of this invention may consist, for the implementation of step A5, in selecting according to a random selection criterion one of the elementary memory blocks allocated. This selection operation using a random selection criterion is represented on
BL d(X)=BL A(X).
In this relation, X designates the content of the elementary memory block BLA read.
The above-mentioned steps A51 and A52 are then followed by a step A53 which consists in calculating a checksum for the elementary memory block allocated selected. Step A53 is written “calculation CKS(X)”. This checksum is then compared with a true value stored in the above-mentioned table, according to the checksum type process mentioned earlier in the description.
If a positive response is obtained to the above-mentioned check, according to a remarkable aspect of the method subject of the invention, the checksum calculation process may be triggered periodically by a step A54 to return to step A51, in order to reinitialise the generation of a different random value, then the call to read the corresponding elementary memory block by executing steps A51 and A52.
On the contrary, if a negative response is obtained in the checksum calculation step A53, the checksum not being satisfied, an error return step A55 may be called, in order to indicate a stored data or code integrity problem. The traditional error management, step A6, may include blocking the onboard system, or an attempt to retrieve the data if an error-correcting code is used as checksum.
An example of specific implementation of the method for dynamically allocating memory by elementary memory blocks, according to the subject of this invention, will now be given below.
The method subject of the invention has been implemented for elementary memory blocks of 256 bytes, the following information being associated with each elementary memory block BL1:
Preferably, as will be described later in the description, the previous information is stored for each elementary memory block in the form:
As regards the encoding of the identification number associated with each elementary memory block, the following encoding was used:
The method for dynamically allocating memory by elementary memory blocks, subject of this invention, can also be used to erase any data structure, or application, identified by an identification number very flexibly and efficiently, as described below and shown on
Since a reference corresponding to the identification number is allocated to each elementary memory block, the corresponding erasure process may consist in collecting all blocks BL0, BLb to BLq whose identification number ID_Ae corresponds to the application to be erased in step E1 shown on
In view of this assignment, all blocks BL0, BLb to BLq are then considered as erased blocks and therefore available for future allocation, and for a write in the entire memory workspace reserved for each of these blocks.
As regards checking whether a byte belongs to the storage area allocated according to the method subject of this invention, the identification number of the corresponding application or data structure can be obtained using the following relation:
ID_Ak=info block [(address_byte-storage area_start_address)/64]
The previous relation is obtained according to the mode of realisation described for blocks of 256 bytes per block and 4 information bytes in info block per current block considered.
The implementation of the method for dynamically allocating memory, subject of this invention, avoids or reduces fragmentation of the storage area managed. When creating an object or a variable type, a search is carried out in the info block list to find the first block belonging to the application or to the data structure which has sufficient free space to create this object or variable type. Under these conditions, a new block is only allocated to an application, or to a data structure, if the remaining space is insufficient for the object or variable type to be created in at least one of the blocks already allocated to this application or this data structure. Consequently, there are no objects or variable types which are not distributed over at least two non-consecutive blocks. Since the above-mentioned objects or variable types do not have to be stored in a specific order, any erased block, which is now therefore free, can always be reassigned and reallocated, either to data from applications or to object code from an application. The risk of fragmenting is therefore limited to the loading and frequent erasure of consecutive code blocks.
The memory fragmentation phenomenon can also be reduced by reallocating elementary memory blocks to object code packets, by rearrangement by translation.
As regards the block check procedure, we indicate that the checksum is calculated for each block subject to the allocation process, i.e. to each write of the block considered. However, there is no need to check the blocks on each read, which would cause a significant reduction in memory access speed.
In an implementation variant, we indicate that the checksum can be calculated on each read for blocks containing data considered to be critical, such as for example sensitive data of the OS or key values for which the identification number may be the value FDh.
As regards the periodic repetition of the checksum calculation on randomly selected blocks, we indicate that the period can be set to 50 ms for example. The calculation of the checksum for all blocks can also be implemented during very specific events of the onboard system, such as its change of life state in the field of application of smartcards, for example.
An example of installing and deinstalling applet type applications, by implementing the method for dynamically allocating memory by elementary memory blocks, according to the subject of this invention, will now be given, referring to
In reference to
150 bytes of code, i.e. 1 block
600 bytes of data, i.e. 3 blocks
150 bytes of code, i.e. 1 block
150 bytes of data, i.e. 1 block
1100 bytes of code, i.e. 5 blocks
200 bytes of data, i.e. 1 block
400 bytes of code, i.e. 2 blocks
300 bytes of data, i.e. 2 blocks
In reference to
The following table II gives the value, in hexadecimal notation, of the identification number ID_Ak where k takes values 1 to 4, value 00 in hexadecimal notation corresponding to the arbitrary value AAAA.
A specific multi-application onboard system used to implement the method for dynamically allocating memory according to the subject of this invention will now be described, in reference to
Note that the corresponding onboard system is represented as a non-limiting example as a microprocessor or microcontroller card. This onboard system includes an operating system managing the input/output circuits of the random access memory and of the non volatile memory via the above-mentioned microprocessor.
In reference to the implementation of the method subject of this invention, it comprises in non volatile programmable memory 18 a, a table to manage the storage area by elementary memory blocks, this table comprising at least, for each elementary memory block BLl previously described in the description, a reference to an identification number of a data structure to which the corresponding elementary memory block has been allocated, and a value of memory workspace occupied in the corresponding elementary memory block allocated. The reference to the identification number of the data structure is written ID_A1, respectively ID_A2 and the value of memory workspace occupied is written LI1 respectively LI2 on
In addition, as shown on the above-mentioned figure, the table may comprise, for each corresponding elementary memory block, a checksum for the elementary block allocated, these values being written CKS1a and CKS1b, respectively CKS2a and CKS2b. We indicate that, in the mode of realisation on
When implementing the method subject of this invention, for an onboard system such as a smartcard, and for a non volatile memory 18 a consisting of an EEPROM type programmable memory of size 32 kbytes, the above-mentioned table occupies a memory workspace corresponding to 32×kbytes/256×4=512 bytes. We note that the memory workspace used to manage this memory workspace, according to the method for dynamically allocating memory by elementary memory blocks according to the subject of this invention, occupies, since the above-mentioned table has to be stored, 1.56% of the memory actually available. This low value of the memory size occupied to implement the method subject of this invention is quite acceptable considering the fact that it is much easier to use and install a wide range of applications, whose number only depends on the size of the non volatile memory 18 a.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US4882474 *||Feb 5, 1988||Nov 21, 1989||American Telephone And Telegraph Company||Security file system and method for securing data in a portable data carrier|
|US6480935 *||Aug 31, 1999||Nov 12, 2002||Todd Carper||Smart card memory management system and method|
|EP0686918A1||May 31, 1994||Dec 13, 1995||Siemens Nixdorf Informationssysteme AG||Object management method in a data processing system, especially adapted for memory management|
|GB2324894A||Title not available|
|WO1995010083A1||Sep 23, 1994||Apr 13, 1995||Cirrus Logic, Inc.||Flash memory with reduced erasing and overwriting|
|WO2001016759A1||Jan 5, 2000||Mar 8, 2001||Cryptec Systems, Inc.||Smart card memory management system and method|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US7434105 *||Nov 7, 2005||Oct 7, 2008||Symantec Operating Corporation||Selective self-healing of memory errors using allocation location information|
|U.S. Classification||711/170, 711/173, 711/E12.006, 711/171, 707/999.205, 707/999.202|
|Cooperative Classification||Y10S707/99953, Y10S707/99956, G06F12/023|
|Sep 9, 2003||AS||Assignment|
Owner name: CP8 TECHNOLOGIES, FRANCE
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:FOUGEROUX, NICOLAS;HAMEAU, PATRICE;LANDIER, OLIVIER;REEL/FRAME:015506/0388
Effective date: 20030616
|Jan 27, 2006||AS||Assignment|
Owner name: AXALTO SA, FRANCE
Free format text: CHANGE OF NAME;ASSIGNOR:SCHLUMBERGER SYSTEMES S.A.;REEL/FRAME:017218/0071
Effective date: 20041103
|Mar 1, 2006||AS||Assignment|
Owner name: CP8 TECHNOLOGIES, FRANCE
Free format text: RERECORD TO CORRECT ASSIGNEE 017218/0071;ASSIGNOR:AXALTO SA;REEL/FRAME:017300/0848
Effective date: 20060301
|Nov 9, 2009||REMI||Maintenance fee reminder mailed|
|Apr 4, 2010||REIN||Reinstatement after maintenance fee payment confirmed|
|May 12, 2010||AS||Assignment|
Owner name: SOLIDO 3D LTD.,ISRAEL
Free format text: CHANGE OF NAME;ASSIGNOR:SOLIDIMENSION LTD.;REEL/FRAME:024370/0549
Effective date: 20090908
|May 25, 2010||FP||Expired due to failure to pay maintenance fee|
Effective date: 20100404
|Jun 21, 2010||PRDP||Patent reinstated due to the acceptance of a late maintenance fee|
Effective date: 20100622
|Jun 22, 2010||FPAY||Fee payment|
Year of fee payment: 4
|Jun 22, 2010||SULP||Surcharge for late payment|
|Sep 24, 2013||FPAY||Fee payment|
Year of fee payment: 8