JPS6148034A - Dynamic size changing system of hashing table - Google Patents

Dynamic size changing system of hashing table

Info

Publication number
JPS6148034A
JPS6148034A JP59169338A JP16933884A JPS6148034A JP S6148034 A JPS6148034 A JP S6148034A JP 59169338 A JP59169338 A JP 59169338A JP 16933884 A JP16933884 A JP 16933884A JP S6148034 A JPS6148034 A JP S6148034A
Authority
JP
Japan
Prior art keywords
symbol
hashing
command
search
name
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
JP59169338A
Other languages
Japanese (ja)
Inventor
Kazuo Masai
一夫 正井
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP59169338A priority Critical patent/JPS6148034A/en
Publication of JPS6148034A publication Critical patent/JPS6148034A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To obtain a retrieval method by which even if the number of a symbol is changed, a retrieval efficiency is not lowered, and an usually and unnecessarily large hashing table is not required by changing dynamically the size of a hashing table in accordance with the number of a symbol. CONSTITUTION:In a table retrieval, the name of a command symbol is given to a hashing function 18, an entry in a hashing table 15 is obtained and from this entry, a symbol name is searched to obtain a suitable value. If the collision of the symbol name is generated and the hashing values overlaps, the processing is doned by using an overflow table 16. When an operator of TSS terminal enters LOGON command and begins TSS session, an initializing routine 6 begins to operate, reads a command symbol from a data set 8 for profiling a command and extends it to a symbol table.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、ハツシング手法を用いた記号テーブルの検索
に係り、特に記号数が動的に大きく変化する記号テーブ
ルの検索方式に好適な、動的にハツシングテーブルと関
数を変更する方式〔発明の背景〕 従来のハツシング手法を用いた記号テーブルの検索方式
では、ハツシングテーブルの大きさや、ハツシング関数
が固定となっていたので、記号数がハツシングチープル
のエン) ’J 攻ニ近づくと、検索効率が落ちるとい
う欠点があった。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to a symbol table search using a hashing method, and in particular a dynamic method suitable for a symbol table search method in which the number of symbols dynamically changes significantly. [Background of the Invention] In the conventional symbol table search method using the hashing method, the size of the hashing table and the hashing function were fixed, so the number of symbols was Sing Cheeple's En) 'J It had the disadvantage that the search efficiency decreased as the attack approached.

これを防ぐには、不必要に大きなハツシングテーブルを
作って、ハツシングチープルカ満杯になることを防ぐ必
要があり、メモリの使用効率の低下をきたしていた。
To prevent this, it is necessary to create an unnecessarily large hashing table to prevent the hashing table from becoming full, resulting in a decrease in memory usage efficiency.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、記号数によってハツシングテーブルの
大きさを変更し、記号数が変更されていっても、検索効
率が落ちることなく、かつ常ニ不必要に大きなハツシン
グチープルヲ4−J ツ必要のない検索手法を提供する
ことにある。
An object of the present invention is to change the size of a hashing table depending on the number of symbols, so that even if the number of symbols is changed, the search efficiency does not decrease, and the hashing table is always unnecessarily large. The objective is to provide a search method that does not require any additional information.

〔発明の概要〕[Summary of the invention]

本発明は、電子計算機システム上で、記号名称とその対
応する値を登録するテーブルとハ。
The present invention provides a table for registering symbol names and their corresponding values on a computer system.

シング手法による検索メカニズムから成る記号テーブル
検索システムにおいて、記号Jkハツシング検索に用い
るハツシングチープルのサイズとハツシング関数を変更
して登録されている記号数が変動しても検索効率が落ち
ないようにすることをR?:tとするものである。
In a symbol table search system consisting of a search mechanism based on the sing method, the size of the hashing cheeple and the hashing function used for symbol Jk hashing searches are changed so that the search efficiency does not decrease even when the number of registered symbols changes. R to do? :t.

〔発明の実blIj例〕[Examples of actual inventions]

