FR2791444A1 - Data processing system automated memory allocation in virtual machine applications; uses decomposition graph applied automatically on element to forms at least elementary parts having size lower or equal to base memory - Google Patents

Data processing system automated memory allocation in virtual machine applications; uses decomposition graph applied automatically on element to forms at least elementary parts having size lower or equal to base memory Download PDF

Info

Publication number
FR2791444A1
FR2791444A1 FR9903839A FR9903839A FR2791444A1 FR 2791444 A1 FR2791444 A1 FR 2791444A1 FR 9903839 A FR9903839 A FR 9903839A FR 9903839 A FR9903839 A FR 9903839A FR 2791444 A1 FR2791444 A1 FR 2791444A1
Authority
FR
France
Prior art keywords
memory
blocks
graph
size
block
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
FR9903839A
Other languages
French (fr)
Inventor
Fridtjof Siebert
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.)
OPEN SOFTWARE FOUNDATION RESEA
Original Assignee
OPEN SOFTWARE FOUNDATION RESEA
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 OPEN SOFTWARE FOUNDATION RESEA filed Critical OPEN SOFTWARE FOUNDATION RESEA
Priority to FR9903839A priority Critical patent/FR2791444A1/en
Publication of FR2791444A1 publication Critical patent/FR2791444A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory

Abstract

A graph of decomposition is automatically applied to an element to form at least elementary parts (P1,P2,P3) having a size lower or equal to the base memory which stores every elementary section (P1,P2,P3) in a completely available memory block. All memory blocks (BM2,BM4,BM6) allocated for this request are combined in a graph of blocks identical to the graph of decomposition. An Independent claim is included for: (a) a device for an automatic allocation of a memory area

Description

Procédé et dispositif de gestion automatique des allocations-mémoire d'uneMethod and device for automatically managing the memory allocations of a

mémoire vive principalemain RAM

L'invention concerne la gestion automatique des allocations-  The invention relates to the automatic management of allocations

mémoire d'une mémoire vive principale et plus particulièrement la récupération automatique de place mémoire libre au sein d'une mémoire ayant subi une fragmentation au cours de l'exécution d'un programme implémenté dans un système de traitement de données numériques, par exemple un processeur ou une machine virtuelle,  memory of a main RAM and more particularly the automatic recovery of free memory space in a memory that has been fragmented during the execution of a program implemented in a digital data processing system, for example a processor or a virtual machine,

accédant à ladite mémoire.accessing said memory.

De la mémoire fragmentée est un espace mémoire inutilisé et qui ne peut pas être utilisé par le système de traitement de données pour satisfaire une requête d'allocation mémoire. Plus précisément, la mémoire fragmentée due à une fragmentation, dite externe, est une partie disponible de l'espace mémoire mais qui se compose de  Fragmented memory is an unused memory space that can not be used by the data processing system to satisfy a memory allocation request. More precisely, the fragmented memory due to fragmentation, called external, is an available part of the memory space but which consists of

segments non contigus, de telle sorte qu'une requête d'allocation-  non-contiguous segments, so that a request for allocation-

mémoire d'une taille supérieure au plus grand des segments disponibles, ne peut pas être satisfaite même si la taille totale de la  memory larger than the largest available segments, can not be satisfied even if the total size of the

mémoire fragmentée serait suffisante pour satisfaire à ladite requête.  fragmented memory would be sufficient to satisfy the said request.

Cette fragmentation externe conduit donc à une perte de la capacité mémoire. Le pourcentage de capacité mémoire ainsi perdue à cause de la fragmentation externe peut être très élevé, et ainsi, quelques éléments seulement, stockés dans la mémoire peuvent empêcher de larges espaces de mémoire d'être utilisés pour satisfaire à des requêtes  This external fragmentation therefore leads to a loss of memory capacity. The percentage of memory capacity thus lost due to external fragmentation can be very high, and thus only a few items stored in memory can prevent large memory space from being used to satisfy queries.

d'allocation mémoire de grande taille.  large memory allocation.

Un moyen classique pour remédier aux inconvénients de la fragmentation externe est d'implémenter une récupération automatique des espaces mémoire libres (dite "ramasse miettes" ou "Garbage Collector" en langue anglaise) capable de déplacer les segments stockés à certains endroits de la mémoire pour les stocker à d'autres endroits de façon à regrouper les segments-mémoire libres pour former un bloc continu disponible pour toute requête d'allocations-mémoire  A conventional way to overcome the drawbacks of external fragmentation is to implement an automatic recovery of free memory spaces (called "garbage collector" or "garbage collector" in English) able to move the stored segments to certain places of memory for store them at other locations to group free memory segments together to form a continuous block available for any memory-allocation requests

continu dont la taille n'excède pas celle du bloc-mémoire ainsi libéré.  continuous whose size does not exceed that of the memory block thus released.

Ceci étant, pour éviter de remettre à jour toutes les références d'un élément qui a été bougé au sein de l'espace mémoire, des cellules ou "poignées" spécifiques (handles en langue anglaise) sont utilisées et tous les accès aux segments de mémoire sont effectués via une telle poignée spécifique. Ceci a cependant pour conséquence de doubler le nombre des accès mémoire imposant ainsi une durée  This being so, to avoid updating all the references of an element that has been moved within the memory space, specific cells or "handles" (English handles) are used and all the accesses to the segments of memory are made via such a specific handle. However, this has the effect of doubling the number of memory accesses thus imposing a duration

d'exécution plus importante pour le programme.  more important execution for the program.

