JP5975419B2 - Information processing apparatus, information processing method, and program - Google Patents

Information processing apparatus, information processing method, and program Download PDF

Info

Publication number
JP5975419B2
JP5975419B2 JP2012060355A JP2012060355A JP5975419B2 JP 5975419 B2 JP5975419 B2 JP 5975419B2 JP 2012060355 A JP2012060355 A JP 2012060355A JP 2012060355 A JP2012060355 A JP 2012060355A JP 5975419 B2 JP5975419 B2 JP 5975419B2
Authority
JP
Japan
Prior art keywords
information
shared memory
transaction
data
memory area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2012060355A
Other languages
Japanese (ja)
Other versions
JP2013196129A (en
Inventor
遼 大木
遼 大木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2012060355A priority Critical patent/JP5975419B2/en
Publication of JP2013196129A publication Critical patent/JP2013196129A/en
Application granted granted Critical
Publication of JP5975419B2 publication Critical patent/JP5975419B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明に係るいくつかの態様は、情報処理装置、情報処理方法、及びプログラムに関する。   Some embodiments according to the present invention relate to an information processing apparatus, an information processing method, and a program.

近年、トランザクション処理の際に参照されるデータの使用方法が種々検討されている(例えば、特許文献1参照)。   In recent years, various methods of using data referred to in transaction processing have been studied (for example, see Patent Document 1).

特許文献1には、発生したトランザクションから共有エリアを動的に割り当て、必要がなくなれば共有エリアを開放することにより、共有エリアとプロセスとの関係を意識せずにプログラムを設計することのできる情報処理装置の方式が開示されている。   Patent Document 1 discloses information that allows a program to be designed without being aware of the relationship between a shared area and a process by dynamically allocating a shared area from a generated transaction and releasing the shared area when it is no longer needed. A processing apparatus scheme is disclosed.

特開平10−049430号公報Japanese Patent Laid-Open No. 10-049430

ところで、トランザクションが参照する共有メモリ領域のデータを更新する際には、当該データの整合性を確保するため、トランザクションの処理終了後、この処理とは排他的に、当該データの更新処理を実行することが多い。   By the way, when updating the data in the shared memory area referred to by the transaction, in order to ensure the consistency of the data, the data update process is executed exclusively from the process after the transaction process is completed. There are many cases.

しかしながら、共有メモリ領域の参照処理と更新処理とを排他制御すると、更新処理が終了するまで次のトランザクションを実行できないため、処理速度の遅延が発生することがあった。   However, when the shared memory area reference process and the update process are exclusively controlled, the next transaction cannot be executed until the update process is completed, which may cause a processing speed delay.

また、特許文献1記載の手法は、あくまでトランザクション同士の処理についてのみ考慮したものであり、参照処理と更新処理との関係に関しては、何ら考慮されていない。   Further, the method described in Patent Document 1 only considers processing between transactions, and does not take into account the relationship between the reference processing and the update processing.

本発明のいくつかの態様は前述の課題に鑑みてなされたものであり、共有メモリ領域のデータの参照と更新とを平行して処理することのできる情報処理装置、情報処理方法、及びプログラムを提供することを目的の1つとする。   Some aspects of the present invention have been made in view of the above-described problems. An information processing apparatus, an information processing method, and a program capable of processing data reference and update in a shared memory area in parallel are provided. One of the purposes is to provide it.

本発明に係る情報処理装置は、第1のデータが記憶された記憶媒体上の位置に関する第1の位置情報を記憶する第1の記憶手段と、前記第1の記憶手段に記憶された前記第1の位置情報に基づき、第1のデータを参照して第1のトランザクションを処理する第1の処理手段と、前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の位置に記録する更新手段と、前記第2のデータが記録された前記記憶媒体上の位置に関する第2の位置情報を記憶する第2の記憶手段と、前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を記録する位置情報更新手段とを備える。   An information processing apparatus according to the present invention includes a first storage unit that stores first position information related to a position on a storage medium in which first data is stored, and the first storage unit that is stored in the first storage unit. The first processing means for processing the first transaction with reference to the first data based on the position information of the first data, and the second data obtained by updating the first data are the first data Update means for recording at different positions on the storage medium, second storage means for storing second position information relating to positions on the storage medium where the second data is recorded, and the first storage When the first position information stored in the means is different from the second position information stored in the second storage means, the second position information is recorded in the first storage means. Position information updating means.

本発明に係る情報処理方法は、第1のデータが記憶された記憶媒体上の位置に関する第1の位置情報を第1の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報に基づき、第1のデータを参照して第1のトランザクションを処理するステップと、前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の位置に記録するステップと、前記第2のデータが記録された前記記憶媒体上の位置に関する第2の位置情報を前記第2の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を位置情報更新手段に記録するステップとを備える。   The information processing method according to the present invention includes a step of recording first position information relating to a position on a storage medium in which first data is stored in a first storage unit, and the first storage unit stores the first position information. The step of processing the first transaction with reference to the first data based on the first position information, and the second data updated from the first data are different from the first data. A step of recording at a position on a storage medium, a step of recording second position information on the position on the storage medium where the second data is recorded in the second storage means, and the first storage When the first position information stored in the means is different from the second position information stored in the second storage means, the second position information is stored in the first storage means. Recording in the updating means; Provided.

本発明に係るプログラムは、情報処理装置に、第1のデータが記憶された記憶媒体上の位置に関する第1の位置情報を第1の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報に基づき、第1のデータを参照して第1のトランザクションを処理するステップと、前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の位置に記録するステップと、前記第2のデータが記録された前記記憶媒体上の位置に関する第2の位置情報を前記第2の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を位置情報更新手段に記録するステップとを実行させる。   The program according to the present invention includes a step of recording, in the information processing apparatus, first position information related to a position on a storage medium in which first data is stored in a first storage unit; Based on the stored first position information, processing the first transaction with reference to the first data, and the second data updated from the first data, the first data and Recording at a different location on the storage medium, recording second location information on the location on the storage medium where the second data is recorded, on the second storage means, When the first position information stored in the first storage unit is different from the second position information stored in the second storage unit, the second position information is stored in the first storage unit. Is recorded in the location information update means To perform the steps that.

尚、本発明において、「部」や「手段」とは、単に物理的手段を意味するものではなく、その「部」や「手段」が有する機能をソフトウェアによって実現する場合も含む。また、1つの「部」や「手段」が有する機能が2つ以上の物理的手段や装置により実現されても、2つ以上の「部」や「手段」の機能が1つの物理的手段や装置により実現されても良い。   In the present invention, “unit” and “means” do not simply mean physical means, but also include cases where the functions of the “part” and “means” are realized by software. In addition, even if the function of one “unit” or “means” is realized by two or more physical means or devices, the function of two or more “units” or “means” can be one physical means or It may be realized by an apparatus.

本発明によれば、共有メモリ領域のデータの参照と更新とを平行して処理することのできる情報処理装置、情報処理方法、及びプログラムを提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the information processing apparatus, the information processing method, and program which can process the reference and update of the data of a shared memory area in parallel can be provided.

本発明の実施形態1における情報処理装置の構成を説明するための図である。It is a figure for demonstrating the structure of the information processing apparatus in Embodiment 1 of this invention. 図1に示した情報処理装置の処理の流れを示すフローチャートである。3 is a flowchart illustrating a processing flow of the information processing apparatus illustrated in FIG. 1. 図1に示した情報処理装置の処理の流れを示すフローチャートである。3 is a flowchart illustrating a processing flow of the information processing apparatus illustrated in FIG. 1. 図1に示した情報処理装置の処理の流れを示すフローチャートである。3 is a flowchart illustrating a processing flow of the information processing apparatus illustrated in FIG. 1. 図1に示した情報処理装置の処理の具体例を説明するための図である。It is a figure for demonstrating the specific example of a process of the information processing apparatus shown in FIG.

以下に本発明の実施形態を説明する。以下の説明及び参照する図面の記載において、同一又は類似の構成には、それぞれ同一又は類似の符号が付されている。
(実施形態)
Embodiments of the present invention will be described below. In the following description and the description of the drawings to be referred to, the same or similar components are denoted by the same or similar reference numerals.
(Embodiment)

図1乃至図5は、本発明の実施形態を説明するための図である。以下、これらの図を参照しながら、以下の流れに沿って本実施形態を説明する。まず、「1」で実施形態全体の概要を示す。その上で、「2」でシステム構成を、「3」で処理の流れを説明する。「4」では、本実施形態の処理の流れを、具体例を挙げて説明する。最後に、「5」以降で、本実施形態に係る効果等を説明する。   1 to 5 are diagrams for explaining an embodiment of the present invention. Hereinafter, the present embodiment will be described along the following flow with reference to these drawings. First, “1” indicates an overview of the entire embodiment. Then, “2” describes the system configuration, and “3” describes the processing flow. In “4”, the processing flow of the present embodiment will be described with a specific example. Finally, the effects and the like according to the present embodiment will be described after “5”.

(1 概要)
複数のプログラムから平行して同一のデータにアクセス可能な共有メモリと呼ばれる技術がある。本実施形態では、トランザクションで共有メモリ上のデータを参照すると共に、同じデータを、当該トランザクションとは別プロセスに係る更新コマンドで更新する場合を考える。
このようなシステムの処理は、以下のような処理に分解することができる。
(1 Overview)
There is a technique called a shared memory that can access the same data in parallel from a plurality of programs. In this embodiment, a case is considered in which data in the shared memory is referred to by a transaction and the same data is updated by an update command related to a process different from the transaction.
The processing of such a system can be broken down into the following processing.

(a)データの更新に伴い、トランザクションが参照すべき共有メモリ上の領域(データが記憶される位置であり、以下「共有メモリ領域」ともいう。)は随時変更され、トランザクションから参照されなくなった共有メモリ領域のデータ(更新前のデータ)は削除される。
(b)共有メモリ上のデータの更新及び削除は、トランザクションのプロセスとは別のプロセスで実行される。
(c)トランザクションの処理中は、共有メモリ上のデータが更新されても、当該トランザクションが参照する共有メモリ領域は変更しない。
(d)トランザクションが実行されるプロセスは、共有メモリ上のデータが更新されると、トランザクションが参照すべき共有メモリ領域を変更する。
(A) As the data is updated, the area on the shared memory that the transaction should refer to (the location where the data is stored, hereinafter also referred to as “shared memory area”) is changed from time to time and is no longer referenced by the transaction. Data in the shared memory area (data before update) is deleted.
(B) Updating and deleting data on the shared memory is executed by a process different from the transaction process.
(C) During transaction processing, even if data on the shared memory is updated, the shared memory area referred to by the transaction is not changed.
(D) When the data on the shared memory is updated, the process in which the transaction is executed changes the shared memory area to be referred to by the transaction.

このようなシステムでは、トランザクション処理とは別に、データが更新されたらトランザクションが参照する共有メモリ領域を変更する処理が必要となるため、例えば、以下の2つのスレッドを用意し、この2つのスレッドを排他制御することとなる。
(1)トランザクションを実行するスレッド
(2)データの更新を受信し、トランザクションで参照すべき共有メモリ領域を変更すると共に、参照されなくなった共有メモリ領域を開放するスレッド
In such a system, in addition to transaction processing, when data is updated, processing for changing the shared memory area referred to by the transaction is required. For example, the following two threads are prepared, and these two threads are prepared. Exclusive control will be performed.
(1) Thread that executes a transaction (2) Thread that receives a data update, changes the shared memory area to be referenced in the transaction, and releases the shared memory area that is no longer referenced

ここで、上記2つのスレッドを排他制御すると、データの変更に伴う共有メモリ領域の誤参照やメモリリークを防いでデータの整合性を保つことができるようになる。   Here, when the above two threads are exclusively controlled, it is possible to prevent misreference of the shared memory area and memory leak due to data change and to maintain data consistency.

しかしながら、CPU(Central Processing Unit)数が多いシステムでこのような手法を行うと、この処理がクリティカルセクションとなるので待ち合わせが発生し、CPU性能を十分に発揮できずに性能が頭打ちとなってしまう。   However, if such a method is performed in a system with a large number of CPUs (Central Processing Units), this process becomes a critical section, so a waiting occurs, and the CPU performance cannot be fully exhibited, and the performance reaches its peak. .

そこで、本実施形態の情報処理装置1は、図1のような構成を有する。情報処理装置1のシステムは、共有メモリ100と、共有メモリ100を参照及び更新するプロセス200と、共有メモリ100を更新する共有メモリ更新コマンド300と、プロセス200に含まれる各スレッドが参照及び更新する共有メモリ参照テーブル400とを含む。   Therefore, the information processing apparatus 1 of the present embodiment has a configuration as shown in FIG. In the system of the information processing apparatus 1, the shared memory 100, the process 200 for referring to and updating the shared memory 100, the shared memory update command 300 for updating the shared memory 100, and the threads included in the process 200 are referenced and updated. A shared memory reference table 400.

図1の例において、プロセス200及び共有メモリ更新コマンド300は、それぞれCPU上で実行されるプログラム、又はプログラムの一部であり、プロセス200及び共有メモリ更新コマンド300は、共有メモリ100上のデータに、平行してアクセス可能である。つまり、プロセス200が共有メモリ100上のデータを参照しながら、共有メモリ更新コマンド300が同じデータを更新することが有りうる。   In the example of FIG. 1, the process 200 and the shared memory update command 300 are each a program executed on the CPU or a part of the program, and the process 200 and the shared memory update command 300 are stored in the data on the shared memory 100. , Accessible in parallel. That is, the shared memory update command 300 may update the same data while the process 200 refers to the data on the shared memory 100.

プロセス200は、トランザクションスレッド210、変更スレッド220、及び共有メモリ領域開放スレッド230の各スレッドを含む。トランザクションスレッド210、変更スレッド220、及び共有メモリ領域開放スレッド230、それぞれ共有メモリ参照テーブル400を参照し、データ(情報)を更新する。   The process 200 includes a transaction thread 210, a change thread 220, and a shared memory area release thread 230. The transaction thread 210, the change thread 220, and the shared memory area release thread 230 refer to the shared memory reference table 400, respectively, and update data (information).

共有メモリ参照テーブル400は、図示しない記憶媒体上で管理される情報管理テーブルであり、トランザクション参照メモリ領域情報410、次回トランザクション参照メモリ領域情報420、及び参照済みメモリ領域情報430を管理する。   The shared memory reference table 400 is an information management table managed on a storage medium (not shown), and manages the transaction reference memory area information 410, the next transaction reference memory area information 420, and the referenced memory area information 430.

トランザクション参照メモリ領域情報410には、トランザクションスレッド210により処理されるトランザクションで参照する、共有メモリ100上の共有メモリ領域120のアドレスが格納される。   The transaction reference memory area information 410 stores an address of the shared memory area 120 on the shared memory 100 that is referred to by a transaction processed by the transaction thread 210.

次回トランザクション参照メモリ領域情報420には、現在または直前にトランザクションスレッド210により実行されていたトランザクションの次に実行されるトランザクションが参照すべき共有メモリ領域120のアドレスが格納される。   The next transaction reference memory area information 420 stores the address of the shared memory area 120 to be referred to by the transaction executed next to the transaction executed by the transaction thread 210 at the present time or immediately before.

参照済みメモリ領域情報430には、トランザクションスレッド210が以前処理していたトランザクションが参照していた(すなわち、現在参照されていない)共有メモリ領域120のアドレスが格納される。   The referenced memory area information 430 stores the address of the shared memory area 120 that has been referenced by the transaction that the transaction thread 210 previously processed (that is, that is not currently referenced).

このような共有メモリ参照テーブル400の管理により、情報処理装置1は、トランザクションを実行するトランザクションスレッド210と、共有メモリ更新コマンド300による共有メモリ100更新に係るスレッドとの間の排他を回避している。   By managing the shared memory reference table 400 as described above, the information processing apparatus 1 avoids exclusion between the transaction thread 210 that executes the transaction and the thread related to the shared memory 100 update by the shared memory update command 300. .

トランザクションスレッド210によるトランザクション中に共有メモリ100の更新が発生した場合(トランザクションスレッド210が参照するデータの更新が発生した場合)、まず、更新後のデータは、更新前のデータが格納される共有メモリ領域120とは異なる共有メモリ領域120に格納される。   When the shared memory 100 is updated during a transaction by the transaction thread 210 (when the data referred to by the transaction thread 210 is updated), first, the updated data is the shared memory in which the data before the update is stored. It is stored in a shared memory area 120 different from the area 120.

そして、トランザクション参照メモリ領域情報410には、更新前のデータが格納される共有メモリ領域120のアドレスを格納し続けると共に(すなわち、少なくともトランザクション終了までは更新しない)、次回トランザクション参照メモリ領域情報420には、更新後のデータ(最新のデータ)が格納される共有メモリ領域120のアドレスを格納する。これにより、たとえトランザクション中に共有メモリ100が更新されたとしても、今回のトランザクションでは更新前のデータを参照しつつ、次回のトランザクションでは、最新のデータが格納された共有メモリ領域120を参照することができるようになる。   The transaction reference memory area information 410 keeps storing the address of the shared memory area 120 where the data before update is stored (that is, at least until the end of the transaction is not updated), and the next transaction reference memory area information 420 contains Stores the address of the shared memory area 120 in which updated data (latest data) is stored. As a result, even if the shared memory 100 is updated during the transaction, the pre-update data is referred to in the current transaction, and the shared memory area 120 in which the latest data is stored is referred to in the next transaction. Will be able to.

また、次回のトランザクションの実行開始時、もしくはそれよりも前に(例えば、前回のトランザクションの終了処理時)、次回トランザクション参照メモリ領域情報420に格納された最新のデータの共有メモリ領域120のアドレスをトランザクション参照メモリ領域情報410に格納すると共に、それまでにトランザクション参照メモリ領域情報410に格納されていた、更新前のデータに係る共有メモリ領域120のアドレスは、参照済みメモリ領域情報430に格納する。共有メモリ領域開放スレッド230は、参照済みメモリ領域情報430にアドレスが格納されている、参照されなくなった共有メモリ領域120を定期的に開放(削除)することで、メモリリークを防ぐ。   Also, at the start of execution of the next transaction or before (for example, at the end of the previous transaction), the address of the shared memory area 120 of the latest data stored in the next transaction reference memory area information 420 is set. In addition to being stored in the transaction reference memory area information 410, the address of the shared memory area 120 related to the data before update that has been stored in the transaction reference memory area information 410 until then is stored in the referenced memory area information 430. The shared memory area releasing thread 230 prevents memory leak by periodically releasing (deleting) the shared memory area 120 that is no longer referred to and whose address is stored in the referenced memory area information 430.

このような処理により、排他制御を行わずに、トランザクションによる共有メモリ100の参照と、共有メモリ更新コマンド300による共有メモリ100の更新とを処理することができるので、CPU性能が頭打ちとなることを防ぐことが可能となる。   With such processing, it is possible to process the reference of the shared memory 100 by a transaction and the update of the shared memory 100 by the shared memory update command 300 without performing exclusive control. It becomes possible to prevent.

(2 システム構成)
以下、情報処理装置1の構成を、図1を参照しながら説明する。上述した通り、情報処理装置1のシステムは、共有メモリ100と、共有メモリを参照及び更新するプロセス200と、共有メモリ100を更新する共有メモリ更新コマンド300と、プロセス200に含まれる各スレッドが参照及び更新する共有メモリ参照テーブル400とを含む。
(2 System configuration)
Hereinafter, the configuration of the information processing apparatus 1 will be described with reference to FIG. As described above, the system of the information processing apparatus 1 is referred to by the shared memory 100, the process 200 that references and updates the shared memory, the shared memory update command 300 that updates the shared memory 100, and each thread included in the process 200. And the shared memory reference table 400 to be updated.

共有メモリ100は、プロセス200や共有メモリ更新コマンド300を含むプロセス、及びその他のプロセスが同時並行的にアクセス可能な記憶媒体(もしくは、記憶媒体の一部)である。共有メモリ100には、世代番号110が管理されると共に、共有メモリ領域120が確保される。
世代番号110は、共有メモリ更新コマンド300により新たな共有メモリ領域120が確保される毎に加算(又は減算)される番号である。この世代番号110の値は、最新のデータが格納された共有メモリ領域120のメモリ番号121と一致する。
The shared memory 100 is a storage medium (or a part of the storage medium) that can be accessed concurrently by processes including the process 200 and the shared memory update command 300 and other processes. In the shared memory 100, the generation number 110 is managed and a shared memory area 120 is secured.
The generation number 110 is a number that is added (or subtracted) every time a new shared memory area 120 is secured by the shared memory update command 300. The value of the generation number 110 matches the memory number 121 of the shared memory area 120 in which the latest data is stored.

共有メモリ領域120は、共有メモリ更新コマンド300によりデータが記録若しくは更新される際に、当該データを格納するために共有メモリ100上に確保される記憶領域である。ここで、共有メモリ領域120の領域内には、メモリ番号121が管理される。メモリ番号121は、各共有メモリ領域120を識別するための識別子としての役割を果たす番号である。   The shared memory area 120 is a storage area secured on the shared memory 100 for storing the data when the data is recorded or updated by the shared memory update command 300. Here, a memory number 121 is managed in the shared memory area 120. The memory number 121 is a number that serves as an identifier for identifying each shared memory area 120.

尚、本実施形態の説明において、共有メモリ領域120A、120B等の個別の領域に言及しない場合には、「共有メモリ領域120」として総称する。この点、メモリ番号121についても同様である。   In the description of the present embodiment, when the individual areas such as the shared memory areas 120A and 120B are not referred to, they are collectively referred to as “shared memory area 120”. This also applies to the memory number 121.

プロセス200は、トランザクションスレッド210、変更スレッド220、及び共有メモリ領域開放スレッド230の各スレッドを含む。トランザクションスレッド210、変更スレッド220、及び共有メモリ領域開放スレッド230は、それぞれ共有メモリ参照テーブル400中の情報を参照すると共に更新する。   The process 200 includes a transaction thread 210, a change thread 220, and a shared memory area release thread 230. The transaction thread 210, the change thread 220, and the shared memory area release thread 230 refer to and update information in the shared memory reference table 400, respectively.

トランザクションスレッド210は、共有メモリ100(に記憶されるデータ)を参照しながら実行するトランザクションのスレッドである。トランザクションスレッド210は、トランザクション開始手段211及びトランザクション終了手段213を含む。   The transaction thread 210 is a thread of a transaction executed while referring to (data stored in the shared memory 100). The transaction thread 210 includes a transaction start unit 211 and a transaction end unit 213.

ここで、トランザクション開始手段211は、トランザクションスレッド210を開始する。この開始処理の中でトランザクション開始手段211は、共有メモリ参照テーブル400中の、トランザクション参照メモリ領域情報410と、次回トランザクション参照メモリ領域情報420とを確認する。双方に設定された共有メモリ領域120のアドレスが異なる場合には、トランザクション開始手段211は、次回トランザクション参照メモリ領域情報420に設定されていた共有メモリ領域120のアドレスをトランザクション参照メモリ領域情報410に格納すると共に、それまでトランザクション参照メモリ領域情報410に格納されていた共有メモリ領域120のアドレスを参照済みメモリ領域情報430に格納する(追加する)。   Here, the transaction start unit 211 starts the transaction thread 210. In this start process, the transaction start unit 211 confirms the transaction reference memory area information 410 and the next transaction reference memory area information 420 in the shared memory reference table 400. When the addresses of the shared memory areas 120 set in both are different, the transaction start unit 211 stores the address of the shared memory area 120 set in the next transaction reference memory area information 420 in the transaction reference memory area information 410. At the same time, the address of the shared memory area 120 previously stored in the transaction reference memory area information 410 is stored (added) in the referenced memory area information 430.

トランザクション終了手段213は、トランザクションスレッド210を終了する。この終了処理の中で、トランザクション終了手段213は、トランザクション開始手段211と同様に、共有メモリ参照テーブル400中の、トランザクション参照メモリ領域情報410と、次回トランザクション参照メモリ領域情報420とを確認する。双方に設定された共有メモリ領域120のアドレスが異なる場合には、トランザクション終了手段213は、次回トランザクション参照メモリ領域情報420に設定されていた共有メモリ領域120のアドレスをトランザクション参照メモリ領域情報410に格納すると共に、それまでトランザクション参照メモリ領域情報410に格納されていた共有メモリ領域120のアドレスを参照済みメモリ領域情報430に格納する(追加する)。   The transaction end unit 213 ends the transaction thread 210. In this termination process, the transaction termination unit 213 confirms the transaction reference memory area information 410 and the next transaction reference memory area information 420 in the shared memory reference table 400, similarly to the transaction start unit 211. When the addresses of the shared memory areas 120 set in both are different, the transaction end unit 213 stores the address of the shared memory area 120 set in the next transaction reference memory area information 420 in the transaction reference memory area information 410. At the same time, the address of the shared memory area 120 previously stored in the transaction reference memory area information 410 is stored (added) in the referenced memory area information 430.

尚、本実施形態では、トランザクション開始手段211及びトランザクション終了手段213の双方が、共有メモリ参照テーブル400中の、トランザクション参照メモリ領域情報410と、次回トランザクション参照メモリ領域情報420とを確認し、相違がある場合には情報を更新しているが、これに限られるものではない。具体的には、たとえばトランザクション開始手段211のみを備え、トランザクション開始時に実行するようにしても良い。   In this embodiment, both the transaction start unit 211 and the transaction end unit 213 check the transaction reference memory area information 410 and the next transaction reference memory area information 420 in the shared memory reference table 400, and the difference is the same. In some cases, information is updated, but this is not a limitation. Specifically, for example, only the transaction start unit 211 may be provided and executed at the start of the transaction.

変更スレッド220は、最新データが記憶された共有メモリ領域120のアドレスを設定するためのスレッドであり、共有メモリ設定手段221を含む。ここで、共有メモリ設定手段221は、共有メモリ更新手段310から共有メモリ領域120の新たな作成を通知されると、共有メモリ100から世代番号110を読込み、この世代番号110と同一の番号を持つ共有メモリ領域120のアドレスを、共有メモリ参照テーブル400中の次回トランザクション参照メモリ領域情報420に設定する。   The change thread 220 is a thread for setting the address of the shared memory area 120 in which the latest data is stored, and includes a shared memory setting unit 221. When the shared memory setting unit 221 is notified of the new creation of the shared memory area 120 from the shared memory update unit 310, the shared memory setting unit 221 reads the generation number 110 from the shared memory 100 and has the same number as the generation number 110. The address of the shared memory area 120 is set in the next transaction reference memory area information 420 in the shared memory reference table 400.

共有メモリ領域開放スレッド230は、参照されなくなったデータが格納されている共有メモリ100上に確保された共有メモリ領域120を確保するためのスレッドであり、共有メモリ開放手段231を含む。   The shared memory area release thread 230 is a thread for securing the shared memory area 120 secured on the shared memory 100 in which data that is no longer referenced is stored, and includes a shared memory release means 231.

共有メモリ開放手段231は、定期間隔で、参照済みメモリ領域情報430にアドレスが設定されている共有メモリ領域120を開放することで、参照されなくなった、古いデータを削除する。また、共有メモリ開放手段231は、この開放処理後、参照済みメモリ領域情報430を未設定に変更する(書き換える)。   The shared memory releasing unit 231 deletes old data that is no longer referenced by releasing the shared memory area 120 whose address is set in the referenced memory area information 430 at regular intervals. Further, the shared memory releasing unit 231 changes (rewrites) the referenced memory area information 430 to an unset after this releasing process.

共有メモリ更新コマンド300は、共有メモリ100のデータを更新するための命令であり、共有メモリ更新手段310を含む。共有メモリ更新手段310は、新たに共有メモリ領域120を作成すると共に、世代番号110に1加算する。また、共有メモリ更新コマンド300は、作成した新たな共有メモリ領域120中に、当該加算後の世代番号110をメモリ番号121として格納する。   The shared memory update command 300 is an instruction for updating data in the shared memory 100 and includes a shared memory update unit 310. The shared memory update unit 310 newly creates the shared memory area 120 and adds 1 to the generation number 110. Also, the shared memory update command 300 stores the added generation number 110 as the memory number 121 in the newly created shared memory area 120.

共有メモリ参照テーブル400は、トランザクション参照メモリ領域情報410、次回トランザクション参照メモリ領域情報420、及び参照済みメモリ領域情報430を管理する。各共有メモリ領域120のアドレスが、トランザクション参照メモリ領域情報410、次回トランザクション参照メモリ領域情報420、及び参照済みメモリ領域情報430の少なくともいずれかに格納される。   The shared memory reference table 400 manages the transaction reference memory area information 410, the next transaction reference memory area information 420, and the referenced memory area information 430. The address of each shared memory area 120 is stored in at least one of the transaction reference memory area information 410, the next transaction reference memory area information 420, and the referenced memory area information 430.

トランザクション参照メモリ領域情報410には、トランザクションスレッド210が参照する、共有メモリ100上の共有メモリ領域120のアドレスが格納される。   The transaction reference memory area information 410 stores the address of the shared memory area 120 on the shared memory 100 that is referred to by the transaction thread 210.

次回トランザクション参照メモリ領域情報420には、最新のデータが格納される共有メモリ領域120(次に実行されるトランザクションが参照すべき共有メモリ領域120)のアドレスが格納される。   The next transaction reference memory area information 420 stores the address of the shared memory area 120 (the shared memory area 120 to be referred to by the next executed transaction) in which the latest data is stored.

参照済みメモリ領域情報430には、トランザクションスレッド210が以前処理していたトランザクションが参照していた(すなわち、現在参照されていない)共有メモリ領域120のアドレスが格納される。参照済みメモリ領域情報430には、複数の共有メモリ領域120のアドレスを格納することができる。   The referenced memory area information 430 stores the address of the shared memory area 120 that has been referenced by the transaction that the transaction thread 210 previously processed (that is, that is not currently referenced). The referenced memory area information 430 can store the addresses of a plurality of shared memory areas 120.

(3 処理の流れ)
次に、情報処理装置1による処理の流れを、図2乃至図4をそれぞれ参照しながら説明する。以下、「3.1」で共有メモリ100へのデータ更新時の処理の流れを、「3.2」でトランザクション開始時又は終了時の処理の流れを説明する。
(3 Process flow)
Next, the flow of processing by the information processing apparatus 1 will be described with reference to FIGS. Hereinafter, the flow of processing at the time of updating data to the shared memory 100 will be described with “3.1”, and the flow of processing at the start or end of a transaction will be described with “3.2”.

(3.1 データ更新時の処理の流れ)
図2及び図3を参照しながら、共有メモリ100へのデータ更新時(作成時)の処理の流れを説明する。図2及び図3は、それぞれ、共有メモリ100へのデータ更新時(作成時)の、共有メモリ更新手段310及び共有メモリ設定手段221の処理の流れを説明するためのフローチャートである。
(3.1 Flow of processing when updating data)
With reference to FIGS. 2 and 3, the flow of processing when data is updated (created) in the shared memory 100 will be described. 2 and 3 are flowcharts for explaining the flow of processing of the shared memory updating unit 310 and the shared memory setting unit 221 when data is updated (created) in the shared memory 100, respectively.

共有メモリ更新手段310は、共有メモリ100のデータを更新するために、まず共有メモリ100の空き領域に、新たな共有メモリ領域120を確保すると共に、データを格納する(S201)。次に、共有メモリ更新手段310は、世代番号110を更新(1加算)すると共に(S203)、更新後の世代番号110を、新たに確保した共有メモリ領域120のメモリ番号121として設定する(S205)。   In order to update the data in the shared memory 100, the shared memory update unit 310 first secures a new shared memory area 120 in the free area of the shared memory 100 and stores the data (S201). Next, the shared memory update unit 310 updates (adds 1) the generation number 110 (S203), and sets the updated generation number 110 as the memory number 121 of the newly secured shared memory area 120 (S205). ).