以下、本発明の一実施例を図を用いて説明する。−1第
1図は、本発明の一実施例として、タイムシェアリング
システム(TSS)の上に描築すレタコマンドプロファ
イルシステムの全貌を示ス。コマンドプロファイルシス
テムは、端末操作を行う各ユーザが各自のTSS環境を
作るために各種オプションや記憶値を格納するパーソナ
ルなデータ格納場所を提供するシステムである。本シス
テムでは、コマンド記号名称1という記Yン名称で、そ
の記号に対応するコマンド記号1直2という値を検索で
きる。第1図は、TSS端末6から電子計算機システム
4上のTSSにLQGQNした時に、端末モニタプログ
ラム5中の切!す1化ルーチン6がコマンドプロファイ
ル用データ七ット8から仮想記憶装置上にコマンド記号
テーブル9を作成し、LOGOFF時ニ61 了ルーチ
ン7がコマンドプロファイル用データセント8にコマン
ド記号テーブル9の内容を格納することを表わす。TS
Sでは、LOGONから1,0GOFFまでの端末操作
単位を’rss−trショント呼び、そのTSSセショ
ン中は、s: s Sのコマンドプロセッサ11、ユー
ザ作成のプログラム12、及びコマンドをマクロ化した
コマンドプロシジャ13からコマンド記号マクロ群10
を通してアクセスできる。
An embodiment of the present invention will be described below with reference to the drawings. -1 FIG. 1 shows the entire outline of a letter command profile system built on a time sharing system (TSS) as an embodiment of the present invention. The command profile system is a system that provides a personal data storage location for each user who operates a terminal to store various options and stored values in order to create his or her own TSS environment. In this system, with the notation name ``command symbol name 1'', it is possible to search for the value ``command symbol 1 straight 2'' corresponding to that symbol. FIG. 1 shows the OFF message in the terminal monitor program 5 when LQGQN is sent from the TSS terminal 6 to the TSS on the computer system 4. The processing routine 6 creates a command symbol table 9 on the virtual storage device from the command profile data bit 8, and at LOGOFF, the completion routine 7 writes the contents of the command symbol table 9 to the command profile data bit 8. Indicates to store. T.S.
In S, the unit of terminal operation from LOGON to 1,0GOFF is called 'rss-tr', and during that TSS session, the command processor 11 of s:s S, the user-created program 12, and the command procedure that is a macro command 13 to command symbol macro group 10
It can be accessed through.

第2図は、コマンド記号テーブル9の詳細を示す。コマ
ンド記号テーブル9は、コマンド記号管理テーブル14
、ハツシングテーブル15とそのオーバー70−テーブ
ル16、及びコマンド記号名称−値テーブル17から成
る。本テーブルを検索するには、コマンド記号名称をハ
ツシング関数1Bに渡し ハツシングテーブル中のエン
トリを求める。本エントリから記号名称を捜し当て値を
得る。もし記号名の面突が発生し、ハツシングエントリ
が重なった時には、オーバ70−テーブルを1史用する
。オーバフローテーブルのサーチは、順に行う。
FIG. 2 shows details of the command symbol table 9. The command symbol table 9 is the command symbol management table 14.
, a hashing table 15 and its over 70-table 16, and a command symbol name-value table 17. To search this table, pass the command symbol name to the hashing function 1B to find the entry in the hashing table. Find the symbol name from this entry and get the value. If a conflict of symbol names occurs and hashing entries overlap, one over-70-table is used. The overflow table is searched sequentially.

第3図は、TSS端末操作者がLOGONフマ〉ドを投
入してTSSセションを開始した時に動作する初凹化用
ルーチン6の静細を示す。
FIG. 3 shows the details of the initialization routine 6 that operates when the TSS terminal operator inputs the LOGON password and starts a TSS session.