Par ailleurs, déplacer des éléments dans l'espace mémoire, et par conséquent modifier les adresses de ces éléments complique de façon significative l'optimisation des compilateurs puisque la détermination des adresses pour ces éléments, qui sont effectuées dans un code de compilation ou code-machine, peuvent devenir invalides lors de la mise en oeuvre du module de récupération automatique de  Moreover, moving elements in the memory space, and consequently modifying the addresses of these elements significantly complicates the optimization of the compilers since the determination of the addresses for these elements, which are carried out in a compilation code or code- machine, may become invalid during the implementation of the automatic recovery module of

place mémoire.memory space.

En outre, déplacer des éléments de taille importante, comme des tableaux importants, provoque des pauses non prédictibles dans l'exécution du programme, pauses dont la durée dépend de la taille des éléments et qui ne sont pas compatibles avec un système temps réel,  In addition, moving large items, such as large tables, causes unpredictable pauses in the execution of the program, pauses whose duration depends on the size of the elements and which are not compatible with a real-time system,

comme par exemple un calculateur embarqué.  as for example an onboard computer.

L'invention vise à apporter une solution à ces problèmes.  The invention aims to provide a solution to these problems.

L'invention a pour but d'éliminer toute fragmentation externe de mémoire, et ce sans nécessiter de déplacement des éléments stockés en mémoire. Un autre but de l'invention est de s'affranchir de l'utilisation de "poignées" spécifiques (handles) et par conséquent d'éviter de prévoir une capacité mémoire supplémentaire pour  The object of the invention is to eliminate any external fragmentation of memory, without the need to move the elements stored in memory. Another object of the invention is to overcome the use of specific "handles" (handles) and therefore to avoid providing additional memory capacity for

l'implémentation de telles poignées.  the implementation of such handles.

L'invention a également pour but de proposer une gestion automatique de mémoire qui soit compatible avec un traitement temps  The invention also aims to propose an automatic memory management that is compatible with a time processing

réel.real.

L'invention propose donc un procédé de gestion automatique des allocations-mémoire d'une mémoire vive principale par un système de traitement de données numériques, notamment un processeur ou une machine virtuelle, exécutant un programme implémenté dans ledit système, par exemple une machine virtuelle utilisant le langage JAVA  The invention therefore proposes a method for automatically managing the memory allocations of a main random access memory by a digital data processing system, in particular a processor or a virtual machine, executing a program implemented in said system, for example a virtual machine. using the JAVA language

(marque déposée) bien connu de l'homme du métier.  (registered trademark) well known to those skilled in the art.

Selon une caractéristique générale de l'invention, on partitionne l'espace mémoire de la mémoire vive princpale en au moins un groupe composé de plusieurs blocs-mémoire de taille mémoire identique et fixe pendant au moins une période temporelle de ladite exécution. Et, en présence d'une requête d'allocation-mémoire au cours de ladite période temporelle pour le stockage d'un élément dans ladite mémoire, on applique automatiquement un graphe de décomposition sur ledit élément de façon à le décomposer en au moins une partie élémentaire ayant une taille inférieure ou égale à ladite taille mémoire, et on stocke chaque partie élémentaire dans un bloc-mémoire totalement disponible, tous les blocs-mémoire alloués pour cette requête étant reliés conformément à un graphe de blocs identique au  According to a general characteristic of the invention, the memory space of the main random access memory is partitioned into at least one group composed of several memory blocks of identical and fixed memory size during at least one time period of said execution. And, in the presence of a memory allocation request during said time period for the storage of an element in said memory, a decomposition graph is automatically applied to said element so as to break it down into at least a part of the memory. elementary memory having a size less than or equal to said memory size, and each elementary part is stored in a fully available memory block, all the memory blocks allocated for this request being connected in accordance with a block graph identical to the

graphe de décomposition.graph of decomposition.

En d'autres termes, la mémoire est divisée en blocs de taille égale. Les requêtes d'allocation mémoire de petite taille peuvent être satisfaites en allouant un seul bloc-mémoire tandis que des requêtes de tailles plus importantes requièrent plusieurs blocs. Cependant, les blocs-mémoire de l'espace mémoire ne bougent jamais et tout bloc totalement disponible peut être utilisé pour toute requête d'allocation mémoire, quelle que soit la taille de la requête. Ainsi, de part l'utilisation automatique de blocs-mémoire identiques ayant une taille fixée, aucune fragmentation externe de la mémoire ne se produit, et tout bloc-mémoire disponible est toujours directement utilisable pour  In other words, the memory is divided into blocks of equal size. Small memory allocation requests can be satisfied by allocating a single memory block while larger size requests require multiple blocks. However, the memory blocks of the memory space never move and any fully available block can be used for any memory allocation request, regardless of the size of the request. Thus, due to the automatic use of identical memory blocks having a fixed size, no external fragmentation of the memory occurs, and any available memory block is always directly usable for

de nouvelles allocations-mémoire.new memory allocations.

Les compilateurs peuvent ainsi optimiser et réutiliser des calculs d'adresse puisque les adresses des éléments mémorisés ne  Compilers can thus optimize and reuse address calculations since the addresses of the memorized elements

changent jamais.never change.

Par ailleurs, un tel procédé de gestion de mémoire est compatible avec une exécution d'un programme temps réel puisque aucun élément mémorisé dans la mémoire n'est mobile. Il n'y a donc plus de problèmes dûs à de longues pauses provoquées par le déplacement d'éléments de grande taille mémorisés dans la mémoire  Moreover, such a memory management method is compatible with execution of a real-time program since no element stored in the memory is mobile. There are no more problems due to long pauses caused by moving large elements stored in memory

afin de rassembler des segments-mémoire disponibles.  to gather available memory segments.

Par ailleurs, puisque le dispositif de gestion automatique des allocations-mémoire ne fonctionne que sur des blocs de taille identique, il devient facile à implémenter et à vérifier. Ceci est particulièrement intéressant lorsque des certifications sont requises  Moreover, since the automatic memory allocation management device only works on blocks of identical size, it becomes easy to implement and verify. This is particularly interesting when certifications are required