これらの処理が終了すると、共有メモリ更新手段310は、共有メモリ領域120を新たに作成した旨のイベントを、共有メモリ設定手段221に通知する(S207)。   When these processes are completed, the shared memory update unit 310 notifies the shared memory setting unit 221 of an event indicating that the shared memory area 120 has been newly created (S207).

共有メモリ設定手段221は、共有メモリ更新手段310から共有メモリ領域120を作成した旨のイベントを受信すると(S301)、共有メモリ100にアクセスして、現在の世代番号110を取得する(S303)。その上で、共有メモリ設定手段221は、当該世代番号110と同一の番号を持つメモリ番号121をもつ共有メモリ領域120を探索し、当該共有メモリ領域120のアドレスを、次回トランザクション参照メモリ領域情報420に設定する(S305)。
以上により、共有メモリ100の更新処理が完了する。
When the shared memory setting unit 221 receives an event indicating that the shared memory area 120 has been created from the shared memory update unit 310 (S301), the shared memory setting unit 221 accesses the shared memory 100 and acquires the current generation number 110 (S303). Then, the shared memory setting unit 221 searches for the shared memory area 120 having the memory number 121 having the same number as the generation number 110, and uses the address of the shared memory area 120 as the next transaction reference memory area information 420. (S305).
Thus, the update process of the shared memory 100 is completed.

