WO2013110816A2 - Method of using a shared memory - Google Patents

Method of using a shared memory Download PDF

Info

Publication number
WO2013110816A2
WO2013110816A2 PCT/EP2013/051594 EP2013051594W WO2013110816A2 WO 2013110816 A2 WO2013110816 A2 WO 2013110816A2 EP 2013051594 W EP2013051594 W EP 2013051594W WO 2013110816 A2 WO2013110816 A2 WO 2013110816A2
Authority
WO
WIPO (PCT)
Prior art keywords
task
shared memory
data processing
block
memory area
Prior art date
Application number
PCT/EP2013/051594
Other languages
French (fr)
Other versions
WO2013110816A3 (en
Inventor
Yves Albrieux
Original Assignee
Tymis
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 Tymis filed Critical Tymis
Publication of WO2013110816A2 publication Critical patent/WO2013110816A2/en
Publication of WO2013110816A3 publication Critical patent/WO2013110816A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms

Definitions

  • the present invention relates to the field of parallel architectures.
  • each computing unit has its own storage space (we speak of "distributed" memory).
  • This system is, however, unnecessarily expensive - since it is necessary to provide in n copies an oversized size memory to avoid problems of overflow - and requires that a heavy communication system be provided between the memories.
  • non-blocking synchronization try to avoid using these locks. They are nevertheless even more difficult to implement and require the establishment of very specific data structures.
  • IPC Inter-Process Communication
  • OpenMP Programming interface
  • SPMD Hight Performance Computing
  • the present invention aims to solve these difficulties by proposing a method of use by a task of a shared memory between a plurality of data processing units connected by an application bus, said task being executed by the user.
  • one of the data processing units the method being characterized in that it comprises steps of:
  • the partition of the first block allocated as a shared memory area for the task is dynamically generated according to a memory space size requested by the data processing unit;
  • the first shared memory block is structured into a set of equal sized units called "pages" each referenced by an index, the partition of the shared memory assigned as the shared memory area for the task being a set of pages said descriptor of the shared memory area being a page table containing indexes of pages composing said partition;
  • a table of pages containing the indexes of the pages composing a partition is represented in the second block of memory by a linked list of pairs, each pair comprising a page index and the memory displacement to be made in the second block to reach the next pair of the linked list;
  • Step (a) comprises obtaining a triplet of identifiers from an IPC key, the resource triplet assigned to the task being identified by the triplet of identifiers;
  • Each identifier is a unique integer for each resource type of the triplet;
  • the task is associated with a first instruction and a second instruction, the first instruction being a non-blocking instruction of the execution of the task and the second instruction being an instruction blocking the return of the result of the execution of the task. task, step (a) being implemented following the launch of the first instruction, and step (d) being implemented following the launch of the second instruction.
  • the invention relates to a method of parallel execution of a computer process by a plurality of data processing units connected by an application bus, the process being written in the form of a sequence of tasks, each task being an elementary action executable by a given processing unit to which said application bus is connected, the tasks being ordered according to possible dependency constraints vis-à-vis other tasks, the parallel execution method respecting the order indicated by the scheduling table, the execution of each task comprising the implementation of the method of use by the task of a shared memory by said data processing units according to the first aspect of the 'invention.
  • Performing a plurality of tasks (T) comprises implementing the method of use by the task of a shared memory by said data processing units according to the first aspect of the invention, the launching the second instruction of such a task (T) being done synchronously with the request to execute a second task (T2) having a dependence constraint vis-à-vis the first task (T).
  • the invention relates to a system comprising a plurality of data processing units implementing the method according to the first or second aspect of the invention, at the least a memory connected to a data processing unit, and an input receiving the plurality of tasks to be executed.
  • FIG. 1a represents an application bus architecture
  • FIG. 1b represents an application bus terminal architecture
  • FIG. 2 represents the transition from an IPC key to a triplet of IPC resource identifiers
  • FIG. 3 represents an example of a first block illustrating the phenomenon of fragmentation
  • FIG. 4a represents an example of a first paginated block and the second associated block
  • FIG. 4b illustrates the compacting problem in the second block of FIG. 4a
  • FIG. 5 shows the request / response mechanism on an automatically synchronized channel.
  • the method of use by a task of a shared memory according to the invention is via an application bus. Similar to ESBs (enterprise service bus), this bus is primarily allow the communication of applications that basically are not designed to work together.
  • BA Business Bus
  • NBA Application Bus Core
  • MCA Application Bus Multiplexer
  • TAA Application Bus Terminal
  • this terminal can be a Master Terminal (Tm) if the application is director or a Terminal Slave (Ts) if the application is controlled.
  • Tm Master Terminal
  • Ts Terminal Slave
  • an application bus may be interconnected to one or more other buses via their respective core (NBA).
  • NBA core
  • a machine constellation managed by a kernel-less BA can not be linked to another constellation.
  • Connections are for example implemented under standard protocol (TCP / IP, ...) advantageously via ports easily accepted by firewalls, domain servers and conventional gateways, under highly secure procedure.
  • the BA can only be accessed by an application via a TBA connected to the local MBA, as shown in Figure 1b.
  • Each application can launch threads and ask the BA to also provide them with a dedicated terminal which allows two threads to interact.
  • each terminal is able to operate in parallel requests-responses on different channels.
  • a dedicated "message pump” allows this terminal to warn of the arrival of data on a particular channel from another terminal.
  • Recent applications and / or adapted to BA can communicate with him live at TBA level.
  • older applications that do not know this BA are advantageously supported (“piloted” applications) by specific interfaces of each of these applications, responsible for offering them the specific adaptation allowing them to integrate a TBA: the CIA (interactive communication by PLC).
  • a CIA is a kind of host driver with the resources needed for applications connected to bus terminals.
  • Each TBA has a plurality of communication channels with its application, through which channels are made the requests for execution of a task and the withdrawal of responses. For each type of request / response, we associate a single channel. In this way, several exchanges can take place in parallel since the channels will be completely independent.
  • the BA thus offers the possibility of massively parallel processing of any process whose execution is required in a multi-core multi-machine environment regardless of the operating systems.
  • a memory proper (in other words a "block"), of any length
  • An access request device composed of a message queue (where the requesting tasks come to "take their turn” in the queue),
  • An access authorization and synchronization device "a semaphore”.
  • the operation of a triplet described above is as follows: the task wishing to use a memory deposits its request in the corresponding queue. It specifies the action (read / write) and the protection semaphore, a kind of red / green light that allows to know if the memory can be read / written. The task is blocked by this semaphore and is unblocked by the BA that releases the semaphore only when the memory is ready to be used and / or it is the turn of the said task to access it.
  • IPC is currently insufficient to manage more than a dozen machines, it is because current methods of using memory use a triplet per channel.
  • the method according to the invention aims to significantly increase the number of machines manageable by IPC without exceeding these limits.
  • the idea is that all the channels of a TBA share only a few messages, or even one, and especially share the same single large memory comprising a set of areas each relating to a channel.
  • the limit in terms of semaphores (32000) poses no problem as the semaphores are reusable.
  • TBA has instruction to immediately process any request from a task, so to empty the queue (which is FIFO type) as quickly as possible.
  • the ratio between the maximum number of message queues and that of the number of shared memory blocks is greater than two. This makes it possible to associate with each queue (and therefore with each TBA) two memory blocks.
  • the shared memory associated with a TBA is composed of two parts, a part dedicated to the storage of the data of the tasks strictly speaking (data on which the processing units act during the execution of a task), and a part dedicated to the storage of descriptors of the structure of the first part.
  • the first block associated with the TBA is dedicated to the storage of the data of the tasks and it is called “block of data”
  • the second block associated with the TBA is dedicated to the storage of the descriptors, and is called “Descriptive block”.
  • the first part of the method according to the invention thus consists in the allocation by the application bus to the task of a resource triplet (IPC) comprising a semaphore, a shared memory area and a queue, the semaphore indicating a blocking state of the task, the shared memory area being a partition of a first shared memory block, a descriptor of the shared memory area being stored in a second shared memory block, said second block being dedicated to storage descriptors of the first shared memory block.
  • IPC resource triplet
  • the semaphore is modified so as to indicate a state of release of the task.
  • the memory area is then available for use by the data processing unit assigned for the execution of the task, without the risk that this use is disturbed by another task. It should be noted that when the memory is available, it is not necessarily immediately used. On the other hand, once the completion of the task has been completed, the answer may be requested a little later. Preparing "in advance" the uses of memory is thus a force of the method according to the invention. An effective acceleration is obtained. This will be detailed further in the following description.
  • the final step of the method consists in the release of the space of the second shared memory block allocated to the storage of the descriptor of the shared memory area, in order to be assigned again to the storage of the descriptor of the shared memory zone which will be used for another task. Assigning an IPC Resource Triplet
  • the management of all IPC resources should preferably be the responsibility of a single entity. This ensures seamless management by a single creative process. This role is vested in the MBA, the BA's multiplexer.
  • the MBA assigns the resource triplet of step (a). It is said that the process will be housed (login in English).
  • TBA master (Tm) triplet At the end of this housing request the process will be either rejected or accepted. If it is accepted (successful login) the MBA will put at its disposal a TBA master (Tm) triplet.
  • the Tm will exploit these minimal resources to present an extensive collection of logical channels of exchange.
  • any master process hosted on the MBA can initiate other so-called slave processes which themselves may require a Slave Terminal (Te) in the image of the Tm.
  • Te Slave Terminal
  • An application is housed on the BA (all machines linked by their MBA).
  • the applications communicate with each other thanks to the BA which manages all the shared resources.
  • the three IPC resources are advantageously identified by a single integer within the operating system considered. This identifier is unique for each type of IPC resource (semaphore, shared memory, message queue). It can be reused from one type to another.
  • each process can then calculate the identifier. This is the solution advantageously preferred by the invention.
  • IPC requires passing through the following two basic steps: Obtaining identifier from a key (represented for the triplet of identifiers in FIG. 2)
  • the obtaining of an identifier is for example carried out by a system call offered by the Posix IPC library (semget, shmget, msgget) or Windows (CreateSemaphore, MapViewOfFile, CreateMailSIot).
  • the IPC resource is created through a second system function reserved for this purpose.
  • the method according to the invention proposes two different policies for partitioning memory space:
  • This method consists in dividing the memory space into several partitions of the same size or different size.
  • the size and number of partitions are fixed in advance and the partitioning is done at the start of the operating system.
  • This method lacks a lot of flexibility and causes internal fragmentation.
  • the sizes of the memories requested rarely correspond to the sizes of the fixed partitions, and the difference constitutes a non-usable memory space.
  • the requested size exceeds that of the partitions, operations of replacement of memory areas will be possible (overlaying).
  • the partition of the first block allocated as a shared memory area for the task is dynamically generated according to a memory space size requested by the data processing unit.
  • Dynamic partitioning thus consists of creating memory zones that vary dynamically.
  • the allocation of the memory is done according to the requests of reservation, of release but also of the available memory size.
  • This allocation policy creates what is called external fragmentation, which is due to unused partitions (internal fragmentation is the undefined free area of a partition, while external fragmentation is unassigned partitions). Nevertheless, the impact of internal fragmentation is significantly reduced.
  • Figure 3 illustrates the phenomenon of fragmentation (internal / external).
  • compaction memory It is always possible to gather all unused spaces into a single partition, this technique is known as compaction memory. Memory compaction is strongly discouraged because it monopolizes at once: the CPU, the RAM and the system bus during data transfer operations.
  • This algorithm is very similar to the one previously described except that the search starts from the position of the last selected partition.
  • the first shared memory block is advantageously structured in a set of units of equal size called "pages" each referenced by an index, the partition of the shared memory allocated as a shared memory area for the task being a set of pages, said descriptor of the shared memory area being a page table containing indexes of pages composing said partition.
  • the allocation spaces are considered to be a non-contiguous space, this is called pagination.
  • the principle of pagination is to structure the memory space into a set of equal sized units called pages.
  • the memory space allocated to a partition will then consist of a set of pages that are not necessarily successive.
  • a partition is no longer identified by its starting address and its size, but by all the pages that compose it, these pages can be organized as a table called a page table that describes the reference to the partition.
  • Figure 4a shows a first block organized in pages and the second associated block.
  • Non-contiguous (page-based) allocation approaches allow good use of address space. When talking about virtual memory, paging also allows:
  • Pagination completely eliminates the problem of external fragmentation since all pages are the same size. However, the internal fragmentation problem may occur in the last page of a partition if it is not fully populated.
  • the size of the pages is a parameterizable criterion.
  • the size of pages is defined according to the size of data exchanged (data structures). The smaller the partition sizes, the more partitions there will be and therefore the page tables will gain volume. You always have to find the right balance between the page size and the overall size of the first IPC memory block.
  • the navigation in a shared memory block requires a preliminary knowledge of its composition: number of available partitions, size of the memory pages, pages allocated to the allocated partitions, etc. This part is the description of a memory block, it can be either integrated directly into the same first block (data block), or integrated into the second block (descriptive block). Each partition in the description block corresponds as explained to a logical channel.
  • step (d) requires a fairly heavy memory compaction if the page table of a partition of the first block is itself a contiguous partition of the second block.
  • the descriptive block is advantageously structured in such a way as to avoid as much as possible the problems related to compaction of the memory, internal and external fragmentation.
  • the offset of the memory areas is avoided as much as this operation is very expensive in CPU time.
  • a table of pages containing the indexes of the pages composing a partition is for example represented in the second memory block by a linked list of pairs, each pair comprising a page index and the memory displacement (or "offset") to perform in the second block to reach the next pair in the linked list.
  • the available memory of a task can be used only much later, in this case when the processing unit actually needs the result of the task: at the time of synchronization.
  • the use and then the release of the memory can be seen as a "response” after a "request”.
  • a pair of instructions called "P-instructions"
  • the first instruction being a non-blocking instruction to request the execution of the task (the “request")
  • the second instruction being a blocking instruction returning the result of the execution of the task (the "response")
  • the step (a) being implemented following the launching of the first instruction
  • the step (d) being implemented following the launch of the second instruction.
  • each task being an elementary action executable by a given processing unit to which said application bus is connected, the tasks being ordered according to possible dependency constraints for other tasks, it is possible to execute the process in a parallel way provided that the scheduling order is respected for the execution of the tasks.
  • the invention thus proposes a method for parallel execution of a computer process by a plurality of data processing units connected by an application bus, the process being written in the form of a sequence of tasks, each task being an elementary action executable by a processing unit given to which said application bus is connected, the tasks being ordered according to possible dependency constraints vis-à-vis other tasks, the parallel execution method respecting the order indicated by the scheduling table, the execution of each task comprising implementing the method of use by the task of a memory shared by said data processing units according to the first aspect of the invention.
  • the P-instructions are particularly suitable for controlling the sequence of tasks, since it is sufficient to obtain automatic synchronization that the launch of the second instruction of a task (T) is done synchronously with the request. execution (the first instruction in the case of a P-instruction) of a second task (T2) having a dependence constraint vis-à-vis the first task (T).
  • the invention proposes systems that can implement the methods according to the first or second aspect of the invention.
  • the first functionality requested from the application bus is to ensure the routing of all data between all the actors of all the interconnected configurations.
  • the system according to the invention comprises the workstation, the latter comprising first of all data display means and data acquisition means. It can be classically a screen and a keyboard with a mouse. This material is simply used to implement one or more human-machine interfaces allowing a user to interact with the BA, possibly by providing processes to execute.
  • the system according to the invention also comprises a data processing unit, which is the unit connected to the application bus, and a memory.
  • the processing unit must preferably be a multicore processor (in this case it will be understood as a plurality of processing units), that is to say a processor that can take advantage parallel execution.
  • the memory is advantageously a single shared memory.
  • This workstation hosts the NBA if there is one.
  • the system according to the invention may not be content with a single workstation, but understand as explained above at least one partner machine.
  • the application bus serves as multiple stations (users) and multiple partners (PLCs) in MSMP configuration. It operates in various configurations called “degraded" Simple / Multiple Station / Partner SSSP, SSMP, MSSP and MSMP. Finally, the application bus is able, as far as possible, to support the links of the real-time type required for certain devices (peripherals, control of production lines, etc.). It thus provides a bridge between the industrial world and the office world for example to obtain a real-time picture of the production.
  • the bus uses the connections and the existing physical media between the usual types of machines (file server, web server, application server, etc.).
  • two TCP / IP ports can be reserved for it (12 and 14 or 3012 and 3014) for its maximum throughput and optimized communications.
  • the communications are multiplexed and each segment has a priority.
  • the task synchronization messages are the highest priorities as well as any real-time links.
  • the scheduling operations of the application bus can be optionally processed by a calculator, ideally vector, which is a processing unit of one of the partner machines, which can be dedicated.
  • a graphics card located on a partner is used as GPGPU (General-Purpose Computation on Graphics Processing Units). Indeed a graphics card is a complete vector calculator.
  • the application bus preferably operates in a secure environment.
  • the multiplexer / demultiplexer is thus provided with a strong encryption function.
  • the system used is random key encryption of variable lengths and automatically refreshed. Thus any attack is thwarted by a key change in a shorter time than that requested by the key search.
  • the strength of the whole is subject to a quality objective that makes the application bus performs particularly advantageously a tracing of its operations and transactions.
  • This tracing is of course not a priority and does not impact the performance of the whole. It is treated as an acquisition of data stored in cache and then saved in times of lower priority.
  • An ancillary tool can make it possible to use these data on demand and at leisure to search the history of any event or extract any useful statistics, or to allow more precise adjustment of the parameters of the application bus so as to optimize the operation for a given configuration.

Abstract

The present invention relates to a method of using, by a task, a memory shared between a plurality of data processing units connected by an application bus, said task being executed by one of the data processing units, the method being characterized in that it comprises steps of: (a) assigning by the application bus to the task of a triplet of resources comprising a semaphore, a shared memory area and a queue, the semaphore indicating a state of blockage of the task, the shared memory area being a partition of a first shared memory block, a descriptor of the shared memory area being stored in a second shared memory block, said second block being dedicated to the storage of descriptors of the first shared memory block; (b) when the application bus notes that said shared memory area assigned is free and/or that the task has passed to the head of the queue, modification of the semaphore so as to indicate a state of freeing of the task; (c) use by the data processing unit of said shared memory area assigned for the execution of the task; (d) freeing of the space of the second shared memory block allocated to the storage of the descriptor of the shared memory area. The invention also relates to a method of parallel execution of a computer process and a system for this purpose.

Description

PROCEDE D'UTILISATION D'UNE MEMOIRE PARTAGEE  METHOD OF USING A SHARED MEMORY
DOMAINE TECHNIQUE GENERAL La présente invention se rapporte au domaine des architectures parallèles. GENERAL TECHNICAL FIELD The present invention relates to the field of parallel architectures.
Plus précisément, elle concerne un procédé d'utilisation d'une mémoire partagée par plusieurs applications ou plusieurs tâches. ETAT DE L'ART  More specifically, it relates to a method of using a shared memory by several applications or several tasks. STATE OF THE ART
Les architectures parallèles sont devenues le paradigme dominant des systèmes informatiques depuis quelques années, le traitement simultané d'une pluralité de tâches démultipliant des performances. Parallel architectures have become the dominant paradigm of computer systems in recent years, with the simultaneous processing of a plurality of tasks multiplying performance.
Cependant, un des problèmes que le parallélisme pose est la gestion d'espace mémoire, en particulier mémoire vive. La première solution est que chaque unité de calcul dispose d'un espace de stockage propre (on parle de mémoire « distribuée »). Ce système est toutefois inutilement cher -car il faut prévoir en n exemplaires une mémoire de taille surdimensionnée pour éviter des problèmes de dépassement de capacité (« overflow »)-, et nécessite que soit prévu un lourd système de communication entre les mémoires.  However, one of the problems that parallelism poses is the management of memory space, in particular RAM. The first solution is that each computing unit has its own storage space (we speak of "distributed" memory). This system is, however, unnecessarily expensive - since it is necessary to provide in n copies an oversized size memory to avoid problems of overflow - and requires that a heavy communication system be provided between the memories.
Alternativement à la mémoire distribuée, on trouve la mémoire dite « partagée », c'est-à-dire co-utilisée par les différentes unités de calcul, ce qui évite les inconvénients susmentionnés. L'accès à une même mémoire par deux processus ou plus nécessite cependant quelques précautions. D'un point de vue matériel, il est nécessaire d'interdire la lecture d'une zone de mémoire si une autre tâche est en train de la réécrire sous peine de lire un curieux mélange, et réciproquement. Le processus de lecture est en effet plus rapide que celui d'écriture. En outre, deux écritures simultanées ne peuvent être autorisées, sinon on risque une situation de « concurrence », dont le résultat est imprévisible. Seules deux lectures simultanées ne posent pas de problème. Alternatively to the distributed memory, there is the so-called "shared" memory, that is to say, co-used by the different calculation units, which avoids the aforementioned drawbacks. Access to the same memory by two or more processes, however, requires some precautions. From a material point of view, it is necessary to forbid the reading of an area of memory if another task is in the process of rewriting it under pain of reading a curious mixture, and vice versa. The reading process is indeed faster than that of writing. Moreover, two simultaneous writings can not be authorized, otherwise we risk a situation of "competition", whose result is unpredictable. Only two simultaneous readings are not a problem.
On voit donc la nécessité d'un système de gestion de l'accès à une mémoire partagée entre deux tâches ou plus.  We therefore see the need for a management system for access to shared memory between two or more tasks.
Pour résoudre ce genre de problème, une possibilité est d'utiliser des verrous, c'est-à-dire de pouvoir bloquer, en une seule instruction, tous les processus tentant d'accéder à une donnée jusqu'à ce que le verrou soit libéré. Cette technique ralentit ainsi l'exécution parallèle, et est parfois source de bugs : si on a deux taches nécessitant deux variables, et que la première tâche verrouille la première variable pendant que la seconde tâche verrouille la seconde variable, alors les deux tâches seront indéfiniment bloquées dans ce que l'on appelle une « étreinte fatale », ou « deadlock » en anglais.  To solve this kind of problem, one possibility is to use locks, that is to say to be able to block, in a single instruction, all the processes trying to access a data until the lock is released. This technique slows down parallel execution, and is sometimes a source of bugs: if you have two tasks requiring two variables, and the first task locks the first variable while the second task locks the second variable, then both tasks will be indefinitely blocked in what is called a "deadly embrace", or "deadlock" in English.
Certaines méthodes de programmation appelées « Non-blocking synchronization » cherchent à éviter d'utiliser ces verrous. Elles sont néanmoins encore plus difficiles à mettre en œuvre et nécessitent la mise en place de structures de données très particulières.  Some programming methods called "non-blocking synchronization" try to avoid using these locks. They are nevertheless even more difficult to implement and require the establishment of very specific data structures.
Les systèmes d'exploitation modernes parviennent à contourner le problème en évitant soigneusement toute interférence d'un processus sur l'autre. Ce contrôle implique une gestion draconienne de l'ensemble des ressources d'un ordinateur en amont de la mémoire. Cela signifie cependant qu'une tâche d'une machine d'un premier type ne peut partager une mémoire avec une tâche d'une machine d'un second type sans utiliser un mécanisme d'interface complexe. On dit en effet que la gestion de mémoire est « machine-dépendante ».  Modern operating systems can get around the problem by carefully avoiding any interference from one process to the other. This control involves a drastic management of all the resources of a computer upstream of the memory. This however means that a task of a machine of a first type can not share a memory with a task of a machine of a second type without using a complex interface mechanism. It is said that memory management is "machine-dependent".
Le seul mécanisme « machine-indépendant » et normalisé qu'il existe à l'heure actuelle est IPC (Inter-Process Communication). Cependant, IPC trouve sa limite dans le paramétrage du noyau du système d'exploitation. En effet, en général IPC est limité à la gestion de 4096 blocs de taille maximale de 32 Mo, et à 1656 files de messages pour une distribution de Linux. Cela est insuffisant pour partager les mémoires de plus d'une dizaine de machines interconnectées par un bus applicatif. The only "machine-independent" and standardized mechanism that exists today is IPC (Inter-Process Communication). However, IPC finds its limit in the kernel configuration of the operating system. Indeed, in general IPC is limited to the management of 4096 blocks of maximum size of 32 MB, and 1656 message queues for a maximum of Linux distribution. This is insufficient to share the memories of more than ten machines interconnected by an application bus.
Par ailleurs il existe une API (interface de programmation) réservée au calcul scientifique et au HPC (Hight Performance Computing) dénommée OpenMP qui est du type SPMD (Single Programme Multiple Data), c'est-à-dire que OpenMP ne s'applique qu'entre les tâches d'une même application. Bien que basée sur le multi-threading, OpenMP n'a pas de solution pour le parallélisme sur une architecture distribuée, et n'a pas de solution pour la parallélisation automatique. Elle demande au programmeur de prendre les précautions nécessaires concernant les synchronisations et les étreintes fatales éventuelles. Cette API nécessite un complément comme MPI (Message Passing Interface) mais qui est elle- même machine dépendante.  Moreover, there is an API (programming interface) reserved for scientific computing and HPC (Hight Performance Computing) called OpenMP which is of SPMD type (that is to say that OpenMP does not apply). than between the tasks of the same application. Although based on multi-threading, OpenMP has no solution for parallelism on a distributed architecture, and has no solution for automatic parallelization. She asks the programmer to take the necessary precautions concerning the synchronizations and possible fatal hugs. This API requires an add-in like Message Passing Interface (MPI) but which itself is dependent machine.
Il y a donc un besoin en un nouveau procédé machine-indépendant de gestion sécurisée d'une mémoire partagée qui soit bien plus efficace et flexible que les techniques connues.  There is therefore a need for a new machine-independent method of secure management of shared memory that is much more efficient and flexible than known techniques.
PRESENTATION DE L'INVENTION La présente invention vise à résoudre ces difficultés en proposant un procédé d'utilisation par une tâche d'une mémoire partagée entre une pluralité d'unités de traitement de données connectées par un bus applicatif, ladite tâche étant exécutée par l'une des unités de traitement de données, le procédé étant caractérisé en ce qu'il comprend des étapes de : PRESENTATION OF THE INVENTION The present invention aims to solve these difficulties by proposing a method of use by a task of a shared memory between a plurality of data processing units connected by an application bus, said task being executed by the user. one of the data processing units, the method being characterized in that it comprises steps of:
(a) Affectation par le bus applicatif à la tâche d'un triplet de ressources comprenant un sémaphore, une zone de mémoire partagée et une file d'attente, le sémaphore indiquant un état de blocage de la tâche, la zone de mémoire partagée étant une partition d'un premier bloc de mémoire partagée, un descripteur de la zone de mémoire partagé étant stocké dans un deuxième bloc de mémoire partagé, ledit deuxième bloc étant dédié au stockage de descripteurs du premier bloc de mémoire partagée. (b) Lorsque le bus applicatif constate que ladite zone de mémoire partagée affectée est libre et/ou que la tâche est passée en tête de la file d'attente, modification du sémaphore de sorte à indiquer un état de libération de la tâche; (a) Assignment by the application bus to the task of a resource triple comprising a semaphore, a shared memory area and a queue, the semaphore indicating a blocking status of the task, the shared memory area being a partition of a first shared memory block, a descriptor of the shared memory area being stored in a second shared memory block, said second block being dedicated to the storage of descriptors of the first shared memory block. (b) When the application bus finds that said assigned shared memory area is free and / or the task has moved to the top of the queue, changing the semaphore to indicate a release status of the task;
(c) Utilisation par l'unité de traitement de données de ladite zone de mémoire partagée affectée pour l'exécution de la tâche ;  (c) use by the data processing unit of said assigned shared memory area for execution of the task;
(d) Libération de l'espace du second bloc de mémoire partagée alloué au stockage du descripteur de la zone de mémoire partagée.  (d) Freeing the space of the second shared memory block allocated for storing the descriptor of the shared memory area.
Selon d'autres caractéristiques avantageuses et non limitatives de l'invention : According to other advantageous and nonlimiting features of the invention:
• la partition du premier bloc affectée en tant que zone de mémoire partagée pour la tâche est générée dynamiquement en fonction d'une taille d'espace mémoire demandée par l'unité de traitement de données ;  The partition of the first block allocated as a shared memory area for the task is dynamically generated according to a memory space size requested by the data processing unit;
• le premier bloc de mémoire partagée est structuré en un ensemble d'unités de taille égale appelées « pages » référencées chacune par un indice, la partition de la mémoire partagée affectée en tant que zone de mémoire partagée pour la tâche étant un ensemble de pages, ledit descripteur de la zone de mémoire partagée étant une table de pages contenant les indices des pages composant ladite partition ;  The first shared memory block is structured into a set of equal sized units called "pages" each referenced by an index, the partition of the shared memory assigned as the shared memory area for the task being a set of pages said descriptor of the shared memory area being a page table containing indexes of pages composing said partition;
• une table de pages contenant les indices des pages composant une partition est représentée dans le second bloc de mémoire par une liste chaînée de couples, chaque couple comprenant un indice de page et le déplacement mémoire à effectuer dans le second bloc pour atteindre le prochain couple de la liste chaînée ;  A table of pages containing the indexes of the pages composing a partition is represented in the second block of memory by a linked list of pairs, each pair comprising a page index and the memory displacement to be made in the second block to reach the next pair of the linked list;
• l'étape (a) comprend l'obtention d'un triplet d'identifiants à partir d'une clé IPC, le triplet de ressources affecté à la tâche étant identifié par le triplet d'identifiants ;  Step (a) comprises obtaining a triplet of identifiers from an IPC key, the resource triplet assigned to the task being identified by the triplet of identifiers;
· chaque identifiant est un nombre entier unique pour chaque type de ressource du triplet ; • la tâche est associée à une première instruction et une deuxième instruction, la première instruction étant une instruction non-bloquante de demande de l'exécution de la tâche et la deuxième instruction étant une instruction bloquante de retour du résultat de l'exécution de la tâche, l'étape (a) étant mise en œuvre suite au lancement de la première instruction, et l'étape (d) étant mise en œuvre suite au lancement de la seconde instruction. · Each identifier is a unique integer for each resource type of the triplet; The task is associated with a first instruction and a second instruction, the first instruction being a non-blocking instruction of the execution of the task and the second instruction being an instruction blocking the return of the result of the execution of the task. task, step (a) being implemented following the launch of the first instruction, and step (d) being implemented following the launch of the second instruction.
Selon un deuxième aspect, l'invention concerne un procédé d'exécution parallèle d'un processus informatique par une pluralité d'unités de traitement de données connectées par un bus applicatif, le processus étant écrit sous la forme d'un enchaînement de tâches, chaque tâche étant une action élémentaire exécutable par une unité de traitement donnée à laquelle ledit bus applicatif est connecté, les tâches étant ordonnées en fonction d'éventuelles contraintes de dépendance vis-à-vis d'autres tâches, la méthode d'exécution parallèle respectant l'ordre indiqué par la table d'ordonnancement, l'exécution de chaque tâche comprenant la mise en œuvre du procédé d'utilisation par la tâche d'une mémoire partagée par lesdites d'unités de traitement de données selon le premier aspect de l'invention. According to a second aspect, the invention relates to a method of parallel execution of a computer process by a plurality of data processing units connected by an application bus, the process being written in the form of a sequence of tasks, each task being an elementary action executable by a given processing unit to which said application bus is connected, the tasks being ordered according to possible dependency constraints vis-à-vis other tasks, the parallel execution method respecting the order indicated by the scheduling table, the execution of each task comprising the implementation of the method of use by the task of a shared memory by said data processing units according to the first aspect of the 'invention.
Selon d'autres caractéristiques avantageuses et non limitatives de l'invention :  According to other advantageous and nonlimiting features of the invention:
• l'exécution d'une pluralité de tâches (T) comprend la mise en œuvre du procédé d'utilisation par la tâche d'une mémoire partagée par lesdites d'unités de traitement de données selon le premier aspect de l'invention, le lancement de la deuxième instruction d'une telle tâche (T) étant fait de façon synchrone avec la demande d'exécution d'une deuxième tâche (T2) ayant une contrainte de dépendance vis-à-vis de la première tâche (T). Selon un troisième aspect, l'invention concerne un système comprenant une pluralité d'unités de traitement de données mettant en œuvre le procédé selon le premier ou le deuxième aspect de l'invention, au moins une mémoire connectée à une unité de traitement de données, et une entrée recevant la pluralité de tâches à exécuter. Performing a plurality of tasks (T) comprises implementing the method of use by the task of a shared memory by said data processing units according to the first aspect of the invention, the launching the second instruction of such a task (T) being done synchronously with the request to execute a second task (T2) having a dependence constraint vis-à-vis the first task (T). According to a third aspect, the invention relates to a system comprising a plurality of data processing units implementing the method according to the first or second aspect of the invention, at the least a memory connected to a data processing unit, and an input receiving the plurality of tasks to be executed.
PRESENTATION DES FIGURES PRESENTATION OF FIGURES
D'autres caractéristiques et avantages de la présente invention apparaîtront à la lecture de la description qui va suivre d'un mode de réalisation préférentiel. Cette description sera donnée en référence aux dessins annexés dans lesquels : Other features and advantages of the present invention will appear on reading the following description of a preferred embodiment. This description will be given with reference to the appended drawings in which:
- la figure 1 a représente une architecture de bus applicatif ;  FIG. 1a represents an application bus architecture;
- la figure 1 b représente une architecture de terminal de bus applicatif ;  FIG. 1b represents an application bus terminal architecture;
- la figure 2 représente le passage d'une clé IPC vers un triplet d'identifiants de ressources IPC ;  FIG. 2 represents the transition from an IPC key to a triplet of IPC resource identifiers;
- la figure 3 représente un exemple de premier bloc illustrant le phénomène de fragmentation ;  FIG. 3 represents an example of a first block illustrating the phenomenon of fragmentation;
- la figure 4a représente un exemple de premier bloc paginé et le deuxième bloc associé ;  FIG. 4a represents an example of a first paginated block and the second associated block;
- la figure 4b illustre le problème du compactage dans le deuxième bloc de la figure 4a ;  FIG. 4b illustrates the compacting problem in the second block of FIG. 4a;
- la figure 5 représente le mécanisme de demande/réponse sur un canal automatiquement synchronisé.  - Figure 5 shows the request / response mechanism on an automatically synchronized channel.
DESCRIPTION DETAILLEE D'UN MODE DE REALISATION DETAILED DESCRIPTION OF AN EMBODIMENT
Architecture de bus applicatif Application bus architecture
En référence aux figures, le procédé d'utilisation par une tâche d'une mémoire partagée selon l'invention se fait via un bus applicatif. A l'instar des ESB (bus de services d'entreprise), ce bus a avant tout pour fonction de permettre la communication des applications qui à la base ne sont pas pensées pour fonctionner ensemble. With reference to the figures, the method of use by a task of a shared memory according to the invention is via an application bus. Similar to ESBs (enterprise service bus), this bus is primarily allow the communication of applications that basically are not designed to work together.
L'architecture du Bus Applicatif (BA) est physiquement répartie sur une constellation de machines. Elle comporte avantageusement les éléments logiciels suivants :  The architecture of the Business Bus (BA) is physically distributed over a constellation of machines. It advantageously comprises the following software elements:
• le Noyau du Bus Applicatif (NBA) idéalement hébergé par une machine dédiée (il n'est pas obligatoire pour les petites et moyennes configurations), chargé de dispatcher et d'ordonnancer les commandes et échanges de données en fonction des priorités, · un Multiplexeur de Bus Applicatif (MBA) par système d'exploitation (en d'autres termes par machine hôte), gérant les ressources partagées (en particulier la ou les unités de traitement, l'espace mémoire, etc.),  • The Application Bus Core (NBA) ideally hosted by a dedicated machine (it is not mandatory for small and medium configurations), responsible for dispatching and scheduling orders and exchanges of data according to priorities, · a Application Bus Multiplexer (MBA) per operating system (in other words, host machine), managing the shared resources (in particular the processing unit or units, the memory space, etc.),
• un Terminal de Bus Applicatif (TBA) par application, ce terminal pouvant être un Terminal Maître (Tm) si l'application est directrice ou un Terminal Esclave (Ts) si l'application est contrôlée.  • An Application Bus Terminal (TBA) per application, this terminal can be a Master Terminal (Tm) if the application is director or a Terminal Slave (Ts) if the application is controlled.
Comme représenté sur la figure 1 a, un bus applicatif peut être interconnecté à un ou plusieurs autres bus via leur noyau (NBA) respectif. Une constellation de machines gérée par un BA sans noyaux ne peut pas être reliée à une autre constellation. Les connexions sont par exemple mise en œuvre sous protocole standard (TCP/IP, ...) avantageusement via des ports facilement admis par les pare-feu, serveurs de domaines et passerelles classiques, sous procédure hautement sécurisée.  As shown in FIG. 1a, an application bus may be interconnected to one or more other buses via their respective core (NBA). A machine constellation managed by a kernel-less BA can not be linked to another constellation. Connections are for example implemented under standard protocol (TCP / IP, ...) advantageously via ports easily accepted by firewalls, domain servers and conventional gateways, under highly secure procedure.
Au niveau d'une machine, le BA n'est accessible par une application que via un TBA connecté au MBA local, comme représenté par la figure 1 b.  At the machine level, the BA can only be accessed by an application via a TBA connected to the local MBA, as shown in Figure 1b.
Chaque application peut lancer des threads et demander au BA de leur fournir également un terminal dédié ce qui permet à deux threads d'interagir.  Each application can launch threads and ask the BA to also provide them with a dedicated terminal which allows two threads to interact.
D'un point de vue pratique chaque terminal est capable d'exploiter en parallèle des demandes-réponses sur des canaux différents. Une « pompe à messages » dédiée permet à ce terminal de prévenir de l'arrivée de données sur tel ou tel canal en provenance de tel ou tel autre terminal. Des applications récentes et/ou adaptées au BA (applications « natives ») peuvent communiquer avec lui en direct au niveau du TBA. Alternativement, les anciennes applications qui ne connaissent pas ce BA sont avantageusement prises en charge (applications « pilotées ») par des interfaces spécifiques de chacune de ces applications, chargées de leur offrir l'adaptation spécifique leur permettant d'intégrer un TBA : les CIA (communication interactive par automate). Un CIA est une sorte de pilote d'accueil disposant des ressources nécessaires aux applications connectées aux terminaux de bus. From a practical point of view each terminal is able to operate in parallel requests-responses on different channels. A dedicated "message pump" allows this terminal to warn of the arrival of data on a particular channel from another terminal. Recent applications and / or adapted to BA ("native" applications) can communicate with him live at TBA level. Alternatively, older applications that do not know this BA are advantageously supported ("piloted" applications) by specific interfaces of each of these applications, responsible for offering them the specific adaptation allowing them to integrate a TBA: the CIA (interactive communication by PLC). A CIA is a kind of host driver with the resources needed for applications connected to bus terminals.
Chaque TBA dispose d'une pluralité de canaux de communication avec son application, canaux via lesquels sont faites les demandes d'exécution d'une tâche et le retrait des réponses. A chaque type de demande/réponse, on associe un canal unique. De cette manière, plusieurs échanges peuvent se dérouler en parallèles puisque les canaux seront complètement indépendants.  Each TBA has a plurality of communication channels with its application, through which channels are made the requests for execution of a task and the withdrawal of responses. For each type of request / response, we associate a single channel. In this way, several exchanges can take place in parallel since the channels will be completely independent.
Le BA offre ainsi la possibilité d'un traitement massivement parallèle de tout processus dont l'exécution est demandée dans un environnement multi-machines multi-cœurs indépendamment des systèmes d'exploitation.  The BA thus offers the possibility of massively parallel processing of any process whose execution is required in a multi-core multi-machine environment regardless of the operating systems.
Au niveau local de chaque machine, la communication et l'échange de données entre les différents processus est basée sur le standard IPC.  At the local level of each machine, communication and data exchange between the different processes is based on the IPC standard.
Ressources IPC IPC Resources
La solution IPC pour le partage sécurisé d'une information nécessite un triplet de « descripteurs » de la tâche : The IPC solution for the secure sharing of information requires a triplet of "descriptors" of the task:
• Une mémoire proprement dite (en d'autres termes un « bloc »), de longueur quelconque,  • A memory proper (in other words a "block"), of any length,
• Un dispositif de demande d'accès composé d'une queue de message (où les tâches demanderesses viennent « prendre leur tour » en file d'attente),  • An access request device composed of a message queue (where the requesting tasks come to "take their turn" in the queue),
• Un dispositif d'autorisation d'accès et de synchronisation : « un sémaphore ». Le fonctionnement d'un triplet décrit ci-avant est le suivant : la tâche désireuse d'utiliser une mémoire dépose sa demande dans la file d'attente correspondante. Elle spécifie l'action (lecture/écriture) et le sémaphore de protection, sorte de feu rouge/vert qui permet de savoir si la mémoire peut être lue/écrite. La tâche est bloquée par ce sémaphore et n'est débloquée par le BA qui libère le sémaphore que lorsque la mémoire est prête à être utilisée et/ou que c'est le tour de la dite tâche d'y accéder. • An access authorization and synchronization device: "a semaphore". The operation of a triplet described above is as follows: the task wishing to use a memory deposits its request in the corresponding queue. It specifies the action (read / write) and the protection semaphore, a kind of red / green light that allows to know if the memory can be read / written. The task is blocked by this semaphore and is unblocked by the BA that releases the semaphore only when the memory is ready to be used and / or it is the turn of the said task to access it.
Si IPC est actuellement insuffisant pour gérer plus d'une dizaine de machines, c'est que les procédés actuels d'utilisation de la mémoire utilisent un triplet par canal.  If IPC is currently insufficient to manage more than a dozen machines, it is because current methods of using memory use a triplet per channel.
A supposer une constellation de 10 machines Linux ayant en moyenne 4 TBA offrant chacun eux-mêmes 40 canaux, on obtient un besoin de 1600 blocs de mémoire et autant de sémaphores et files d'attentes. Or ce sont ces dernières qui posent problème, puisque la limite maximum de files de messages est de 1649. On remarque également que plus du tiers du nombre maximum (4096) de blocs mémoires sont déjà utilisés, alors que dans la majorité des cas seule une infime fraction de leur espace alloué est réellement exploitée.  Assuming a constellation of 10 Linux machines with an average of 4 TBA each offering 40 channels, we obtain a need for 1600 memory blocks and as many semaphores and queues. But these are the latter which pose a problem, since the maximum limit of message queues is 1649. We also note that more than a third of the maximum number (4096) of memory blocks are already used, whereas in the majority of cases only one tiny fraction of their allocated space is actually exploited.
Bien entendu les limites indiquées sont ajustables pour tous les systèmes : on peut modifier ces valeurs et recompiler le noyau du SE. Mais cette manipulation et les dangers qu'elle présente laisse démunis les utilisateurs qui sont très rarement spécialistes des systèmes d'exploitation et bien plus préoccupés par leur processus métier.  Of course, the limits shown are adjustable for all systems: you can modify these values and recompile the OS core. But this manipulation and the dangers it presents leave the users who are very rarely specialists in operating systems and much more concerned about their business process.
Le procédé selon l'invention vise à pouvoir multiplier sensiblement le nombre de machines gérable par IPC sans dépasser pourtant ces limites. L'idée est que tous les canaux d'un TBA se partagent seulement quelques queue de messages, voire une seule, et surtout se partagent la même unique grande mémoire comprenant un ensemble de zones relatives chacune à un canal. La limite en termes de sémaphores (32000) ne pose quant à elle pas de problèmes puisque les sémaphores sont réutilisables.  The method according to the invention aims to significantly increase the number of machines manageable by IPC without exceeding these limits. The idea is that all the channels of a TBA share only a few messages, or even one, and especially share the same single large memory comprising a set of areas each relating to a channel. The limit in terms of semaphores (32000) poses no problem as the semaphores are reusable.
Ainsi, des constellations de plusieurs centaines de machines deviennent possibles. L'autre grande différence par rapport aux solutions classiques est que le programmeur n'a plus à se soucier ni de sockets, ni de synchronisation ni de gestion des échanges. Le MBA prend tout ceci en charge. Thus, constellations of several hundred machines become possible. The other big difference from traditional solutions is that the programmer no longer has to worry about sockets, synchronization or exchange management. The MBA takes care of this.
Structure de grande mémoire partagée Large shared memory structure
Le fait d'avoir une unique file d'attente par TBA ne pose pas de gros problèmes : il suffit que le BA ait instruction de traiter immédiatement toute demande de la part d'une tâche, de sorte à vider la file (qui est de type FIFO) le plus rapidement possible. The fact of having a single queue by TBA does not pose big problems: it is enough that the BA has instruction to immediately process any request from a task, so to empty the queue (which is FIFO type) as quickly as possible.
En revanche, la gestion « multi-canaux » de la mémoire est plus complexes.  In contrast, the "multi-channel" management of memory is more complex.
La demanderesse a remarqué que le rapport entre le nombre maximum de files d'attente de messages et celui du nombre de blocs de mémoire partagées est supérieur à deux. Cela permet d'associer à chaque file (et donc à chaque TBA) deux blocs mémoires.  The Applicant has noticed that the ratio between the maximum number of message queues and that of the number of shared memory blocks is greater than two. This makes it possible to associate with each queue (and therefore with each TBA) two memory blocks.
Pour pouvoir mettre en œuvre ce procédé, la mémoire partagée associée à un TBA est composée de deux parties, une partie dédiée au stockage des données des tâches à proprement parler (données sur lesquelles les unités de traitement agissent lors de l'exécution d'une tâche), et une partie dédiée au stockage de descripteurs de la structure de la première partie.  To be able to implement this method, the shared memory associated with a TBA is composed of two parts, a part dedicated to the storage of the data of the tasks strictly speaking (data on which the processing units act during the execution of a task), and a part dedicated to the storage of descriptors of the structure of the first part.
En d'autres termes, le premier bloc associé au TBA est dédié au stockage des données des tâches et il est appelé « bloc de données », et le second bloc associé au TBA est dédié au stockage des descripteurs, et est quant à lui appelé « bloc descriptif ».  In other words, the first block associated with the TBA is dedicated to the storage of the data of the tasks and it is called "block of data", and the second block associated with the TBA is dedicated to the storage of the descriptors, and is called "Descriptive block".
Ainsi, au lieu d'associer un bloc mémoire IPC complet à un canal du TBA, on associe une partition du premier bloc, les données permettant d'identifier cette partition (le « descripteur » de cette partition) étant stockées dans le second bloc. Procédé d'utilisation d'une mémoire partagée par une tâche Thus, instead of associating a complete IPC memory block with a channel of the TBA, a partition of the first block is associated, the data making it possible to identify this partition (the "descriptor" of this partition) being stored in the second block. A method of using shared memory by a task
La première partie du procédé selon l'invention consiste ainsi en l'affectation par le bus applicatif à la tâche d'un triplet de ressources (IPC) comprenant un sémaphore, une zone de mémoire partagée et une file d'attente, le sémaphore indiquant un état de blocage de la tâche, la zone de mémoire partagée étant une partition d'un premier bloc de mémoire partagée, un descripteur de la zone de mémoire partagé étant stocké dans un deuxième bloc de mémoire partagé, ledit deuxième bloc étant dédié au stockage de descripteurs du premier bloc de mémoire partagée. The first part of the method according to the invention thus consists in the allocation by the application bus to the task of a resource triplet (IPC) comprising a semaphore, a shared memory area and a queue, the semaphore indicating a blocking state of the task, the shared memory area being a partition of a first shared memory block, a descriptor of the shared memory area being stored in a second shared memory block, said second block being dedicated to storage descriptors of the first shared memory block.
Lorsque le bus applicatif constate que ladite zone de mémoire partagée affectée est libre (i.e. qu'une tâche précédente n'en a déjà plus besoin) et/ou que la tâche est passée en tête de la file d'attente, le sémaphore est modifié de sorte à indiquer un état de libération de la tâche.  When the application bus finds that said allocated shared memory area is free (ie that a previous task no longer needs it) and / or that the task has moved to the top of the queue, the semaphore is modified so as to indicate a state of release of the task.
La zone mémoire est alors disponible pour utilisation par l'unité de traitement de données affectée pour l'exécution de la tâche, sans risque que cette utilisation soit perturbée par une autre tâche. Il est à noter que lorsque la mémoire est disponible, elle n'est pas forcément immédiatement utilisée. Par ailleurs, une fois l'exécution de la tâche accomplie, la réponse peut être demandée un peu plus tard. Préparer « à l'avance » les utilisations de mémoire est ainsi une force du procédé selon l'invention. On obtient une accélération effective. Cela sera détaillé davantage dans la suite de la présente description.  The memory area is then available for use by the data processing unit assigned for the execution of the task, without the risk that this use is disturbed by another task. It should be noted that when the memory is available, it is not necessarily immediately used. On the other hand, once the completion of the task has been completed, the answer may be requested a little later. Preparing "in advance" the uses of memory is thus a force of the method according to the invention. An effective acceleration is obtained. This will be detailed further in the following description.
L'étape finale du procédé consiste en la libération de l'espace du second bloc de mémoire partagée alloué au stockage du descripteur de la zone de mémoire partagée, afin de nouveau affecté au stockage du descripteur de l'une zone de mémoire partagée qui sera utilisée pour une autre tâche. Affectation d'un triplet de ressources IPC The final step of the method consists in the release of the space of the second shared memory block allocated to the storage of the descriptor of the shared memory area, in order to be assigned again to the storage of the descriptor of the shared memory zone which will be used for another task. Assigning an IPC Resource Triplet
La gestion de toutes les ressources IPC doit préférentiellement être à la charge d'une seule entité. Cela garantit une gestion homogène par un unique processus créateur. Ce rôle est dévolu au MBA, le multiplexeur du BA. The management of all IPC resources should preferably be the responsibility of a single entity. This ensures seamless management by a single creative process. This role is vested in the MBA, the BA's multiplexer.
Pour qu'un processus puisse obtenir une ressource IPC pour chacune de ses tâches, il doit en faire la demande auprès du MBA via un protocole bien défini destiné à optimiser l'utilisation des ressources IPC.  In order for a process to obtain an IPC resource for each of its tasks, it must request it from the MBA via a well-defined protocol designed to optimize the use of IPC resources.
A cette fin, le MBA affecte le triplet de ressources de l'étape (a). On dit que le processus va se loger (login en anglais).  To this end, the MBA assigns the resource triplet of step (a). It is said that the process will be housed (login in English).
A l'issue de cette demande de logement le processus sera soit refoulé soit accepté. S'il est accepté (login réussi) le MBA va mettre à sa disposition d'un TBA maître (Tm) le triplet.  At the end of this housing request the process will be either rejected or accepted. If it is accepted (successful login) the MBA will put at its disposal a TBA master (Tm) triplet.
Le Tm va exploiter ces ressources minimales afin de présenter une collection étendue de canaux logiques d'échanges.  The Tm will exploit these minimal resources to present an extensive collection of logical channels of exchange.
Par ailleurs, tout processus maître logé sur le MBA peut initier d'autres processus dits esclaves qui eux-mêmes peuvent nécessiter un Terminal Esclave (Te) à l'image du Tm. La disparition du maître indique au MBA qu'il peut récupérer les ressources allouées au groupe maître + esclaves.  Moreover, any master process hosted on the MBA can initiate other so-called slave processes which themselves may require a Slave Terminal (Te) in the image of the Tm. The disappearance of the master indicates to the MBA that it can recover the resources allocated to the master + slave group.
Une application se loge sur le BA (ensemble des machines reliées par leur MBA). Les applications communiquent entre elles grâce au BA qui gère l'ensemble des ressources partagées.  An application is housed on the BA (all machines linked by their MBA). The applications communicate with each other thanks to the BA which manages all the shared resources.
Par ailleurs, les trois ressources IPC sont avantageusement identifiées par un nombre entier unique au sein du système d'exploitation considéré. Cet identifiant est unique pour chaque type de ressources IPC (sémaphore, mémoire partagée, file de messages). Il peut donc être réutilisé d'un type à l'autre. Moreover, the three IPC resources are advantageously identified by a single integer within the operating system considered. This identifier is unique for each type of IPC resource (semaphore, shared memory, message queue). It can be reused from one type to another.
Il existe trois façons différentes de générer un identifiant : Identifiant fixe There are three different ways to generate an identifier: Fixed identifier
La façon la plus simple pour plusieurs processus de partager un identifiant est de le fixer. Cependant cette solution est à déconseillée puisque rien ne garantit que cet identifiant ne sera pas utilisé par un processus étranger.  The easiest way for many processes to share an ID is to fix it. However, this solution is not recommended since there is no guarantee that this identifier will not be used by a foreign process.
Identifiant calculé par une clé privée Identifier calculated by a private key
Il est possible de demander au système de calculer un identifiant grâce à une clef. Pour créer une clé en mode privé, il faut passer le drapeau IPC_PRIVATE en premier argument d'une fonction propre au type de ressource IPC et demandant une clef numérique en second argument. Dans ce cas, le système d'exploitation génère automatiquement l'identifiant et garantit son exclusivité.  It is possible to ask the system to calculate an identifier with a key. To create a key in private mode, it is necessary to pass the IPC_PRIVATE flag as the first argument of a function specific to the IPC resource type and requesting a numeric key as a second argument. In this case, the operating system automatically generates the identifier and guarantees its exclusivity.
Néanmoins, le partage de cette ressource reste faisable si le processus créateur met à disposition des autres processus l'identifiant de cette ressource.  Nevertheless, the sharing of this resource remains feasible if the creator process makes available to other processes the identifier of this resource.
Identifiant calculé par une clé dynamique Identifier calculated by a dynamic key
Si au lieu d'utiliser le drapeau IPC_PRIVATE on donne une clef obtenue par un moyen connu de tous les processus devant partager la ressource, chaque processus pourra alors calculer l'identifiant. C'est la solution avantageusement préférée par l'invention.  If instead of using the IPC_PRIVATE flag we give a key obtained by a known means of all processes to share the resource, each process can then calculate the identifier. This is the solution advantageously preferred by the invention.
Sous Linux, il existe la fonction ftok() qui permet de générer dynamiquement une clé IPC libre en se basant sur deux paramètres : un nom de fichier existant (souvent le nom du projet ou module), et un caractère ascii permettant de singulariser une clef du même module : pour un même nom de fichier, deux clés différentes seront générées ce caractère est différent. Cette fonction rapproche un peu Windows (qui ne travaille qu'avec des noms de fichiers) d'avec Linux.  On Linux, there is the ftok () function that allows to dynamically generate a free IPC key based on two parameters: an existing file name (often the name of the project or module), and an ASCII character allowing to singularize a key the same module: for the same file name, two different keys will be generated this character is different. This function brings Windows (which only works with file names) closer to Linux.
Que ce soit sous Linux ou sous Windows, la création d'une ressource Whether on Linux or Windows, creating a resource
IPC nécessite le passage par les deux étapes fondamentales suivantes : Obtention d'identifiant à partir d'une clef (représentée pour le triplet d'identifiants sur la figure 2) IPC requires passing through the following two basic steps: Obtaining identifier from a key (represented for the triplet of identifiers in FIG. 2)
Création de la ressource IPC et obtention d'une référence de la ressource.  Creation of the IPC resource and obtaining a reference of the resource.
L'obtention d'un identifiant est par exemple réalisée par un appel système offert par la bibliothèque Posix IPC (semget, shmget, msgget) ou Windows (CreateSemaphore, MapViewOfFile, CreateMailSIot).  The obtaining of an identifier is for example carried out by a system call offered by the Posix IPC library (semget, shmget, msgget) or Windows (CreateSemaphore, MapViewOfFile, CreateMailSIot).
En se basant sur l'identifiant généré dans l'étape précédente, la ressource IPC est créée en passant par une deuxième fonction système réservée à cet effet.  Based on the identifier generated in the previous step, the IPC resource is created through a second system function reserved for this purpose.
Politiques de partitionnement du premier bloc Partitioning policies of the first block
Le procédé selon l'invention propose deux politiques différentes de partitionnement d'espace mémoire : The method according to the invention proposes two different policies for partitioning memory space:
Partitionnement fixe Fixed partitioning
Cette méthode consiste à diviser l'espace mémoire en plusieurs partitions de même grandeur ou de grandeur différente. La taille et le nombre des partitions sont fixés à l'avance et le partitionnement se fait lors du démarrage du système d'exploitation.  This method consists in dividing the memory space into several partitions of the same size or different size. The size and number of partitions are fixed in advance and the partitioning is done at the start of the operating system.
Cette méthode manque beaucoup de flexibilité et cause de la fragmentation interne. En effet, les tailles des mémoires demandées correspondent rarement aux tailles des partitions fixes, et la différence constitue un espace mémoire non exploitable. De plus, si la taille demandée dépasse celle des partitions, des opérations de remplacement de zones mémoires seront envisageables (overlaying).  This method lacks a lot of flexibility and causes internal fragmentation. In fact, the sizes of the memories requested rarely correspond to the sizes of the fixed partitions, and the difference constitutes a non-usable memory space. Moreover, if the requested size exceeds that of the partitions, operations of replacement of memory areas will be possible (overlaying).
Partitionnement dynamique Dynamic partitioning
De façon préférentielle la partition du premier bloc affectée en tant que zone de mémoire partagée pour la tâche est générée dynamiquement en fonction d'une taille d'espace mémoire demandée par l'unité de traitement de données. Preferably, the partition of the first block allocated as a shared memory area for the task is dynamically generated according to a memory space size requested by the data processing unit.
Le partitionnement dynamique consiste ainsi à créer des zones mémoires qui varient dynamiquement. L'allocation de la mémoire se fait en fonction des demandes de réservation, de libération mais aussi de la taille mémoire disponible. Cette politique d'allocation crée ce qu'on appelle la fragmentation externe, laquelle est due aux partitions non exploitées (la fragmentation interne correspond à la zone libre non exploitée d'une partition, alors que la fragmentation externe correspond aux partitions non attribuées). Néanmoins, l'impact de la fragmentation interne est nettement réduit. La figure 3 illustre le phénomène de fragmentation (interne/externe).  Dynamic partitioning thus consists of creating memory zones that vary dynamically. The allocation of the memory is done according to the requests of reservation, of release but also of the available memory size. This allocation policy creates what is called external fragmentation, which is due to unused partitions (internal fragmentation is the undefined free area of a partition, while external fragmentation is unassigned partitions). Nevertheless, the impact of internal fragmentation is significantly reduced. Figure 3 illustrates the phenomenon of fragmentation (internal / external).
Il est toujours possible de réunir l'ensemble des espaces non exploités en une seule partition, cette technique est connue sous le nom de compaction mémoire. Le compactage de mémoire est fortement déconseillé car il monopolise à la fois : le CPU, La RAM et le bus système durant les opérations de transfert de données.  It is always possible to gather all unused spaces into a single partition, this technique is known as compaction memory. Memory compaction is strongly discouraged because it monopolizes at once: the CPU, the RAM and the system bus during data transfer operations.
Politiques d'allocation d'espace mémoire en cas de partitionnement dynamique Memory allocation policies for dynamic partitioning
Lorsque plusieurs partitions libres sont disponibles, il faut choisir celle qui corresponde au mieux à la demande, si non, créer une nouvelle. Voici quelques exemples d'algorithmes d'allocation : First Fit When several free partitions are available, choose the one that best corresponds to the request, if not, create a new one. Here are some examples of allocation algorithms: First Fit
On cherche dans la liste des partitions libres la première partition suffisamment grande pour contenir l'espace demandé. Cet algorithme est à la fois rapide et simple à mettre en œuvre mais cause beaucoup de fragmentation externe car les blocs en fin de liste sont difficilement accessibles. Next Fit We search in the list of free partitions the first partition large enough to contain the requested space. This algorithm is both fast and simple to implement but causes a lot of external fragmentation because the blocks at the end of the list are difficult to access. Next Fit
Cet algorithme ressemble beaucoup à celui décrit précédemment sauf que la recherche commence depuis la position de la dernière partition choisie.  This algorithm is very similar to the one previously described except that the search starts from the position of the last selected partition.
Best Fit Best Fit
On cherche la partition dont la taille se rapproche le plus à la taille de l'espace demandé. Cet algorithme a tendance de préserver les grandes partitions au cas où l'on pourrait les exploiter ultérieurement. L'inconvénient de cet algorithme est que la mémoire sera fractionnée en plusieurs petites zones non exploitables.  We are looking for the partition whose size is closest to the size of the requested space. This algorithm tends to preserve large partitions in case they can be exploited later. The disadvantage of this algorithm is that the memory will be split into several small non-exploitable areas.
Worst Fit Worst Fit
On cherche la plus grande partition libre afin d'avoir le plus grand espace non utilisé. Cet espace sera utilisé pour créer des nouvelles partitions.  We are looking for the largest free partition to have the largest unused space. This space will be used to create new partitions.
Buddy System Buddy System
Cet algorithme considère que les partitions mémoires ont une taille de 2n. Lorsqu'il n'y a plus de partions de taille 2x on subdivise une partition de taille 2X+1, s'il n'y a plus de partitions de taille de taille 2X+1 on découpe une partition de taille 2X+2 et ainsi de suite. Lorsque deux partitions adjacentes de même taille se libèrent, ils seront regroupés en une seule partition de taille deux fois plus grande. Cet algorithme est rapide et constitue un bon compromis entre les avantages et les inconvénients des algorithmes décrits précédemment. Cependant, le fait de devoir arrondir la taille des partitions à une puissance de 2 engendre une certaine fragmentation interne. La table 1 ci-après décrit le déroulement d'un exemple d'une séquence d'allocation mémoire : Taille totale I Mo This algorithm considers that the memory partitions have a size of 2 n . When there are no more partions of size 2 x subdivide a partition of size 2 X + 1 , if there are more partitions of size 2 X + 1 we cut a partition of size 2 X + 2 and so on. When two adjacent partitions of the same size are released, they will be grouped into a single partition of twice the size. This algorithm is fast and constitutes a good compromise between the advantages and disadvantages of the algorithms described above. However, having to round the size of partitions to a power of 2 causes some internal fragmentation. Table 1 below describes the flow of an example of a memory allocation sequence: Total size I MB
Demande A= 1 1 1k 126k 128k 256k 512k  Application A = 1 1 1k 126k 128k 256k 512k
Demande B=230k 128k Î28k 256k 512k  Application B = 230k 128k Î28k 256k 512k
Demande C=52K 128k 64k 64k 256k 512k  Application C = 52K 128k 64k 64k 256k 512k
Demande D=256k 128k 64k 64k 256k 256k 256k libération B 128k 64k 64k 256k 256k 256k Request D = 256k 128k 64k 64k 256k 256k 256k release B 128k 64k 64k 256k 256k 256k
Libération A 128k 64k 64k 256k 256k 256kRelease At 128k 64k 64k 256k 256k 256k
Demande E=80k 128k 64k 64k 256k 256k 256kApplication E = 80k 128k 64k 64k 256k 256k 256k
Libération C 128k 128k 256k 256k 256kRelease C 128k 128k 256k 256k 256k
Libération E 512k 256k 256k libération D IMo Release E 512k 256k 256k release D IMo
Table 1 Table 1
Allocation non-contigiie Non-contiguous allowance
Les algorithmes vus jusqu'à présent considèrent les partitions comme étant un espace continu. Ces algorithmes engendrent beaucoup de fragmentation interne ou externe. Pour remédier à ce problème, le premier bloc de mémoire partagée est avantageusement structuré en un ensemble d'unités de taille égale appelées « pages » référencées chacune par un indice, la partition de la mémoire partagée affectée en tant que zone de mémoire partagée pour la tâche étant un ensemble de pages, ledit descripteur de la zone de mémoire partagée étant une table de pages contenant les indices des pages composant ladite partition.  The algorithms seen so far consider partitions as a continuous space. These algorithms generate a lot of internal or external fragmentation. To remedy this problem, the first shared memory block is advantageously structured in a set of units of equal size called "pages" each referenced by an index, the partition of the shared memory allocated as a shared memory area for the task being a set of pages, said descriptor of the shared memory area being a page table containing indexes of pages composing said partition.
En d'autres termes, les espaces d'allocation sont considérés comme étant un espace non-contigu, c'est ce que l'on appelle la pagination.  In other words, the allocation spaces are considered to be a non-contiguous space, this is called pagination.
Le principe de la pagination consiste à structurer l'espace mémoire en un ensemble d'unités de taille égales appelées pages. L'espace mémoire attribué à une partition se composera alors d'un ensemble de pages qui ne sont pas forcément successives. Une partition n'est plus identifiée par son adresse de départ et sa taille mais par l'ensemble des pages qui la compose, ces pages peuvent être organisées sous forme de table appelée table des pages qui décrit la référence à la partition. La figure 4a représente un premier bloc organisé en pages et le second bloc associé. The principle of pagination is to structure the memory space into a set of equal sized units called pages. The memory space allocated to a partition will then consist of a set of pages that are not necessarily successive. A partition is no longer identified by its starting address and its size, but by all the pages that compose it, these pages can be organized as a table called a page table that describes the reference to the partition. Figure 4a shows a first block organized in pages and the second associated block.
Le principe de la pagination est souvent combiné avec d'autre notions comme la segmentation (qui permet de regrouper des tables de pages) ou le swaping (utilisation d'espace disque pour chargement et déchargement des pages). Ces techniques constituent les briques de base du concept de mémoire virtuelle qui permet l'exécution des programmes dont la taille dépasse celle de la mémoire réelle. D'une manière générale, l'espace mémoire est souvent mal exploité dans les approches contiguës. En effet, les problèmes de fragmentation interne/externe sont très difficiles à contourner, il y a toujours un compromis entre l'efficacité de l'algorithme déployé et le taux de fragmentation interne/externe. Il n y a pas d'algorithme idéal du moment que l'on se place dans un système fortement dynamique.  The principle of pagination is often combined with other notions such as segmentation (which allows to group pages tables) or swaping (use of disk space for loading and unloading pages). These techniques are the building blocks of the concept of virtual memory that allows the execution of programs whose size exceeds that of the actual memory. In general, memory space is often poorly exploited in contiguous approaches. Indeed, problems of internal / external fragmentation are very difficult to circumvent, there is always a compromise between the efficiency of the deployed algorithm and the rate of internal / external fragmentation. There is no ideal algorithm as long as we place ourselves in a highly dynamic system.
Les approches d'allocation non-contigue (à base de pages) permettent une bonne exploitation d'espace d'adressage. Lorsqu'on parle de mémoire virtuelle, la pagination permet aussi :  Non-contiguous (page-based) allocation approaches allow good use of address space. When talking about virtual memory, paging also allows:
• Chargement à la demande. Les pages ne sont chargées que lorsqu'elles sont référencées.  • Loading on demand. Pages are only loaded when they are referenced.
• Etendre l'espace d'adressage réel (physique).  • Extend the real (physical) address space.
• Transparence. L'utilisateur n'a plus à gérer explicitement ses partitions.  • Transparency. The user no longer has to explicitly manage his partitions.
La pagination permet d'éliminer complètement le problème de fragmentation externe puisque toutes les pages ont la même taille. Cependant, le problème de fragmentation interne peut se produire dans la dernière page d'une partition si elle n'est pas totalement remplie.  Pagination completely eliminates the problem of external fragmentation since all pages are the same size. However, the internal fragmentation problem may occur in the last page of a partition if it is not fully populated.
Structure du deuxième bloc Structure of the second block
Afin de pouvoir évaluer les performances de notre système, la taille des pages est un critère paramétrable. Sur le plan pratique, la taille des pages est définie en fonction de la taille de données échangées (structures de données). Plus la taille des partitions est petite, plus il y aura de partitions et par conséquent les tables des pages prendront du volume. Il faut toujours trouver le juste milieu entre la taille des pages et la taille globale du premier bloc mémoire IPC. In order to be able to evaluate the performances of our system, the size of the pages is a parameterizable criterion. In practical terms, the size of pages is defined according to the size of data exchanged (data structures). The smaller the partition sizes, the more partitions there will be and therefore the page tables will gain volume. You always have to find the right balance between the page size and the overall size of the first IPC memory block.
La navigation dans un bloc mémoire partagée nécessite une connaissance préalable de sa composition : nombre de partitions disponibles, taille des pages mémoires, pages affectées aux partitions allouées, etc. Cette partie constitue la description d'un bloc mémoire, elle peut être soit, intégrée directement dans le même premier bloc (bloc de données), soit intégrée dans le deuxième bloc (bloc descriptif). Chaque partition dans le bloc descriptif correspond comme expliqué à un canal logique.  The navigation in a shared memory block requires a preliminary knowledge of its composition: number of available partitions, size of the memory pages, pages allocated to the allocated partitions, etc. This part is the description of a memory block, it can be either integrated directly into the same first block (data block), or integrated into the second block (descriptive block). Each partition in the description block corresponds as explained to a logical channel.
Mais comme l'on voit sur la figure 4b (qui reprend l'exemple de la figure 4a en cas de suppression du descripteur de la zone de mémoire du premier bloc relative au canal 1 ), la mise en œuvre de l'étape (d) nécessite un compactage mémoire assez lourd si la table des pages d'une partition du premier bloc est elle-même une partition contigue du deuxième bloc.  But as can be seen in FIG. 4b (which uses the example of FIG. 4a in case of deletion of the descriptor from the memory zone of the first block relating to channel 1), the implementation of step (d) ) requires a fairly heavy memory compaction if the page table of a partition of the first block is itself a contiguous partition of the second block.
Le bloc descriptif est avantageusement structuré de manière à éviter au maximum les problèmes liés au compactage de la mémoire, à la fragmentation interne et externe. On évite au maximum le décalage des zones mémoires puisque cette opération est très coûteuse en temps CPU. Pour réaliser cela, une table de pages contenant les indices des pages composant une partition est par exemple représentée dans le second bloc de mémoire par une liste chaînée de couples, chaque couple comprenant un indice de page et le déplacement mémoire (ou « offset ») à effectuer dans le second bloc pour atteindre le prochain couple de la liste chaînée.  The descriptive block is advantageously structured in such a way as to avoid as much as possible the problems related to compaction of the memory, internal and external fragmentation. The offset of the memory areas is avoided as much as this operation is very expensive in CPU time. To achieve this, a table of pages containing the indexes of the pages composing a partition is for example represented in the second memory block by a linked list of pairs, each pair comprising a page index and the memory displacement (or "offset") to perform in the second block to reach the next pair in the linked list.
La table des pages d'un canal n'est ainsi plus représentée par une partition contigue. Toutes opération de mise à jour sur la partition est faisable par une simple modification des liens de chaînage. Aucun compactage mémoire ne sera alors nécessaire. P-lnstructions The page table of a channel is no longer represented by a contiguous partition. All update operation on the partition is feasible by a simple modification of the links of chaining. No memory compaction will be necessary. P-lnstructions
Des méthodes performantes pour découper un processus en une pluralité de tâches et les ordonnancer en vue de leur exécution parallélisée par les différentes unités de traitement de données (processeurs, cœurs, etc.) sont connues. On se référera par exemple aux demandes de brevet FR 2963125 et FR 2963126. High-performance methods for splitting a process into a plurality of tasks and scheduling them for parallel execution by the different data processing units (processors, cores, etc.) are known. For example, patent applications FR 2963125 and FR 2963126 are referred to.
Comme expliqué, la mémoire mise à disposition d'une tâche peut n'être utilisée que bien plus tard, en l'occurrence lorsque l'unité de traitement a effectivement besoin du résultat de la tâche : au moment de la synchronisation. L'utilisation puis la libération de la mémoire peut être vue comme une « réponse » après une « demande ».  As explained, the available memory of a task can be used only much later, in this case when the processing unit actually needs the result of the task: at the time of synchronization. The use and then the release of the memory can be seen as a "response" after a "request".
Ainsi, un couple d'instructions, appelées « P-instructions », est avantageusement associé à la tâche, la première instruction étant une instruction non-bloquante de demande de l'exécution de la tâche (la « demande ») et la deuxième instruction étant une instruction bloquante de retour du résultat de l'exécution de la tâche (la « réponse »), l'étape (a) étant mise en œuvre suite au lancement de la première instruction, et l'étape (d) étant mise en œuvre suite au lancement de la seconde instruction.  Thus, a pair of instructions, called "P-instructions", is advantageously associated with the task, the first instruction being a non-blocking instruction to request the execution of the task (the "request") and the second instruction. being a blocking instruction returning the result of the execution of the task (the "response"), the step (a) being implemented following the launching of the first instruction, and the step (d) being implemented following the launch of the second instruction.
Si on a un processus écrit sous la forme d'un enchaînement de tâches, chaque tâche étant une action élémentaire exécutable par une unité de traitement donnée à laquelle ledit bus applicatif est connecté, les tâches étant ordonnées en fonction d'éventuelles contraintes de dépendance vis-à- vis d'autres tâches, il est possible d'exécuter le processus de façon parallélisée à condition de respecter l'ordre d'ordonnancement pour l'exécution des tâches.  If we have a written process in the form of a sequence of tasks, each task being an elementary action executable by a given processing unit to which said application bus is connected, the tasks being ordered according to possible dependency constraints for other tasks, it is possible to execute the process in a parallel way provided that the scheduling order is respected for the execution of the tasks.
L'invention propose ainsi selon un deuxième aspect un procédé d'exécution parallèle d'un processus informatique par une pluralité d'unités de traitement de données connectées par un bus applicatif, le processus étant écrit sous la forme d'un enchaînement de tâches, chaque tâche étant une action élémentaire exécutable par une unité de traitement donnée à laquelle ledit bus applicatif est connecté, les tâches étant ordonnées en fonction d'éventuelles contraintes de dépendance vis-à-vis d'autres tâches, le procédé d'exécution parallèle respectant l'ordre indiqué par la table d'ordonnancement, l'exécution de chaque tâche comprenant la mise en œuvre du procédé d'utilisation par la tâche d'une mémoire partagée par lesdites d'unités de traitement de données selon le premier aspect de l'invention. According to a second aspect, the invention thus proposes a method for parallel execution of a computer process by a plurality of data processing units connected by an application bus, the process being written in the form of a sequence of tasks, each task being an elementary action executable by a processing unit given to which said application bus is connected, the tasks being ordered according to possible dependency constraints vis-à-vis other tasks, the parallel execution method respecting the order indicated by the scheduling table, the execution of each task comprising implementing the method of use by the task of a memory shared by said data processing units according to the first aspect of the invention.
Les P-instructions s'avèrent particulièrement adaptées pour le contrôle de l'enchaînement des tâches, puisqu'il suffit pour obtenir une synchronisation automatique que le lancement de la deuxième instruction d'une tâche (T) soit fait de façon synchrone avec la demande d'exécution (la première instruction dans le cas d'une P-instruction) d'une deuxième tâche (T2) ayant une contrainte de dépendance vis-à-vis de la première tâche (T).  The P-instructions are particularly suitable for controlling the sequence of tasks, since it is sufficient to obtain automatic synchronization that the launch of the second instruction of a task (T) is done synchronously with the request. execution (the first instruction in the case of a P-instruction) of a second task (T2) having a dependence constraint vis-à-vis the first task (T).
Systèmes systems
L'invention propose selon un troisième aspect des systèmes pouvant mettre en œuvre les procédés selon le premier ou le deuxième aspect de l'invention. According to a third aspect, the invention proposes systems that can implement the methods according to the first or second aspect of the invention.
La première fonctionnalité demandée au bus applicatif est d'assurer l'acheminement de toutes les données entre tous les acteurs de toutes les configurations interconnectées.  The first functionality requested from the application bus is to ensure the routing of all data between all the actors of all the interconnected configurations.
Tous les acteurs peuvent être rassemblés dans une seule station, l'unité de traitement du bus applicatif étant celle de la station. Dans ce cas là, le système selon l'invention comprend la station de travail, celle-ci comprenant tout d'abord des moyens d'affichage de données et des moyens de saisie de données. Il peut s'agir classiquement d'un écran et d'un clavier avec une souris. Ce matériel sert tout simplement à mettre en œuvre une ou plusieurs interfaces homme-machine permettant à un utilisateur d'interagir avec le BA, éventuellement en fournissant des processus à exécuter. Le système selon l'invention comprend également une unité de traitement de données, qui est l'unité reliée au bus applicatif, et une mémoire. Pour que le système ait un intérêt, l'unité de traitement doit être de préférence un processeur multicoeur (dans ce cas on la comprendra comme une pluralité d'unité de traitement), c'est-à-dire un processeur qui pourra tirer parti de l'exécution parallèle. La mémoire est avantageusement une unique mémoire partagée. All the actors can be gathered in a single station, the processing unit of the application bus being that of the station. In this case, the system according to the invention comprises the workstation, the latter comprising first of all data display means and data acquisition means. It can be classically a screen and a keyboard with a mouse. This material is simply used to implement one or more human-machine interfaces allowing a user to interact with the BA, possibly by providing processes to execute. The system according to the invention also comprises a data processing unit, which is the unit connected to the application bus, and a memory. For the system to be of interest, the processing unit must preferably be a multicore processor (in this case it will be understood as a plurality of processing units), that is to say a processor that can take advantage parallel execution. The memory is advantageously a single shared memory.
Cette station de travail héberge le NBA s'il y en a un.  This workstation hosts the NBA if there is one.
Alternativement le système selon l'invention peut ne pas se contenter d'une seule station de travail, mais comprendre comme expliqué précédemment au moins une machine partenaire. Il peut en outre y avoir plusieurs stations de travail contrôlées par des utilisateurs, les différentes stations ayant chacune une unité de traitement et utilisant les mêmes machines partenaires autour d'un bus applicatif unique.  Alternatively the system according to the invention may not be content with a single workstation, but understand as explained above at least one partner machine. In addition, there may be several workstations controlled by users, the different stations each having a processing unit and using the same partner machines around a single application bus.
Le bus applicatif sert de Multiples Stations (usagers) et de Multiples Partenaires (automates) en configuration dite MSMP. Il fonctionne en diverses configurations dites « dégradées » Simple/Multiple Station/Partenaire SSSP, SSMP, MSSP et MSMP. Enfin, le bus applicatif est capable dans toute la mesure du possible de prendre en charge les liaisons du type temps réel nécessaires à certains dispositifs (périphériques, commande de chaînes de production, ...). Il offre ainsi une passerelle entre le monde industriel et le monde du bureau par exemple pour obtenir un tableau temps réel de la production.  The application bus serves as multiple stations (users) and multiple partners (PLCs) in MSMP configuration. It operates in various configurations called "degraded" Simple / Multiple Station / Partner SSSP, SSMP, MSSP and MSMP. Finally, the application bus is able, as far as possible, to support the links of the real-time type required for certain devices (peripherals, control of production lines, etc.). It thus provides a bridge between the industrial world and the office world for example to obtain a real-time picture of the production.
Le bus utilise la connectique et les supports physiques existants entre les machines de types habituellement utilisés (serveur de fichiers, serveur Web, Serveur d'applications, etc.). En particulier, deux ports TCP/IP peuvent lui être réservés (12 et 14 ou 3012 et 3014) pour ses communications à débit maximum et optimisé. Les communications sont multiplexées et chaque segment possède une priorité. Les messages de synchronisation des tâches sont les plus prioritaires ainsi que les éventuelles liaisons temps réel.  The bus uses the connections and the existing physical media between the usual types of machines (file server, web server, application server, etc.). In particular, two TCP / IP ports can be reserved for it (12 and 14 or 3012 and 3014) for its maximum throughput and optimized communications. The communications are multiplexed and each segment has a priority. The task synchronization messages are the highest priorities as well as any real-time links.
Les opérations d'ordonnancement du bus applicatif peuvent être le cas échéant traitées par un calculateur, idéalement vectoriel, qui est une unité de traitement de l'une des machines partenaires, qui peut être dédié. Sur de moyennes configurations, une carte graphique située sur un partenaire est utilisée comme GPGPU (General-Purpose computation on Graphics Processing Units). En effet une carte graphique est un calculateur vectoriel complet. The scheduling operations of the application bus can be optionally processed by a calculator, ideally vector, which is a processing unit of one of the partner machines, which can be dedicated. On average configurations, a graphics card located on a partner is used as GPGPU (General-Purpose Computation on Graphics Processing Units). Indeed a graphics card is a complete vector calculator.
Etant a priori réparti, le bus applicatif fonctionne préférentiellement dans un cadre sécurisé. Le multiplexeur/démultiplexeur est donc muni d'une solide fonction de cryptage. Le système utilisé est un cryptage par clefs aléatoires de longueurs variables et rafraîchies automatiquement. Ainsi toute attaque est déjouée par un changement de clef en un temps plus court que celui demandé par la recherche de clef. Il y a une clef par port et par sens de transmission. La transmission de la nouvelle clef aléatoirement calculée est elle-même sécurisée par la clef précédente. Ainsi, même si la clef initiale (utilisée une unique fois lors du login) est connue, il ne peut être question de pénétrer la suite des échanges.  Being distributed a priori, the application bus preferably operates in a secure environment. The multiplexer / demultiplexer is thus provided with a strong encryption function. The system used is random key encryption of variable lengths and automatically refreshed. Thus any attack is thwarted by a key change in a shorter time than that requested by the key search. There is a key by port and by direction of transmission. The transmission of the new randomly calculated key is itself secured by the previous key. Thus, even if the initial key (used once during the login) is known, there can be no question of penetrating further exchanges.
La solidité de l'ensemble est soumise à un objectif de qualité qui fait que le bus applicatif réalise de façon particulièrement avantageuse un traçage de ses opérations et des transactions. Ce traçage n'est bien entendu pas prioritaire et n'impacte pas les performances de l'ensemble. Il est traité comme une acquisition de données stockées en cache puis sauvegardées dans les temps de plus faible priorité. Un outil annexe peut permettre d'exploiter ces données à la demande et à loisir pour y rechercher l'historique de tout événement ou en extraire toute statistique utile, ou encore permettre le réglage plus précis des paramètres du bus applicatif de façon à en optimiser le fonctionnement pour une configuration donnée.  The strength of the whole is subject to a quality objective that makes the application bus performs particularly advantageously a tracing of its operations and transactions. This tracing is of course not a priority and does not impact the performance of the whole. It is treated as an acquisition of data stored in cache and then saved in times of lower priority. An ancillary tool can make it possible to use these data on demand and at leisure to search the history of any event or extract any useful statistics, or to allow more precise adjustment of the parameters of the application bus so as to optimize the operation for a given configuration.

Claims

REVENDICATIONS
1. Procédé d'utilisation par une tâche d'une mémoire partagée entre une pluralité d'unités de traitement de données connectées par un bus applicatif, ladite tâche étant exécutée par l'une des unités de traitement de données, le procédé étant caractérisé en ce qu'il comprend des étapes de : A method of using by a task a shared memory between a plurality of data processing units connected by an application bus, said task being executed by one of the data processing units, the method being characterized by what it includes steps of:
(a) Affectation par le bus applicatif à la tâche d'un triplet de ressources comprenant un sémaphore, une zone de mémoire partagée et une file d'attente, le sémaphore indiquant un état de blocage de la tâche, la zone de mémoire partagée étant une partition d'un premier bloc de mémoire partagée, un descripteur de la zone de mémoire partagé étant stocké dans un deuxième bloc de mémoire partagé, ledit deuxième bloc étant dédié au stockage de descripteurs du premier bloc de mémoire partagée.  (a) Assignment by the application bus to the task of a resource triple comprising a semaphore, a shared memory area and a queue, the semaphore indicating a blocking state of the task, the shared memory area being a partition of a first shared memory block, a descriptor of the shared memory area being stored in a second shared memory block, said second block being dedicated to the storage of descriptors of the first shared memory block.
(b) Lorsque le bus applicatif constate que ladite zone de mémoire partagée affectée est libre et/ou que la tâche est passée en tête de la file d'attente, modification du sémaphore de sorte à indiquer un état de libération de la tâche;  (b) When the application bus finds that said assigned shared memory area is free and / or the task has moved to the top of the queue, changing the semaphore to indicate a release status of the task;
(c) Utilisation par l'unité de traitement de données de ladite zone de mémoire partagée affectée pour l'exécution de la tâche ;  (c) use by the data processing unit of said assigned shared memory area for execution of the task;
(d) Libération de l'espace du second bloc de mémoire partagée alloué au stockage du descripteur de la zone de mémoire partagée.  (d) Freeing the space of the second shared memory block allocated for storing the descriptor of the shared memory area.
2. Procédé selon la revendication 1 , dans lequel la partition du premier bloc affectée en tant que zone de mémoire partagée pour la tâche est générée dynamiquement en fonction d'une taille d'espace mémoire demandée par l'unité de traitement de données. The method of claim 1, wherein the partition of the assigned first block as a shared memory area for the task is dynamically generated based on a memory space size requested by the data processing unit.
3. Procédé selon la revendication 2, dans lequel le premier bloc de mémoire partagée est structuré en un ensemble d'unités de taille égale appelées « pages » référencées chacune par un indice, la partition de la mémoire partagée affectée en tant que zone de mémoire partagée pour la tâche étant un ensemble de pages, ledit descripteur de la zone de mémoire partagée étant une table de pages contenant les indices des pages composant ladite partition. The method of claim 2, wherein the first shared memory block is structured into a set of size units. called "pages" each referenced by an index, the shared memory partition assigned as shared memory area for the task being a set of pages, said descriptor of the shared memory area being a page table containing the indices pages composing the partition.
4. Procédé selon la revendication 3, dans lequel une table de pages contenant les indices des pages composant une partition est représentée dans le second bloc de mémoire par une liste chaînée de couples, chaque couple comprenant un indice de page et le déplacement mémoire à effectuer dans le second bloc pour atteindre le prochain couple de la liste chaînée. The method of claim 3, wherein a page table containing indexes of pages composing a partition is represented in the second memory block by a linked list of pairs, each pair comprising a page index and the memory movement to be performed. in the second block to reach the next pair in the linked list.
5. Procédé selon l'une des revendications précédentes, dans lequel l'étape (a) comprend l'obtention d'un triplet d'identifiants à partir d'une clé IPC, le triplet de ressources affecté à la tâche étant identifié par le triplet d'identifiants. 5. Method according to one of the preceding claims, wherein step (a) comprises obtaining a triplet of identifiers from an IPC key, the resource triplet assigned to the task being identified by the triplet of identifiers.
6. Procédé selon la revendication 5, dans lequel chaque identifiant est un nombre entier unique pour chaque type de ressource du triplet. The method of claim 5, wherein each identifier is a unique integer for each resource type of the triplet.
7. Procédé selon l'une des revendications précédentes, dans lequel la tâche est associée à une première instruction et une deuxième instruction, la première instruction étant une instruction non- bloquante de demande de l'exécution de la tâche et la deuxième instruction étant une instruction bloquante de retour du résultat de l'exécution de la tâche, l'étape (a) étant mise en œuvre suite au lancement de la première instruction, et l'étape (d) étant mise en œuvre suite au lancement de la seconde instruction. 7. Method according to one of the preceding claims, wherein the task is associated with a first instruction and a second instruction, the first instruction being a non-blocking instruction to request the execution of the task and the second instruction being a blocking instruction for returning the result of the execution of the task, step (a) being implemented following the launching of the first instruction, and step (d) being implemented following the launching of the second instruction .
8. Procédé d'exécution parallèle d'un processus informatique par une pluralité d'unités de traitement de données connectées par un bus applicatif, le processus étant écrit sous la forme d'un enchaînement de tâches, chaque tâche étant une action élémentaire exécutable par une unité de traitement donnée à laquelle ledit bus applicatif est connecté, les tâches étant ordonnées en fonction d'éventuelles contraintes de dépendance vis-à-vis d'autres tâches, la méthode d'exécution parallèle respectant l'ordre indiqué par la table d'ordonnancement, l'exécution de chaque tâche comprenant la mise en œuvre du procédé d'utilisation par la tâche d'une mémoire partagée par lesdites d'unités de traitement de données selon l'une des revendications 1 à 7. 8. A method of parallel execution of a computer process by a plurality of data processing units connected by an application bus, the process being written in the form of a sequence of tasks, each task being an elementary action executable by a given processing unit to which said application bus is connected, the tasks being ordered according to possible dependency constraints vis-à-vis other tasks, the parallel execution method respecting the order indicated by the table d scheduling, the execution of each task comprising the implementation of the method of use by the task of a memory shared by said data processing units according to one of claims 1 to 7.
9. Procédé selon la revendication 8, dans laquelle l'exécution d'une pluralité de tâches (T) comprend la mise en œuvre du procédé d'utilisation par la tâche d'une mémoire partagée par lesdites d'unités de traitement de données selon la revendication 7, le lancement de la deuxième instruction d'une telle tâche (T) étant fait de façon synchrone avec la demande d'exécution d'une deuxième tâche (T2) ayant une contrainte de dépendance vis-à-vis de la première tâche (T). The method of claim 8, wherein executing a plurality of tasks (T) comprises implementing the method of using by the task a memory shared by said data processing units according to claim 7, the initiation of the second instruction of such a task (T) being done synchronously with the request for execution of a second task (T2) having a dependency constraint on the first task (T).
10. Système comprenant une pluralité d'unités de traitement de données mettant en œuvre le procédé d'utilisation par une tâche d'une mémoire partagée selon l'une des revendications 1 à 7 ou le procédé d'exécution parallèle d'un processus informatique selon l'une des revendications 8 ou 9, au moins une mémoire connectée à une unité de traitement de données, et une entrée recevant la pluralité de tâches à exécuter. 10. System comprising a plurality of data processing units implementing the method of use by a task of a shared memory according to one of claims 1 to 7 or the method of parallel execution of a computer process according to one of claims 8 or 9, at least one memory connected to a data processing unit, and an input receiving the plurality of tasks to be executed.
PCT/EP2013/051594 2012-01-27 2013-01-28 Method of using a shared memory WO2013110816A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR1250814 2012-01-27
FR1250814A FR2986346A1 (en) 2012-01-27 2012-01-27 METHOD OF USING A SHARED MEMORY

Publications (2)

Publication Number Publication Date
WO2013110816A2 true WO2013110816A2 (en) 2013-08-01
WO2013110816A3 WO2013110816A3 (en) 2014-03-13

Family

ID=47747564

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2013/051594 WO2013110816A2 (en) 2012-01-27 2013-01-28 Method of using a shared memory

Country Status (2)

Country Link
FR (1) FR2986346A1 (en)
WO (1) WO2013110816A2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309024A (en) * 2019-04-23 2019-10-08 网宿科技股份有限公司 Data processing system and its method for executing data processing task
CN111796901A (en) * 2019-04-08 2020-10-20 维塔科技(北京)有限公司 Method and device for switching shared memory area, storage medium and electronic equipment
CN112199190A (en) * 2020-07-31 2021-01-08 厦门星宸科技有限公司 Memory allocation method and device, storage medium and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2963125A1 (en) 2010-07-26 2012-01-27 Tymis METHOD FOR PARALLEL EXECUTION OF A COMPUTER PROCESS BY AN APPLICATION BUS
FR2963126A1 (en) 2010-07-26 2012-01-27 Tymis METHOD OF PARALLEL EXECUTION OF A PLURALITY OF ORDINATED TASKS ACCORDING TO A SCHEDULING TABLE

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01246656A (en) * 1988-03-29 1989-10-02 Nec Corp Inter-processor sharing memory control system
WO1997005550A1 (en) * 1995-07-27 1997-02-13 Intel Corporation Protocol for arbitrating access to a shared memory area using historical state information
US7174552B2 (en) * 2002-01-12 2007-02-06 Intel Corporation Method of accessing a resource by a process based on a semaphore of another process

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2963125A1 (en) 2010-07-26 2012-01-27 Tymis METHOD FOR PARALLEL EXECUTION OF A COMPUTER PROCESS BY AN APPLICATION BUS
FR2963126A1 (en) 2010-07-26 2012-01-27 Tymis METHOD OF PARALLEL EXECUTION OF A PLURALITY OF ORDINATED TASKS ACCORDING TO A SCHEDULING TABLE

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111796901A (en) * 2019-04-08 2020-10-20 维塔科技(北京)有限公司 Method and device for switching shared memory area, storage medium and electronic equipment
CN110309024A (en) * 2019-04-23 2019-10-08 网宿科技股份有限公司 Data processing system and its method for executing data processing task
CN110309024B (en) * 2019-04-23 2023-07-18 网宿科技股份有限公司 Data processing system and method for executing data processing task
CN112199190A (en) * 2020-07-31 2021-01-08 厦门星宸科技有限公司 Memory allocation method and device, storage medium and electronic equipment
CN112199190B (en) * 2020-07-31 2023-11-03 星宸科技股份有限公司 Memory allocation method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
FR2986346A1 (en) 2013-08-02
WO2013110816A3 (en) 2014-03-13

Similar Documents

Publication Publication Date Title
US10209910B2 (en) Copy-redirect on write
US10701138B2 (en) Hybrid cloud applications
JP6774499B2 (en) Providing access to hybrid applications offline
JP2018531445A6 (en) Copy redirection on write
CN109743199A (en) Containerization management system based on micro services
US20180046487A1 (en) Container synchronization
US10042714B2 (en) Point-in-time copy on write for golden image
US10002059B2 (en) System and method for assigning memory available for high availability failover to virtual machines
FR2865818A1 (en) COMPUTER SYSTEM, CONTROL DEVICE, MEMORY SYSTEM, AND COMPUTER DEVICE
EP2232368A1 (en) System comprising a plurality of processing units making it possible to execute tasks in parallel, by mixing the mode of execution of control type and the mode of execution of data flow type
WO2007051935A1 (en) Method and system for conducting intensive multitask and multiflow calculation in real-time
EP3586221B1 (en) File system management method, equipment and system
FR2881246A1 (en) PERFECT PROCESS FOR MANAGING, JOURNALIZING OR REJECTING NON-DETERMINISTIC OPERATIONS IN THE CONDUCT OF AN APPLICATION PROCESS
FR2865817A1 (en) MEMORIZATION SYSTEM HAVING A PLURALITY OF INTERFACES
FR2931970A1 (en) METHOD FOR GENERATING HANDLING REQUIREMENTS OF SERVER CLUSTER INITIALIZATION AND ADMINISTRATION DATABASE, DATA CARRIER AND CLUSTER OF CORRESPONDING SERVERS
US10681180B2 (en) Dynamically transitioning the file system role of compute nodes for provisioning a storlet
FR2881247A1 (en) METHOD OF SEMANTICALLY MANAGING, JOURNALIZING OR REJECTING NON-DETERMINISTIC OPERATIONS WITHIN THE PROGRESS OF AN APPLICATION PROCESS
FR2881308A1 (en) METHOD OF ACCELERATING THE TRANSMISSION OF JOURNALIZATION DATA IN A MULTI-COMPUTER ENVIRONMENT AND SYSTEM USING THE SAME
WO2013110816A2 (en) Method of using a shared memory
EP3506110B1 (en) Multi-access to a data file stored in a data storage system related to a buffer memory
US11941453B2 (en) Containerized computing environments
FR3078462A1 (en) METHOD AND DEVICE FOR CONTROLLING ACCESS TO A RESOURCE OF A COMPUTER SYSTEM BY SOFTWARE APPLICATIONS
FR2986344A1 (en) METHOD OF PARALLEL EXECUTION OF A PLURALITY OF COMPUTER TASKS
EP3729273B1 (en) System and method for formulating and executing fonctional tests for cluster de servers
EP3776871B1 (en) Erasure recovery in distributed storage system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13705407

Country of ref document: EP

Kind code of ref document: A2

122 Ep: pct app. not ent. europ. phase

Ref document number: 13705407

Country of ref document: EP

Kind code of ref document: A2