pour des systèmes o la sécurité est particulièrement importante.  for systems where security is particularly important.

Au sens de la présente invention, l'expression "graphe de décomposition" ou "graphe de blocs" doit être prise dans un sens très large. En effet, le type d'accès mémoire le plus fréquent est un accès à un élément de petite taille. Dans ce cas, ces accès peuvent être effectués directement en utilisant un seul bloc-mémoire disponible de taille fixée. Plus précisément, lorsque la taille de l'élément est inférieure ou égale à un seuil prédéterminé, le graphe de décomposition conserve l'élément dans son intégralité, cet élément étant alors stocké dans son intégralité dans un seul bloc-mémoire  For the purposes of the present invention, the expression "decomposition graph" or "block graph" must be taken in a very broad sense. Indeed, the most common type of memory access is access to a small element. In this case, these accesses can be made directly using a single available memory block of fixed size. More precisely, when the size of the element is less than or equal to a predetermined threshold, the decomposition graph retains the element in its entirety, this element then being stored in its entirety in a single memory block

totalement disponible.totally available.

Par contre, pour des éléments de grande taille notamment, on décompose l'élément en plusieurs parties élémentaires que l'on stocke respectivement dans plusieurs blocs-mémoire disponibles, certains des blocs-mémoire du graphe de bloc contenant une information de lien permettant de désigner automatiquement le bloc suivant dans le  On the other hand, for large elements in particular, the element is decomposed into several elementary parts that are respectively stored in several available memory blocks, some of the memory blocks of the block graph containing link information for designating automatically the next block in the

graphe.graph.

Le graphe de décomposition peut être simplement une chaîne.  The decomposition graph can simply be a string.

Une telle chaîne peut être appliquée pour des objets de type JAVA.  Such a string can be applied for JAVA type objects.

En variante, le graphe de décomposition peut être une arborescence. Il en est ainsi en particulier lorsque l'élément à stocker  Alternatively, the decomposition graph can be a tree. This is particularly so when the item to be stored

est un tableau.is a painting.

Dans certaines applications, on peut partitionner l'espace  In some applications, we can partition the space

mémoire en plusieurs groupes de blocs-mémoire. Tous les blocs-  memory in several groups of memory blocks. All blocks-

mémoire d'un groupe ont la même taille fixe pendant au moins ladite  memory of a group have the same fixed size for at least

période temporelle d'exécution du programme. Par contre, la taille-  time period of program execution. However, the size

mémoire des blocs d'un groupe est différente de la taille mémoire des  block memory of a group is different from the memory size of the

blocs d'un autre groupe. On stocke alors un élément dans des blocs-  blocks from another group. We then store an element in blocks

mémoire appartenant à ces groupes. A cet égard on peut stocker un élément dans des blocs mémoire appartenant tous à un même groupe  memory belonging to these groups. In this respect, an element can be stored in memory blocks belonging to one and the same group

ou à des groupes différents.or to different groups.

Il est également possible de modifier la taille mémoire au cours de l'exécution du programme, la nouvelle taille mémoire restant identique et fixe pour tous les blocs-mémoire de chaque groupe pendant au moins une autre période temporelle de l'exécution du programme. L'invention a également pour objet un dispositif de gestion automatique des allocations-mémoire d'une mémoire vive principale, comprenant, outre ladite mémoire, un système de traitement de données numériques, par exemple un processeur, une machine virtuelle, un compilateur ou un interpréteur, apte à accéder à la mémoire pendant l'exécution d'un programme implémenté dans ledit système. Selon une caractéristique générale de l'invention, l'espace mémoire de la mémoire est partitionné en au moins un groupe composé de plusieurs blocs-mémoire de taille- mémoire identique et fixe pendant au moins une période temporelle de ladite exécution. Le système comprend des moyens aptes, en présence d'une requête d'allocation-mémoire au cours de ladite période temporelle pour le stockage d'un élément dans ladite mémoire, à appliquer automatiquement un graphe de décomposition sur ledit élément de façon à le décomposer en au moins une partie élémentaire ayant une taille inférieure ou égale à ladite taille mémoire. Le système comporte également des moyens aptes à stocker chaque partie élémentaire dans un bloc-mémoire totalement disponible de la mémoire, tous les blocs-mémoire alloués pour cette requête étant reliés conformément à un graphe de blocs identique au graphe de décomposition. Selon un mode de réalisation préféré de l'invention, le système est une machine virtuelle, par exemple une machine virtuelle JAVA, comportant un compilateur apte, en présence d'une instruction  It is also possible to modify the memory size during the execution of the program, the new memory size remaining identical and fixed for all the memory blocks of each group for at least one other time period of the execution of the program. The subject of the invention is also a device for automatically managing the memory allocations of a main random access memory, comprising, besides said memory, a digital data processing system, for example a processor, a virtual machine, a compiler or a interpreter, able to access the memory during the execution of a program implemented in said system. According to a general characteristic of the invention, the memory space of the memory is partitioned into at least one group composed of several identical memory memory blocks and fixed for at least one time period of said execution. The system comprises means capable, in the presence of a memory allocation request during said time period for storing an element in said memory, to automatically apply a decomposition graph on said element so as to decompose it. in at least one elementary part having a size less than or equal to said memory size. The system also comprises means capable of storing each elementary part in a memory block that is totally available from the memory, all the memory blocks allocated for this request being connected in accordance with a block graph identical to the decomposition graph. According to a preferred embodiment of the invention, the system is a virtual machine, for example a JAVA virtual machine, comprising a suitable compiler, in the presence of an instruction

de requête d'allocation mémoire, à générer automatiquement le code-  memory allocation request, to automatically generate the code-

machine permettant d'accéder à ladite mémoire conformément audit  machine making it possible to access said memory in accordance with the audit