(3.2 トランザクションの開始時又は終了時の処理の流れ)
続いて、トランザクション開始時又は終了時の処理の流れを、図4を参照しながら説明する。尚、本実施形態では、トランザクション開始時及び終了時に、それぞれトランザクション開始手段211及びトランザクション終了手段213が、図4に示す同一の処理を行うが、ここでは、トランザクション開始手段211の処理として説明する。
(3.2 Process flow at the start or end of a transaction)
Next, the flow of processing at the start or end of a transaction will be described with reference to FIG. In this embodiment, the transaction start unit 211 and the transaction end unit 213 perform the same processing shown in FIG. 4 at the start and end of a transaction, respectively, but here, the processing will be described as the process of the transaction start unit 211.

トランザクション開始手段211は、トランザクションスレッド210によるトランザクション処理の開始時に、トランザクション参照メモリ領域情報410に設定された共有メモリ領域120のアドレスと、次回トランザクション参照メモリ領域情報420に設定された共有メモリ領域120のアドレスとが、同一であるか異なるかを確認する(S401)。設定されたアドレスが相違する場合(参照先の共有メモリ領域120が異なる場合。S401のYes)、トランザクション開始手段211は、トランザクション参照メモリ領域情報410に設定されていた共有メモリ領域120のアドレスを、参照済みメモリ領域情報430に設定(追加)する(S403)。そして、トランザクション開始手段211は、次回トランザクション参照メモリ領域情報420に設定されていた共有メモリ領域120のアドレスを、トランザクション参照メモリ領域情報410に設定する(S405)。   The transaction start unit 211 starts the transaction process by the transaction thread 210 and the address of the shared memory area 120 set in the transaction reference memory area information 410 and the shared memory area 120 set in the next transaction reference memory area information 420. It is confirmed whether the address is the same or different (S401). When the set addresses are different (when the reference destination shared memory area 120 is different; Yes in S401), the transaction start unit 211 uses the address of the shared memory area 120 set in the transaction reference memory area information 410 as It is set (added) to the referenced memory area information 430 (S403). Then, the transaction start unit 211 sets the address of the shared memory area 120 set in the next transaction reference memory area information 420 in the transaction reference memory area information 410 (S405).