本ルーチンは、コマンドプロファイル用データセクト8
からコマンド記号を読み込みコマンド1;己号テーフ′
ルに展IJi□Jする。コマンドプロファイル用データ
セクト8の1長初のレコードには、記号数カ・ノンタ1
9が洛納されていて、1υ初にこのカウンタ11白を1
1完み込み、ハツシングチープルのサイズとハツシング
関数を第41図、第5図に示すアルゴリズムで決める。
This routine executes command profile data sector 8.
Read the command symbol from Command 1;
Exhibition IJi□J to Le. The first record of length 1 in command profile data sector 8 contains the number of symbols and nonta 1.
9 is in Rakuno, and this counter 11 white is 1 at the beginning of 1υ.
1. The size of the hatching cheeple and the hashing function are determined by the algorithm shown in FIGS. 41 and 5.

その後、コマンドプロファイル;11データセツトの第
2レコード以降に格納されているコマンド記号を一つづ
つテーブルに登録する。
Thereafter, the command symbols stored after the second record of the command profile 11 data set are registered one by one in the table.

第4図は、ハツシングテーブルのサイズを決定するアル
ゴリズム・を示ず。本アルゴリズムは、ハツシングチー
プルの検索効率が落ちないように予裕を見込み、コマン
ド記号カウンタ19の値が0から50までは100エン
ドす、51から100までは200エントリ、それ以上
はカウンク誼の2倍のエントリを作成している。ハツシ
ングテーブルのサイズを決めるとともに、ハツシング関
数18ヲハツシングテーブルにできるだけ均一に振り分
ける様に、第5図のアルゴリズムで決める0 @511!;i、ハクシングルA政のアルゴリズムを示
ス。この関数では、ハツシングテーブルのエントリ数で
記号名称をコード化して16弗の1桁おきに抽出した値
をt;1っている。このため、ハツシングテーブルのサ
イズか変っても、ハツシング関数はI’tTにハツシン
グテーブル全体をできるだけ均一に使うことになる。
FIG. 4 does not show the algorithm for determining the size of the hashing table. This algorithm assumes a margin so that the search efficiency of Hashing Cheeple does not decrease.If the value of the command symbol counter 19 is from 0 to 50, there will be 100 entries, if the value is from 51 to 100, it will be 200 entries, and if the value is from 51 to 100, it will be counted. has created twice as many entries. In addition to determining the size of the hashing table, the algorithm shown in Figure 5 is used to distribute the hashing functions 18 to the hashing table as evenly as possible. ;i, shows the algorithm of hacking single A politics. In this function, the symbol name is encoded by the number of entries in the hashing table, and the value extracted every other digit of 16 is t;1. Therefore, even if the size of the hashing table changes, the hashing function uses the entire hashing table for I'tT as uniformly as possible.

第6図は、コマンド記号を参照・登録・変更・削除する
コマンド記号マクロ群10を示す。コマンド記号のアク
セスは、必ずこのマクロを用いる。このマクロを;1B
シてコマンド記号を登;Q;Aする時にはコマンド記号
カウンタ19ご1増し、フマント記号を削除する時には
1減らす。このため、コマンド記号カウンタ19は、常
に現状のコマンド記−3故が保たれる。
FIG. 6 shows a command symbol macro group 10 for referencing, registering, changing, and deleting command symbols. Always use this macro to access command symbols. This macro;1B
The command symbol counter 19 is incremented by 1 when registering a command symbol;Q;A, and decremented by 1 when deleting a humanto symbol. Therefore, the command symbol counter 19 always maintains the current command number -3.