graphe de bloc ou de décomposition.  block or decomposition graph.

En d'autres termes, la décomposition des éléments ainsi que la construction du graphe de blocs pour les accès mémoire, sont  In other words, the decomposition of the elements as well as the construction of the block graph for the memory accesses, are

totalement transparents pour l'utilisateur.  completely transparent to the user.

D'autres avantages et caractéristiques de l'invention apparaîtront h l'examen détaillé de modes de réalisation et de mise en oeuvre, nullement limitatifs, et des dessins annexés sur lesquels: - la figure 1 illustre schématiquement un mode de mise en oeuvre d'un moyen de récupération de place disponible dans une mémoire, appartenant à l'art antérieur, - la figure 2 illustre très schématiquement un mode de  Other advantages and characteristics of the invention will become apparent from the detailed examination of embodiments and implementations, in no way limiting, and the accompanying drawings, in which: FIG. 1 schematically illustrates an embodiment of FIG. a means for recovering space available in a memory, belonging to the prior art, - Figure 2 very schematically illustrates a mode of

réalisation d'un dispositif de gestion automatique d'allocations-  implementation of an automatic allocation management system-

mémoire selon l'invention, permettant une mise en oeuvre du procédé selon l'invention, et, - les figures 3 à 5 illustrent des mises en oeuvre du procédé selon l'invention permettant le stockage d'éléments de types différents  memory according to the invention, allowing implementation of the method according to the invention, and - Figures 3 to 5 illustrate implementations of the method according to the invention for storing elements of different types

et de grande taille dans une mémoire selon l'invention.  and large in a memory according to the invention.

Sur la figure 1, la référence MM désigne une mémoire vive principale dans laquelle sont stockés des éléments ou objets OB1, OB2 et OB3, à des adresses différentes. Au cours de l'exécution d'un programme implémenté dans un processeur accédant à ladite mémoire, les segments SM1, SM2 et SM3 de l'espace mémoire de la mémoire MM, qui étaient précédemment affectés à d'autres objets, ont ét6 lib6rés. L'algorithme de r6cupération de place-mémoire disponible (Garbage Collector) d6tecte alors de façon classique et connue par l'homme du métier les segments disponibles SM1-SM3 et déplace les objets OB2 et OB3 de façon à former à partir des segments fragmentés SM1, SM2 et SM3 un segment de m6moire disponible continu SM4, illustr6 sur la partie droite de la figure 1, segment SM4 qui est alors  In FIG. 1, the reference MM designates a main random access memory in which elements or objects OB1, OB2 and OB3 are stored at different addresses. During the execution of a program implemented in a processor accessing said memory, the segments SM1, SM2 and SM3 of the memory space MM, which were previously assigned to other objects, were released. The Garbage Collector (Garbage Collector) retrieval algorithm then detects, in a manner known to those skilled in the art, the available segments SM1-SM3 and moves the OB2 and OB3 objects to form from the fragmented SM1 segments. , SM2 and SM3 a continuous available memory segment SM4, illustrated on the right-hand side of Figure 1, segment SM4 which is then

capable de recevoir un nouvel objet de grande taille OB4.  able to receive a new large object OB4.

Selon l'invention, comme illustr6 plus particulièrement sur la figure 2, on ne déplace pas les objets m6moris6s de façon à lib6rer de la place mémoire, mais, comme on va le voir plus en d6tails maintenant, on partitionne la m6moire vive principale MM en un jeu de blocs-mémoire BMi de taille identique et fixée, et chaque bloc BMi totalement disponible pourra être utilisé pour une allocation mémoire  According to the invention, as illustrated more particularly in FIG. 2, the memorized objects are not moved so as to liberate memory space, but, as will be seen in more detail now, the main RAM memory MM is partitioned into a set of memory blocks BMi of identical size and fixed, and each block BMi totally available can be used for a memory allocation

de taille quelconque par le système de traitement de données SYS.  of any size by the SYS data processing system.

Ce système de traitement de données SYS peut être un processeur ou bien une machine virtuelle. Une machine virtuelle est une machine de traitement abstraite qui, d'une façon analogue à une machine de traitement réelle, possède un jeu d'instructions et utilise différentes zones de mémoire. En général, l'implémentation d'une machine virtuelle peut être réalisée de façon matérielle, par exemple par un processeur matériel, ou bien de façon logicielle par des implémentations de compilateur ou d'interpréteur, ou bien de façon mixte logiciel et matériel. Chaque instruction de machine virtuelle définit une opération spécifique qui doit être effectuée. La machine virtuelle n'a pas besoin de comprendre le langage informatique qui est utilisé pour générer les instructions de la machine virtuelle ou les implémentation de niveaux inférieurs à la machine virtuelle. Seul un format particulier d'instructions de machine virtuelle doivent être comprises. A titre d'exemple, des instructions de machines virtuelles peuvent être des instructions de machine virtuelles JAVA. Chaque instruction de machine virtuelle JAVA inclut un ou plusieurs octets qui codent des informations identifiant des instructions, des opérandes  This SYS data processing system can be a processor or a virtual machine. A virtual machine is an abstract processing machine that, in a manner analogous to a real processing machine, has a set of instructions and uses different areas of memory. In general, the implementation of a virtual machine can be performed in a hardware way, for example by a hardware processor, or in a software way by implementations of compiler or interpreter, or in a mixed software and hardware way. Each virtual machine instruction defines a specific operation that must be performed. The virtual machine does not need to understand the computer language that is used to generate the virtual machine instructions or the implementation of levels below the virtual machine. Only a particular format of virtual machine instructions should be understood. For example, virtual machine instructions can be JAVA virtual machine instructions. Each JAVA virtual machine instruction includes one or more bytes that encode information identifying instructions, operands

et toutes autres informations requises.  and any other information required.