これにより、トランザクション実行前(前回のトランザクション実行時も含む)までに、最新のデータが格納された共有メモリ領域120の位置が変更されていた場合であっても、トランザクションスレッド210が、最新のデータが格納された共有メモリ領域120を参照できるようになる。   As a result, even if the position of the shared memory area 120 in which the latest data is stored has been changed before the transaction execution (including the time of the previous transaction execution), the transaction thread 210 has the latest data. Can be referred to.

(4 具体例の説明)
以下、図5を参照しながら、本実施形態に係る情報処理装置1の処理の具体例を説明する。図5は、共有メモリ100のデータ更新及び開放に関する処理の流れの具体例を説明するための図である。以下、共有メモリ100及び共有メモリ参照テーブル400の状態遷移に着目しながら説明する。
(4 Description of specific examples)
Hereinafter, a specific example of processing of the information processing apparatus 1 according to the present embodiment will be described with reference to FIG. FIG. 5 is a diagram for explaining a specific example of a flow of processing related to data update and release of the shared memory 100. Hereinafter, description will be made while paying attention to state transitions of the shared memory 100 and the shared memory reference table 400.

トランザクションスレッド210によるトランザクションが開始される前、共有メモリ参照テーブル400には、トランザクション参照メモリ領域情報410に「共有メモリ領域A」(共有メモリ領域120Aのアドレス)が、次回トランザクション参照メモリ領域情報420に「共有メモリ領域B」(同じく、共有メモリ領域120Bのアドレス)が、それぞれ設定されている。参照済みメモリ領域情報430には、何も設定されていない(未設定)。   Before the transaction by the transaction thread 210 is started, the shared memory reference table 400 includes “shared memory area A” (address of the shared memory area 120A) in the transaction reference memory area information 410 and the next transaction reference memory area information 420. “Shared memory area B” (similarly, the address of the shared memory area 120B) is set. Nothing is set in the referenced memory area information 430 (not set).

