JPH04257062A - Data processor using hash queue - Google Patents

Data processor using hash queue

Info

Publication number
JPH04257062A
JPH04257062A JP3039077A JP3907791A JPH04257062A JP H04257062 A JPH04257062 A JP H04257062A JP 3039077 A JP3039077 A JP 3039077A JP 3907791 A JP3907791 A JP 3907791A JP H04257062 A JPH04257062 A JP H04257062A
Authority
JP
Japan
Prior art keywords
hash
queue
data
hash function
functions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3039077A
Other languages
Japanese (ja)
Inventor
Jiyunzou Tokimitsu
時光 淳三
Masatake Iwakura
岩倉 正剛
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3039077A priority Critical patent/JPH04257062A/en
Publication of JPH04257062A publication Critical patent/JPH04257062A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To suppress the increase of queues at a minimum without using any overflow queue concerning the data processor using a hash queue to decide the registering position of data by applying a hash function as an item key value. CONSTITUTION:By providing a hash processing part 13 to prepare the plural hash functions decided the order of application and to successively apply the next hash function when there is no vacancy at the hash queue calculated by the hash function applied before, the queue to register data is decided by combining the hash functions on multiple stages.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は,データ項目のキーを特
定のハッシュ関数に従って,物理的な格納アドレスに変
換し,その場所にデータを登録するハッシュキューを用
いるデータ処理装置に関する。直接アクセスボリューム
に関するファイルの管理および類似するテーブル管理等
に利用することができる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus using a hash queue for converting the key of a data item into a physical storage address according to a specific hash function and registering data at that location. It can be used for managing files related to direct access volumes and similar table management.

【0002】0002

【従来の技術】図4は,従来技術の説明図である。登録
対象となるデータの,ある項目に特定のアルゴリズムに
よるハッシュ関数を適用し,その結果によって,図4の
(イ)に示すようなハッシュキュー15の一つのキュー
を選択してデータを登録することが行われている。デー
タの検索時にも,同じハッシュ関数を用いることにより
,データの格納位置を求める。
2. Description of the Related Art FIG. 4 is an explanatory diagram of the prior art. A hash function based on a specific algorithm is applied to a certain item of data to be registered, and depending on the result, one of the hash queues 15 as shown in (a) of FIG. 4 is selected and the data is registered. is being carried out. When searching for data, the same hash function is used to find the storage location of the data.

【0003】従来のハッシュ方式のキューテーブル管理
では,ハッシュキュー15に通常キュー15a〜15c
と,オーバーフローキュー15dとを設け,例えば図4
の(ロ)に示すように,ハッシュ処理部40により,項
目にハッシュ関数を適用して,結果をキュー番号とした
とき,そのキュー番号に対応する通常キュー(例えば通
常キュー15a)にデータが入り切らない場合には,オ
ーバーフローキュー15dに登録することにより対処す
るようにしている。
In conventional hash-based queue table management, the hash queue 15 has normal queues 15a to 15c.
and an overflow queue 15d, for example, as shown in FIG.
As shown in (b), when the hash processing unit 40 applies a hash function to the item and uses the result as a queue number, data is entered into the normal queue (for example, the normal queue 15a) corresponding to that queue number. If it is not turned off, it is handled by registering it in the overflow queue 15d.

【0004】0004

【発明が解決しようとする課題】従来技術では,キュー
に入り切らない項目について,すべてオーバーフロー項
目として,オーバーフローキュー15dに設定するため
,直接アクセスボリューム上のファイル管理をハッシュ
構造にすると,キューに設定される項目量がトラックサ
イズにより限定されるために,多くの項目がオーバーフ
ローキュー15dに設定されるという問題がある。
[Problem to be Solved by the Invention] In the prior art, all items that cannot fit in the queue are set as overflow items in the overflow queue 15d. Therefore, if the file management on the direct access volume is in a hash structure, the items that cannot be set in the queue are set in the overflow queue 15d. Since the amount of items to be stored is limited by the track size, there is a problem in that many items are set in the overflow queue 15d.

【0005】また,オーバフロー項目を減らすために,
キューの数を増やすことも考えられるが,資源が無駄に
なることが多く,また資源量に制約があって,キューを
増やすのが困難な場合もある。
[0005] Also, in order to reduce the number of overflow items,
Although it is possible to increase the number of queues, this often results in a waste of resources, and it may be difficult to increase the number of queues due to constraints on the amount of resources.