On suppose maintenant dans l'exemple qui va être décrit que le système SYS est une machine virtuelle JAVA de 32 bits qui comporte des moyens logiciels MP de partitionnement de la mémoire MM, des moyens MD de détection des blocs-mémoire BMi disponibles (ces moyens de détection étant des moyens de structure classique et connue de l'homme du métier) ainsi que des moyens MG, dont on reviendra plus en détails ci-après sur la fonction, et dont le rôle est d'effectuer une décomposition des éléments de grande taille devant  It is now assumed in the example which will be described that the SYS system is a 32-bit JAVA virtual machine which comprises software means MP for partitioning the memory MM, MD means for detecting the memory blocks BMi available (these means detection means being conventional structure means and known to those skilled in the art) as well as MG means, which will be discussed in more detail below on the function, and whose role is to perform a decomposition of large elements. front size

être stockés dans la mémoire MM.be stored in memory MM.

Tous ces moyens MP, MD et MG sont réalisés de façon logicielle. On suppose ici que chaque bloc-mémoire BMI a une taille  All these means MP, MD and MG are made in software. It is assumed here that each BMI memory block has a size

fixe de 16 octets c'est à dire 4 mots machine de 4 octets chacun.  fixed 16 bytes ie 4 machine words of 4 bytes each.

On suppose également, en faisant référence plus particulièrement à la figure 3, qu'au cours de l'exécution du programme implément6 dans le système SYS, des objets OB1, OB2, OB4 et OB7 occupent les blocs-m6moire BM1, BM3, BM5 et BM7  It is also assumed, with particular reference to FIG. 3, that during the execution of the program implemented in the SYS system, objects OB1, OB2, OB4 and OB7 occupy the memory blocks BM1, BM3, BM5 and BM7

tandis que les moyens de d6tection MD ont détecté que les blocs-  while the MD detection means have detected that the

m6moire BM2, BM4, BM6, BM8, BM9 et BM10 étaient disponibles  memory BM2, BM4, BM6, BM8, BM9 and BM10 were available

pour une éventuelle autre allocation-mémoire.  for a possible other memory allocation.

On suppose également, en faisant r6férence plus particulièrement à la figure 4, qu'un objet OB6 composé de 7 champs  It is also assumed, with reference more particularly to FIG. 4, that an object OB6 composed of 7 fields

ou mots de 4 octets F1-F7 doit être stocké dans la m6moire MM.  or 4-byte words F1-F7 must be stored in the MM memory.

Les moyens MG appliquent alors automatiquement un graphe de décomposition sur l'objet OB6 de façon à le d6composer en trois  The means MG then automatically apply a decomposition graph on the object OB6 so as to decompose it in three

parties 6élémentaires P1, P2, P3.elementary parts P1, P2, P3.

La première partie P1 comporte un premier mot comprenant le type TY de l'objet, suivi des deux premiers mots de l'objet OB6, et d'un mot final LK1 contenant une information de lien. Cette information de lien rattache la première partie élémentaire P1 à la deuxième partie élémentaire P2 dont les trois premiers mots contiennent les trois autres mots F3, F4 et F5 de l'objet OB6 et dont le quatrième mot contient une information de lien LK2 qui rattache cette deuxième partie à la troisième partie élémentaire P3 contenant les  The first part P1 comprises a first word comprising the type TY of the object, followed by the first two words of the object OB6, and a final word LK1 containing link information. This link information links the first elementary part P1 to the second elementary part P2 whose first three words contain the other three words F3, F4 and F5 of the object OB6 and whose fourth word contains a link information LK2 which links this second part to the third elementary part P3 containing the

deux derniers mots F6 et F7 de l'objet OB6.  last two words F6 and F7 of object OB6.

Les moyens MG stockent alors respectivement les trois parties P1, P2, P3 dans par exemple les trois blocs de mémoire  The means MG then store the three parts P1, P2, P3 respectively in the three memory blocks

disponibles BM2, BM4 et BM6.available BM2, BM4 and BM6.

Les blocs BM2, BM4 et BM6 ne sont pas des blocs contigus et sont organis6s en un graphe de blocs analogue au graphe de décomposition de l'objet OB6. Plus particulièrement, dans le cas présent, les blocs BM2, BM4 et BM6 sont chaînés, le dernier mot ou champ de chacun des deux premiers blocs est utilisé pour désigner le bloc suivant dans la chaîme. Plus précisément, le mot LK1 contient par exemple l'adresse du premier mot du bloc BM4 tandis que le mot LK2  Blocks BM2, BM4 and BM6 are not contiguous blocks and are organized in a block graph similar to the decomposition graph of object OB6. More particularly, in the present case, the BM2, BM4 and BM6 blocks are chained, the last word or field of each of the first two blocks is used to designate the next block in the chain. More precisely, the word LK1 contains for example the address of the first word of the block BM4 while the word LK2

contient l'adresse du premier mot du bloc BM6.  contains the address of the first word of block BM6.

On remarque ici que les deux derniers mots du bloc BM6 ne sont pas occupés. Ceci étant, selon l'invention, ces deux derniers mots ne pourront pas être utilisés pour une autre allocation de mémoire tant  Note here that the last two words of block BM6 are not busy. That being the case, according to the invention, these last two words can not be used for another memory allocation so long.

que tous les mots du bloc ne seront pas déclarés disponibles.  all words in the block will not be declared available.

