JP4644002B2 - Directory update method, directory update program, and tree-structured data storage device - Google Patents

Directory update method, directory update program, and tree-structured data storage device Download PDF

Info

Publication number
JP4644002B2
JP4644002B2 JP2005043023A JP2005043023A JP4644002B2 JP 4644002 B2 JP4644002 B2 JP 4644002B2 JP 2005043023 A JP2005043023 A JP 2005043023A JP 2005043023 A JP2005043023 A JP 2005043023A JP 4644002 B2 JP4644002 B2 JP 4644002B2
Authority
JP
Japan
Prior art keywords
node
exclusive lock
mark
leaf
lock
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.)
Active
Application number
JP2005043023A
Other languages
Japanese (ja)
Other versions
JP2006228060A (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.)
Tokyo Institute of Technology NUC
Japan Broadcasting Corp
Original Assignee
Tokyo Institute of Technology NUC
Japan Broadcasting 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 Tokyo Institute of Technology NUC, Japan Broadcasting Corp filed Critical Tokyo Institute of Technology NUC
Priority to JP2005043023A priority Critical patent/JP4644002B2/en
Publication of JP2006228060A publication Critical patent/JP2006228060A/en
Application granted granted Critical
Publication of JP4644002B2 publication Critical patent/JP4644002B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、木構造における各ノードのエントリ数を制限したディレクトリ構造において、前記木構造の変化を伴う際のディレクトリ更新を効率的に行うディレクトリ更新方法及びディレクトリ更新プログラム、並びに、木構造型データ記憶装置に関する。   The present invention provides a directory update method, a directory update program, and a tree structure type data storage for efficiently performing a directory update when the tree structure is changed in a directory structure in which the number of entries of each node in the tree structure is limited. Relates to the device.

近年、並列に配置された計算機(PE:Processing Element)上にデータベース等のデータを分散して記憶することで、データにアクセスする際の負荷分散と並行性動作とを実現したシステムが存在する。
このようなシステムにおいては、アクセス集中による負荷の偏りが存在する場合、その負荷の大きいPEがボトルネックとなり、システム全体の処理能力が低下してしまう。そこで、各PEに負荷を均等に分配するためのディレクトリ構造と、そのディレクトリ構造における並行性制御とが提案されている(例えば、非特許文献1参照)。
ここで、図13を参照して、従来の並列計算機におけるディレクトリ構造について、その概要を説明する。図13は、従来の並列計算機におけるディレクトリ構造の一例であるFat−Btree構造を示す図である。
In recent years, there is a system that realizes load distribution and parallel operation when accessing data by distributing and storing data such as a database on computers (PE: Processing Elements) arranged in parallel.
In such a system, when there is a load bias due to concentration of access, a PE with a large load becomes a bottleneck, and the processing capacity of the entire system decreases. Therefore, a directory structure for evenly distributing the load to each PE and concurrency control in the directory structure have been proposed (for example, see Non-Patent Document 1).
Here, the outline of the directory structure in the conventional parallel computer will be described with reference to FIG. FIG. 13 is a diagram showing a Fat-Btree structure which is an example of a directory structure in a conventional parallel computer.

(Fat−Btree構造)
図13に示すように、Fat−Btree構造は、データを示す葉ノードNlを各計算機PEに均等に分配している。また、Fat−Btree構造は、葉ノードNl以外のインデックスを示すインデックスノードNiとして、各計算機PEに配置されている葉ノードNlへのアクセスパスとなるインデックスノードNiのみを各計算機PEに分配している。
なお、各インデックスノードNiに登録(エントリ)される下位層のインデックスノードの数と、葉ノードNlに登録されるデータ(データページ)の数とは、予め定められた数に制限されている。この制限された数を超過する場合は、各ノードは分割され、木構造が更新(SMO:Structure Modification Operation)されることになる。これによって、あるアクセスパスに対して負荷が集中することを回避している。
(Fat-Btree structure)
As shown in FIG. 13, the Fat-Btree structure distributes leaf nodes Nl indicating data evenly to each computer PE. Further, the Fat-Btree structure distributes only the index node Ni serving as an access path to the leaf node Nl arranged in each computer PE to each computer PE as an index node Ni indicating an index other than the leaf node Nl. Yes.
Note that the number of lower-level index nodes registered (entry) in each index node Ni and the number of data (data pages) registered in the leaf node Nl are limited to a predetermined number. When this limited number is exceeded, each node is divided and the tree structure is updated (SMO: Structure Modification Operation). This avoids the concentration of load on a certain access path.

このように、葉ノードNl及びインデックスノードNiを分配することで、各計算機PEの記憶部に記憶されるのは、全体の木構造に対して、ルートノードNiRから、均等に分配された葉ノードNlまでの部分木となる。すなわち、計算機PE1には部分木R1が、計算機PE2には部分木R2が、計算機PE3には部分木R3が、計算機PE4には部分木R4がそれぞれ記憶されることになる。
これによって、各計算機PEに対するアクセスの分散が行われる。また、各計算機PEでは、記憶している葉ノードNlの探索に必要のないインデックスノードNiを保持していないため、高速に葉ノードNlにアクセスすることができる。
In this way, by distributing the leaf node Nl and the index node Ni, what is stored in the storage unit of each computer PE is the leaves that are evenly distributed from the root node Ni R to the entire tree structure. This is a subtree up to the node Nl. That is, computer PE subtrees R 1 is 1 may, computer PE 2 subtrees R 2 is found that computer PE subtree R 3 is 3, the subtree R 4 is a computer PE 4 are stored respectively become.
As a result, access is distributed to each computer PE. Further, since each computer PE does not hold an index node Ni that is not necessary for searching the stored leaf node Nl, the leaf node Nl can be accessed at high speed.

(並行性制御)
次に、従来の並列計算機における並行性制御について説明する。図13で説明したFat−Btree構造では、木構造の一貫性を保証するため、並行性制御が必須である。この並行性制御においては、アクセスパスに対して、他のプロセスからのアクセスを制御するロックが用いられる。このロックには、以下の表1に示す5種類(IS,IX,S,SIX,X)のモードがある。
(Concurrency control)
Next, concurrency control in a conventional parallel computer will be described. In the Fat-Btree structure described with reference to FIG. 13, concurrency control is indispensable in order to guarantee the consistency of the tree structure. In this concurrency control, a lock for controlling access from another process is used for the access path. This lock has five modes (IS, IX, S, SIX, X) shown in Table 1 below.

Figure 0004644002
Figure 0004644002

表1中、“○”印は、同時に複数のロックを設定できることを示している。
なお、以下では、IS、IX、S、SIX及びXの各モードのロックをそれぞれ、ISロック(インテント共有ロック)、IXロック(インテント排他ロック)、Sロック(共有ロック)、SIXロック(インテント排他付き共有ロック)及びXロック(排他ロック)と呼ぶ。
ここで、ISロック(インテント共有ロック)は、下位層の一部のリソースにSロックを設定し、そのリソースを読み取るプロセスの意思を示すものである。また、IXロック(インテント排他ロック)は、下位層の一部のリソースにXロックを設定し、そのリソースを変更するプロセスの意思を示すものである。また、Sロック(共有ロック)は、リソースを読み取り専用とする旨を示すものである。また、SIXロック(インテント排他付き共有ロック)は、リソースの同時読み取りを許可し、下位層のリソースにIXロックを設定し、プロセスがそのリソースを変更する意図を示すものである。さらに、Xロック(排他ロック)は、他のプロセスからの読み取り、変更を禁止する旨を示すものである。
In Table 1, “◯” marks indicate that a plurality of locks can be set simultaneously.
In the following, IS, IX, S, SIX and X mode locks are respectively IS lock (intent shared lock), IX lock (intent exclusive lock), S lock (shared lock), SIX lock ( Shared lock with intent exclusion) and X lock (exclusive lock).
Here, the IS lock (intent shared lock) indicates the intention of the process of setting an S lock on a part of resources in the lower layer and reading the resource. The IX lock (intent exclusive lock) indicates the intention of the process of setting an X lock on a part of resources in the lower layer and changing the resource. The S lock (shared lock) indicates that a resource is read-only. In addition, the SIX lock (shared lock with intent exclusion) permits simultaneous reading of a resource, sets an IX lock on a lower layer resource, and indicates an intention of the process to change the resource. Further, the X lock (exclusive lock) indicates that reading and changing from other processes are prohibited.

ただし、一般には、これらのロックには、デッドロック検出機能を持たない高速かつ単純なラッチが用いられる。このラッチは、セマフォの一種であって、以下、前記した各ロックをラッチにより実現した場合を、特に、ISラッチ(インテント共有ラッチ)、IXラッチ(インテント排他ラッチ)、Sラッチ(共有ラッチ)、SIXラッチ(インテント排他付き共有ラッチ)、及び、Xラッチ(排他ラッチ)と呼ぶ。   However, in general, a high-speed and simple latch that does not have a deadlock detection function is used for these locks. This latch is a kind of semaphore. Hereinafter, when each of the above-described locks is realized by a latch, in particular, an IS latch (intent shared latch), an IX latch (intent exclusive latch), and an S latch (shared latch). ), SIX latch (shared latch with intent exclusion) and X latch (exclusive latch).

次に、図13を参照して、前記した表1の5種類のロック(ラッチ)を用いた、並行性制御方式の一例であるINC−OPT(INCremental OPTimistic)方式について説明する。
(INC−OPT方式の参照時のプロトコル)
まず、INC−OPT方式におけるデータの参照時のプロトコルについて説明する。INC−OPT方式における、データである葉ノードNlの検索は、以下の〔R−1〕〜〔R−3〕の手順により行われる。
〔R−1〕ルートノードNiRにISラッチを設定する。
〔R−2〕上位層のノード(親ノード)に設定されて下位層のノード(子ノード)のポインタを取得し、子ノードにラッチ(ISラッチ)を設定し、親ノードのラッチを解放する動作を葉ノードNlまで繰り返す(以下、この動作をラッチカップリングという)。
〔R−3〕葉ノードNlにSラッチを設定する。
これによって、葉ノードNlを読み出す(参照する)ことが可能になる。
Next, an INC-OPT (INCremental OPTimistic) method, which is an example of a concurrency control method, using the five types of locks (latches) shown in Table 1 will be described with reference to FIG.
(Protocol for INC-OPT system reference)
First, a protocol for data reference in the INC-OPT system will be described. The search of the leaf node Nl that is data in the INC-OPT method is performed by the following procedures [R-1] to [R-3].
[R-1] An IS latch is set in the root node Ni R.
[R-2] Set to a higher layer node (parent node), obtain a pointer to a lower layer node (child node), set a latch (IS latch) to the child node, and release the parent node latch The operation is repeated up to the leaf node Nl (hereinafter, this operation is referred to as latch coupling).
[R-3] An S latch is set in the leaf node Nl.
As a result, the leaf node Nl can be read (referenced).

(INC−OPT方式の更新時のプロトコル)
次に、INC−OPT方式におけるデータの更新時のプロトコルについて説明する。INC−OPT方式における、葉ノードNlの更新は、以下の〔W−1〕、〔W−2〕の2つのフェーズで行われる。
〔W−1(第1フェーズ)〕ルートノードNiRから葉ノードNlまで、IXラッチカップリングによりIXラッチを設定し、最下層の葉ノードNlにXラッチを設定する。ここで、葉ノードNlを更新する際に、予め定められたデータ(データページ)の数を超過することで、木構造に変化(SMO)が発生する場合は、葉ノードNlのXラッチを解放し、第2フェーズに移行する。なお、SMOが発生しない場合は、そのまま葉ノードNlを更新し動作を終了する。
〔W−2(第2フェーズ)〕葉ノードNlとその親ノードに対してXラッチを設定する。もし、葉ノードNlを分割することで、親ノードもエントリ数の制限を超過する場合は、さらに上位(親)のノードにXラッチの範囲を拡大していく。そして、親ノードの分割が必要でなくなった段階で、葉ノードNlの更新(SMOを含む)を行う。
以上の動作によって、INC−OPT方式は、Fat−Btree構造を維持したまま、データ(葉ノード)の参照、更新が可能になる。
宮崎純,横田治夫,「並列ディレクトリ構造Fat−Btreeの並行性制御とその評価」,情報処理学会研究会報告,データベースシステムDBS−124−69,pp.37−44,情報処理学会,Jul.2001
(Procedure when updating INC-OPT method)
Next, a protocol for updating data in the INC-OPT system will be described. The update of the leaf node Nl in the INC-OPT method is performed in the following two phases [W-1] and [W-2].
[W-1 (first phase)] From the root node Ni R to the leaf node Nl, an IX latch is set by IX latch coupling, and an X latch is set at the lowermost leaf node Nl. Here, when updating the leaf node Nl, if the tree structure changes (SMO) due to exceeding the predetermined number of data (data pages), the X latch of the leaf node Nl is released. Then, the process proceeds to the second phase. If SMO does not occur, the leaf node Nl is updated as it is and the operation ends.
[W-2 (second phase)] X-latches are set for the leaf node Nl and its parent node. If the leaf node Nl is divided so that the parent node also exceeds the limit on the number of entries, the range of the X latch is expanded to a higher (parent) node. Then, the leaf node Nl is updated (including SMO) when the parent node is no longer divided.
With the above operation, the INC-OPT system can refer to and update data (leaf nodes) while maintaining the Fat-Btree structure.
Jun Miyazaki, Haruo Yokota, “Concurrency Control of Parallel Directory Structure Fat-Btree and Its Evaluation”, Information Processing Society of Japan Report, Database System DBS-124-69, pp. 37-44, Information Processing Society of Japan, Jul. 2001

しかし、前記したINC−OPT方式では、データの更新時のプロトコルにおいて、SMOが発生する場合、第2フェーズを処理するための動作(リスタート)を複数回行う必要がある。例えば、ルートノードまで更新が及ぶ場合、木構造の木の高さと同じフェーズ数分のリスタートが必要となり、あるプロセスからの更新命令に対する応答時間を増加させてしまうという問題がある。
さらに、上位層において、複数回Xラッチを設定することになり、他のプロセスからの読み取り、変更を禁止する期間が増大し、システム全体のスループットが低下してしまうという問題がある。
However, in the above-described INC-OPT method, when SMO occurs in the protocol at the time of data update, it is necessary to perform an operation (restart) for processing the second phase a plurality of times. For example, when the update reaches the root node, restarting is required for the same number of phases as the height of the tree in the tree structure, which increases the response time for an update command from a certain process.
Furthermore, in the upper layer, the X latch is set a plurality of times, and there is a problem that the period during which reading and changing from other processes is prohibited increases and the throughput of the entire system decreases.

本発明は、以上のような問題点に鑑みてなされたものであり、従来のINC−OPT方式に比べて、リスタート回数を少なく抑え、SMOに要するXラッチの獲得時間を短くするディレクトリ更新方法及びディレクトリ更新プログラム、並びに、木構造型データ記憶装置を提供することを目的とする。   The present invention has been made in view of the above problems, and a directory update method for reducing the number of restarts and shortening the acquisition time of the X latch required for SMO as compared with the conventional INC-OPT system. Another object of the present invention is to provide a directory update program and a tree-structured data storage device.