【0006】本発明は上記問題点の解決を図り,オーバ
フローキューを用いることなく,かつキューの増加を最
低限に抑えることができる手段を提供することを目的と
している。
SUMMARY OF THE INVENTION The present invention aims to solve the above-mentioned problems and provides a means for minimizing the increase in the number of queues without using an overflow queue.

【0007】[0007]

【課題を解決するための手段】図1は,本発明の原理説
明図である。図1において,10はCPUおよびメモリ
などからなるデータ処理装置,11はデータの登録を行
うデータ登録部,12は登録されているデータを検索す
るデータ検索部,13はハッシュ処理部,14は磁気デ
ィスク装置などの直接アクセスボリュームによるデータ
格納装置,15はハッシュキューを表す。
[Means for Solving the Problems] FIG. 1 is a diagram illustrating the principle of the present invention. In FIG. 1, 10 is a data processing device including a CPU and memory, 11 is a data registration unit that registers data, 12 is a data search unit that searches for registered data, 13 is a hash processing unit, and 14 is a magnetic A data storage device using a direct access volume such as a disk device, 15 represents a hash queue.

【0008】データ登録部11によりデータを登録する
場合およびデータ検索部12によりデータを検索する場
合に,ハッシュ処理部13によって,そのデータの格納
位置が求められる。
When data is registered by the data registration section 11 and when data is searched by the data search section 12, the storage location of the data is determined by the hash processing section 13.

【0009】本発明では,ハッシュ処理部13が用いる
ハッシュ関数が,複数用意されている。これらのハッシ
ュ関数F1,F2,…は,適用順序があらかじめ定めら
れている。データの項目に,最初のハッシュ関数F1を
適用し,結果のキュー番号Q1によりデータの格納位置
を決める。もし,キュー番号Q1に項目を格納する余裕
がなければ,オーバーフローキューを用いるのではなく
,次のハッシュ関数F2を用いてハッシングを行う。 そして,その結果のキュー番号Q2に項目を格納する。 キューに空きがなかった場合,さらに次のハッシュ関数
を用いてハッシングを行う。
[0009] In the present invention, a plurality of hash functions used by the hash processing section 13 are prepared. The application order of these hash functions F1, F2, . . . is determined in advance. The first hash function F1 is applied to the data item, and the storage position of the data is determined based on the resulting queue number Q1. If there is no room to store an item in queue number Q1, hashing is performed using the next hash function F2 instead of using an overflow queue. Then, the item is stored in the resulting queue number Q2. If there is no space in the queue, hashing is further performed using the following hash function.

【0010】0010

【作用】ハッシュ関数を複数用意し,あるハッシュ関数
で計算したキューに項目を格納するテーブルの余裕がな
かったとき,異なるハッシュ関数により計算を行い,別
のキューに項目を設定するようにする。
[Operation] Multiple hash functions are prepared, and when there is no room in the table to store an item in a queue calculated using a certain hash function, the calculation is performed using a different hash function and the item is set in another queue.

【0011】このように,異なった形態のハッシュ関数
を多段に適用することにより,オーバーフローキューを
用いず,かつキューの増加を最低限に抑えることができ
る。したがって,省資源化が可能になる。また,データ
は最初に格納可能なキューに設定することにより,検索
時の効率も維持できる。
[0011] In this way, by applying different types of hash functions in multiple stages, it is possible to avoid using an overflow queue and to minimize the increase in the number of queues. Therefore, it becomes possible to save resources. Additionally, by first setting data in a queue that can be stored, efficiency during searches can be maintained.

【0012】0012

【実施例】図2は,本発明の適用例を示す。磁気ディス
クなどの直接アクセスボリューム20には,そのボリュ
ームに格納されるファイルの管理情報を持つファイル管
理簿21が,特定のいくつかのトラックに設けられる。 なお,この情報をVTOC(Volume Table
 Of Contents)と呼ぶこともある。
Embodiment FIG. 2 shows an example of application of the present invention. In a direct access volume 20 such as a magnetic disk, a file management list 21 containing management information of files stored in the volume is provided in a number of specific tracks. Note that this information is stored as a VTOC (Volume Table
Of Contents).