Pour l'implémentation de la gestion automatique des allocations-mémoire, il est nécessaire de disposer d'une information indiquant à quel endroit sont stockées les informations de type référence et de liens dans les blocs (en effet certains champs des  For the implementation of the automatic management of memory allocations, it is necessary to have information indicating where reference type information and links in the blocks are stored (indeed some fields of

objets peuvent également contenir des références à d'autres objets).  objects can also contain references to other objects).

Cette information peut être stockée dans un vecteur à un bit qui existe classiquement en parallèle avec la mémoire principale MM et qui fournit un bit par mot. Ce bit indique si le mot correspondant est une information de type référence ou de lien ou non. Ainsi, à titre indicatif, une valeur logique 1 signifiera que le mot correspondant est  This information can be stored in a one-bit vector which conventionally exists in parallel with the main memory MM and which provides one bit per word. This bit indicates whether the corresponding word is reference or link type information or not. Thus, as a guide, a logical value 1 will mean that the corresponding word is

une information de lien ou de référence.  link or reference information.

Le code qui est requis pour accéder à l'objet ainsi décomposé est créé automatiquement par l'interpréteur ou le compilateur de la machine virtuelle, cette décomposition de l'objet mémorisé restant transparente pour l'utilisateur. Seule l'adresse du premier bloc stockant  The code that is required to access the object thus decomposed is automatically created by the interpreter or the compiler of the virtual machine, this decomposition of the memorized object remaining transparent to the user. Only the address of the first block storing

l'objet est nécessaire pour accéder à l'objet dans sa totalité.  the object is needed to access the object in its entirety.

Bien entendu, pour de petits objets, dont les champs ne requièrent par exemple que 8 octets de mémoire, l'objet complet peut  Of course, for small objects, whose fields only require, for example, 8 bytes of memory, the complete object can

être stocké en totalité dans un seul bloc de 16 octets.  be stored entirely in a single block of 16 bytes.

Les tableaux sont des types particuliers d'éléments. Bien qu'il soit possible d'utiliser une arborescence du type chaîne pour décomposer et stocker des tableaux dans la mémoire, il est préférable, pour des tableaux de grande taille, d'utiliser une décomposition du type arborescence comme illustré plus particulièrement sur la figure  Arrays are particular types of elements. Although it is possible to use a tree of the type string to break down and store tables in the memory, it is preferable, for large tables, to use a decomposition of the tree type as illustrated more particularly in the figure.

5. Ceci permet d'accéder plus rapidement aux données du tableau.  5. This allows faster access to the table data.

Sur cette figure 5, un tableau TB du type JAVA, contenant 16 mots de données D1 à D16 est décomposé en six parties élémentaires  In this FIG. 5, a TB array of the JAVA type containing 16 words of data D1 to D16 is broken down into six elementary parts.

P1 àP6.P1 to P6.

Plus précisément, la partie P1 est la partie de tête du tableau qui contient une information TY relative au type de l'élément mémorisé. Une information LH relative à la longueur du tableau est stockée dans le deuxième mot du bloc. Une information DH relative à la profondeur du tableau est stockée dans le troisième mot du bloc, et enfin, une information de lien LK1 permettant de pointer la deuxième partie P2 du tableau décomposé, est stock6e dans le dernier mot du bloc. Les quatre mots de la deuxième partie P2 contiennent respectivement quatre informations de liens LK2-LK5 permettant respectivement d'accéder aux quatre parties P3 à P6 contenant les  More specifically, the part P1 is the leading part of the table containing TY information relating to the type of the stored item. LH information relating to the length of the table is stored in the second word of the block. DH information relating to the depth of the table is stored in the third word of the block, and finally, a link information LK1 for pointing the second part P2 of the decomposed table, is stored in the last word of the block. The four words of the second part P2 respectively contain four links information LK2-LK5 respectively allowing access to the four parts P3 to P6 containing the

données D1 à D16 du tableau.data D1 to D16 of the table.

Ces parties P1 à P6 sont respectivement stockées dans les blocs-mémoire totalement disponibles BM2, BM4, BM6, BM8, BM9 et BM10. Les mots LK2, LK3, LK4 et LK5 contiennent respectivement  These parts P1 to P6 are respectively stored in the fully available memory blocks BM2, BM4, BM6, BM8, BM9 and BM10. The words LK2, LK3, LK4 and LK5 respectively contain

les adresses des blocs-mémoire BM6, BM8, BM9 et BM10.  the addresses of memory blocks BM6, BM8, BM9 and BM10.

Pour accéder aux éléments d'un tel tableau, il est donc nécessaire de traverser l'arborescence jusqu'à ce que les blocs d'extrémités (ou "blocs feuilles") contenant les éléments désirés aient été atteints. Bien entendu, cette structure d'arborescence n'est pas visible pour l'utilisateur de la machine virtuelle, et l'interpréteur ou le compilateur génère automatiquement le code requis pour gérer les  To access the elements of such a table, it is therefore necessary to traverse the tree until the end blocks (or "leaf blocks") containing the desired elements have been reached. Of course, this tree structure is not visible to the user of the virtual machine, and the interpreter or compiler automatically generates the code required to handle the

accès à ce tableau.access to this table.

A titre indicatif, le code requis peut utiliser une courte boucle pour traverser la profondeur de l'arborescence jusqu'à ce que la donnée d'un bloc feuille puisse être atteinte. Ceci peut être aisément implément6 en code-machine. A titre d'exemple le pseudo-code C pour une telle boucle est le suivant: block * ptr = &array. data; for (int i = array. depth; i > o; i--)t ptr = ptr [index / node-width Ai % node- width]; } data = ptr [index % node-width]; Le coefficient node-width est une puissance constante de 2 indiquant le nombre de mots à un noeud de l'arborescence (4 dans l'exemple décrit). Bien entendu, l'homme du métier saura ajuster le code si la taille des éléments stockés dans le tableau est différente de la taille du  As an indication, the required code may use a short loop to traverse the depth of the tree until the data of a leaf block can be reached. This can easily be implemented in machine code. By way of example, the pseudo-code C for such a loop is the following: block * ptr = & array. data; for (int i = array. depth; i> o; i -) t ptr = ptr [index / node-width Ai% node- width]; } data = ptr [index% node-width]; The node-width coefficient is a constant power of 2 indicating the number of words at a node of the tree (4 in the example described). Of course, those skilled in the art will be able to adjust the code if the size of the elements stored in the table is different from the size of the