また、共有メモリ100には、共有メモリ領域120A及び120Bが確保されてデータが格納されると共に、それぞれのメモリ番号121A及び121Bには「1」、「2」が設定されている。世代番号110には、現在のメモリ番号121の中で最も大きい値(最新のデータが格納されている共有メモリ領域120B)と一致する「2」が設定されている。   In the shared memory 100, shared memory areas 120A and 120B are secured and data is stored, and “1” and “2” are set in the respective memory numbers 121A and 121B. The generation number 110 is set to “2” that matches the largest value in the current memory number 121 (the shared memory area 120B in which the latest data is stored).

トランザクションスレッド210のトランザクション開始手段211がトランザクションを開始すると、図4を参照して説明した通り、まず、トランザクション開始手段211は、トランザクション参照メモリ領域情報410と次回トランザクション参照メモリ領域情報420とを確認し、両者に設定された共有メモリ領域120のアドレスが一致しているか否かを確認する。   When the transaction start unit 211 of the transaction thread 210 starts a transaction, the transaction start unit 211 first checks the transaction reference memory area information 410 and the next transaction reference memory area information 420 as described with reference to FIG. Then, it is confirmed whether or not the addresses of the shared memory area 120 set for both coincide.

図5の例では、トランザクション参照メモリ領域情報410には「共有メモリ領域A」が、次回トランザクション参照メモリ領域情報420には「共有メモリ領域B」が、それぞれ設定されている。つまり両者が異なるため、トランザクション開始手段211は、トランザクション参照メモリ領域情報410に設定されていた「共有メモリ領域A」(共有メモリ領域120Aのアドレス)を参照済みメモリ領域情報430に設定すると共に、次回トランザクション参照メモリ領域情報420に設定されていた「共有メモリ領域B」(共有メモリ領域120Bのアドレス)を、トランザクション参照メモリ領域情報410に格納する。
次に、トランザクションスレッド210によるトランザクション中に、共有メモリ更新コマンド300が共有メモリ100を更新する場合を考える。
In the example of FIG. 5, “shared memory area A” is set in the transaction reference memory area information 410, and “shared memory area B” is set in the next transaction reference memory area information 420. That is, since the two are different, the transaction start unit 211 sets the “shared memory area A” (address of the shared memory area 120A) set in the transaction reference memory area information 410 to the referenced memory area information 430, and next time. The “shared memory area B” (address of the shared memory area 120B) set in the transaction reference memory area information 420 is stored in the transaction reference memory area information 410.
Next, consider a case where the shared memory update command 300 updates the shared memory 100 during a transaction by the transaction thread 210.