【0013】1トラックを1ハッシュキューとして,フ
ァイル管理情報のハッシュ化を実現する。ハッシュ関数
の計算に用いるキー値は,ファイル名であり,直接アク
セスボリューム20上の各トラックを,ハッシュキュー
に対応させることにより,ファイル名から直ちにそのフ
ァイルの管理情報が格納されているトラックを決定でき
るようにする。
[0013] By using one track as one hash queue, file management information is hashed. The key value used to calculate the hash function is the file name, and by associating each track on the direct access volume 20 with a hash queue, the track in which the management information for that file is stored can be immediately determined from the file name. do it like this.

【0014】図3は,本発明の一実施例による処理フロ
ーチャートを示す。以下,図3に示す処理(a) 〜(
i) に従って,ファイル登録時における処理を説明す
る。なお,この例では説明の都合上,処理をループさせ
ているが,ループさせないで多段化を実現したほうが処
理が少し速くなる。 (a) 登録するファイル名をキー値とする。 (b) ループ変数nを1に初期化する。 (c) ファイル名のキー値に従って,あらかじめ定め
られた第n番目のハッシュ関数を計算する。
FIG. 3 shows a processing flowchart according to one embodiment of the present invention. Hereinafter, the process (a) shown in FIG.
i) Processing at the time of file registration will be explained according to . Note that in this example, the processing is performed in a loop for convenience of explanation, but the processing is slightly faster if multi-stage processing is realized without a loop. (a) Use the file name to be registered as the key value. (b) Initialize loop variable n to 1. (c) Calculate a predetermined n-th hash function according to the key value of the file name.

【0015】(d) 結果を図2に示す直接アクセスボ
リューム20のトラックアドレスとする。 (e) そのトラックにファイルの管理情報を登録する
余裕があるかどうかを判定し,余裕がある場合には,処
理(f) へ進み,余裕がない場合には,処理(g) 
へ進む。 (f) そのトラックの空き領域に,指定されたファイ
ルの管理情報を登録し,処理を終了する。
(d) The result is the track address of the direct access volume 20 shown in FIG. (e) Determine whether there is room to register file management information on that track. If there is space, proceed to process (f); if there is no space, proceed to process (g).
Proceed to. (f) Register the management information of the specified file in the free area of the track, and end the process.

【0016】(g) そのトラックの領域に空きがなけ
れば,次のハッシュ関数があるかどうかを判定する。次
のハッシュ関数があれば,処理(h) へ進む。なけれ
ば,処理(i) へ進む。 (h) nに1を加え,処理(c) 以下を繰り返す。 (i) すべてのハッシュ関数を適用しても空きのある
トラックが見つからなかった場合,登録不可としてエラ
ー終了する。
(g) If there is no free space in the area of the track, it is determined whether the next hash function exists. If there is the next hash function, proceed to process (h). If not, proceed to process (i). (h) Add 1 to n, and repeat the process (c) below. (i) If no empty track is found even after applying all the hash functions, registration is not possible and the process ends with an error.

【0017】以上,ファイル登録時の処理について説明
したが,ファイル検索時の処理も同様である。検索の場
合,ファイル名をキー値として,該当するファイルが見
つかるまで,ハッシュ関数を登録時と同じ順番で計算し
,ファイルの管理情報が格納されているトラックを求め
る。
Although the processing at the time of file registration has been described above, the processing at the time of file search is also similar. In the case of a search, hash functions are calculated in the same order as when the file was registered, using the file name as a key value, until the corresponding file is found, and the track in which the file management information is stored is determined.

【0018】[0018]

【発明の効果】以上説明したように,本発明によれば,
オーバーフローキューを用いる必要がなくなり,ハッシ
ュキューの有効利用が可能になるとともに,ハッシュキ
ューそのものの増加を軽減できるので,省資源化を図る
ことができる。
[Effect of the invention] As explained above, according to the present invention,
There is no need to use an overflow queue, making it possible to use hash queues effectively, and reducing the increase in the number of hash queues themselves, resulting in resource savings.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の原理説明図である。FIG. 1 is a diagram explaining the principle of the present invention.

【図2】本発明の適用例を示す図である。FIG. 2 is a diagram showing an example of application of the present invention.

【図3】本発明の一実施例による処理フローチャートで
ある。
FIG. 3 is a processing flowchart according to an embodiment of the present invention.