mot machine.machine word.

Ilhe

Claims (9)

REVENDICATIONS 1. Procédé de gestion automatique des allocations-mémoire d'une mémoire vive principale par un système de traitement de données numériques exécutant un programme implémenté dans ledit système, caractérisé par le fait qu'on partitionne l'espace mémoire de la mémoire vive principale (MM) en au moins un groupe composé de plusieurs blocs-mémoire (BMi) de taille-mémoire identique et fixe pendant au moins une période temporelle de ladite exécution, et en présence d'une requête d'allocation de mémoire au cours de ladite période temporelle pour le stockage d'un élément (OB6) dans ladite mémoire, on applique automatiquement un graphe de décomposition sur ledit élément de façon à le décomposer en au moins une partie  1. A method for automatically managing the memory allocations of a main random access memory by a digital data processing system executing a program implemented in said system, characterized by partitioning the memory space of the main random access memory ( MM) in at least one group composed of several memory blocks (BMi) of identical and fixed memory size during at least one time period of said execution, and in the presence of a memory allocation request during said period time for storing an element (OB6) in said memory, a decomposition graph is automatically applied to said element so as to decompose it into at least a part élémentaire (P1,P2,P3) ayant une taille inférieure ou égale à ladite taille-  (P1, P2, P3) having a size less than or equal to said size mémoire et on stocke chaque partie élémentaire (P1,P2,P3) dans un bloc-  memory and stores each elementary part (P1, P2, P3) in a block mémoire totalement disponible, tous les blocs-mémoire (BM2,BM4,BM6) alloués pour cette requête étant reliés conformément à un graphe de blocs  fully available memory, all memory blocks (BM2, BM4, BM6) allocated for this request being connected in accordance with a block graph identique au graphe de décomposition.  identical to the decomposition graph. 2. Procédé selon la revendication 1, caractérisé par le fait que lorsque la taille de l'élément est inférieure ou égale à un seuil prédéterminé, le graphe de décomposition conserve l'élément dans son intégralité, celui-ci étant alors stocké dans son intégralité dans un seul  2. Method according to claim 1, characterized in that when the size of the element is less than or equal to a predetermined threshold, the decomposition graph retains the element in its entirety, which is then stored in its entirety. in one bloc-mémoire totalement disponible (BMi).  fully available memory module (BMi). 3. Procédé selon la revendication 1, caractérisé par le fait qu'on décompose l'élément en plusieurs parties élémentaires que l'on stocke respectivement dans plusieurs blocs-mémoire disponibles, certains des blocs-mémoire du graphe de blocs contenant une information de lien (LKi) permettant de désigner automatiquement le  3. Method according to claim 1, characterized in that the element is broken down into several elementary parts which are respectively stored in several available memory blocks, some of the blocks of memory of the block graph containing link information. (LKi) to automatically designate the bloc suivant dans le graphe.next block in the graph. 4. Procédé selon la revendication 3, caractérisé par le fait que  4. Method according to claim 3, characterized in that le graphe de décomposition est une chaîne.  the decomposition graph is a string. 5. Procédé selon la revendication 3, caractérisé par le fait que  5. Method according to claim 3, characterized in that le graphe de décomposition est une arborescence.  the decomposition graph is a tree. 6. Procédé selon l'une des revendications précédentes,  6. Method according to one of the preceding claims, caractérisé par le fait qu'on partitionne l'espace mémoire (MM) en plusieurs groupes de blocs-mémoire, tous les blocs-mémoire d'un groupe ayant la même taille-mémoire fixe pendant au moins ladite période temporelle, la taille-mémoire des blocs d'un groupe étant différente de la taille-mémoire des blocs d'un autre groupe, et par le fait qu'on stocke un élément dans des blocs-mémoire appartenant à ces groupes.  characterized by partitioning the memory space (MM) into several groups of memory blocks, all the memory blocks of a group having the same memory size fixed for at least said time period, the memory size blocks of a group being different from the memory size of the blocks of another group, and by the fact that an element is stored in memory blocks belonging to these groups. 7. Procédé selon l'une des revendications précédentes,  7. Method according to one of the preceding claims, caractérisé par le fait qu'on modifie la taille-mémoire au cours de l'exécution dudit programme, la nouvelle taille-mémoire restant identique et fixe pour tous les blocs-mémoire (BMi) de chaque groupe pendant au moins une autre période temporelle de l'exécution du programme.  characterized by the fact that the memory size is modified during the execution of said program, the new memory size remaining identical and fixed for all the memory blocks (BMi) of each group for at least one other time period of the execution of the program. 8. Dispositif de gestion automatique des allocations-mémoire d'une mémoire vive principale, comprenant outre ladite mémoire, un système de traitement de données numériques apte à accéder à la mémoire pendant l'exécution d'un programme implémenté dans ledit système, caractérisé par le fait que l'espace-mémoire de la mémoire vive principale (MM) est partitionné en au moins un groupe composé de plusieurs blocs-mémoire (BMi) de taille-mémoire identique et fixe pendant au moins une période temporelle de ladite exécution, et par le fait que le système (SYS) comprend des moyens (MG) aptes, en présence d'une requête d'allocation de mémoire au cours de ladite période temporelle pour le stockage d'un élément dans ladite mémoire, à appliquer automatiquement un graphe de décomposition sur ledit élément de façon à le décomposer en au moins une partie élémentaire ayant une taille inférieure ou égale à ladite taille-mémoire et des8. Device for automatically managing the memory allocations of a main random access memory, comprising in addition to said memory, a digital data processing system able to access the memory during the execution of a program implemented in said system, characterized by the memory space of the main random access memory (MM) is partitioned into at least one group consisting of several memory blocks (BMi) of identical and fixed memory size for at least one time period of said execution, and in that the system (SYS) comprises means (MG) capable, in the presence of a memory allocation request during said time period for the storage of an element in said memory, to automatically apply a graph decomposing on said element so as to decompose it into at least one elementary part having a size less than or equal to said memory size and moyens (MG) aptes à stocker chaque partie élémentaire dans un bloc-  means (MG) able to store each elementary part in a block mémoire totalement disponible de la mémoire, tous les blocs-mémoire alloués pour cette requête étant reliés conformément à un graphe de  memory completely available, all memory blocks allocated for this request being connected in accordance with a graph of blocs identique au graphe de décomposition.  blocks identical to the decomposition graph. 9. Dispositif selon la revendication 8, caractérisé par le fait que le système (SYS) est une machine virtuelle comportant un compilateur apte, en présence d'une instruction de requête d'allocation mémoire, à générer automatiquement le code-machine permettant d'accéder à ladite mémoire conformément audit graphe de blocs ou  9. Device according to claim 8, characterized in that the system (SYS) is a virtual machine having a compiler adapted, in the presence of a memory allocation request instruction, to automatically generate the machine code for accessing said memory in accordance with said block graph or de décomposition.decomposition.
FR9903839A 1999-03-26 1999-03-26 Data processing system automated memory allocation in virtual machine applications; uses decomposition graph applied automatically on element to forms at least elementary parts having size lower or equal to base memory Pending FR2791444A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
FR9903839A FR2791444A1 (en) 1999-03-26 1999-03-26 Data processing system automated memory allocation in virtual machine applications; uses decomposition graph applied automatically on element to forms at least elementary parts having size lower or equal to base memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
FR9903839A FR2791444A1 (en) 1999-03-26 1999-03-26 Data processing system automated memory allocation in virtual machine applications; uses decomposition graph applied automatically on element to forms at least elementary parts having size lower or equal to base memory