本発明は、前記目的を達成するために創案されたものであり、まず、請求項に記載のディレクトリ更新方法は、木構造における各ノードのエントリ数を制限したディレクトリ構造において、前記木構造の変化を伴う際の記憶装置におけるディレクトリ更新方法であって、前記記憶装置により、最上位層のルートノードから更新対象となる最下位層の葉ノードまでの経路において、最上位層のノードに排他ロックを設定する旨を示すインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返し、前記エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードの階層番号をマーク用階層番号として保持するとともに、前記葉ノードに対して排他ロックを設定し、前記葉ノードのエントリ数が予め定めた制限未満である場合に前記葉ノードの更新を行い、前記エントリ数が予め定めた制限を超過する場合に前記葉ノードの更新を行わずに排他ロックを解放する第1フェーズ実行ステップと、前記記憶装置により、前記ルートノードから前記葉ノードまでの経路のうち、前記ルートノードから前記マーク用階層番号で特定されるノードの親ノードまでの経路において、最上位層のノードにインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返すとともに前記エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する第2フェーズ実行ステップとを実行し、前記第2フェーズ実行ステップにおいて前記マーク用階層番号で特定されるノードから前記葉ノードまでの経路において、各ノードに排他ロックを設定する排他ロック設定ステップと、この排他ロック設定ステップで設定した排他ロックが、前記葉ノードの更新によりエントリ数の最大数を超過してノードの分割が発生するノードに対して設定されているかどうかを判定する排他ロック有効判定ステップと、前記分割が発生するノードに対して排他ロックが設定されていると判定された場合に、前記葉ノードの更新を行うノード更新ステップとを実行し、前記分割が発生するノードに対して排他ロックが設定されていないと判定された場合に、前記第2の非フルエントリノードの階層番号を前記マーク用階層番号として再設定し、前記第2フェーズ実行ステップを繰り返すことを特徴とする。 The present invention has been developed to achieve the above object. First, the directory update method according to claim 1 is a directory structure in which the number of entries of each node in a tree structure is limited. A directory update method in a storage device when accompanied by a change, wherein the storage device exclusively locks the highest layer node in a path from the root node of the highest layer to a leaf node of the lowest layer to be updated. set the intent exclusive lock indicating to set, after setting the intent exclusive lock on node in the lower layer immediately below the node was set to a node of the upper layer directly above the node of the lower layer Repeat the procedure for releasing the intent exclusive lock toward the lower layer, the lowest level of the first non-full count the entry is less than a predetermined limit Holds the layer number of Ntorinodo as layer number marks, sets an exclusive lock on the leaf node, and update of the leaf nodes when the number of entries the leaf node is less than limit a predetermined, A first phase executing step of releasing an exclusive lock without updating the leaf node when the number of entries exceeds a predetermined limit; and a path of the path from the root node to the leaf node by the storage device among them, in the path from the root node to the parent node of the nodes identified by the mark tier number, set the intent exclusive lock on the node in the highest layer, in the node of the lower layer immediately below the node after setting the tent exclusive lock, releasing the intent exclusive lock set in the node of the upper layer directly above the node of the lower layer Lowest second non-full entry node performs a second phase execution step of searching for, the second phase execution step number said entry is less than the predetermined limit with repeating that procedure toward the lower layer In the path from the node specified by the mark hierarchy number to the leaf node, an exclusive lock setting step for setting an exclusive lock on each node, and the exclusive lock set in the exclusive lock setting step are the leaf node An exclusive lock validity determination step for determining whether or not a node is split due to the update exceeding the maximum number of entries, and an exclusive lock is set for the node where the split occurs when it is determined to be, running the node update step of updating of the leaf node, the If the division is exclusive lock is determined not to be set for the node to be generated, and re-sets the level number of said second non-full entry node as layer number for the mark, the second phase execution step It is characterized by repeating .

この手順によれば、ディレクトリ更新方法は、第1フェーズ実行ステップで、ルートノードから更新対象となる葉ノードまでの経路において、Xロック(排他ロック)を設定する旨を示すIXロック(インテント排他ロック)を下位層に対して設定し、その上位層に対するIXロックの設定を解放する手順を下位層に向かって繰り返しながら、エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードを探索する。このように、IXロックを順次設定することで、他のプロセスが葉ノードに対してXロックを設定することを防止し、当該プロセスが確実に葉ノードに対してXロックを設定することが可能になる。
なお、ディレクトリ更新方法は、第1フェーズ実行ステップで、第1の非フルエントリノードを探索するとともに、葉ノードに対して排他ロックを設定し、葉ノードのエントリ数が予め定めた制限未満である場合に葉ノードの更新を行い、エントリ数が予め定めた制限を超過する場合に葉ノードの更新を行わずに排他ロックを解放する。これによって、葉ノードのエントリ数が予め定めた制限未満である場合には、第1フェーズ実行ステップで動作が終了することになる。
According to this procedure, in the directory update method, in the first phase execution step, an IX lock (intent exclusive) indicating that an X lock (exclusive lock) is set in the route from the root node to the leaf node to be updated. Lock) is set for the lower layer, and the procedure for releasing the IX lock setting for the upper layer is repeated toward the lower layer, and the lowest first non-full whose number of entries is less than a predetermined limit. Search for entry nodes. Thus, by sequentially setting the IX lock, it is possible to prevent other processes from setting the X lock to the leaf node, and the process can reliably set the X lock to the leaf node. become.
In the directory update method, in the first phase execution step, the first non-full entry node is searched, an exclusive lock is set for the leaf node, and the number of entries in the leaf node is less than a predetermined limit. In this case, the leaf node is updated, and when the number of entries exceeds a predetermined limit, the exclusive lock is released without updating the leaf node. Thus, when the number of leaf node entries is less than a predetermined limit, the operation ends in the first phase execution step.

そして、ディレクトリ更新方法は、第2フェーズ実行ステップで、ルートノードから第1の非フルエントリノードの親ノードまでの経路において、Xロック(排他ロック)を設定する旨を示すIXロック(インテント排他ロック)を下位層に対して設定し、その上位層に対するIXロックの設定を解放する手順を下位層に向かって繰り返しながら、エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する。
さらに、ディレクトリ更新方法は、第2フェーズ実行ステップにおいて、第2の非フルエントリノードの探索と並行し、排他ロック設定ステップで、第1の非フルエントリノードから葉ノードまでの経路において、各ノードにXロック(排他ロック)を設定する。そして、排他ロック有効判定ステップで、排他ロック設定ステップで設定したXロックが、葉ノードの更新に伴う木構造の変化に関連するノードに対して設定されているかどうかを判定する。すなわち、葉ノードを分割することで影響を受ける親ノードに対してXロックが設定されているかどうかを判定する。
Then, in the directory update method, in the second phase execution step, an IX lock (intent exclusive) indicating that an X lock (exclusive lock) is set in the path from the root node to the parent node of the first non-full entry node. Lock) is set for the lower layer, and the procedure for releasing the IX lock setting for the upper layer is repeated toward the lower layer, and the lowest second non-full whose number of entries is less than a predetermined limit. Search for entry nodes.
Further, the directory update method is configured such that, in the second phase execution step, in parallel with the search for the second non-full entry node, in the exclusive lock setting step, each node in the path from the first non-full entry node to the leaf node. Is set to X lock (exclusive lock). Then, in the exclusive lock validity determination step, it is determined whether or not the X lock set in the exclusive lock setting step is set for the node related to the change in the tree structure accompanying the update of the leaf node. That is, it is determined whether X lock is set for the parent node that is affected by dividing the leaf node.

そして、木構造の更新に関連するノードに対してXロックが設定されていると判定された場合、ディレクトリ更新方法は、ノード更新ステップで葉ノードの更新を行う。一方、木構造の変化に関連するノードに対してXロックが設定されていないと判定された場合、ディレクトリ更新方法は、第2の非フルエントリノードを第1の非フルエントリノードとして、第2フェーズ実行ステップを繰り返す。
これによって、ディレクトリ更新方法は、動作をリスタートさせて第2フェーズ実行ステップに移行した場合に、非フルエントリノードより下位のノードに対して一度にXロックを設定するため、葉ノードから順次上位のノードにXロックを設定する場合に比べ、第2フェーズ実行ステップをリスタートする回数を減らすことができる。
なお、ここで、排他ロック及びインテント排他ロックには、デッドロック検出機能を持たない高速かつ単純なラッチ(排他ラッチ及びインテント排他ラッチ)を用いることが望ましい。
When it is determined that the X lock is set for the node related to the tree structure update, the directory update method updates the leaf node in the node update step. On the other hand, if it is determined that the X lock is not set for the node related to the change in the tree structure, the directory update method uses the second non-full entry node as the first non-full entry node and the second non-full entry node. Repeat the phase execution steps.
As a result, when the directory update method restarts the operation and shifts to the second phase execution step, the X lock is set for the nodes lower than the non-full entry node at the same time. The number of times of restarting the second phase execution step can be reduced as compared with the case where the X lock is set to the node.
Here, it is desirable to use a high-speed and simple latch (exclusive latch and intent exclusive latch) having no deadlock detection function for the exclusive lock and the intent exclusive lock.

また、請求項に記載のディレクトリ更新プログラムは、木構造における各ノードのエントリ数を制限したディレクトリ構造において、前記木構造の変化を伴うディレクトリの更新を行うために、コンピュータを、最上位層のルートノードから更新対象となる最下位層の葉ノードまでの経路において、最上位層のノードに排他ロックを設定する旨を示すインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返し、前記エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードを探索するとともに、前記葉ノードに対して排他ロックを設定し、前記葉ノードのエントリ数が予め定めた制限未満である場合に前記葉ノードの更新を行い、前記エントリ数が予め定めた制限を超過する場合に前記葉ノードの更新を行わずに排他ロックを解放する第1フェーズ実行手段、前記ルートノードから前記葉ノードまでの経路のうち、前記ルートノードから前記マーク用階層番号で特定されるノードの親ノードまでの経路において、最上位層のノードにインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返すとともに、前記エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する第2フェーズ実行手段として機能させる構成とした。
さらに、第2フェーズ実行手段が、前記マーク用階層番号で特定されるノードから前記葉ノードまでの経路において、各ノードに排他ロックを設定する排他ロック設定手段と、
この排他ロック設定手段で設定した排他ロックが、前記葉ノードの更新によりエントリ数の最大数を超過してノードの分割が発生するノードに対して設定されているかどうかを判定する排他ロック有効判定手段と、前記分割が発生するノードに対して排他ロックが設定されていると判定された場合に、前記葉ノードの更新を行うノード更新手段と、前記分割が発生するノードに対して排他ロックが設定されていないと判定された場合に、前記第2の非フルエントリノードの階層番号を前記マーク用階層番号として再設定するノード再設定手段とを備える構成とした。
According to a second aspect of the present invention, in the directory structure in which the number of entries of each node in the tree structure is limited, in order to update the directory accompanying the change of the tree structure, the directory update program in the path from the root node to the leaf nodes of the lowest layer to be updated, and set the intent exclusive lock, which indicates that an exclusive lock on the highest node layer, with respect to the node of the lower layer immediately below the node After the intent exclusive lock is set, the procedure for releasing the intent exclusive lock set in the upper layer node immediately above the lower layer node is repeated toward the lower layer, and the number of entries is limited in advance. Search for the lowest first non-full entry node that is less than and set an exclusive lock on the leaf node The leaf node is updated when the number of entries in the leaf node is less than a predetermined limit, and the exclusive lock is released without updating the leaf node when the number of entries exceeds a predetermined limit. A first phase execution means for performing intent on a node of the highest layer in a route from the root node to a parent node of a node specified by the mark hierarchy number among routes from the root node to the leaf node and an exclusive lock, after setting the intent exclusive lock on node in the lower layer immediately below the node, the procedure for releasing the intent exclusive lock set at nodes of the upper layer directly above the node of the lower layer Is repeated toward the lower layer, and the lowest second non-full entry node whose number of entries is less than a predetermined limit is searched. And configured to function as a two-phase execution means.
Further, the second phase execution means, an exclusive lock setting means for setting an exclusive lock on each node in the path from the node specified by the mark hierarchy number to the leaf node ;
Exclusive lock validity determining means for determining whether or not the exclusive lock set by the exclusive lock setting means is set for a node that exceeds the maximum number of entries due to the update of the leaf node and causes node division. A node updating unit that updates the leaf node when it is determined that an exclusive lock is set for the node where the split occurs, and an exclusive lock is set for the node where the split occurs A node resetting unit configured to reset the hierarchy number of the second non-full entry node as the mark hierarchy number when it is determined that the second non-full entry node is not set .

かかる構成によれば、ディレクトリ更新プログラムは、第1フェーズ実行手段によって、ルートノードから更新対象となる葉ノードまでの経路において、Xロック(排他ロック)を設定する旨を示すIXロック(インテント排他ロック)を下位層に対して設定し、その上位層に対するIXロックの設定を解放する手順を下位層に向かって繰り返しながら、エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードを探索する。
なお、ディレクトリ更新プログラムは、第1フェーズ実行手段で、第1の非フルエントリノードを探索するとともに、葉ノードに対して排他ロックを設定し、葉ノードのエントリ数が予め定めた制限未満である場合に葉ノードの更新を行い、エントリ数が予め定めた制限を超過する場合に葉ノードの更新を行わずに排他ロックを解放する。
According to this configuration, the directory update program uses the first phase execution means to set an IX lock (intent exclusive) indicating that an X lock (exclusive lock) is set in the path from the root node to the leaf node to be updated. Lock) is set for the lower layer, and the procedure for releasing the IX lock setting for the upper layer is repeated toward the lower layer, and the lowest first non-full whose number of entries is less than a predetermined limit. Search for entry nodes.
The directory update program searches for the first non-full entry node in the first phase execution means, sets an exclusive lock on the leaf node, and the number of entries in the leaf node is less than a predetermined limit. In this case, the leaf node is updated, and when the number of entries exceeds a predetermined limit, the exclusive lock is released without updating the leaf node.

そして、ディレクトリ更新プログラムは、第2フェーズ実行手段によって、ルートノードから第1の非フルエントリノードの親ノードまでの経路において、Xロック(排他ロック)を設定する旨を示すIXロック(インテント排他ロック)を下位層に対して設定し、その上位層に対するIXロックの設定を解放する手順を下位層に向かって繰り返しながら、エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する。
さらに、ディレクトリ更新プログラムは、排他ロック設定手段によって、第1の非フルエントリノードから葉ノードまでの経路において、各ノードにXロックを設定し、排他ロック有効判定手段によって、排他ロック設定手段で設定したXロックが、葉ノードの更新に伴う木構造の変化に関連するノードに対して設定されているかどうかを判定する。
Then, the directory update program uses the second phase execution means to set an IX lock (intent exclusive) indicating that an X lock (exclusive lock) is set in the path from the root node to the parent node of the first non-full entry node. Lock) is set for the lower layer, and the procedure for releasing the IX lock setting for the upper layer is repeated toward the lower layer, and the lowest second non-full whose number of entries is less than a predetermined limit. Search for entry nodes.
Further, the directory update program sets an X lock on each node in the path from the first non-full entry node to the leaf node by the exclusive lock setting unit, and sets by the exclusive lock setting unit by the exclusive lock validity determination unit. It is determined whether or not the X lock is set for the node related to the change in the tree structure accompanying the update of the leaf node.

そして、木構造の変化に関連するノードに対してXロックが設定されていると判定された場合、ディレクトリ更新プログラムは、ノード更新手段によって、葉ノードの更新を行う。
一方、木構造の変化に関連するノードに対してXロックが設定されていないと判定された場合、ディレクトリ更新プログラムは、ノード再設定手段によって、第2の非フルエントリノードを第1の非フルエントリノードとして設定する。これによって、Xロックの範囲が拡大されることになる。
なお、ここで、排他ロック及びインテント排他ロックには、デッドロック検出機能を持たない高速かつ単純なラッチ(排他ラッチ及びインテント排他ラッチ)を用いることが望ましい。
When it is determined that the X lock is set for the node related to the change in the tree structure, the directory update program updates the leaf node by the node update unit.
On the other hand, when it is determined that the X lock is not set for the node related to the change in the tree structure, the directory update program sets the second non-full entry node to the first non-full by the node resetting means. Set as entry node. As a result, the X lock range is expanded.
Here, it is desirable to use a high-speed and simple latch (exclusive latch and intent exclusive latch) having no deadlock detection function for the exclusive lock and the intent exclusive lock.