共有メモリ更新コマンド300の共有メモリ更新手段310は、共有メモリ100に、新たな共有メモリ領域120C(「共有メモリ領域C」)を確保すると共に、世代番号110を1加算して「3」を世代番号110に設定し、当該世代番号110と同一の値である「3」を、共有メモリ領域120Cのメモリ番号121Cに設定する。
共有メモリ更新手段310は、これらの処理が完了した後、その旨を変更スレッド220の共有メモリ設定手段221に通知する。
The shared memory update unit 310 of the shared memory update command 300 secures a new shared memory area 120C (“shared memory area C”) in the shared memory 100 and adds “1” to the generation number 110 to generate “3”. The number 110 is set, and “3”, which is the same value as the generation number 110, is set in the memory number 121C of the shared memory area 120C.
After these processes are completed, the shared memory update unit 310 notifies the shared memory setting unit 221 of the change thread 220 to that effect.

共有メモリ設定手段221は、新たな共有メモリ領域120Cを作成した旨のイベントを受信すると、共有メモリ100の世代番号110を参照して、最新のメモリ番号121が「3」である旨を知ると、「3」をメモリ番号121Cに持つ共有メモリ領域120Cのアドレス(「共有メモリ領域C」)を、次回トランザクション参照メモリ領域情報420に格納する。   When the shared memory setting unit 221 receives an event indicating that a new shared memory area 120C has been created, the shared memory setting unit 221 refers to the generation number 110 of the shared memory 100 and knows that the latest memory number 121 is “3”. , The address of the shared memory area 120C having “3” as the memory number 121C (“shared memory area C”) is stored in the next transaction reference memory area information 420.

図5の例では、共有メモリ設定手段221が次回トランザクション参照メモリ領域情報420を変更後、トランザクションスレッド210のトランザクション終了手段213が、トランザクションを終了する。この時、まずトランザクション終了手段213は、トランザクション参照メモリ領域情報410と次回トランザクション参照メモリ領域情報420とを確認し、両者に設定された共有メモリ領域120のアドレスが一致しているか否かを確認する。   In the example of FIG. 5, after the shared memory setting unit 221 changes the next transaction reference memory area information 420, the transaction end unit 213 of the transaction thread 210 ends the transaction. At this time, the transaction end means 213 first checks the transaction reference memory area information 410 and the next transaction reference memory area information 420, and checks whether or not the addresses of the shared memory area 120 set in both match. .

今回の例では、トランザクション参照メモリ領域情報410には「共有メモリ領域B」が、次回トランザクション参照メモリ領域情報420には「共有メモリ領域C」が、それぞれ設定されている。つまり両者が異なるため、トランザクション終了手段213は、トランザクション参照メモリ領域情報410に設定されていた「共有メモリ領域B」(共有メモリ領域120Bのアドレス)を参照済みメモリ領域情報430に格納(追加)すると共に、次回トランザクション参照メモリ領域情報420に設定されていた「共有メモリ領域C」(共有メモリ領域120Cのアドレス)を、トランザクション参照メモリ領域情報410に格納する。   In this example, “shared memory area B” is set in the transaction reference memory area information 410, and “shared memory area C” is set in the next transaction reference memory area information 420. That is, since they are different, the transaction end unit 213 stores (adds) the “shared memory area B” (address of the shared memory area 120B) set in the transaction reference memory area information 410 in the referenced memory area information 430. At the same time, the “shared memory area C” (address of the shared memory area 120C) set in the next transaction reference memory area information 420 is stored in the transaction reference memory area information 410.

図5の例では、トランザクションスレッド210のトランザクション終了後、定期間隔で動作している共有メモリ開放手段231が、使用されていない共有メモリ領域120の開放処理を行う。具体的には、共有メモリ開放手段231は、まず、共有メモリ参照テーブル400の参照済みメモリ領域情報430を参照し、現在参照されていない共有メモリ領域120A(「共有メモリ領域A」)及び共有メモリ領域120B(「共有メモリ領域B」)のアドレスを取得する。そして、共有メモリ開放手段231は、共有メモリ領域120A及び120Bを開放し、これらの領域に記憶されていたデータを削除する。削除完了後、共有メモリ開放手段231は、共有メモリ参照テーブル400の参照済みメモリ領域情報430を、「未設定」に変更する。   In the example of FIG. 5, after the transaction of the transaction thread 210 ends, the shared memory releasing unit 231 that operates at regular intervals performs a releasing process of the shared memory area 120 that is not used. Specifically, the shared memory releasing unit 231 first refers to the referenced memory area information 430 of the shared memory reference table 400, and the shared memory area 120A (“shared memory area A”) and shared memory that are not currently referenced. The address of the area 120B (“shared memory area B”) is acquired. Then, the shared memory releasing unit 231 releases the shared memory areas 120A and 120B, and deletes data stored in these areas. After completion of the deletion, the shared memory releasing unit 231 changes the referenced memory area information 430 of the shared memory reference table 400 to “unset”.

(5 本実施形態の効果)
上述したように、本実施形態に係る情報処理装置1は、次回トランザクション参照メモリ領域情報420に、共有メモリ更新コマンド300で作成した共有メモリ領域120の情報を格納し、トランザクションの開始時又は終了時の少なくとも一方に、次回トランザクション参照メモリ領域情報420の情報を、トランザクション参照メモリ領域情報410に設定する。これにより、トランザクション中でも、当該トランザクションによる参照処理との排他制御を行わずに、また誤参照することなく、共有メモリ100に対する更新を行うことができる。
(5 Effects of this embodiment)
As described above, the information processing apparatus 1 according to the present embodiment stores the information of the shared memory area 120 created by the shared memory update command 300 in the next transaction reference memory area information 420, and starts or ends a transaction. Information of the next transaction reference memory area information 420 is set in the transaction reference memory area information 410. As a result, even during a transaction, the shared memory 100 can be updated without performing exclusive control with reference processing by the transaction and without erroneous reference.