Publications (1)

Publication Number Publication Date
FR2791444A1 true FR2791444A1 (en) 2000-09-29

Family

ID=9543710

Family Applications (1)

Application Number Title Priority Date Filing Date
FR9903839A Pending FR2791444A1 (en) 1999-03-26 1999-03-26 Data processing system automated memory allocation in virtual machine applications; uses decomposition graph applied automatically on element to forms at least elementary parts having size lower or equal to base memory

Country Status (1)

Country Link
FR (1) FR2791444A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0446940A2 (en) * 1990-03-16 1991-09-18 Fujitsu Limited Dynamic data storage system
EP0706130A1 (en) * 1994-10-07 1996-04-10 International Business Machines Corporation Contiguous memory allocation process

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0446940A2 (en) * 1990-03-16 1991-09-18 Fujitsu Limited Dynamic data storage system
EP0706130A1 (en) * 1994-10-07 1996-04-10 International Business Machines Corporation Contiguous memory allocation process

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ROUNCE P A: "A PROCESSOR WITH LIST STRUCTURED MEMORY", PROCEEDINGS OF THE ANNUAL EUROPEAN COMPUTER CONFERENCE. (COMPEURO),US,LOS ALAMITOS, IEEE. COMP. SOC. PRESS, VOL. CONF. 5, PAGE(S) 41-45, XP000245593 *

Similar Documents

Publication Publication Date Title
EP2013737B1 (en) Memory management system for reducing memory fragmentation
EP0920685B1 (en) Integrated circuit card comprising files classified in a tree structure
EP2366147B1 (en) Physical manager of synchronization barrier between multiple processes
EP0935781A1 (en) Method for allocating memory in a multiprocessor data processing system
FR2824160A1 (en) DYNAMICALLY CONFIGURABLE GENERIC CONTAINER
FR2804770A1 (en) METHOD AND SYSTEM OF EARLY ACCESS, IN PARALLEL, TO LABELS OF LOWER LEVELS AND FIRST-LEVEL HISTORY
CA2447516A1 (en) Management and synchronization application for network file system
FR2668271A1 (en) Interface for dynamic modelling of the performance of computer systems
EP3028243A1 (en) Determining topic relevance of an email thread
JP6759285B2 (en) Localized data affinity system and hybrid method
US9083725B2 (en) System and method providing hierarchical cache for big data applications
EP0805392A1 (en) Smart, least-recently-used method for reusing directory search handles
EP0251861B1 (en) Memory management unit
WO1994015292A1 (en) Buffer memory management method, recording medium and computer system incorporating same
EP1866770A1 (en) Method and system for maintaining consistency of a cache memory by multiple independent processes
FR2791444A1 (en) Data processing system automated memory allocation in virtual machine applications; uses decomposition graph applied automatically on element to forms at least elementary parts having size lower or equal to base memory
FR2791790A1 (en) Preconditioning and encoding of a data table and method for implementation of table requests using a vectoral processor to speed search process on large static databases
FR3050848B1 (en) SERVER ARCHITECTURE AND DATA REDISTRIBUTION METHOD FOR DISTRIBUTION OF A VERSIONED GRAPH.
CA2600504A1 (en) Container-level transaction management system and method therefor
EP2901291B1 (en) Method for managing the memory resources of a security device, such as a smart card, and security device implementing said method
FR2825491A1 (en) METHOD FOR IMPLEMENTING A PLURALITY OF OBJECT INTERFACES
WO2004042572A2 (en) Microcircuit card comprising means for publishing its computer objects
FR2697652A1 (en) A method for automatically determining the probabilities associated with a Boolean function.
FR3050845A1 (en) MANAGING ACCESS TO DATA IN A STORAGE SYSTEM
EP0354073A1 (en) Random access memory management system