また、請求項に記載の木構造型データ記憶装置は、木構造における各ノードのエントリ数を制限したディレクトリ構造によって、データを記憶する木構造型データ記憶装置において、最上位層のルートノードから更新対象となる最下位層の葉ノードまでの経路において、最上位層のノードに排他ロックを設定する旨を示すインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返し、前記エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードの階層番号をマーク用階層番号として保持するとともに、前記葉ノードに対して排他ロックを設定し、前記葉ノードのエントリ数が予め定めた制限未満である場合に前記葉ノードの更新を行い、前記エントリ数が予め定めた制限を超過する場合に前記葉ノードの更新を行わずに排他ロックを解放する第1フェーズ実行手段と、前記ルートノードから前記葉ノードまでの経路のうち、前記ルートノードから前記マーク用階層番号で特定されるノードの親ノードまでの経路において、最上位層のノードにインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返すとともに前記エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する第2フェーズ実行手段とを備える構成とした。
さらに、第2フェーズ実行手段が、前記マーク用階層番号で特定されるノードから前記葉ノードまでの経路において、各ノードに排他ロックを設定する排他ロック設定手段と、
この排他ロック設定手段で設定した排他ロックが、前記葉ノードの更新によりエントリ数の最大数を超過してノードの分割が発生するノードに対して設定されているかどうかを判定する排他ロック有効判定手段と、前記分割が発生するノードに対して排他ロックが設定されていると判定された場合に、前記葉ノードの更新を行うノード更新手段と、
前記分割が発生するノードに対して排他ロックが設定されていないと判定された場合に、前記第2の非フルエントリノードの階層番号を前記マーク用階層番号として再設定するノード再設定手段とを備える構成とした。
The tree structure type data storage device according to claim 3 is a tree structure type data storage device that stores data by a directory structure in which the number of entries of each node in the tree structure is limited. in route to the leaf nodes of the lowest layer to be updated, and set the intent exclusive lock, which indicates that an exclusive lock on the highest node layer, intent to the node of the lower layer immediately below the node after an exclusive lock, repeat the procedure for releasing the intent exclusive lock set in the node of the upper layer directly above the node of the lower layer toward the lower layer, is lower than the limit of the number of the entries is predetermined It holds as lowest first mark layer number of the layer number of the non-full entry node, an exclusive lock on the leaf node The leaf node is updated when the number of entries in the leaf node is less than a predetermined limit, and the leaf node is not updated when the number of entries exceeds a predetermined limit. a first phase execution means for releasing the locking, of the path from the root node to the leaf node, the path from the root node to the parent node of the node identified by the level number for the mark, the uppermost layer set the intent exclusive lock on node, after setting the intent exclusive lock on node in the lower layer immediately below the node, intent exclusive lock set in the node of the upper layer directly above the node of the lower layer look for a second non-full entry node number the entries with repeat step toward the lower layers of the lowest less than the predetermined limit to release the And configured to include a second phase execution means for.
Further, the second phase execution means, an exclusive lock setting means for setting an exclusive lock on each node in the path from the node specified by the mark hierarchy number to the leaf node ;
Exclusive lock validity determining means for determining whether or not the exclusive lock set by the exclusive lock setting means is set for a node that exceeds the maximum number of entries due to the update of the leaf node and causes node division. And node update means for updating the leaf node when it is determined that an exclusive lock is set for the node where the division occurs , and
Node resetting means for resetting the hierarchy number of the second non-full entry node as the mark hierarchy number when it is determined that an exclusive lock is not set for the node where the division occurs ; It was set as the structure provided.

かかる構成によれば、木構造型データ記憶装置は、第1フェーズ実行手段によって、ルートノードから更新対象となる葉ノードまでの経路において、Xロックを設定する旨を示すIXロックを下位層に対して設定し、その上位層に対するIXロックの設定を解放する手順を下位層に向かって繰り返しながら、エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードを探索する。
なお、木構造型データ記憶装置は、第1フェーズ実行手段で、第1の非フルエントリノードを探索するとともに、葉ノードに対して排他ロックを設定し、葉ノードのエントリ数が予め定めた制限未満である場合に葉ノードの更新を行い、エントリ数が予め定めた制限を超過する場合に葉ノードの更新を行わずに排他ロックを解放する。
According to such a configuration, the tree-structured data storage device transmits, to the lower layer, the IX lock indicating that the X lock is set in the route from the root node to the leaf node to be updated by the first phase execution unit. The lowest first non-full entry node whose number of entries is less than a predetermined limit is searched while repeating the procedure for setting and releasing the IX lock setting for the upper layer toward the lower layer.
The tree-structure-type data storage device searches for the first non-full entry node in the first phase execution means, sets an exclusive lock on the leaf node, and sets a predetermined number of leaf node entries. The leaf node is updated when the number of entries is less, and the exclusive lock is released without updating the leaf node when the number of entries exceeds a predetermined limit.

そして、木構造型データ記憶装置は、第2フェーズ実行手段によって、ルートノードから第1の非フルエントリノードの親ノードまでの経路において、Xロックを設定する旨を示すIXロックを下位層に対して設定し、その上位層に対するIXロックの設定を解放する手順を下位層に向かって繰り返しながら、エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する。
さらに、木構造型データ記憶装置は、排他ロック設定手段によって、第1の非フルエントリノードから葉ノードまでの経路において、各ノードにXロックを設定し、排他ロック有効判定手段によって、排他ロック設定手段で設定したXロックが、葉ノードの更新に伴う木構造の変化に関連するノードに対して設定されているかどうかを判定する。
そして、木構造の変化に関連するノードに対してXロックが設定されていると判定された場合、ディレクトリ分散型記憶装置は、ノード更新手段によって、葉ノードの更新を行う。
一方、木構造の変化に関連するノードに対してXロックが設定されていないと判定された場合、木構造型データ記憶装置は、ノード再設定手段によって、第2の非フルエントリノードを第1の非フルエントリノードとして設定する。
なお、ここで、Xロック(排他ロック)及びIXロック(インテント排他ロック)には、デッドロック検出機能を持たない高速かつ単純なラッチ(排他ラッチ及びインテント排他ラッチ)を用いることが望ましい。
Then, the tree-structured data storage device sends an IX lock indicating that an X lock is to be set to the lower layer in the path from the root node to the parent node of the first non-full entry node by the second phase execution means. The lowest second non-full entry node whose number of entries is less than a predetermined limit is searched while repeating the procedure for setting and releasing the IX lock setting for the upper layer toward the lower layer.
Furthermore, the tree structure type data storage device sets an X lock to each node in the path from the first non-full entry node to the leaf node by the exclusive lock setting means, and sets the exclusive lock by the exclusive lock validity determination means. It is determined whether the X lock set by the means is set for a node related to a change in the tree structure accompanying the update of the leaf node.
When it is determined that the X lock is set for the node related to the change in the tree structure, the directory distributed storage device updates the leaf node by the node update unit.
On the other hand, when it is determined that the X lock is not set for the node related to the change in the tree structure, the tree-structure-type data storage device assigns the second non-full entry node to the first by the node resetting means. Set as a non-full entry node.
Here, it is desirable to use a high-speed and simple latch (exclusive latch and intent exclusive latch) having no deadlock detection function for the X lock (exclusive lock) and IX lock (intent exclusive lock).

本発明によれば、更新対象となる葉ノードを更新することでディレクトリ構造の木構造に変化が発生する場合、葉ノードから順次親ノードに排他ロック(排他ラッチ)を設定する手順を行わず、エントリ数が予め定めた制限未満である最も下位のノード以降に対して排他ロック(排他ラッチ)を設定する。これによって、葉ノードから順次排他ロック(排他ラッチ)の範囲を拡大させるINC−OPT方式に比べ、リスタートの回数を減らすことができ、ディレクトリ構造の変更に伴う時間を減らすことができる。   According to the present invention, when a change occurs in the tree structure of the directory structure by updating a leaf node to be updated, a procedure for setting an exclusive lock (exclusive latch) sequentially from the leaf node to the parent node is not performed, An exclusive lock (exclusive latch) is set for the nodes after the lowest node whose number of entries is less than a predetermined limit. As a result, the number of restarts can be reduced and the time required for changing the directory structure can be reduced as compared with the INC-OPT method in which the range of exclusive lock (exclusive latch) is sequentially expanded from the leaf node.

さらに、本発明によれば、リスタート回数を減らすことで、排他ロック(排他ラッチ)を設定している時間を減らすことができるため、他のプロセスからの葉ノードに対するアクセスに対する応答性を高めることができる。また、ディレクトリ構造を分散して記憶するシステムの場合、システム全体のスループットを改善することができる。   Furthermore, according to the present invention, since the time for setting the exclusive lock (exclusive latch) can be reduced by reducing the number of restarts, the responsiveness to the access to the leaf node from another process is improved. Can do. In the case of a system that stores a directory structure in a distributed manner, the throughput of the entire system can be improved.

[ディレクトリ分散型記憶装置(木構造型データ記憶装置)の構成]
まず、図1を参照して、ディレクトリ分散型記憶装置の構成について説明する。図1は、本発明に係る木構造型データ記憶装置の最良の形態であるディレクトリ分散型記憶装置の構成を示すブロック図である。
図1に示したディレクトリ分散型記憶装置1は、ネットワークNに接続された他のディレクトリ分散型記憶装置(図示せず)と協働し、データベース等のデータを分散して記憶するものである。このディレクトリ分散型記憶装置1は、図13で説明したFat−Btree構造のディレクトリ構造によってデータを記憶管理する計算機PEに相当する。
ここでは、ディレクトリ分散型記憶装置1は、通信制御部2と、記憶部3と、制御部4とを備えている。また、ここでは、ロック制御として、デッドロック検出機能を持たないラッチを用いることとする。
[Configuration of Directory Distributed Storage Device (Tree Structure Data Storage Device)]
First, the configuration of a directory distributed storage device will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of a directory distributed storage device which is the best mode of a tree-structured data storage device according to the present invention.
The directory distributed storage device 1 shown in FIG. 1 cooperates with other directory distributed storage devices (not shown) connected to the network N to store data such as databases in a distributed manner. This directory distributed storage device 1 corresponds to a computer PE that stores and manages data in the directory structure of the Fat-Btree structure described in FIG.
Here, the directory distributed storage device 1 includes a communication control unit 2, a storage unit 3, and a control unit 4. Here, a latch having no deadlock detection function is used as the lock control.

通信制御部2は、ネットワークNを介して、クライアントコンピュータ(図示せず)や他のディレクトリ分散型記憶装置(図示せず)と、データや制御情報(ノード情報を含む)の送受信を行うものである。例えば、通信制御部2は、TCP/IP(Transmission Control Protocol/Internet Protocol)の通信プロトコルによってデータ等の送受信を行う通信ボードである。   The communication control unit 2 transmits / receives data and control information (including node information) to / from a client computer (not shown) and other directory distributed storage devices (not shown) via the network N. is there. For example, the communication control unit 2 is a communication board that transmits and receives data and the like using a TCP / IP (Transmission Control Protocol / Internet Protocol) communication protocol.

記憶部3は、データベース等のデータや、ディレクトリ構造を特定するノード情報等を記憶しておくもので、一般的なハードディスク等の記憶装置である。この記憶部3には、データ31と、ノード情報32と、エントリ制限情報33とを記憶している。   The storage unit 3 stores data such as a database, node information specifying a directory structure, and the like, and is a general storage device such as a hard disk. The storage unit 3 stores data 31, node information 32, and entry restriction information 33.

データ31は、Fat−Btree構造における葉ノードであって、データの実体である。このデータ31は、記憶領域の予め定められたページ単位で管理され、所定のページ数(後記するエントリ制限情報33に含まれる)を超過する場合は分割される。   The data 31 is a leaf node in the Fat-Btree structure and is a data entity. This data 31 is managed in a predetermined page unit of the storage area, and is divided when it exceeds a predetermined number of pages (included in entry restriction information 33 described later).

ノード情報32は、Fat−Btree構造のデータ構造を示す情報である。ここでは、ノード情報32は、Fat−Btree構造のルートノードから、この記憶部3に記憶されているデータ(葉ノード)31までのアクセスパスを示している。
さらに、ノード情報32は、各ノードにどのプロセスから、どのロック(ラッチ)が設定されているかを示す情報を含んでいる。
The node information 32 is information indicating the data structure of the Fat-Btree structure. Here, the node information 32 indicates an access path from the root node of the Fat-Btree structure to the data (leaf node) 31 stored in the storage unit 3.
Further, the node information 32 includes information indicating which lock (latch) is set from which process in each node.

エントリ制限情報33は、Fat−Btree構造において、ノードに登録される子ノードの数の最大値や、葉ノードとして登録できるデータ(データページ)の数の最大値を示している。このエントリ制限情報33は、後記する制御部4によって参照され、データの更新に伴う木構造の変化(SMO)が発生するか否かを判定するために用いられる。   The entry restriction information 33 indicates the maximum value of the number of child nodes registered in the node and the maximum number of data (data pages) that can be registered as leaf nodes in the Fat-Btree structure. The entry restriction information 33 is referred to by the control unit 4 to be described later, and is used to determine whether or not a tree structure change (SMO) due to data update occurs.

制御部4は、ディレクトリ分散型記憶装置1全体の動作を制御するものであって、一般的なコンピュータにおけるCPU(Central Processing Unit:中央処理装置)に相当するものである。ここでは、制御部4は、データ操作手段5と、データ管理手段6と、制御情報送受信手段7とを備えている。   The control unit 4 controls the operation of the entire directory distributed storage device 1 and corresponds to a CPU (Central Processing Unit) in a general computer. Here, the control unit 4 includes data operation means 5, data management means 6, and control information transmission / reception means 7.

データ操作手段5は、通信制御部2を介して、データの送受信操作を行うものである。ここでは、データ操作手段5は、データ送受信手段51と、データ参照手段52と、データ更新手段53とを備えている。   The data operation means 5 performs data transmission / reception operations via the communication control unit 2. Here, the data operation unit 5 includes a data transmission / reception unit 51, a data reference unit 52, and a data update unit 53.

データ送受信手段51は、データ管理手段6のデータ操作制御手段61から制御情報として通知されるデータの送信元(例えば、クライアントコンピュータ等)から、通信制御部2を介してデータを受信したり、データ操作制御手段61から制御情報として通知されるデータの送信先(例えば、クライアントコンピュータ等)に、通信制御部2を介してデータを送信したりするものである。
このデータ送受信手段51は、データ参照手段52から出力されるデータを、通信制御部2を介して送信し、通信制御部2を介して受信したデータをデータ更新手段53に出力する。
The data transmission / reception means 51 receives data from the data transmission source (for example, a client computer) notified from the data operation control means 61 of the data management means 6 via the communication control unit 2, Data is transmitted via the communication control unit 2 to a data transmission destination (for example, a client computer) notified as control information from the operation control means 61.
The data transmitting / receiving unit 51 transmits the data output from the data reference unit 52 via the communication control unit 2 and outputs the data received via the communication control unit 2 to the data updating unit 53.

データ参照手段52は、記憶部3に記憶されているデータ31を読み出すものである。このデータ参照手段52は、データ管理手段6のデータ操作制御手段61から通知される制御情報(記憶元のアドレス等)に基づいて、データ31を記憶部3から読み出す。このデータ参照手段52で読み出されたデータ31は、データ送受信手段51に出力される。   The data reference means 52 reads the data 31 stored in the storage unit 3. The data reference unit 52 reads the data 31 from the storage unit 3 based on control information (such as a storage source address) notified from the data operation control unit 61 of the data management unit 6. The data 31 read by the data reference unit 52 is output to the data transmission / reception unit 51.

データ更新手段53は、データ送受信手段51で受信したデータを、記憶部3に書き込むものである。このデータ更新手段53は、データ管理手段6のデータ操作制御手段61から通知される制御情報(記憶先のアドレス等)に基づいて、データを記憶部3に書き込む。なお、データ更新手段53は、データ操作制御手段61から通知される制御情報(記憶先のアドレス等)に基づいて、指示されたデータ31を記憶部3から削除する動作も行うものとする。   The data update unit 53 writes the data received by the data transmission / reception unit 51 into the storage unit 3. The data updating unit 53 writes data into the storage unit 3 based on control information (such as a storage destination address) notified from the data operation control unit 61 of the data management unit 6. The data updating unit 53 also performs an operation of deleting the instructed data 31 from the storage unit 3 based on control information (storage destination address or the like) notified from the data operation control unit 61.

データ管理手段6は、記憶部3に記憶されているノード情報32とエントリ制限情報33とに基づいて、記憶部3に記憶されるデータ31を階層構造で管理するものである。また、このデータ管理手段6は、Fat−Btree構造(図13参照)のディレクトリ構造によりデータ31を管理するものとする。ここでは、データ管理手段6は、データ操作制御手段61と、データ参照制御手段62と、データ更新制御手段63とを備えている。   The data management unit 6 manages the data 31 stored in the storage unit 3 in a hierarchical structure based on the node information 32 and the entry restriction information 33 stored in the storage unit 3. The data management means 6 is assumed to manage the data 31 with a directory structure having a Fat-Btree structure (see FIG. 13). Here, the data management unit 6 includes a data operation control unit 61, a data reference control unit 62, and a data update control unit 63.

データ操作制御手段61は、図示していないクライアントコンピュータ等から送信される制御情報を、後記する制御情報送受信手段7を介して受信することで、その制御情報で示されるデータの操作を行うものでもある。
ここで、制御情報とは、データを制御する情報である。例えば、データを記憶する旨を示すデータ記憶指示、データを送信する旨を示すデータ送信指示、データを削除する旨を示すデータ削除指示等、あるいはこれらの指示に対する応答等である。
The data operation control means 61 may receive control information transmitted from a client computer or the like (not shown) via the control information transmission / reception means 7 to be described later, thereby operating the data indicated by the control information. is there.
Here, the control information is information for controlling data. For example, a data storage instruction indicating that data is stored, a data transmission instruction indicating that data is transmitted, a data deletion instruction indicating that data is deleted, a response to these instructions, or the like.