また、参照済みメモリ領域情報430に、参照済みの共有メモリ領域120の情報を退避することで、共有メモリ開放手段231が、参照されなくなった共有メモリ領域120を定期間隔で開放すると共に、メモリリークを防ぐことができる。   Further, by saving the information of the referenced shared memory area 120 in the referenced memory area information 430, the shared memory releasing unit 231 releases the shared memory area 120 that is no longer referenced at regular intervals, and a memory leak. Can be prevented.

(5 付記事項)
尚、前述の各実施形態の構成は、組み合わせたり或いは一部の構成部分を入れ替えたりしてもよい。また、本発明の構成は前述の実施形態のみに限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加えてもよい。
また、前述の各実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(5 Additional notes)
Note that the configurations of the above-described embodiments may be combined or some of the components may be replaced. The configuration of the present invention is not limited to the above-described embodiment, and various modifications may be made without departing from the scope of the present invention.
Further, a part or all of each of the above-described embodiments can be described as in the following supplementary notes, but is not limited thereto.

(付記1)
第1のデータが記憶された記憶媒体上の位置に関する第1の位置情報を記憶する第1の記憶手段と、前記第1の記憶手段に記憶された前記第1の位置情報に基づき、第1のデータを参照して第1のトランザクションを処理する第1の処理手段と、前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の位置に記録する更新手段と、前記第2のデータが記録された前記記憶媒体上の位置に関する第2の位置情報を記憶する第2の記憶手段と、前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を記録する位置情報更新手段とを備える情報処理装置。
(Appendix 1)
First storage means for storing first position information relating to a position on a storage medium in which first data is stored, and first information based on the first position information stored in the first storage means. The first processing means for processing the first transaction with reference to the data and the second data obtained by updating the first data are recorded at a position on the storage medium different from the first data. Updating means, second storage means for storing second position information relating to the position on the storage medium in which the second data is recorded, and the first storage means stored in the first storage means. Information processing comprising position information update means for recording the second position information in the first storage means when the position information is different from the second position information stored in the second storage means apparatus.

(付記2)
前記位置情報更新手段は、前記第1のトランザクションの次に実行される第2のトランザクションの開始に伴い、前記第1の記憶手段に前記第2の位置情報を記録する、付記1に記載の情報処理装置。
(Appendix 2)
The information according to appendix 1, wherein the location information update unit records the second location information in the first storage unit with the start of a second transaction executed next to the first transaction. Processing equipment.

(付記3)
前記位置情報更新手段は、前記第1のトランザクションの終了に伴い、前記第1の記憶手段に前記第2の位置情報を記録する、付記1又は付記2記載の情報処理装置。
(Appendix 3)
The information processing apparatus according to appendix 1 or appendix 2, wherein the location information update unit records the second location information in the first storage unit upon completion of the first transaction.

(付記4)
前記位置情報更新手段が前記第1の記憶手段に前記第2の記憶情報を記録する際に、前記第1の記憶手段に記憶されていた前記第1の位置情報が記録される第3の記憶手段を更に備える、付記1乃至付記3記載の情報処理装置。
(Appendix 4)
When the position information update unit records the second storage information in the first storage unit, a third storage in which the first position information stored in the first storage unit is recorded. The information processing apparatus according to appendix 1 to appendix 3, further comprising means.

(付記5)
前記第3の記憶手段に記憶された前記第1の位置情報と、前記第1の位置情報に対応する前記第1のデータとを削除する削除手段を更に備える、付記4記載の情報処理装置。
(Appendix 5)
The information processing apparatus according to appendix 4, further comprising a deletion unit that deletes the first position information stored in the third storage unit and the first data corresponding to the first position information.

(付記6)
第1のデータが記憶された記憶媒体上の位置に関する第1の位置情報を第1の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報に基づき、第1のデータを参照して第1のトランザクションを処理するステップと、前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の位置に記録するステップと、前記第2のデータが記録された前記記憶媒体上の位置に関する第2の位置情報を前記第2の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を位置情報更新手段に記録するステップとを備える情報処理方法。
(Appendix 6)
Based on the step of recording the first position information on the position on the storage medium storing the first data in the first storage means, and the first position information stored in the first storage means, Processing the first transaction with reference to the first data, and recording the second data updated from the first data at a location on the storage medium different from the first data. Recording the second position information on the position on the storage medium in which the second data is recorded in the second storage means; and the first information stored in the first storage means A step of recording the second position information in the first storage means in the position information update means when the position information is different from the second position information stored in the second storage means. Information processing method.

(付記7)
情報処理装置に、第1のデータが記憶された記憶媒体上の位置に関する第1の位置情報を第1の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報に基づき、第1のデータを参照して第1のトランザクションを処理するステップと、前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の位置に記録するステップと、前記第2のデータが記録された前記記憶媒体上の位置に関する第2の位置情報を前記第2の記憶手段に記録するステップと、前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を位置情報更新手段に記録するステップとを実行させるためのプログラム。
(Appendix 7)
A step of recording, in the information processing apparatus, first position information relating to a position on a storage medium storing the first data in a first storage means; and the first information stored in the first storage means Based on the position information, referring to the first data, processing the first transaction, and updating the second data updated on the first data on the storage medium different from the first data A step of recording in the position, a step of recording second position information on the position on the storage medium where the second data is recorded in the second storage unit, and a step of storing in the first storage unit. If the first position information is different from the second position information stored in the second storage means, the second position information is recorded in the first storage means in the position information update means. Step to perform Because of the program.

1・・・情報処理装置、100・・・共有メモリ、110・・・世代番号、120・・・共有メモリ領域、121・・・メモリ番号、200・・・プロセス、210・・・トランザクションスレッド、211・・・トランザクション開始手段、213・・・トランザクション終了手段、220・・・変更スレッド、221・・・共有メモリ設定手段、230・・・共有メモリ領域開放スレッド、231・・・共有メモリ開放手段、300・・・共有メモリ更新コマンド、310・・・共有メモリ更新手段、400・・・共有メモリ参照テーブル、410・・・トランザクション参照メモリ領域情報、420・・・次回トランザクション参照メモリ領域情報、430・・・参照済みメモリ領域情報   DESCRIPTION OF SYMBOLS 1 ... Information processing apparatus, 100 ... Shared memory, 110 ... Generation number, 120 ... Shared memory area, 121 ... Memory number, 200 ... Process, 210 ... Transaction thread, 211 ... transaction start means, 213 ... transaction end means, 220 ... change thread, 221 ... shared memory setting means, 230 ... shared memory area release thread, 231 ... shared memory release means , 300 ... Shared memory update command, 310 ... Shared memory update means, 400 ... Shared memory reference table, 410 ... Transaction reference memory area information, 420 ... Next transaction reference memory area information, 430 ... Referenced memory area information

Claims (7)