第7図は、端末i−☆作者がLOGOFFコマンドを役
人してTSSセションを終了させる時1・I’ii+ 
t’s:する終J′ルーチン7の詐≦二〇1全示す。本
ルーチンは、コマンド記号カウンタ19をコマンドプロ
フチイル1[1データセントに11シき込み、その後コ
マンド記号名称とfil’fを書きiΔむ。こ(−で作
成したコマンドプロファイル用データセットG11t、
次の機会に1,0GONL/た時に読み込ま1する。
Figure 7 shows terminal i-☆ when the author executes the LOGOFF command to terminate the TSS session 1・I'ii+
t's: End J' Routine 7 fraud≦201. This routine writes 11 entries into the command symbol counter 19 into the command profile 1[1 data center, and then writes the command symbol name and fil'f. Command profile data set G11t created with this (-),
Next time, when 1,0 GONL/ is obtained, it will be read and set to 1.

−回のTSSセションで多くのコマンド記号を登録する
と、次のTSSセションでは、大きなハツシングテーブ
ルとなり検索効率か落ちない。また、ゾj1“li木か
らa M D P ROFコマンドを投入することによ
り、”rSsセション中に71ツシングテープルサイズ
?変史することができる。
If a large number of command symbols are registered in - times of TSS sessions, the hashing table becomes large in the next TSS session, and the search efficiency does not deteriorate. In addition, by inputting the a M D P ROF command from the ``li'' tree, the ``71 twinning table size?'' is generated during the rSs session. It can change history.

以上の説明で明らかなように、本実施例によれば、コマ
ンド記−写のjl(が増加した時には、より大きなハツ
シングテーブルを作り、減少した時には、より小さなハ
ツシングテーブル2作るので、検索効率を落さずにメモ
リを可1約できるという効果がある。
As is clear from the above explanation, according to this embodiment, when jl( of the command description increases, a larger hashing table 2 is created, and when it decreases, a smaller hashing table 2 is created. This has the effect of making it possible to reduce the amount of memory required without reducing efficiency.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、ハツシングテーブルを用いた検索シス
テムで、ハツシングテーブルのサイズを動的に変更でき
るので、サイズの変更から次の変更までの間に登録記号
数の増減が50%以下であれば、平均で2回以内の検索
比較で済み・かつ記憶領域も登録記号数の2倍のエン)
 IJ Mで済むという効果がある。
According to the present invention, in a search system using a hashing table, the size of the hashing table can be dynamically changed, so that the number of registered symbols increases or decreases by 50% or less between one size change and the next change. If there is, on average, only two search comparisons will be required and the storage space will be twice as large as the number of registered symbols)
There is an effect that IJM can be used.

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

第1図はコマンドプロファイルシステムの全貌を表わす
ブロック図、第2図はコマンド記号の詳細を示すブロッ
ク図、第3図はコマンド記号テーブル初期化処理の詳細
を示す構成図、第4図はハツシングテーブル作成アルゴ
リズムを示す説明図、第5図はハツシング関数を示す説
明図、第6図はコマンド記号マクロ群によるアクセス処
理を示すブロック図、′B7図はコマンド記号テーブル
格納処理の詳細を示す説明図である。 1・・・コマンド記号 2・・・コマンド記号値 3・・・TSS端末 4・・・電子計W(磯システム 5・・・ff1i、を末モニタプログラム6・・・初期
化ルーチン 7・・・格納ルーチン 9・・・コマンド記号テーブル 10・・・コマンド記号マクロ群 11・・・コマンドプロセッサ 12・・・ユーザプログラム 16・・コマンドプロシジャ 14・・・コマンド記号管理テーブル 15・・・ハツシングチープル 18・・・ハツシング関数 19・・・記号数カウンタ
Figure 1 is a block diagram showing the overall picture of the command profile system, Figure 2 is a block diagram showing details of command symbols, Figure 3 is a block diagram showing details of command symbol table initialization processing, and Figure 4 is a hashing diagram. Fig. 5 is an explanatory diagram showing the table creation algorithm, Fig. 5 is an explanatory diagram showing the hashing function, Fig. 6 is a block diagram showing access processing using a command symbol macro group, and Fig. 'B7 is an explanatory diagram showing details of command symbol table storage processing. It is. 1...Command symbol 2...Command symbol value 3...TSS terminal 4...Electronic meter W (Iso system 5...ff1i, end monitor program 6...Initialization routine 7... Storage routine 9...Command symbol table 10...Command symbol macro group 11...Command processor 12...User program 16...Command procedure 14...Command symbol management table 15...Hashing cheaple 18... Hashing function 19... Symbol number counter

Claims (1)

【特許請求の範囲】[Claims] 1、電子計算機システム上で、記号名称とその対応する
値を登録するテーブルとハッシング手法による検索メカ
ニズムから成る記号テーブル検索システムにおいて、記
号数カウンタで検索に用いるハッシングテーブルのサイ
ズとハッシング関数を変更して登録されている記号数が
変動しても検索効率が落ちないようにすることを特徴と
するハッシングテーブルの動的サイズ変更方式。
1. In a symbol table search system on a computer system that consists of a table in which symbol names and their corresponding values are registered and a search mechanism using a hashing method, the size of the hashing table and the hashing function used for the search are changed using a symbol number counter. A method for dynamically changing the size of a hashing table, which is characterized in that search efficiency does not decrease even if the number of symbols registered in the hashing table changes.
JP59169338A 1984-08-15 1984-08-15 Dynamic size changing system of hashing table Pending JPS6148034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59169338A JPS6148034A (en) 1984-08-15 1984-08-15 Dynamic size changing system of hashing table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59169338A JPS6148034A (en) 1984-08-15 1984-08-15 Dynamic size changing system of hashing table

Publications (1)

Publication Number Publication Date
JPS6148034A true JPS6148034A (en) 1986-03-08

Family

ID=15884703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59169338A Pending JPS6148034A (en) 1984-08-15 1984-08-15 Dynamic size changing system of hashing table

Country Status (1)

Country Link
JP (1) JPS6148034A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02231675A (en) * 1989-01-31 1990-09-13 Internatl Business Mach Corp <Ibm> Information retrieving apparatus and method
JPH03245266A (en) * 1990-02-23 1991-10-31 Casio Comput Co Ltd Memory access device
JP2003337834A (en) * 2002-04-29 2003-11-28 Internatl Business Mach Corp <Ibm> Resizable cache sensitive hash table

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02231675A (en) * 1989-01-31 1990-09-13 Internatl Business Mach Corp <Ibm> Information retrieving apparatus and method
JPH03245266A (en) * 1990-02-23 1991-10-31 Casio Comput Co Ltd Memory access device
JP2003337834A (en) * 2002-04-29 2003-11-28 Internatl Business Mach Corp <Ibm> Resizable cache sensitive hash table
US7085911B2 (en) 2002-04-29 2006-08-01 International Business Machines Corporation Resizable cache sensitive hash table

Similar Documents

Publication Publication Date Title
JP2002519751A (en) User profile driven information retrieval based on context
JP2769065B2 (en) Method and apparatus for use in a digital data processing system
EP0720107B1 (en) Word retrieval apparatus for a dictionnary
CN108763511A (en) Figure layer composition method, device, electronic equipment and storage medium in the page
US6269363B1 (en) Method of accessing data using approximate data structures by relaxing the operations that define same
JPS6148034A (en) Dynamic size changing system of hashing table
EP0799451B1 (en) Method for transforming a hash bucket number to a control interval to identify the physical location of information in a mass memory
JPH0991303A (en) Data management device
JP2874810B2 (en) Key memory allocation method
JPS6046456B2 (en) data access device
CN116467260A (en) File recording method, system, terminal and medium convenient for file searching
Kim et al. A new parallel signature file method for efficient information retrieval
JPH0394325A (en) Data selector
JP3111498B2 (en) Record search method and data processing device
CN111966691A (en) Configuration method and system for rapidly querying directory to which object belongs in distributed storage system
JPS613245A (en) Information processor
KR930011444B1 (en) Transforming method for korean alphabet code
JPS59191649A (en) Program production system
JPS635451A (en) Memory addressing system
JPH05173742A (en) Message data managing system
JP2000172542A (en) File access system
JPS63163546A (en) Data base update processing system
JPS63189934A (en) Sub-entry processing system for data base
JPH08194702A (en) Information processor and its character cacheing method
JPH09319649A (en) Device and method for discriminating address