例えば、制御情報が、データを記憶する旨を示すデータ記憶指示である場合、データ操作制御手段61は、その旨をデータ更新手段53に通知する。また、制御情報が、データを送信する旨を示すデータ送信指示である場合、データ操作制御手段61は、その旨をデータ参照手段52に通知する。また、制御情報が、データを削除する旨を示すデータ削除指示である場合、データ操作制御手段61は、その旨をデータ更新手段53に通知する。また、データ操作制御手段61は、これらの操作指示(データ記憶指示、データ送信指示、データ削除指示)の操作結果を制御情報送受信手段7に対して応答として出力する。   For example, when the control information is a data storage instruction indicating that data is stored, the data operation control unit 61 notifies the data update unit 53 to that effect. If the control information is a data transmission instruction indicating that data is to be transmitted, the data operation control unit 61 notifies the data reference unit 52 to that effect. When the control information is a data deletion instruction indicating that data is to be deleted, the data operation control unit 61 notifies the data update unit 53 to that effect. Further, the data operation control means 61 outputs the operation results of these operation instructions (data storage instruction, data transmission instruction, data deletion instruction) to the control information transmission / reception means 7 as a response.

なお、データ操作制御手段61は、データ操作が、データの参照を行うものである場合は、その旨を後記するデータ参照制御手段62に通知し、他のプロセスに対する排他制御を行うものとする。また、データ操作制御手段61は、データ操作が、データの更新を行うものである場合は、その旨を後記するデータ更新制御手段63に通知し、他のプロセスに対する排他制御や、木構造の変更(SMO)を行う。   Note that if the data operation refers to data, the data operation control unit 61 notifies the data reference control unit 62 to that effect and performs exclusive control on other processes. In addition, when the data operation is to update the data, the data operation control unit 61 notifies the data update control unit 63 to that effect, and performs exclusive control for other processes or changes in the tree structure. (SMO) is performed.

データ参照制御手段62は、データの読み出し等である参照系の操作において、他のプロセスに対する排他制御を行うものである。例えば、データ参照制御手段62は、ルートノードにISラッチ(表1参照)を設定し、親ノードに設定されている子ノードのポインタを取得し、子ノードにラッチ(ISラッチ)を設定し、親ノードのラッチを解放する動作をデータ(葉ノード)31まで繰り返す。そして、データ(葉ノード)31にSラッチを(表1参照)設定することで、データ(葉ノード)31の参照(読み出し)を可能にする。   The data reference control means 62 performs exclusive control with respect to other processes in a reference system operation such as data reading. For example, the data reference control means 62 sets an IS latch (see Table 1) in the root node, acquires a pointer of a child node set in the parent node, sets a latch (IS latch) in the child node, The operation of releasing the parent node latch is repeated up to the data (leaf node) 31. The data (leaf node) 31 can be referred to (read out) by setting an S latch (see Table 1) to the data (leaf node) 31.

データ更新制御手段63は、データの追加、更新等の更新系の操作において、他のプロセスに対する排他制御や、木構造の変更(SMO)を行うものである。ここでは、データ更新制御手段63は、第1フェーズ実行手段631と、第2フェーズ実行手段632とを備えている。   The data update control means 63 performs exclusive control on other processes and tree structure change (SMO) in update-related operations such as addition and update of data. Here, the data update control unit 63 includes a first phase execution unit 631 and a second phase execution unit 632.

第1フェーズ実行手段631は、第1フェーズとして、エントリ数が予め定めた制限未満である最も下位のノード(第1の非フルエントリノード)を探索するとともに、データ(葉ノード)31の更新を行うものである。ここでは、第1フェーズ実行手段631は、第1非フルエントリノード探索手段631aと、葉ノードラッチ設定手段631bと、ノード更新手段631cとを備えている。   As the first phase, the first phase executing means 631 searches for the lowest node (first non-full entry node) whose number of entries is less than a predetermined limit and updates the data (leaf node) 31. Is what you do. Here, the first phase executing means 631 includes first non-full entry node searching means 631a, leaf node latch setting means 631b, and node updating means 631c.

第1非フルエントリノード探索手段631aは、ルートノードから更新対象となるデータ(葉ノード)31までの経路において、Xラッチ(排他ラッチ:表1参照)を設定する旨を示すIXラッチ(インテント排他ラッチ:表1参照)を下位層に対して設定し、その上位層に対するIXラッチの設定を解放する手順を下位層に向かって繰り返すラッチカップリングを行いながら、エントリ数が予め定めた制限未満である最も下位のノード(第1の非フルエントリノード)を探索するものである。ここでは、第1非フルエントリノード探索手段631aは、SMOが発生しない最下層のノードをルートノードから順次探索し、そのノードのルートノードからの木の高さを保持しておく。   The first non-full-entry node search means 631a has an IX latch (intent) indicating that an X latch (exclusive latch: see Table 1) is set in the path from the root node to the data (leaf node) 31 to be updated. The exclusive latch (see Table 1) is set for the lower layer, and the procedure for releasing the IX latch setting for the upper layer is repeated toward the lower layer, and the number of entries is less than a predetermined limit. The lowest node (first non-full entry node) is searched. Here, the first non-full entry node searching means 631a sequentially searches the lowest layer node where no SMO occurs from the root node, and maintains the height of the tree from the root node of the node.

葉ノードラッチ設定手段631bは、更新対象となるデータ(葉ノード)31に対してXラッチを設定するものである。これによって、他のプロセスに対して、更新対象となるデータ(葉ノード)31の読み取り、変更を禁止することができる。   The leaf node latch setting means 631b sets an X latch for the data (leaf node) 31 to be updated. Thereby, it is possible to prohibit other processes from reading and changing the data (leaf node) 31 to be updated.

ノード更新手段631cは、葉ノードラッチ設定手段631bによってXラッチが設定された、更新対象となるデータ(葉ノード)31を更新するものである。なお、ノード更新手段631cは、記憶部3のノード情報32とエントリ制限情報33とを参照し、データ31を追加、更新する際に、エントリ数が超過する場合に、データ(葉ノード)31の分割や、その親ノードの分割といった木構造に変化を及ぼす操作(SMO)が発生する場合は、データ(葉ノード)31を更新せず、データ31に対するXラッチを解放する。そして、第2フェーズ実行手段632に、第1非フルエントリノード探索手段631aで探索された第1の非フルエントリノードの位置(その親ノードのルートノードからの木の高さ)を通知する。
このように、第1フェーズ実行手段631は、SMOが発生しない場合は、第1フェーズ実行手段631でデータ(葉ノード)31の更新を完了するが、SMOが発生する場合は、第2フェーズ実行手段632に処理を移行する。
The node updating unit 631c updates the data (leaf node) 31 to be updated in which the X latch is set by the leaf node latch setting unit 631b. Note that the node update unit 631c refers to the node information 32 and the entry restriction information 33 in the storage unit 3, and adds or updates the data 31, and if the number of entries exceeds, the node (leaf node) 31 When an operation (SMO) that changes the tree structure such as division or parent node division occurs, the data (leaf node) 31 is not updated, and the X latch for the data 31 is released. Then, the second phase execution means 632 is notified of the position of the first non-full entry node searched by the first non-full entry node searching means 631a (the height of the tree from the root node of the parent node).
As described above, when the SMO does not occur, the first phase executing unit 631 completes the update of the data (leaf node) 31 by the first phase executing unit 631, but when the SMO occurs, the first phase executing unit 631 executes the second phase. Processing proceeds to means 632.

第2フェーズ実行手段632は、第2フェーズとして、第1フェーズ実行手段631で探索された第1の非フルエントリノードより上位のノードで、エントリ数が予め定めた制限未満である最も下位のノード(第2の非フルエントリノード)を探索するとともに、データ(葉ノード)31の更新を行うものである。ここでは、第2フェーズ実行手段632は、第2非フルエントリノード探索手段632aと、子ノードラッチ設定手段632bと、ラッチ有効判定手段632cと、ノード更新手段632dと、ノード再設定手段632eとを備えている。   The second phase execution means 632 is a node higher than the first non-full entry node searched by the first phase execution means 631 as the second phase, and the lowest node whose number of entries is less than a predetermined limit. While searching for (second non-full entry node), the data (leaf node) 31 is updated. Here, the second phase executing means 632 includes second non-full entry node searching means 632a, child node latch setting means 632b, latch validity determining means 632c, node updating means 632d, and node resetting means 632e. I have.

第2非フルエントリノード探索手段632aは、ルートノードから、第1の非フルエントリノードの親ノードまでの経路において、IXラッチカップリングを行いながら、エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索するものである。   The second non-full entry node search means 632a performs the IX latch coupling on the route from the root node to the parent node of the first non-full entry node, and the lowest number of entries is less than a predetermined limit. The second non-full entry node is searched.

子ノードラッチ設定手段(排他ロック設定手段)632bは、第2非フルエントリノード探索手段632aで探索された第2の非フルエントリノードより下位層の子ノード(葉ノードを含む)に対して、Xラッチを設定するものである。   The child node latch setting means (exclusive lock setting means) 632b is provided for child nodes (including leaf nodes) in a lower layer than the second non-full entry node searched by the second non-full entry node searching means 632a. The X latch is set.

ラッチ有効判定手段(排他ロック有効判定手段)632cは、子ノードラッチ設定手段632bで設定したXラッチが、データ(葉ノード)31の更新に伴う木構造の変化(SMO)に関連するノードに対して設定されているかどうかを判定するものである。すなわち、このラッチ有効判定手段632cは、ノードの分割が発生するすべてのノードにXラッチが設定されており、かつ、その親ノードにXラッチが設定されているかどうかを判定する。このように、ノードの分割が発生するすべてのノードと、その親ノードにXラッチが設定されていれば、他のプロセスからの影響を受けることなく、木構造の変更が可能になる。   The latch validity determination means (exclusive lock validity determination means) 632c is for the node related to the tree structure change (SMO) associated with the update of the data (leaf node) 31 by the X latch set by the child node latch setting means 632b. It is determined whether it is set. That is, the latch validity determining means 632c determines whether or not X latches are set for all nodes where node division occurs, and whether or not the X latch is set for the parent node. In this way, if an X latch is set in all nodes where node division occurs and its parent node, the tree structure can be changed without being affected by other processes.

ノード更新手段632dは、ラッチ有効判定手段632cで木構造の変化に関連するノードに対してXラッチが設定されていると判定された場合に、データ(葉ノード)31の更新を行うものである。すなわち、このノード更新手段632dは、データ(葉ノード)31の更新を行う際に、データ31の分割を行う。また、その親ノード(インデックスノード)で分割が必要な場合は、順次上位の親ノードに遡って分割を行う。これによって、データ(葉ノード)31に対するアクセスの均等化が図られることになる。   The node update unit 632d updates the data (leaf node) 31 when it is determined by the latch validity determination unit 632c that the X latch is set for the node related to the change in the tree structure. . That is, the node updating unit 632d divides the data 31 when updating the data (leaf node) 31. When the parent node (index node) needs to be divided, the division is performed sequentially back to the upper parent node. As a result, equalization of access to the data (leaf node) 31 is achieved.

ノード再設定手段632eは、ラッチ有効判定手段632cで木構造の変化に関連するノードに対してXラッチが設定されていないと判定された場合に、第2の非フルエントリノードを第1の非フルエントリノードとして再設定するものである。すなわち、第2の非フルエントリノードのルートノードからの木の高さを保持し直す。なお、このとき、ノード再設定手段632eは、すべてのXラッチを解放する。
そして、ノード再設定手段632eは、第2非フルエントリノード探索手段632aに制御を移行させる。
The node resetting unit 632e determines the second non-full entry node as the first non-full entry node when the latch validity determining unit 632c determines that the X latch is not set for the node related to the change in the tree structure. It is reset as a full entry node. That is, the height of the tree from the root node of the second non-full entry node is held again. At this time, the node resetting means 632e releases all X latches.
Then, the node resetting unit 632e shifts the control to the second non-full entry node searching unit 632a.

このように、データ更新制御手段63を構成することで、データ更新制御手段63は、データ(葉ノード)31の更新を、以下の〔第1フェーズ〕、〔第2フェーズ〕の2つのフェーズで行うことになる。   By configuring the data update control unit 63 in this way, the data update control unit 63 updates the data (leaf node) 31 in the following two phases: [first phase] and [second phase]. Will do.

〔第1フェーズ〕ルートノードから葉ノードまで、IXラッチカップリングによりIXラッチを設定し、最下層の葉ノードにXラッチを設定する。また、フルエントリでないインデックスノード(第1の非フルエントリノード)が存在したら、そのノードの位置(ルートノードからの高さ)を保持(マーク)する。マークするノードの位置は、非フルエントリノードが存在する度に逐次更新される。もし、SMOが発生しない場合は、葉ノードを更新して終了する。もし、SMOが発生する場合は、葉ノードのXラッチを解放し、第2フェーズに移行する。 [First Phase] From the root node to the leaf node, an IX latch is set by IX latch coupling, and an X latch is set at the lowermost leaf node. If there is an index node that is not a full entry (first non-full entry node), the position (height from the root node) of the node is held (marked). The position of the node to be marked is sequentially updated each time there is a non-full entry node. If no SMO occurs, the leaf node is updated and the process ends. If SMO occurs, the X latch of the leaf node is released and the process proceeds to the second phase.