第1のデータが記憶された記憶媒体上の第1メモリ番号を持つ位置に関する第1の位置情報を記憶する第1の記憶手段と、
前記第1メモリ番号を世代情報として管理する手段と、
前記第1の記憶手段に記憶された前記第1の位置情報に基づき、前記第1のデータを参照して第1のトランザクションを処理する第1の処理手段と、
前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の第2メモリ番号を持つ位置に記録すると共に、前記世代情報に前記第2メモリ番号を登録する更新手段と、
前記世代情報を参照することにより、前記第2のデータが記録された前記記憶媒体上の前記第2メモリ番号を持つ位置に関する第2の位置情報を記憶する第2の記憶手段と、
前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を記録する位置情報更新手段と
を備える情報処理装置。
First storage means for storing first position information relating to a position having a first memory number on a storage medium in which first data is stored;
Means for managing the first memory number as generation information;
A first processing means for processing the stored in said first storage means based on the first position information, first transaction by referring to the first data,
The second data updated from the first data is recorded at a position having a second memory number on the storage medium different from the first data, and the second memory number is registered in the generation information. and updating means for,
Second storage means for storing second position information related to the position having the second memory number on the storage medium on which the second data is recorded by referring to the generation information ;
When the first position information stored in the first storage means is different from the second position information stored in the second storage means, the second information is stored in the first storage means. An information processing apparatus comprising position information update means for recording position information.
前記位置情報更新手段は、前記第1のトランザクションの次に実行される第2のトランザクションの開始に伴い、前記第1の記憶手段に前記第2の位置情報を記録する、
請求項1に記載の情報処理装置。
The location information update unit records the second location information in the first storage unit with the start of a second transaction executed next to the first transaction.
The information processing apparatus according to claim 1.
前記位置情報更新手段は、前記第1のトランザクションの終了に伴い、前記第1の記憶手段に前記第2の位置情報を記録する、
請求項1又は請求項2に記載の情報処理装置。
The location information update unit records the second location information in the first storage unit when the first transaction ends.
The information processing apparatus according to claim 1 or 2.
前記位置情報更新手段が前記第1の記憶手段に前記第2の記憶情報を記録する際に、前記第1の記憶手段に記憶されていた前記第1の位置情報が記録される第3の記憶手段
を更に備える、請求項1乃至請求項3記載の情報処理装置。
When the position information update unit records the second storage information in the first storage unit, a third storage in which the first position information stored in the first storage unit is recorded. The information processing apparatus according to claim 1, further comprising means.
前記第3の記憶手段に記憶された前記第1の位置情報と、前記第1の位置情報に対応する前記第1のデータとを削除する削除手段
を更に備える、請求項4記載の情報処理装置。
The information processing apparatus according to claim 4, further comprising a deletion unit that deletes the first position information stored in the third storage unit and the first data corresponding to the first position information. .
第1のデータが記憶された記憶媒体上の第1メモリ番号を持つ位置に関する第1の位置情報を第1の記憶手段に記録するステップと、
前記第1メモリ番号を世代情報として管理する手段と、
前記第1の記憶手段に記憶された前記第1の位置情報に基づき、前記第1のデータを参照して第1のトランザクションを処理するステップと、
前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の第2メモリ番号を持つ位置に記録すると共に、前記世代情報に前記第2メモリ番号を登録するステップと、
前記世代情報を参照することにより、前記第2のデータが記録された前記記憶媒体上の前記第2メモリ番号を持つ位置に関する第2の位置情報を前記第2の記憶手段に記録するステップと、
前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を位置情報更新手段に記録するステップと
を備える情報処理方法。
Recording first position information on a position having a first memory number on the storage medium storing the first data in the first storage means;
Means for managing the first memory number as generation information;
Processing said stored in said first storage means based on the first position information, first transaction by referring to the first data,
The second data updated from the first data is recorded at a position having a second memory number on the storage medium different from the first data, and the second memory number is registered in the generation information. And steps to
Recording the second location information on the location having the second memory number on the storage medium in which the second data is recorded by referring to the generation information in the second storage means;
When the first position information stored in the first storage means is different from the second position information stored in the second storage means, the second information is stored in the first storage means. An information processing method comprising: recording position information in a position information update unit.
情報処理装置に、
第1のデータが記憶された記憶媒体上の第1メモリ番号を持つ位置に関する第1の位置情報を第1の記憶手段に記録するステップと、
前記第1メモリ番号を世代情報として管理するステップと、
前記第1の記憶手段に記憶された前記第1の位置情報に基づき、前記第1のデータを参照して第1のトランザクションを処理するステップと、
前記第1のデータを更新した第2のデータを、前記第1のデータとは異なる前記記憶媒体上の第2メモリ番号を持つ位置に記録すると共に、前記世代情報に前記第2メモリ番号を登録するステップと、
前記世代情報を参照することにより、前記第2のデータが記録された前記記憶媒体上の前記第2メモリ番号を持つ位置に関する第2の位置情報を前記第2の記憶手段に記録するステップと、
前記第1の記憶手段に記憶された前記第1の位置情報が、前記第2の記憶手段に記憶された前記第2の位置情報と異なる場合に、前記第1の記憶手段に前記第2の位置情報を位置情報更新手段に記録するステップと
を実行させるためのプログラム。
In the information processing device,
Recording first position information on a position having a first memory number on the storage medium storing the first data in the first storage means;
Managing the first memory number as generation information;
Processing said stored in said first storage means based on the first position information, first transaction by referring to the first data,
The second data updated from the first data is recorded at a position having a second memory number on the storage medium different from the first data, and the second memory number is registered in the generation information. And steps to
Recording the second location information on the location having the second memory number on the storage medium in which the second data is recorded by referring to the generation information in the second storage means;
When the first position information stored in the first storage means is different from the second position information stored in the second storage means, the second information is stored in the first storage means. A program for executing the step of recording the position information in the position information update means.
JP2012060355A 2012-03-16 2012-03-16 Information processing apparatus, information processing method, and program Expired - Fee Related JP5975419B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012060355A JP5975419B2 (en) 2012-03-16 2012-03-16 Information processing apparatus, information processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012060355A JP5975419B2 (en) 2012-03-16 2012-03-16 Information processing apparatus, information processing method, and program

Publications (2)

Publication Number Publication Date
JP2013196129A JP2013196129A (en) 2013-09-30
JP5975419B2 true JP5975419B2 (en) 2016-08-23

Family

ID=49395055

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012060355A Expired - Fee Related JP5975419B2 (en) 2012-03-16 2012-03-16 Information processing apparatus, information processing method, and program

Country Status (1)

Country Link
JP (1) JP5975419B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000305767A (en) * 1999-04-19 2000-11-02 Nec Corp Distributed processing system
JP5343399B2 (en) * 2008-05-22 2013-11-13 富士通株式会社 Management program, management method, and management apparatus

Also Published As

Publication number Publication date
JP2013196129A (en) 2013-09-30

Similar Documents

Publication Publication Date Title
CN108009008B (en) Data processing method and system and electronic equipment
US10983955B2 (en) Data unit cloning in memory-based file systems
US10585691B2 (en) Distribution system, computer, and arrangement method for virtual machine
US20160098295A1 (en) Increased cache performance with multi-level queues of complete tracks
US20140173226A1 (en) Logical object deletion
BR112014014274B1 (en) METHOD IMPLEMENTED BY COMPUTER AND SYSTEM
US20210344752A1 (en) Method and apparatus for performing simple storage service seamless migration using index objects
JP2016535380A (en) Data storage management paged for forward only
CN103559139A (en) Data storage method and device
US12050927B2 (en) Techniques for concurrently supporting virtual NUMA and CPU/memory hot-add in a virtual machine
JP5719083B2 (en) Database apparatus, program, and data processing method
US11176089B2 (en) Systems and methods for implementing dynamic file systems
JP2012155561A (en) Information processor and writing control method
JP5975419B2 (en) Information processing apparatus, information processing method, and program
US10430287B2 (en) Computer
US20160048463A1 (en) Assignment control method, system, and recording medium
JP2009157441A (en) Information processor, file rearrangement method, and program
JP2014127015A (en) Information processor, distributed database system, and backup method
JP2013196276A (en) Information processor, program and data arrangement method
US20200133776A1 (en) Methods, devices and computer readable medium for managing a redundant array of independent disks
CN104461382A (en) Internal writing method for file server operating multiple file systems and server
JP2019159415A (en) Update processing device, update processing method, and program
CN112579384B (en) Method, device and system for monitoring nodes of SAS domain and nodes
JP5473016B2 (en) Data sharing system, terminal device, data sharing method, and program
JP2017117437A (en) Reducing write-backs to memory by controlling age of cache lines in lower level cache

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151216

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160129

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160627

R150 Certificate of patent or registration of utility model

Ref document number: 5975419

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160710

LAPS Cancellation because of no payment of annual fees