【図4】従来技術の説明図である。FIG. 4 is an explanatory diagram of the prior art.

【符号の説明】[Explanation of symbols]

10    データ処理装置 11    データ登録部 12    データ検索部 13    ハッシュ処理部 14    データ格納装置 15    ハッシュキュー 10   Data processing device 11 Data registration section 12 Data search section 13 Hash processing section 14 Data storage device 15 Hash queue

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  ハッシュ対象となる項目に所定のハッ
シュ関数を適用することにより,データを登録すべきハ
ッシュキュー(15)を定めるデータ処理装置(10)
において,適用順序が定められた複数のハッシュ関数(
F1,F2, …) を有し,先に適用したハッシュ関
数により求められたハッシュキュー(15)に空きがな
い場合に,次のハッシュ関数を順次適用するハッシュ処
理部(13)を備え,ハッシュ関数を多段に組み合わせ
るようにしたことを特徴とするハッシュキューを用いる
データ処理装置。
[Claim 1] A data processing device (10) that determines a hash queue (15) in which data should be registered by applying a predetermined hash function to an item to be hashed.
, multiple hash functions (
F1, F2, ...), and includes a hash processing unit (13) that sequentially applies the next hash function when there is no space in the hash queue (15) obtained by the previously applied hash function. A data processing device using a hash queue, characterized in that functions are combined in multiple stages.
JP3039077A 1991-02-08 1991-02-08 Data processor using hash queue Pending JPH04257062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3039077A JPH04257062A (en) 1991-02-08 1991-02-08 Data processor using hash queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3039077A JPH04257062A (en) 1991-02-08 1991-02-08 Data processor using hash queue

Publications (1)

Publication Number Publication Date
JPH04257062A true JPH04257062A (en) 1992-09-11

Family

ID=12543050

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3039077A Pending JPH04257062A (en) 1991-02-08 1991-02-08 Data processor using hash queue

Country Status (1)

Country Link
JP (1) JPH04257062A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102010049290A1 (en) 2009-11-11 2011-05-26 Seiko Instruments Inc. Clock part and clock
JP2015513146A (en) * 2012-02-24 2015-04-30 シンプリヴィティ・コーポレーション Method and apparatus for arranging content-derived data in memory
JP2015515047A (en) * 2012-02-24 2015-05-21 シンプリヴィティ・コーポレーション Method and apparatus utilizing non-uniform hash function to place records in non-uniform access memory

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102010049290A1 (en) 2009-11-11 2011-05-26 Seiko Instruments Inc. Clock part and clock
JP2015513146A (en) * 2012-02-24 2015-04-30 シンプリヴィティ・コーポレーション Method and apparatus for arranging content-derived data in memory
JP2015515047A (en) * 2012-02-24 2015-05-21 シンプリヴィティ・コーポレーション Method and apparatus utilizing non-uniform hash function to place records in non-uniform access memory
US9875183B2 (en) 2012-02-24 2018-01-23 Hewlett Packard Enterprise Development Lp Method and apparatus for content derived data placement in memory

Similar Documents

Publication Publication Date Title
JPH09293006A (en) Method for dividing parallel database and control system thereof
JPH04257062A (en) Data processor using hash queue
JP2865831B2 (en) Parallel string search device
JP2625382B2 (en) File allocation system
US5706513A (en) System and method for queuing an retrieving data objects to and from a shared storage medium
JPH03266046A (en) Data base high speed access method
JP2871755B2 (en) Split control method in dynamic hash
JPH0728836A (en) Data base retrieving method and data base system using this method
JP3245873B2 (en) File processing device
Lin Cat: An execution model for concurrent full text search
JPS60254342A (en) Controlling method of resources in using
JP2740572B2 (en) Program loading method
JPH06332799A (en) Tree information storage system
JP3111498B2 (en) Record search method and data processing device
JPH0561739A (en) Swap file managing system
JPH02190946A (en) Keyword control system
JPH05313963A (en) Deciding system for storing block to data file
JPH04101272A (en) Data element retrieving method
JPH0546448A (en) File management method for auxiliary storage device
JPH113260A (en) Database management method
JPH04178878A (en) Table record retrieving system
JPH07129467A (en) Memory controlling method for information processor
JPH04116728A (en) Retrieval processing system in repetitive library search
JP2004078974A (en) Data storage control method and data processing system
JPS63167942A (en) File control system