〔第2フェーズ〕ルートノードから、第1フェーズでマークした第1の非フルエントリノードの親ノードまで、順次IXラッチカップリングによりIXラッチを設定し、第1の非フルエントリノード以下のノードにXラッチを設定する。もし、設定したXラッチの範囲が、SMOを行うために十分な範囲に設定されていなければ、マークの位置によるXラッチの範囲を変化させ、SMOを行うために十分な範囲となった段階で、葉ノードを更新して終了する。
なお、本方式は、第1フェーズにおいて、フルエントリでないインデックスノード(第1の非フルエントリノード)の位置(ルートノードからの高さ)を保持(マーク)しておくため、MARK−OPT(MARKing OPTimistic)方式と呼ぶこととする。
[Second Phase] From the root node to the parent node of the first non-full entry node marked in the first phase, the IX latch is sequentially set by IX latch coupling, and the nodes below the first non-full entry node are set. Set the X latch. If the set X latch range is not set to a sufficient range for performing SMO, the X latch range is changed depending on the mark position and becomes a sufficient range for performing SMO. Update the leaf node and exit.
In the first phase, since the position (height from the root node) of the index node (first non-full entry node) that is not a full entry is held (marked) in the first phase, MARK-OPT (MARKing This is called an OPTimistic method.

制御情報送受信手段7は、通信制御部2を介して、図示していないクライアントコンピュータ等と制御情報の送受信を行うものである。ここでは、制御情報送受信手段7は、クライアントコンピュータ等から受信した制御情報をデータ操作制御手段61に出力し、データ操作制御手段61から出力された制御信号をクライアントコンピュータ等に送信する。   The control information transmission / reception means 7 transmits / receives control information to / from a client computer (not shown) via the communication control unit 2. Here, the control information transmitting / receiving unit 7 outputs the control information received from the client computer or the like to the data operation control unit 61, and transmits the control signal output from the data operation control unit 61 to the client computer or the like.

以上、説明したように、ディレクトリ分散型記憶装置1を構成することで、第2フェーズでは、第1フェーズでマークした第1の非フルエントリノードの親ノードまでIXラッチカップリングを行い、第1の非フルエントリノード以下のノードにXラッチを設定するため、Xラッチの範囲を葉ノードから順次拡げていく従来のINC−OPT方式に比べて、リスタートを行う回数を減らすことができる。
また、ここでは、ディレクトリ(ノード情報)とデータ(葉ノード)とを複数のディレクトリ分散型記憶装置で分散して記憶する形態としたが、本発明は、この形態に限定されるものではない。例えば、1つの記憶装置(木構造型データ記憶装置)のみに、すべてのノード情報と葉ノードとを記憶し、各ノードのエントリ数を制限したディレクトリ構造を形成している場合であっても、本発明に係るディレクトリ更新を行うことは可能である。この場合であっても、INC−OPT方式に比べて、リスタートを行う回数を減らすことができ、SMOに要するXラッチの獲得時間を短くすることができる。ただし、システム全体のスループットを向上させるには、複数の木構造型データ記憶装置(ディレクトリ分散型記憶装置)で、ディレクトリ(ノード情報)とデータ(葉ノード)とを分散するほうが望ましいと言える。
なお、ディレクトリ分散型記憶装置1の制御部4は、一般的なコンピュータにプログラムを実行させ、コンピュータ内の演算装置や記憶装置を動作させることにより実現することができる。ここで実現されるディレクトリの更新を行うディレクトリ更新プログラムは、通信回線を介して配布することも可能であるし、CD−ROM等の記録媒体に書き込んで配布することも可能である。
As described above, by configuring the directory distributed storage device 1, in the second phase, IX latch coupling is performed up to the parent node of the first non-full entry node marked in the first phase, and the first Since the X latch is set in a node below the non-full entry node, the number of restarts can be reduced as compared with the conventional INC-OPT system in which the range of the X latch is sequentially expanded from the leaf node.
Here, the directory (node information) and the data (leaf node) are distributed and stored in a plurality of directory distributed storage devices, but the present invention is not limited to this mode. For example, even if only one storage device (tree structure type data storage device) stores all node information and leaf nodes, and forms a directory structure in which the number of entries in each node is limited, It is possible to perform a directory update according to the present invention. Even in this case, the number of restarts can be reduced and the X latch acquisition time required for SMO can be shortened as compared with the INC-OPT method. However, in order to improve the throughput of the entire system, it can be said that it is preferable to distribute the directory (node information) and the data (leaf nodes) with a plurality of tree structure type data storage devices (directory distributed storage devices).
The control unit 4 of the directory distributed storage device 1 can be realized by causing a general computer to execute a program and operating an arithmetic device or a storage device in the computer. The directory update program for updating the directory realized here can be distributed via a communication line, or can be written on a recording medium such as a CD-ROM for distribution.

[ディレクトリ分散型記憶装置の動作]
次に、図2及び図3を参照(適宜図1参照)して、ディレクトリ分散型記憶装置の動作について説明する。なお、ここでは、ディレクトリ分散型記憶装置1のデータ更新制御手段63において行われる、本発明に係るディレクトリ更新方法(MARK−OPT方式)について、詳細に説明を行うことにする。図2は、MARK−OPT方式の第1フェーズの動作を示すフローチャートである。図3は、MARK−OPT方式の第2フェーズの動作を示すフローチャートである。
[Directory Distributed Storage Device Operation]
Next, the operation of the directory distributed storage device will be described with reference to FIGS. Here, the directory update method (MARK-OPT method) according to the present invention performed in the data update control means 63 of the directory distributed storage device 1 will be described in detail. FIG. 2 is a flowchart showing the operation of the first phase of the MARK-OPT method. FIG. 3 is a flowchart showing the operation of the second phase of the MARK-OPT method.

《MARK−OPT方式》
(第1フェーズ;第1フェーズ実行ステップ)
ディレクトリ分散型記憶装置1は、第1フェーズ実行手段631において、以下の手順で第1フェーズの動作(図2参照)を実行する。
まず、ディレクトリ分散型記憶装置1は、第1非フルエントリノード探索手段631aによって、初期値として、エントリ数が制限を超過していないノードの階層番号を示す変数〔マーク用階層番号(n)〕に、木構造の木の高さを示すツリー高“H”を設定する(ステップS1)。さらに、ディレクトリ分散型記憶装置1は、初期値として、親ノードを識別するための変数(Parent)に“null”、子ノードを識別するための変数(Child)にルートノードを示す識別子“ROOT”を設定し、ループに使用するインデックス用階層番号(h)と非フルエントリノードの位置を示すマーク値(m)とにそれぞれ“1”を設定する(ステップS2)。
<MARK-OPT method>
(First phase; first phase execution step)
The directory distributed storage device 1 executes the first phase operation (see FIG. 2) in the following procedure in the first phase executing means 631.
First, the directory distributed storage device 1 uses the first non-full entry node search means 631a as an initial value to indicate a variable indicating the hierarchy number of a node whose number of entries does not exceed the limit [mark hierarchy number (n)]. Is set to a tree height “H” indicating the height of the tree structure (step S1). Furthermore, the directory distributed storage device 1 uses “null” as a variable for identifying a parent node as an initial value, and an identifier “ROOT” indicating a root node as a variable for identifying a child node (Child). And “1” is set in each of the index layer number (h) used for the loop and the mark value (m) indicating the position of the non-full entry node (step S2).

そして、ディレクトリ分散型記憶装置1は、インデックス用階層番号(h)が、マーク用階層番号(n)に達していないかどうかを判定し(ステップS3)、達した場合(ステップS3でNo)、ステップS8に進む。
一方、インデックス用階層番号(h)が、マーク用階層番号(n)に達していない場合(ステップS3でYes)、ディレクトリ分散型記憶装置1は、第1非フルエントリノード探索手段631aによって、子ノード(Child)にIXラッチを設定し、親ノード(Parent)に設定されているラッチを解放する(ステップS4)。ただし、最初は親ノード(Parent)には、IXラッチが設定されていないため、ステップS4のラッチの解放は、ラッチが設定されている場合にのみなされる。
続けて、ディレクトリ分散型記憶装置1は、第1非フルエントリノード探索手段631aによって、記憶部3のノード情報32及びエントリ制限情報33を参照することで、子ノード(Child)のエントリ数が最大(フルエントリ)となっているかどうかを判定する(ステップS5)。ここで、子ノード(Child)がフルエントリの場合(ステップS5でYes)、ステップS7に進む。
Then, the directory distributed storage device 1 determines whether or not the index layer number (h) has reached the mark layer number (n) (step S3), and if it has reached (No in step S3), Proceed to step S8.
On the other hand, if the index hierarchy number (h) does not reach the mark hierarchy number (n) (Yes in step S3), the directory distributed storage device 1 uses the first non-full entry node search means 631a to The IX latch is set in the node (Child), and the latch set in the parent node (Parent) is released (step S4). However, since the IX latch is not set in the parent node (Parent) at first, the latch is released in step S4 only when the latch is set.
Subsequently, the directory distributed storage device 1 refers to the node information 32 and the entry restriction information 33 in the storage unit 3 by the first non-full entry node search unit 631a, so that the number of entries in the child node (Child) is maximum. It is determined whether or not it is (full entry) (step S5). If the child node (Child) is a full entry (Yes in step S5), the process proceeds to step S7.

一方、子ノード(Child)がフルエントリでない場合(ステップS5でNo)、マーク値(m)に現在の階層番号であるインデックス用階層番号(h)を設定し、非フルエントリノードの位置を保持(マーク)しておく(ステップS6)。
そして、ディレクトリ分散型記憶装置1は、現在の子ノード直下のノードを新しい子ノード(新子ノード)として決定し、親ノード(Parent)に子ノード(Child)、子ノード(Child)に新子ノード(NewChild)を設定し直す。さらに、インデックス用階層番号(h)に“1”を加算することで、1つ下の階層に制御対象を移動する(ステップS7)。そして、ステップS3に戻る。
On the other hand, if the child node (Child) is not a full entry (No in step S5), the index layer number (h) that is the current layer number is set to the mark value (m), and the position of the non-full entry node is retained. (Mark) (step S6).
Then, the directory distributed storage device 1 determines the node immediately below the current child node as a new child node (new child node), and sets the parent node (Parent) as the child node (Child) and the child node (Child) as the new child. Reset the node (NewChild). Further, by adding “1” to the index layer number (h), the control target is moved to the next lower layer (step S7). Then, the process returns to step S3.

このステップS3からステップS7までのループによって、ルートノードから、葉ノードの親ノードに対してIXラッチカップリングが行われることになる。
そして、ディレクトリ分散型記憶装置1は、葉ノードラッチ設定手段631bによって、子ノード(この段階では葉ノード)に対してXラッチを設定し、その親ノードのラッチを解放する(ステップS8)。
Through the loop from step S3 to step S7, the IX latch coupling is performed from the root node to the parent node of the leaf node.
Then, the directory distributed storage device 1 sets the X latch for the child node (the leaf node at this stage) by the leaf node latch setting unit 631b, and releases the latch of the parent node (step S8).

ここで、ディレクトリ分散型記憶装置1は、ノード更新手段631cによって、記憶部3のノード情報32及びエントリ制限情報33を参照することで、子ノード(葉ノード)のエントリ数が最大(フルエントリ)となっているかどうかを判定する(ステップS9)。ここで、葉ノードがフルエントリでない場合(ステップS9でNo)、ノード更新手段631cが葉ノードの更新操作を実行し(ステップS10)、すべてのラッチを解放し(ステップS11)、動作を終了する。
一方、葉ノードがフルエントリの場合(ステップS9でYes)、ディレクトリ分散型記憶装置1は、すべてのラッチを解放し(ステップS12)、マーク用階層番号(n)に、マーク値(m)を設定し(ステップS13)、第2フェーズに移行する。
Here, the directory distributed storage device 1 refers to the node information 32 and the entry restriction information 33 in the storage unit 3 by the node update unit 631c, so that the number of entries of child nodes (leaf nodes) is the maximum (full entry). Is determined (step S9). If the leaf node is not a full entry (No in step S9), the node update unit 631c executes the update operation of the leaf node (step S10), releases all latches (step S11), and ends the operation. .
On the other hand, if the leaf node is a full entry (Yes in step S9), the directory distributed storage device 1 releases all the latches (step S12), and sets the mark value (m) to the mark hierarchy number (n). Set (step S13), the process proceeds to the second phase.

(第2フェーズ;第2フェーズ実行ステップ)
次に、ディレクトリ分散型記憶装置1は、第2フェーズ実行手段632において、以下の手順で第2フェーズの動作(図3参照)を実行する。
まず、ディレクトリ分散型記憶装置1は、第2非フルエントリノード探索手段632aによって、ルートノードからマーク用階層番号(n)で示される非フルエントリノードの親ノードまで、IXラッチカップリングを行う(ステップS20〜ステップS25)。なお、このステップS20〜ステップS25までの動作は、図2で説明したステップS2〜ステップS7までの動作と同一であるため説明を省略する。
(Second phase; second phase execution step)
Next, the directory distribution type storage device 1 executes the second phase operation (see FIG. 3) in the following procedure in the second phase execution means 632.
First, the directory distributed storage device 1 performs IX latch coupling from the root node to the parent node of the non-full entry node indicated by the mark hierarchy number (n) by the second non-full entry node searching means 632a ( Step S20 to Step S25). The operations from step S20 to step S25 are the same as the operations from step S2 to step S7 described in FIG.

そして、ディレクトリ分散型記憶装置1は、ステップS25(ステップS7)まででIXラッチカップリングされたノードの子ノード、すなわち、マーク用階層番号(n)で示される非フルエントリノードと、そのコピー(複製)にXラッチを設定し、親ノードのIXラッチを解放する(ステップS26)。ここで、コピー(複製)とは、図13で説明した計算機PE間で、同一のインデックスノードNiをコピーしてそれぞれのPEで保有している場合、そのPE毎のインデックスノードNiを指す。
さらに、ディレクトリ分散型記憶装置1は、現在の子ノード直下のノードを新しい子ノード(新子ノード)として決定し、親ノード(Parent)に子ノード(Child)、子ノード(Child)に新子ノード(NewChild)を設定し直す。さらに、インデックス用階層番号(h)に“1”を加算することで、1つ下の階層に制御対象を移動する(ステップS27)。
Then, the directory distribution type storage device 1 is a child node of the node IX latch-coupled up to step S25 (step S7), that is, a non-full entry node indicated by the mark hierarchy number (n) and its copy ( The X latch is set in (Duplicate), and the IX latch of the parent node is released (step S26). Here, copying (duplication) refers to the index node Ni for each PE when the same index node Ni is copied and held in each PE between the computer PEs described in FIG.
Further, the directory distributed storage device 1 determines the node immediately below the current child node as a new child node (new child node), and sets the parent node (Parent) as the child node (Child) and the child node (Child) as the new child. Reset the node (NewChild). Further, by adding “1” to the index layer number (h), the control target is moved to the next lower layer (step S27).

そして、ディレクトリ分散型記憶装置1は、インデックス用階層番号(h)が、ツリー高“H”に達していないかどうかを判定し(ステップS28)、達した場合(ステップS28でNo)は、ステップS31に進む。
一方、インデックス用階層番号(h)が、ツリー高“H”を超えていない場合(ステップS28でYes)、ディレクトリ分散型記憶装置1は、子ノードラッチ設定手段632bによって、子ノードとそのコピー(複製)にXラッチを設定する(ステップS29;排他ロック設定ステップ)。
続けて、ディレクトリ分散型記憶装置1は、子ノードラッチ設定手段632bによって、現在の子ノード直下のノードを新しい子ノード(新子ノード)として決定し、親ノード(Parent)に子ノード(Child)、子ノード(Child)に新子ノード(NewChild)を設定し直す。さらに、インデックス用階層番号(h)に“1”を加算することで、1つ下の階層に制御対象を移動する(ステップS30)。そして、ステップS28に戻る。
このステップS28からステップS30までのループによって、ステップS27で設定された子ノード以下のノードにXラッチが設定されることになる。
Then, the directory distributed storage device 1 determines whether or not the index hierarchy number (h) has reached the tree height “H” (step S28), and if it has reached (No in step S28), the step Proceed to S31.
On the other hand, if the index hierarchy number (h) does not exceed the tree height “H” (Yes in step S28), the directory distributed storage device 1 uses the child node latch setting means 632b to copy the child node and its copy ( (Duplicate) is set to X latch (step S29; exclusive lock setting step).
Subsequently, the directory distributed storage device 1 determines the node immediately below the current child node as a new child node (new child node) by the child node latch setting unit 632b, and sets the child node (Child) to the parent node (Parent). , The new child node (NewChild) is reset to the child node (Child). Further, by adding “1” to the index layer number (h), the control target is moved to the next lower layer (step S30). Then, the process returns to step S28.
By the loop from step S28 to step S30, the X latch is set to a node below the child node set in step S27.

そして、ディレクトリ分散型記憶装置1は、ラッチ有効判定手段632cによって、Xラッチが、データ(葉ノード)31の更新に伴う木構造の変化(SMO)に関連するノードに対してなされているかどうかを判定する(ステップS31;排他ロック有効判定ステップ)。ここで、XラッチがSMOを行うためには不十分である場合(ステップS31でNo)、すべてのラッチを解放し(ステップS32)、マーク用階層番号(n)に、マーク値(m)を設定し(ステップS33;ノード再設定ステップ)、ステップS20に戻る(リスタートする)。すなわち、Xラッチの範囲を拡げる動作を実行する。
一方、XラッチがSMOを行うために十分な設定がなされている場合(ステップS31でYes)、ノード更新手段632dが葉ノード及びそれに関連するノードの更新操作(SMO)を実行し(ステップS34;ノード更新ステップ)、すべてのラッチを解放し(ステップS35)、動作を終了する。
Then, the directory distributed storage device 1 determines whether or not the X latch is made to the node related to the tree structure change (SMO) associated with the update of the data (leaf node) 31 by the latch validity determination means 632c. Determination (step S31; exclusive lock validity determination step). Here, if the X latch is insufficient for performing SMO (No in step S31), all latches are released (step S32), and the mark value (m) is set to the mark hierarchy number (n). Set (step S33; node reset step), return to step S20 (restart). That is, an operation for expanding the range of the X latch is executed.
On the other hand, when the X latch has been sufficiently set to perform SMO (Yes in step S31), the node update unit 632d executes an update operation (SMO) of the leaf node and the related node (step S34; Node update step), all latches are released (step S35), and the operation is terminated.

以上のMARK−OPT方式による第1フェーズ(図2参照)及び第2フェーズ(図3参照)の動作によって、ディレクトリ分散型記憶装置1は、第1フェーズによってマークされたノードによって、Xラッチの設定範囲を定めることができ、葉ノードから順次Xラッチの範囲を拡大していくINC−OPT方式に比べ、第2フェーズを再実行するリスタートの回数を減らすことができる。
なお、ディレクトリ更新方法は、第1フェーズ及び第2フェーズで説明した各ステップにより、ディレクトリを更新する方法であって、ディレクトリ更新プログラムは、この第1フェーズ及び第2フェーズで説明した各ステップをコンピュータに実行させるためのプログラムである。
By the operation of the first phase (see FIG. 2) and the second phase (see FIG. 3) by the MARK-OPT method, the directory distributed storage device 1 sets the X latch by the node marked by the first phase. The range can be determined, and the number of restarts for re-execution of the second phase can be reduced as compared with the INC-OPT method in which the range of the X latch is sequentially expanded from the leaf node.
The directory update method is a method for updating a directory according to the steps described in the first phase and the second phase, and the directory update program executes each step described in the first phase and the second phase by a computer. It is a program for making it run.

以上、本発明に係るディレクトリ分散型記憶装置1の動作として、MARK−OPT方式の動作について説明したが、本発明はこれに限定されるものではない。例えば、このMARK−OPT方式は、他のプロセスの動作によって、途中で木構造に変化があった場合でも処理に変更はないが、その木構造の変化によって処理を変えることとしてもよい。以下、MARK−OPT方式を拡張したINC−MARK−OPT方式、2P−INT−MARK−OPT方式及び2P−REP−MARK−OPT方式について説明を行う。   As described above, the operation of the MARK-OPT system has been described as the operation of the directory distributed storage device 1 according to the present invention, but the present invention is not limited to this. For example, in the MARK-OPT method, even if there is a change in the tree structure due to the operation of another process, the process is not changed, but the process may be changed according to the change in the tree structure. Hereinafter, the INC-MARK-OPT method, the 2P-INT-MARK-OPT method, and the 2P-REP-MARK-OPT method, which are extensions of the MARK-OPT method, will be described.

《INC−MARK−OPT方式》
まず、図4を参照して、INC−MARK−OPT(INCremental MARKing OPTimistic)方式について説明する。図4は、INC−MARK−OPT方式の第2フェーズの動作を示すフローチャートである。なお、INC−MARK−OPT方式の第1フェーズは、図2で説明したMARK−OPT方式と同じ動作であるため説明を省略する。
<< INC-MARK-OPT system >>
First, an INC-MARK-OPT (INCremental MARKing OPTimistic) system will be described with reference to FIG. FIG. 4 is a flowchart showing the operation of the second phase of the INC-MARK-OPT system. The first phase of the INC-MARK-OPT method is the same as that of the MARK-OPT method described with reference to FIG.

このINC−MARK−OPT方式は、第2フェーズにおいて、木の構造が変化したと判断された場合にリスタートを行う方式である。
図4に示すように、INC−MARK−OPT方式は、MARK−OPT方式の第2フェーズにおけるステップS26とステップS27の間に、ステップS261a〜ステップS261cを追加している。他のステップについては、図3で説明したMARK−OPT方式と同じ動作であるため説明を省略する。
The INC-MARK-OPT method is a method for restarting when it is determined that the tree structure has changed in the second phase.
As shown in FIG. 4, in the INC-MARK-OPT system, steps S261a to S261c are added between step S26 and step S27 in the second phase of the MARK-OPT system. The other steps are the same as those in the MARK-OPT method described in FIG.

すなわち、INC−MARK−OPT方式は、ステップS26で親ノードのIXラッチを解放した段階で、記憶部3のノード情報32及びエントリ制限情報33を参照することで、子ノード(Child)のエントリ数が最大(フルエントリ)となっているかどうかを判定する(ステップS261a)。ここで、子ノード(Child)がフルエントリの場合(ステップS261aでYes)、すべてのラッチを解放し(ステップS261b)、マーク用階層番号(n)に、マーク値(m)を設定し(ステップS261c)、ステップS20に戻る(リスタートする)。一方、子ノード(Child)がフルエントリでない場合(ステップS261aでNo)は、MARK−OPT方式と同様にステップS27以降の動作を実行する。   In other words, the INC-MARK-OPT method refers to the node information 32 and the entry restriction information 33 in the storage unit 3 at the stage where the IX latch of the parent node is released in step S26, so that the number of entries in the child node (Child) Is determined to be the maximum (full entry) (step S261a). If the child node (Child) is a full entry (Yes in step S261a), all the latches are released (step S261b), and the mark value (m) is set to the mark hierarchy number (n) (step S261a). S261c), returning to step S20 (restarting). On the other hand, when the child node (Child) is not a full entry (No in step S261a), the operations after step S27 are executed in the same manner as the MARK-OPT method.

このように、INC−MARK−OPT方式は、木の構造が変化したと判断された段階で直ちにリスタートを行うため、SMOの範囲が拡大している場合には、MARK−OPT方式より不必要なXラッチを減らすことができる。   In this way, the INC-MARK-OPT method restarts immediately when it is determined that the tree structure has changed, and is therefore unnecessary compared to the MARK-OPT method when the SMO range is expanded. X latch can be reduced.

《2P−INT−MARK−OPT方式》
次に、図5を参照して、2P−INT−MARK−OPT(2-Phase INTegrated MARKing OPTimistic)方式について説明する。図5は、2P−INT−MARK−OPT方式の第2フェーズの動作を示すフローチャートである。なお、2P−INT−MARK−OPT方式の第1フェーズは、図2で説明したMARK−OPT方式と同じ動作であるため説明を省略する。
<< 2P-INT-MARK-OPT system >>
Next, a 2P-INT-MARK-OPT (2-Phase Integrated Marking OPTimistic) system will be described with reference to FIG. FIG. 5 is a flowchart showing the operation of the second phase of the 2P-INT-MARK-OPT method. The first phase of the 2P-INT-MARK-OPT method is the same as that of the MARK-OPT method described in FIG.

この2P−INT−MARK−OPT方式は、第2フェーズにおいて、木の構造が変化したと判断された場合に、そのノード以下のノードに対してIXラッチカップリングを行う方式である。
図5に示すように、2P−INT−MARK−OPT方式は、MARK−OPT方式の第2フェーズにおけるステップS26とステップS27の間に、ステップS261a及びステップS261dを追加している。他のステップについては、図3で説明したMARK−OPT方式と同じ動作であるため説明を省略する。
The 2P-INT-MARK-OPT method is a method in which, when it is determined that the tree structure has changed in the second phase, IX latch coupling is performed for nodes below that node.
As shown in FIG. 5, in the 2P-INT-MARK-OPT method, step S261a and step S261d are added between step S26 and step S27 in the second phase of the MARK-OPT method. The other steps are the same as those in the MARK-OPT method described in FIG.

すなわち、2P−INT−MARK−OPT方式は、ステップS26で親ノードのIXラッチを解放した段階で、記憶部3のノード情報32及びエントリ制限情報33を参照することで、子ノード(Child)のエントリ数が最大(フルエントリ)となっているかどうかを判定する(ステップS261a)。ここで、子ノード(Child)がフルエントリの場合(ステップS261aでYes)、マーク用階層番号(n)に、現在の階層番号であるインデックス用階層番号(h)を設定し(ステップS261d)、第1フェーズ(図2)のステップS7に戻る。一方、子ノード(Child)がフルエントリでない場合(ステップS261aでNo)は、MARK−OPT方式と同様にステップS27以降の動作を実行する。   That is, in the 2P-INT-MARK-OPT method, the IX latch of the parent node is released in step S26, and the node information 32 and the entry restriction information 33 in the storage unit 3 are referred to, so that the child node (Child) It is determined whether the number of entries is the maximum (full entry) (step S261a). If the child node (Child) is a full entry (Yes in step S261a), the index layer number (h), which is the current layer number, is set in the mark layer number (n) (step S261d). The process returns to step S7 of the first phase (FIG. 2). On the other hand, when the child node (Child) is not a full entry (No in step S261a), the operations after step S27 are executed in the same manner as the MARK-OPT method.

このように、2P−INT−MARK−OPT方式は、木の構造が変化したと判断されてもリスタートを行わず、第1フェーズに切り替えて処理を行う。これによって、2P−INT−MARK−OPT方式は、INC−MARK−OPT方式よりもリスタート回数を少なくし、MARK−OPT方式より不必要なXラッチを減らすことができる。   As described above, the 2P-INT-MARK-OPT method does not restart even if it is determined that the structure of the tree has changed, and performs processing by switching to the first phase. As a result, the 2P-INT-MARK-OPT method can reduce the number of restarts compared to the INC-MARK-OPT method, and can reduce unnecessary X latches than the MARK-OPT method.

《2P−REP−MARK−OPT方式》
次に、図6を参照して、2P−REP−MARK−OPT(2-Phase REPetitive MARKing OPTimistic)方式について説明する。図6は、2P−REP−MARK−OPT方式の第2フェーズの動作を示すフローチャートである。なお、2P−REP−MARK−OPT方式の第1フェーズは、図2で説明したMARK−OPT方式と同じ動作であるため説明を省略する。
<< 2P-REP-MARK-OPT system >>
Next, a 2P-REP-MARK-OPT (2-Phase REPetitive MARKing OPTimistic) system will be described with reference to FIG. FIG. 6 is a flowchart showing the operation of the second phase of the 2P-REP-MARK-OPT method. The first phase of the 2P-REP-MARK-OPT method is the same as that of the MARK-OPT method described in FIG.

この2P−REP−MARK−OPT方式は、第2フェーズにおいて、木の構造が変化したと判断された場合に、リスタートを行う方式である。なお、INC−MARK−OPT方式との違いは、リスタート後は第1フェーズに戻って処理を行うことである。
図6に示すように、2P−REP−MARK−OPT方式は、MARK−OPT方式の第2フェーズにおけるステップS26とステップS27の間に、ステップS261a及びステップS261bを追加している。他のステップについては、図3で説明したMARK−OPT方式と同じ動作であるため説明を省略する。
This 2P-REP-MARK-OPT method is a method for restarting when it is determined that the tree structure has changed in the second phase. Note that the difference from the INC-MARK-OPT method is that the processing returns to the first phase after the restart.
As shown in FIG. 6, in the 2P-REP-MARK-OPT scheme, Step S261a and Step S261b are added between Step S26 and Step S27 in the second phase of the MARK-OPT scheme. The other steps are the same as those in the MARK-OPT method described in FIG.

すなわち、2P−REP−MARK−OPT方式は、ステップS26で親ノードのIXラッチを解放した段階で、記憶部3のノード情報32及びエントリ制限情報33を参照することで、子ノード(Child)のエントリ数が最大(フルエントリ)となっているかどうかを判定する(ステップS261a)。ここで、子ノード(Child)がフルエントリの場合(ステップS261aでYes)、すべてのラッチを解放し(ステップS261b)、第1フェーズ(図2)のステップS1に戻る。一方、子ノード(Child)がフルエントリでない場合(ステップS261aでNo)は、MARK−OPT方式と同様にステップS27以降の動作を実行する。   In other words, the 2P-REP-MARK-OPT method refers to the node information 32 and the entry restriction information 33 in the storage unit 3 at the stage where the IX latch of the parent node is released in step S26, so that the child node (Child) It is determined whether the number of entries is the maximum (full entry) (step S261a). If the child node (Child) is a full entry (Yes in step S261a), all the latches are released (step S261b), and the process returns to step S1 in the first phase (FIG. 2). On the other hand, when the child node (Child) is not a full entry (No in step S261a), the operations after step S27 are executed in the same manner as the MARK-OPT method.

このように、2P−REP−MARK−OPT方式は、木の構造が変化したと判断された段階で直ちにリスタートし、第1フェーズに戻って処理を行うため、リスタート回数は、MARK−OPT方式に比べて多くなるが、不必要なXラッチの設定を最も少なくすることができる。   In this way, the 2P-REP-MARK-OPT method restarts immediately when it is determined that the tree structure has changed, and returns to the first phase for processing, so the number of restarts is MARK-OPT. Although the number is larger than that of the method, unnecessary X latch setting can be minimized.

[ディレクトリ更新動作の具体例]
次に、ディレクトリ分散型記憶装置1(図1参照)におけるディレクトリ更新の動作について、具体例を示して説明する。ここでは、一例として、図7に示すようなディレクトリ更新が行われる例について説明する。図7(a)は、ディレクトリ更新前のディレクトリ構造を示し、図7(b)は、データ追加に伴うディレクト更新後のディレクト構造を示している。
[Specific examples of directory update operations]
Next, the directory update operation in the directory distributed storage device 1 (see FIG. 1) will be described with a specific example. Here, as an example, an example in which directory update as shown in FIG. 7 is performed will be described. FIG. 7A shows a directory structure before directory update, and FIG. 7B shows a directory structure after directory update accompanying data addition.

図7(a)に示すように、ディレクトリ更新前は、D1−D2−D3−D4−D5−D6の各ノードの階層によって、データ31として葉ノードD6が記憶部3に記憶されている。なお、ここでは、インデックスノード及び葉ノードのエントリ数の最大値(制限値)を“3”とする。すなわち、インデックスノードD2、D5は、子ノードがフルエントリ状態であるフルエントリインデックスノードとなっており、葉ノードD6は、データがフルエントリ状態であるフルエントリ葉ノードとなっているものとする。 As shown in FIG. 7A, before the directory update, the leaf node D 6 is stored as the data 31 in the storage unit 3 according to the hierarchy of each node of D 1 -D 2 -D 3 -D 4 -D 5 -D 6. Is remembered. Here, the maximum value (limit value) of the number of entries in the index node and leaf node is set to “3”. That is, the index nodes D 2 and D 5 are full entry index nodes whose child nodes are in a full entry state, and the leaf node D 6 is a full entry leaf node whose data is in a full entry state. And

この図7(a)の状態において、葉ノードD6にデータを追加すると、図7(b)に示すように、葉ノードD6は葉ノードD61、D62に分割され、その親ノードであるインデックスノードD5は、エントリ数の最大数を超過するため、インデックスノードD51、D52に分割されることになる。
この例に基づいて、前記したMARK−OPT方式、INC−MARK−OPT方式、2P−INT−MARK−OPT方式及び2P−REP−MARK−OPT方式の各方式の動作について具体的に説明する。
When data is added to the leaf node D 6 in the state of FIG. 7A, the leaf node D 6 is divided into leaf nodes D 61 and D 62 as shown in FIG. 7B. there index node D 5 in order to exceed the maximum number of entries will be divided into the index node D 51, D 52.
Based on this example, the operation of each of the above-described MARK-OPT system, INC-MARK-OPT system, 2P-INT-MARK-OPT system, and 2P-REP-MARK-OPT system will be specifically described.

《MARK−OPT方式》
まず、図8及び図9を参照して、MARK−OPT方式の動作を具体的に説明する。図8及び図9は、MARK−OPT方式のラッチ状態を模式的に示す模式図である。なお、図中変数「n」、「h」及び「m」は、図2及び図3のフローチャートに用いたマーク用階層番号、インデックス用階層番号及びマーク値をそれぞれ示している。
<MARK-OPT method>
First, the operation of the MARK-OPT method will be described in detail with reference to FIGS. 8 and 9 are schematic views schematically showing a MARK-OPT type latch state. In the figure, variables “n”, “h”, and “m” indicate the mark hierarchy number, index hierarchy number, and mark value used in the flowcharts of FIGS. 2 and 3, respectively.

図8(a)に示すように、MARK−OPT方式は、第1フェーズで、IXラッチカップリングによって、状態P1から状態P9として、ルートノードD1から葉ノードD6の親ノード(インデックスノードD5)まで、順次IXラッチを設定する。また、IXラッチ設定中に、フルエントリとなっていないインデックスノードを探索し、マーク値(m)にその状態におけるマーク用階層番号(h)の値を設定する。ここでは、状態P1において、マーク値(m)に“1”を設定し、状態P5において、マーク値(m)に“3”を設定し、状態P7において、マーク値(m)に“4”を設定する。そして、状態P10に示すように、葉ノードD6にXラッチを設定し、状態P11に示すように親ノードのIXラッチを解放する。この状態では、葉ノードD6を更新するためのXラッチが不十分(インデックスノードD4及びD5にXラッチの設定が必要)であるため、状態P12に示すように葉ノードD6のXラッチを解放し第2フェーズの動作(リスタート)を行う。 As shown in FIG. 8 (a), MARK-OPT method, in the first phase, IX by the latch coupling, the state P9 from state P1, the parent node (index node D of leaf nodes D 6 from the root node D 1 Set the IX latch sequentially until 5 ). Further, during the IX latch setting, an index node that is not a full entry is searched, and the value of the mark hierarchy number (h) in that state is set as the mark value (m). Here, “1” is set to the mark value (m) in the state P1, “3” is set to the mark value (m) in the state P5, and “4” is set to the mark value (m) in the state P7. Set. Then, as shown in state P10, to set the X latch the leaf node D 6, to release the IX latch parent node as shown in the state P11. In this state, since the X latch for updating the leaf node D 6 is insufficient (the X nodes need to be set in the index nodes D 4 and D 5 ), as shown in the state P12, the X of the leaf node D 6 The latch is released and the second phase operation (restart) is performed.

続けて、図8(b)に示すように、MARK−OPT方式は、第2フェーズで、IXラッチカップリングによって、状態P13から状態P17として、ルートノードD1から、第1フェーズでマークしたマーク値(m:ここでは“4”)のノードの親ノード(インデックスノードD3)まで、順次IXラッチを設定する。そして、親ノード(インデックスノードD3)以下の子ノードにXラッチを設定する。そして、状態P20に示すように、インデックスノードD4〜D6にXラッチを設定した段階で、葉ノードD6の更新を行う。そして、葉ノードD6の更新(及びインデックスノードD5の分割)後、全ラッチを解放し動作を終了する。
なお、この図8(b)は、処理中に上位ノードで更新操作(SMO)が発生しなかった場合の動作を示している。この処理中に上位ノードで更新操作(SMO)が発生した場合の動作については、図9を参照して説明を行う。
Mark continued, as shown in FIG. 8 (b), MARK-OPT method, in the second phase, which by IX latch coupling, as a state P17 from the state P13, from the root node D 1, marked in the first phase The IX latch is sequentially set up to the parent node (index node D 3 ) of the node of the value (m: here “4”). Then, an X latch is set in a child node below the parent node (index node D 3 ). Then, as shown in state P20, at the stage of setting the X latch to the index node D 4 to D 6, and updates the leaf node D 6. Then, after updating the leaf node D 6 (and dividing the index node D 5 ), all the latches are released and the operation ends.
FIG. 8B shows an operation when an update operation (SMO) does not occur in the upper node during processing. The operation when an update operation (SMO) occurs in the upper node during this process will be described with reference to FIG.

図9(a)は、上位ノードで更新操作(SMO)が発生した場合におけるリスタートの1回目の動作を示し、図9(b)は、リスタートの2回目の動作を示している。なお、図9では、他のプロセスの動作によりSMOが発生し、インデックスノードD4がフルエントリインデックスノードになった例を示している。 FIG. 9A shows a first restart operation when an update operation (SMO) occurs in the upper node, and FIG. 9B shows a second restart operation. FIG. 9 shows an example in which SMO is generated by the operation of another process, and the index node D 4 becomes a full entry index node.

図9(a)に示すように、MARK−OPT方式は、第2フェーズのリスタート1回目で、IXラッチカップリングによって、状態P21から状態P25として、ルートノードD1から、第1フェーズでマークしたマーク値(m:ここでは“4”)のノードの親ノード(インデックスノードD3)まで、順次IXラッチを設定する。また、IXラッチ設定中に、フルエントリとなっていないインデックスノードを探索し、マーク値(m)にその状態におけるマーク用階層番号(h)の値を設定する。ここでは、状態P21において、マーク値(m)に“1”を設定し、状態P25において、マーク値(m)に“3”を設定する。
そして、親ノード(インデックスノードD3)以下の子ノードにXラッチを設定する。この状態では、葉ノードD6を更新するためのXラッチが不十分(インデックスノードD3〜D5にXラッチの設定が必要)であるため、状態P29に示すようにすべてのラッチを解放し、第2フェーズの動作(リスタート2回目)を行う。
As shown in FIG. 9 (a), MARK-OPT method, marks the second phase restart first, the IX latch coupling, as a state P25 from the state P21, from the root node D 1, in the first phase The IX latches are sequentially set up to the parent node (index node D 3 ) of the node of the marked value (m: here “4”). Further, during the IX latch setting, an index node that is not a full entry is searched, and the value of the mark hierarchy number (h) in that state is set as the mark value (m). Here, “1” is set to the mark value (m) in the state P21, and “3” is set to the mark value (m) in the state P25.
Then, an X latch is set in a child node below the parent node (index node D 3 ). In this state, since the X latch for updating the leaf node D 6 is insufficient (the X nodes need to be set in the index nodes D 3 to D 5 ), all the latches are released as shown in the state P29. The second phase operation (second restart) is performed.

続けて、図9(b)に示しように、MARK−OPT方式は、第2フェーズのリスタート2回目で、IXラッチカップリングによって、状態P30から状態P32として、ルートノードD1から、第2フェーズのリスタート1回目でマークしたマーク値(m:ここでは“3”)のノードの親ノード(インデックスノードD2)まで、順次IXラッチを設定する。そして、親ノード(インデックスノードD2)以下の子ノードにXラッチを設定する。そして、状態P37に示すように、インデックスノードD3〜D6にXラッチを設定した段階で、葉ノードD6の更新を行う。そして、葉ノードD6の更新(及びインデックスノードD4及びD5の分割)後、全ラッチを解放し動作を終了する。 Subsequently, it shows as in FIG. 9 (b), MARK-OPT method, the second phase restart second, by IX latch coupling, as a state P32 from the state P30, from the root node D 1, second The IX latch is sequentially set up to the parent node (index node D 2 ) of the node of the mark value (m: “3” here) marked at the first restart of the phase. Then, an X latch is set in a child node below the parent node (index node D 2 ). Then, as shown in state P37, at the stage of setting the X latch to the index node D 3 to D 6, and updates the leaf node D 6. Then, after updating the leaf node D 6 (and dividing the index nodes D 4 and D 5 ), all the latches are released and the operation ends.

《INC−MARK−OPT方式》
次に、図10を参照して、INC−MARK−OPT方式の動作を具体的に説明する。図10は、INC−MARK−OPT方式のラッチ状態を模式的に示す模式図である。なお、INC−MARK−OPT方式の第1フェーズ及びSMOが発生しなかった場合の第2フェーズの動作は、図8で説明したMARK−OPT方式の動作と同じであるため説明を省略する。
ここでは、図10(a)に示すように、他のプロセスの動作によりSMOが発生し、インデックスノードD4がフルエントリインデックスノードになった例を示している。
<< INC-MARK-OPT system >>
Next, the operation of the INC-MARK-OPT method will be specifically described with reference to FIG. FIG. 10 is a schematic diagram schematically showing a latch state of the INC-MARK-OPT method. Note that the operation of the first phase of the INC-MARK-OPT method and the operation of the second phase when no SMO has occurred are the same as the operation of the MARK-OPT method described in FIG.
Here, as shown in FIG. 10 (a), SMO is generated by the operation of other processes, the index node D 4 is an example became full entry index node.

ここで、INC−MARK−OPT方式は、第2フェーズのリスタート1回目で、IXラッチカップリングによって、状態P41から状態P45として、ルートノードD1から、第1フェーズでマークしたマーク値(m:ここでは“4”)のノードの親ノード(インデックスノードD3)まで、順次IXラッチを設定する。また、IXラッチ設定中に、フルエントリとなっていないインデックスノードを探索し、マーク値(m)にその状態におけるマーク用階層番号(h)の値を設定する。ここでは、状態P41において、マーク値(m)に“1”を設定し、状態P45において、マーク値(m)に“3”を設定する。 Here, INC-MARK-OPT method, the second phase restart first, the IX latch coupling, as a state P45 from the state P41, from the root node D 1, mark values marked in the first phase (m : Here, the IX latch is sequentially set up to the parent node (index node D 3 ) of the node “4”). Further, during the IX latch setting, an index node that is not a full entry is searched, and the value of the mark hierarchy number (h) in that state is set as the mark value (m). Here, “1” is set to the mark value (m) in the state P41, and “3” is set to the mark value (m) in the state P45.

そして、INC−MARK−OPT方式は、子ノード(インデックスノードD4)にXラッチを設定し、親ノード(インデックスノードD3)のIXラッチを解放した状態P47において、すでに葉ノードD6を更新するためのXラッチが不十分(インデックスノードD3〜D5にXラッチの設定が必要)であると判断する。そこで、状態P48に示すようにすべてのラッチを解放し、第2フェーズの動作(リスタート2回目)を行う。
なお、第2フェーズのリスタート2回目の動作は、図9(b)の動作と同じになるため説明を省略する。
In the INC-MARK-OPT method, the X node is set in the child node (index node D 4 ), and the leaf node D 6 is already updated in the state P47 in which the IX latch of the parent node (index node D 3 ) is released. It is determined that the X latch for this is insufficient (the X nodes need to be set in the index nodes D 3 to D 5 ). Therefore, as shown in the state P48, all the latches are released, and the second phase operation (second restart) is performed.
Note that the second restart operation in the second phase is the same as the operation in FIG.

《2P−INT−MARK−OPT方式》
次に、図11を参照して、2P−INT−MARK−OPT方式の動作を具体的に説明する。図11は、2P−INT−MARK−OPT方式のラッチ状態を模式的に示す模式図である。なお、2P−INT−MARK−OPT方式の第1フェーズ及びSMOが発生しなかった場合の第2フェーズの動作は、図8で説明したMARK−OPT方式の動作と同じであるため説明を省略する。
ここでも、図10(a)と同様に、他のプロセスの動作によりSMOが発生し、インデックスノードD4がフルエントリインデックスノードになったものとしている。
<< 2P-INT-MARK-OPT system >>
Next, the operation of the 2P-INT-MARK-OPT method will be specifically described with reference to FIG. FIG. 11 is a schematic diagram schematically showing a latch state of the 2P-INT-MARK-OPT method. The operation of the first phase of the 2P-INT-MARK-OPT method and the operation of the second phase when no SMO occurs are the same as the operation of the MARK-OPT method described in FIG. .
Here, as in FIG. 10A, it is assumed that SMO is generated by the operation of another process and the index node D 4 becomes a full entry index node.

ここで、2P−INT−MARK−OPT方式は、第2フェーズのリスタート1回目で、状態P61から状態P67に遷移する。なお、この状態P61〜状態P67は、図10(a)の状態P41〜状態P47と同じ状態である。
そして、2P−INT−MARK−OPT方式は、状態P67において、すでに葉ノードD6を更新するためのXラッチが不十分(インデックスノードD3〜D5にXラッチの設定が必要)であると判断し、第1フェーズの途中(ステップS7:図2参照)にフェーズを切り替えて動作を継続する。
Here, in the 2P-INT-MARK-OPT method, the state transitions from the state P61 to the state P67 at the first restart of the second phase. The states P61 to P67 are the same as the states P41 to P47 in FIG.
In the 2P-INT-MARK-OPT method, in the state P67, the X latch for updating the leaf node D 6 is already insufficient (setting of the X latch to the index nodes D 3 to D 5 is necessary). The operation is continued by switching the phase in the middle of the first phase (step S7: see FIG. 2).

そして、2P−INT−MARK−OPT方式は、マーク用階層番号(h)に対応するインデックスノードより下位のインデックスノード(D5以下)に対してIXラッチカップリングを行う。そして、状態P71に示すように、葉ノードD6にXラッチを設定し、状態P72に示すように親ノードのIXラッチを解放する。この状態では、葉ノードD6を更新するためのXラッチが不十分(インデックスノードD3〜D5にXラッチの設定が必要)であるため、状態P73に示すように葉ノードD6のXラッチを解放し第2フェーズの動作(リスタート2回目)を行う。
なお、第2フェーズのリスタート2回目の動作は、図9(b)の動作と同じになるため説明を省略する。
In the 2P-INT-MARK-OPT method, IX latch coupling is performed on an index node (D 5 or lower) lower than the index node corresponding to the mark hierarchy number (h). Then, as shown in state P71, to set the X latch the leaf node D 6, to release the IX latch parent node as shown in the state P72. In this state, since the X latch for updating the leaf node D 6 is insufficient (the X nodes need to be set in the index nodes D 3 to D 5 ), the X of the leaf node D 6 is shown in the state P73. The latch is released and the second phase operation (second restart) is performed.
Note that the second restart operation in the second phase is the same as the operation in FIG.

《2P−REP−MARK−OPT方式》
次に、図12を参照して、2P−REP−MARK−OPT方式の動作を具体的に説明する。図12は、2P−REP−MARK−OPT方式のラッチ状態を模式的に示す模式図である。なお、2P−REP−MARK−OPT方式の第1フェーズ及びSMOが発生しなかった場合の第2フェーズの動作は、図8で説明したMARK−OPT方式の動作と同じであるため説明を省略する。
ここでも、図10(a)と同様に、他のプロセスの動作によりSMOが発生し、インデックスノードD4がフルエントリインデックスノードになったものとしている。
<< 2P-REP-MARK-OPT system >>
Next, the operation of the 2P-REP-MARK-OPT method will be specifically described with reference to FIG. FIG. 12 is a schematic diagram schematically showing a latch state of the 2P-REP-MARK-OPT method. The operation of the first phase of the 2P-REP-MARK-OPT method and the operation of the second phase when no SMO has occurred are the same as the operation of the MARK-OPT method described in FIG. .
Here, as in FIG. 10A, it is assumed that SMO is generated by the operation of another process and the index node D 4 becomes a full entry index node.

ここで、2P−REP−MARK−OPT方式は、第2フェーズのリスタート1回目で、状態P81から状態P88に遷移する。なお、この状態P81〜状態P88は、図10(a)の状態P41〜状態P48と同じ状態である。そして、2P−REP−MARK−OPT方式は、状態P88以降、第1フェーズに戻って動作を再開(リスタート2回目)する。   Here, in the 2P-REP-MARK-OPT method, the state P81 is changed to the state P88 at the first restart of the second phase. The states P81 to P88 are the same as the states P41 to P48 in FIG. In the 2P-REP-MARK-OPT system, after the state P88, the operation returns to the first phase and restarts (second restart).

そして、2P−REP−MARK−OPT方式は、図12(b)に示すように、第1フェーズを実行し、IXラッチカップリングによって、状態P89から状態P97に示すように、ルートノードD1から葉ノードD6の親ノード(インデックスノードD5)まで、順次IXラッチを設定する。また、IXラッチ設定中に、フルエントリとなっていないインデックスノードを探索し、マーク値(m)にその状態におけるマーク用階層番号(h)の値を設定する。ここでは、状態P89において、マーク値(m)に“1”を設定し、状態P93において、マーク値(m)に“3”を設定する。そして、状態P98に示すように、葉ノードD6にXラッチを設定し、状態P99に示すように親ノードのIXラッチを解放する。この状態では、葉ノードD6を更新するためのXラッチが不十分(インデックスノードD3〜D5にXラッチの設定が必要)であるため、状態P100に示すように葉ノードD6のXラッチを解放し第2フェーズの動作(リスタート3回目)を行う。
なお、第2フェーズのリスタート3回目の動作は、図9(b)の動作と同じになるため説明を省略する。
Then, in the 2P-REP-MARK-OPT method, as shown in FIG. 12B, the first phase is executed, and from the root node D 1 as shown in the state P89 to the state P97 by IX latch coupling. The IX latches are sequentially set up to the parent node (index node D 5 ) of the leaf node D 6 . Further, during the IX latch setting, an index node that is not a full entry is searched, and the value of the mark hierarchy number (h) in that state is set as the mark value (m). Here, “1” is set to the mark value (m) in the state P89, and “3” is set to the mark value (m) in the state P93. Then, as shown in state P98, to set the X latch the leaf node D 6, to release the IX latch parent node as shown in the state P99. In this state, since the X latch for updating the leaf node D 6 is insufficient (the X nodes need to be set in the index nodes D 3 to D 5 ), as shown in the state P100, the X of the leaf node D 6 The latch is released and the second phase operation (restart third time) is performed.
Note that the third operation of the second phase restart is the same as the operation of FIG.

以上説明したように、MARK−OPT方式、INC−MARK−OPT方式、2P−INT−MARK−OPT方式及び2P−REP−MARK−OPT方式は、第1フェーズによってマークされたノードによってXラッチの設定範囲を定めるため、葉ノードから順次Xラッチの範囲を拡大していくINC−OPT方式に比べ、リスタートの回数を減らすことができる。   As described above, the MARK-OPT method, INC-MARK-OPT method, 2P-INT-MARK-OPT method, and 2P-REP-MARK-OPT method are used to set the X latch by the node marked by the first phase. Since the range is determined, the number of restarts can be reduced as compared with the INC-OPT method in which the X latch range is sequentially expanded from the leaf node.

本発明に係るディレクトリ分散型記憶装置(木構造型データ記憶装置)の構成を示すブロック図である。1 is a block diagram showing a configuration of a directory distributed storage device (tree structure type data storage device) according to the present invention. MARK−OPT方式の第1フェーズの動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 1st phase of a MARK-OPT system. MARK−OPT方式の第2フェーズの動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 2nd phase of a MARK-OPT system. INC−MARK−OPT方式の第2フェーズの動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 2nd phase of INC-MARK-OPT system. 2P−INT−MARK−OPT方式の第2フェーズの動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 2nd phase of 2P-INT-MARK-OPT system. 2P−REP−MARK−OPT方式の第2フェーズの動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the 2nd phase of 2P-REP-MARK-OPT system. ディレクトリの更新例を示す図であって、(a)は更新前、(b)は更新後の状態を示す。It is a figure which shows the example of a directory update, Comprising: (a) is before an update, (b) shows the state after an update. MARK−OPT方式のラッチ状態(第1フェーズ及び第2フェーズ)を模式的に示す模式図である。It is a schematic diagram which shows typically the latch state (1st phase and 2nd phase) of a MARK-OPT system. MARK−OPT方式のラッチ状態(第2フェーズ:リスタート1回目及び2回目)を模式的に示す模式図である。It is a schematic diagram which shows typically the latch state (2nd phase: restart 1st time and 2nd time) of a MARK-OPT system. INC−MARK−OPT方式のラッチ状態(第2フェーズ)を模式的に示す模式図である。It is a schematic diagram which shows typically the latch state (2nd phase) of INC-MARK-OPT system. 2P−INT−MARK−OPT方式のラッチ状態(第2フェーズ)を模式的に示す模式図である。It is a schematic diagram which shows typically the latching state (2nd phase) of a 2P-INT-MARK-OPT system. 2P−REP−MARK−OPT方式のラッチ状態(第2フェーズ)を模式的に示す模式図である。It is a schematic diagram which shows typically the latch state (2nd phase) of 2P-REP-MARK-OPT system. 従来の並列計算機におけるディレクトリ構造の一例であるFat−Btree構造を示す図である。It is a figure which shows Fat-Btree structure which is an example of the directory structure in the conventional parallel computer.

符号の説明Explanation of symbols

1 ディレクトリ分散型記憶装置(木構造型データ記憶装置)
2 通信制御部
3 記憶部
4 制御部
5 データ操作手段
51 データ送受信手段
52 データ参照手段
53 データ更新手段
6 データ管理手段
61 データ操作制御手段
62 データ参照制御手段
63 データ更新制御手段
631 第1フェーズ実行手段
631a 第1非フルエントリノード探索手段
631b 葉ノードラッチ設定手段
631c ノード更新手段
632 第2フェーズ実行手段
632a 第2非フルエントリノード探索手段
632b 子ノードラッチ設定手段(排他ロック設定手段)
632c ラッチ有効判定手段(排他ロック有効判定手段)
632d ノード更新手段
632e ノード再設定手段
7 制御情報送受信手段
1 Directory distributed storage device (tree structure data storage device)
2 Communication control unit 3 Storage unit 4 Control unit 5 Data operation unit 51 Data transmission / reception unit 52 Data reference unit 53 Data update unit 6 Data management unit 61 Data operation control unit 62 Data reference control unit 63 Data update control unit 631 First phase execution Means 631a First non-full entry node search means 631b Leaf node latch setting means 631c Node update means 632 Second phase execution means 632a Second non-full entry node search means 632b Child node latch setting means (exclusive lock setting means)
632c Latch validity judging means (exclusive lock validity judging means)
632d Node updating means 632e Node resetting means 7 Control information transmitting / receiving means

Claims (3)

木構造における各ノードのエントリ数を制限したディレクトリ構造において、前記木構造の変化を伴う際の記憶装置におけるディレクトリ更新方法であって、
前記記憶装置により、最上位層のルートノードから更新対象となる最下位層の葉ノードまでの経路において、最上位層のノードに排他ロックを設定する旨を示すインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返し、前記エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードの階層番号をマーク用階層番号として保持するとともに、前記葉ノードに対して排他ロックを設定し、前記葉ノードのエントリ数が予め定めた制限未満である場合に前記葉ノードの更新を行い、前記エントリ数が予め定めた制限を超過する場合に前記葉ノードの更新を行わずに排他ロックを解放する第1フェーズ実行ステップと、
前記記憶装置により、前記ルートノードから前記葉ノードまでの経路のうち、前記ルートノードから前記マーク用階層番号で特定されるノードの親ノードまでの経路において、最上位層のノードにインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返すとともに、前記エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する第2フェーズ実行ステップとを実行し
前記第2フェーズ実行ステップにおいて
前記マーク用階層番号で特定されるノードから前記葉ノードまでの経路において、各ノードに排他ロックを設定する排他ロック設定ステップと、
この排他ロック設定ステップで設定した排他ロックが、前記葉ノードの更新によりエントリ数の最大数を超過してノードの分割が発生するノードに対して設定されているかどうかを判定する排他ロック有効判定ステップと、
前記分割が発生するノードに対して排他ロックが設定されていると判定された場合に、前記葉ノードの更新を行うノード更新ステップとを実行し
前記分割が発生するノードに対して排他ロックが設定されていないと判定された場合に、前記第2の非フルエントリノードの階層番号を前記マーク用階層番号として再設定し、前記第2フェーズ実行ステップを繰り返すことを特徴とするディレクトリ更新方法。
In the directory structure in which the number of entries of each node in the tree structure is limited, the directory update method in the storage device when the tree structure changes,
In the path from the root node of the highest layer to the leaf node of the lowest layer to be updated , the storage device sets an intent exclusive lock indicating that an exclusive lock is set on the node of the highest layer, and after setting the intent exclusive lock on node in the lower layer immediately below the node, repeat the procedure for releasing the intent exclusive lock set in the node of the upper layer directly above the node of the lower layer toward the lower layer , Holding the hierarchy number of the lowest first non-full entry node whose number of entries is less than a predetermined limit as a mark hierarchy number, and setting an exclusive lock on the leaf node, The leaf node is updated when the number of entries is less than a predetermined limit, and the leaf node is updated when the number of entries exceeds a predetermined limit. A first phase execution step of releasing the exclusive lock without update,
Intent exclusive lock to the highest layer node in the route from the root node to the parent node of the node specified by the mark hierarchy number among the routes from the root node to the leaf node by the storage device set, after setting the intent exclusive lock on node in the lower layer immediately below the node, the lower the procedure for releasing the intent exclusive lock set in the node of the upper layer directly above the node of the lower layer with repeated towards the layer, perform a second phase execution step of searching for a second non-full entry node of the most subordinate number said entry is less than the predetermined limit,
In the second phase execution step,
An exclusive lock setting step for setting an exclusive lock on each node in the path from the node specified by the mark hierarchy number to the leaf node;
Exclusive lock validity determination step for determining whether or not the exclusive lock set in this exclusive lock setting step is set for a node in which the maximum number of entries is exceeded due to the update of the leaf node and node division occurs. When,
When it is determined that an exclusive lock has been set for the node where the split occurs , a node update step of updating the leaf node is performed ,
If the exclusive lock on the node where the split occurs is determined not to be set, and resetting the layer number of the second non-full entry node as layer number for the mark, the second phase execution A directory update method characterized by repeating steps.
木構造における各ノードのエントリ数を制限したディレクトリ構造において、前記木構造の変化を伴うディレクトリの更新を行うために、コンピュータを、
最上位層のルートノードから更新対象となる最下位層の葉ノードまでの経路において、最上位層のノードに排他ロックを設定する旨を示すインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返し、前記エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードの階層番号をマーク用階層番号として保持するとともに、前記葉ノードに対して排他ロックを設定し、前記葉ノードのエントリ数が予め定めた制限未満である場合に前記葉ノードの更新を行い、前記エントリ数が予め定めた制限を超過する場合に前記葉ノードの更新を行わずに排他ロックを解放する第1フェーズ実行手段、
前記ルートノードから前記葉ノードまでの経路のうち、前記ルートノードから前記マーク用階層番号で特定されるノードの親ノードまでの経路において、最上位層のノードにインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返すとともに、前記エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する第2フェーズ実行手段として機能させ、
この第2フェーズ実行手段が、
前記マーク用階層番号で特定されるノードから前記葉ノードまでの経路において、各ノードに排他ロックを設定する排他ロック設定手段と、
この排他ロック設定手段で設定した排他ロックが、前記葉ノードの更新によりエントリ数の最大数を超過してノードの分割が発生するノードに対して設定されているかどうかを判定する排他ロック有効判定手段と、
前記分割が発生するノードに対して排他ロックが設定されていると判定された場合に、前記葉ノードの更新を行うノード更新手段と、
前記分割が発生するノードに対して排他ロックが設定されていないと判定された場合に、前記第2の非フルエントリノードの階層番号を前記マーク用階層番号として設定するノード再設定手段と、
を備えていることを特徴とするディレクトリ更新プログラム。
In the directory structure in which the number of entries of each node in the tree structure is limited, in order to update the directory accompanying the change of the tree structure,
In the path from the root node of the highest layer to the leaf node of the lowest layer to be updated , set an intent exclusive lock indicating that an exclusive lock is set on the node of the highest layer, and the lower layer immediately below that node after setting the intent exclusive lock on the node, repeat the procedure for releasing the intent exclusive lock set in the node of the upper layer directly above the node of the lower layer toward the lower layer, the number of the entries The hierarchy number of the lowest first non-full entry node that is less than a predetermined limit is retained as a mark hierarchy number, an exclusive lock is set for the leaf node, and the entry number of the leaf node is set in advance. The leaf node is updated when it is less than a predetermined limit, and the leaf node is not updated when the number of entries exceeds a predetermined limit. The first phase execution means for releasing the lock,
In the path from the root node to the leaf node, in the path from the root node to the parent node of the node specified by the mark hierarchy number, an intent exclusive lock is set on the highest layer node, and After setting the intent exclusive lock on the lower layer node immediately below the node , the procedure for releasing the intent exclusive lock set on the upper layer node immediately above the lower layer node is repeated toward the lower layer. And the second phase execution means for searching for the lowest second non-full entry node whose number of entries is less than a predetermined limit,
This second phase execution means
Exclusive lock setting means for setting an exclusive lock on each node in the path from the node specified by the mark hierarchy number to the leaf node;
Exclusive lock validity determining means for determining whether or not the exclusive lock set by the exclusive lock setting means is set for a node that exceeds the maximum number of entries due to the update of the leaf node and causes node division. When,
Node update means for updating the leaf node when it is determined that an exclusive lock is set for the node where the split occurs ;
Node resetting means for resetting the hierarchy number of the second non-full entry node as the hierarchy number for the mark when it is determined that an exclusive lock is not set for the node where the division occurs ;
A directory update program comprising:
木構造における各ノードのエントリ数を制限したディレクトリ構造によって、データを記憶する木構造型データ記憶装置において、
最上位層のルートノードから更新対象となる最下位層の葉ノードまでの経路において、最上位層のノードに排他ロックを設定する旨を示すインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返し、前記エントリ数が予め定めた制限未満である最も下位の第1の非フルエントリノードの階層番号をマーク用階層番号として保持するとともに、前記葉ノードに対して排他ロックを設定し、前記葉ノードのエントリ数が予め定めた制限未満である場合に前記葉ノードの更新を行い、前記エントリ数が予め定めた制限を超過する場合に前記葉ノードの更新を行わずに排他ロックを解放する第1フェーズ実行手段と、
前記ルートノードから前記葉ノードまでの経路のうち、前記ルートノードから前記マーク用階層番号で特定されるノードの親ノードまでの経路において、最上位層のノードにインテント排他ロックを設定し、当該ノード直下の下位層のノードに対してインテント排他ロックを設定した後に当該下位層のノードの直上の上位層のノードに設定したインテント排他ロックを解放する手順を下位層に向かって繰り返すとともに、前記エントリ数が予め定めた制限未満である最も下位の第2の非フルエントリノードを探索する第2フェーズ実行手段とを備え、
この第2フェーズ実行手段が、
前記マーク用階層番号で特定されるノードから前記葉ノードまでの経路において、各ノードに排他ロックを設定する排他ロック設定手段と、
この排他ロック設定手段で設定した排他ロックが、前記葉ノードの更新によりエントリ数の最大数を超過してノードの分割が発生するノードに対して設定されているかどうかを判定する排他ロック有効判定手段と、
前記分割が発生するノードに対して排他ロックが設定されていると判定された場合に、前記葉ノードの更新を行うノード更新手段と、
前記分割が発生するノードに対して排他ロックが設定されていないと判定された場合に、前記第2の非フルエントリノードの階層番号を前記マーク用階層番号として設定するノード再設定手段と、
を備えていることを特徴とする木構造型データ記憶装置。
In a tree structure type data storage device for storing data by a directory structure in which the number of entries of each node in the tree structure is limited,
In the path from the root node of the highest layer to the leaf node of the lowest layer to be updated , set an intent exclusive lock indicating that an exclusive lock is set on the node of the highest layer, and the lower layer immediately below that node after setting the intent exclusive lock on the node, repeat the procedure for releasing the intent exclusive lock set in the node of the upper layer directly above the node of the lower layer toward the lower layer, the number of the entries The hierarchy number of the lowest first non-full entry node that is less than a predetermined limit is retained as a mark hierarchy number, an exclusive lock is set for the leaf node, and the entry number of the leaf node is set in advance. The leaf node is updated when it is less than a predetermined limit, and the leaf node is not updated when the number of entries exceeds a predetermined limit. A first phase execution means for releasing the lock,
In the path from the root node to the leaf node, in the path from the root node to the parent node of the node specified by the mark hierarchy number, an intent exclusive lock is set on the highest layer node, and After setting the intent exclusive lock on the lower layer node immediately below the node , the procedure for releasing the intent exclusive lock set on the upper layer node immediately above the lower layer node is repeated toward the lower layer. And a second phase executing means for searching for the lowest second non-full entry node whose number of entries is less than a predetermined limit,
This second phase execution means
An exclusive lock setting means for setting an exclusive lock on each node in the path from the node specified by the mark hierarchy number to the leaf node;
Exclusive lock validity determining means for determining whether or not the exclusive lock set by the exclusive lock setting means is set for a node that exceeds the maximum number of entries due to the update of the leaf node and causes node division. When,
Node update means for updating the leaf node when it is determined that an exclusive lock is set for the node where the split occurs ;
Node resetting means for resetting the hierarchy number of the second non-full entry node as the hierarchy number for the mark when it is determined that an exclusive lock is not set for the node where the division occurs ;
A tree-structured data storage device comprising:
JP2005043023A 2005-02-18 2005-02-18 Directory update method, directory update program, and tree-structured data storage device Active JP4644002B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005043023A JP4644002B2 (en) 2005-02-18 2005-02-18 Directory update method, directory update program, and tree-structured data storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005043023A JP4644002B2 (en) 2005-02-18 2005-02-18 Directory update method, directory update program, and tree-structured data storage device

Publications (2)

Publication Number Publication Date
JP2006228060A JP2006228060A (en) 2006-08-31
JP4644002B2 true JP4644002B2 (en) 2011-03-02

Family

ID=36989378

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005043023A Active JP4644002B2 (en) 2005-02-18 2005-02-18 Directory update method, directory update program, and tree-structured data storage device

Country Status (1)

Country Link
JP (1) JP4644002B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5339507B2 (en) * 2008-10-01 2013-11-13 インターナショナル・ビジネス・マシーンズ・コーポレーション How to explore a tree structure
JP5712851B2 (en) 2011-07-29 2015-05-07 富士通株式会社 Data division apparatus, data division method, and data division program
JP6107429B2 (en) 2013-05-30 2017-04-05 富士通株式会社 Database system, search method and program
JP6188607B2 (en) * 2014-03-10 2017-08-30 株式会社日立製作所 Index tree search method and computer
US10404664B2 (en) 2016-10-25 2019-09-03 Arm Ip Limited Apparatus and methods for increasing security at edge nodes

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5089952A (en) * 1988-10-07 1992-02-18 International Business Machines Corporation Method for allowing weak searchers to access pointer-connected data structures without locking
JP3441807B2 (en) * 1994-09-19 2003-09-02 株式会社日立製作所 B-tree index management method and system

Also Published As

Publication number Publication date
JP2006228060A (en) 2006-08-31

Similar Documents

Publication Publication Date Title
US7716182B2 (en) Version-controlled cached data store
EP2356560B1 (en) Atomic multiple modification of data in a distributed storage system
US11556501B2 (en) Determining differences between two versions of a file directory tree structure
US7827374B2 (en) Relocating page tables
US6868414B2 (en) Technique for serializing data structure updates and retrievals without requiring searchers to use locks
US20080177742A1 (en) Efficient support of consistent cyclic search with read-copy-update
JP2565658B2 (en) Resource control method and apparatus
JP2002503000A (en) Systems and methods for developing websites
US20070288720A1 (en) Physical address mapping framework
JP2007041859A (en) File management program, file management apparatus and file management method
JP4644002B2 (en) Directory update method, directory update program, and tree-structured data storage device
JP2023512247A (en) Managing Objects in Shared Cache Using Multiple Chains
US8131700B2 (en) Transitioning clone data maps and synchronizing with a data query
JP4971717B2 (en) Directory distributed storage device and data processing request transfer program
US9588985B2 (en) Reducing blocking instances in parallel processing systems performing operations on trees
KR101623631B1 (en) Cache memory structure and method
JP6323887B2 (en) Method and device for changing root node
JPH05307478A (en) Constituting method for data base management system
JP4825504B2 (en) Data registration / retrieval system and data registration / retrieval method
EP3995972A1 (en) Metadata processing method and apparatus, and computer-readable storage medium
JPH09293055A (en) System and method for exclusive control over shared file in loosely coupled multiple computer system, and medium for storing exclusive control program
Singh et al. A relaxed balanced lock-free binary search tree
JP3420255B2 (en) Distributed resource management controller
Ramachandran Concurrent binary search trees: Design and optimizations
SIG DCED: THE DCE HOST DAEMON—PROGRAMMER’S API

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071001

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100727

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100924

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: 20101109

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101203

R150 Certificate of patent or registration of utility model

Ref document number: 4644002

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131210

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250