JPH1021053A - Data processor - Google Patents

Data processor

Info

Publication number
JPH1021053A
JPH1021053A JP17227396A JP17227396A JPH1021053A JP H1021053 A JPH1021053 A JP H1021053A JP 17227396 A JP17227396 A JP 17227396A JP 17227396 A JP17227396 A JP 17227396A JP H1021053 A JPH1021053 A JP H1021053A
Authority
JP
Japan
Prior art keywords
record
input means
sort
sorted
sort processor
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
JP17227396A
Other languages
Japanese (ja)
Inventor
Shinsuke Azuma
辰輔 東
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP17227396A priority Critical patent/JPH1021053A/en
Publication of JPH1021053A publication Critical patent/JPH1021053A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To execute the sort and merge of massive data at a high speed without considerably increasing hardware by providing 2nd input means at the sort processors of respective steps in addition to 1st input means, merging plural sorted record streams inputted from these 2nd input means, and outputting a single sorted record stream. SOLUTION: Memories 111-114 are connected to respective sort processors 121-124 and these one-dimensionally connected sort processors 121-124 are provided with 1st input means 161a-164a composed of receivers and registers and 2nd input means 161b-164b similarly composed of receivers and registers. Then, the output of the sort processor 121 is connected to the 1st input means 162a of the sort processor 122, circuit configuration for merge as a 2nd mode is provided in addition to the circuit configuration of pipeline margin sorter as a 1st mode, and both the modes are used while being switched.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、データベース処理
におけるソートおよびマージのハードウェアでの実現方
式で、特にパイプラインマージソータにおける改良に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for implementing sorting and merging in database processing by hardware, and more particularly to an improvement in a pipeline merge sorter.

【0002】[0002]

【従来の技術】一般に、データベースの要素であるレコ
ードは複数のフィールドから構成される。あるフィール
ドをキーとして、レコードを昇順あるいは降順に並び替
える処理をソートという。また、ソート済みのレコード
列が複数ある場合に、それらをひとつのソートされたレ
コード列に再編成する処理をマージという。
2. Description of the Related Art In general, a record which is an element of a database is composed of a plurality of fields. The process of sorting records in ascending or descending order using a certain field as a key is called sorting. When there are a plurality of sorted record strings, a process of reorganizing them into one sorted record string is called merging.

【0003】ソートあるいはマージをソフトウェアで行
なう場合、プロセッサとメモリ、ディスクなどの補助記
憶装置との間で大量のデータが行き交い、処理に時間を
要する。それに対し、ソートを高速に処理するハードウ
ェアとしてパイプラインマージソータなどが存在する。
When sorting or merging is performed by software, a large amount of data is exchanged between a processor and an auxiliary storage device such as a memory or a disk, and a long time is required for processing. On the other hand, there is a pipeline merge sorter or the like as hardware for performing high-speed sorting.

【0004】図7は、例えば「VLSIソートプロセッ
サ」(情報処理、Vol.31、No.4、1990
年)に記載されているパイプラインマージソータの構成
図である。図において、101、102、103、10
4は1次元接続されるソートプロセッサ、111〜11
4は各ソートプロセッサに接続されるメモリである。
FIG. 7 shows, for example, “VLSI sort processor” (information processing, Vol. 31, No. 4, 1990).
2) is a configuration diagram of a pipeline merge sorter described in (1). In the figure, 101, 102, 103, 10
4 is a one-dimensionally connected sort processor, 111 to 11
Reference numeral 4 denotes a memory connected to each sort processor.

【0005】パイプラインマージソータでは、n段目の
ソートプロセッサがn−1段目のソートプロセッサから
それぞれ2n-1レコードからなる2組のソート済みレコ
ード列を入力し、マージして2nレコードからなる1組
のソート済みレコード列を出力する。各ソートプロセッ
サに接続されるメモリには、入力される2組のレコード
列のうち第1のレコード列が格納される。パイプライン
マージソータを用いたソートのプロセスを図8に示す。
図において、101からの出力の段では、数字列の数字
2個づつを単位にソートした結果が記録されている。ま
た、次段の102からの出力では、数字列の数字4個づ
つを単位にソートした結果が記録されている。103か
らの出力では数字8個づつを単位にソートした結果が記
録され、最終的に104からの出力において全体のソー
トが終了する。
In a pipeline merge sorter, an n-th sort processor inputs two sets of sorted record strings each composed of 2 n-1 records from an ( n-1) -th sort processor, and merges them into 2 n records. Output a set of sorted record strings consisting of The memory connected to each sort processor stores the first record string of the two sets of input record strings. FIG. 8 shows a process of sorting using a pipeline merge sorter.
In the figure, in the output stage from 101, the result of sorting in units of two numbers in the number string is recorded. Also, in the output from the next stage 102, the result of sorting in units of four numbers in the number string is recorded. In the output from 103, the result of sorting in units of eight numbers is recorded, and finally, in the output from 104, the entire sorting is completed.

【0006】このようなハードウェアでは1回にソート
できるデータ量に限度がある。通常、その限度を超える
量のデータをソートする場合には、まずデータ全体を1
回にソートできるレコード列に分割し、各レコード列を
ハードウェアでソートしてから、その結果生成された複
数のソート済みレコード列をソフトウェアあるいはハー
ドウェアでマージするという手法がとられる。
With such hardware, the amount of data that can be sorted at one time is limited. Normally, when sorting data that exceeds the limit, first sort the entire data by 1
A method is adopted in which a record row is divided into record rows that can be sorted at a time, each record row is sorted by hardware, and a plurality of sorted record rows generated as a result are merged by software or hardware.

【0007】ただし、上述した通り、ソフトウェアでマ
ージを行なう場合、処理に時間がかかる。ハードウェア
でマージを行なう手段の一例として、特開昭62−15
4140号公報の構成図を図9に示す。図において、2
01および202はソート装置、203はマージ装置で
ある。ソート装置201および202はそれぞれレコー
ド列を入力しソートを施して、ソート済みレコード列を
マージ装置203に入力する。マージ装置203は入力
された2組のソート済みレコード列をマージして出力す
る。このような構成にすることによって、1回ではソー
トしきれない量のデータを、パイプライン的に高速にソ
ートすることができる。
[0007] However, as described above, when merging is performed by software, it takes a long time to process. Japanese Patent Application Laid-Open No. 62-15 / 1987 discloses an example of means for performing merging with hardware.
FIG. 9 shows a configuration diagram of Japanese Patent No. 4140. In the figure, 2
01 and 202 are sorting devices, and 203 is a merging device. Each of the sorting devices 201 and 202 inputs and sorts a record sequence, and inputs the sorted record sequence to the merge device 203. The merging device 203 merges and outputs the input two sets of sorted record strings. With such a configuration, an amount of data that cannot be sorted at one time can be sorted at a high speed in a pipeline manner.

【0008】[0008]

【発明が解決しようとする課題】従来の方法では、マー
ジ専用のハードウェアを必要とし、さらに1回でソート
可能なデータ量を2倍にするためにソート装置を2個も
つ必要があり、ハードウェア規模が大きくなるという問
題があった。また、従来の方法では、1回でソート可能
なデータ量を高々2倍に増加するにとどまり、それを超
える量のデータをソートするには、ソフトウェアでマー
ジするかあるいはさらにハードウェアを追加する必要が
あり、処理時間が増加するあるいはハードウェア規模が
増大するという問題があった。
In the conventional method, hardware dedicated to merging is required, and two sort devices are required to double the amount of data that can be sorted at one time. There was a problem that the wear scale became large. Further, in the conventional method, the amount of data that can be sorted at one time is increased at most twice, and in order to sort the data exceeding that amount, it is necessary to merge with software or add additional hardware. There is a problem that the processing time increases or the hardware scale increases.

【0009】本発明はこのような問題を解決するために
なされたもので、ハードウェアの大きな増加なしに、大
量のデータのソートおよびマージを高速に実行すること
を可能とするデータ処理装置を提供することを目的とし
ている。
The present invention has been made to solve such a problem, and provides a data processing apparatus capable of executing a large amount of data sorting and merging at high speed without a large increase in hardware. It is intended to be.

【0010】[0010]

【課題を解決するための手段】この発明に係るデータ処
理装置は、メモリを有するn段目のソートプロセッサが
n−1段目のソートプロセッサからそれぞれ2n-1レコ
ードからなる2組のソート済みレコード列を入力しマー
ジして2nレコードからなる1組のソート済みレコード
列を出力するパイプラインマージソータにおいて、上記
ソート済みレコード列を入力する第1の入力手段とは別
に、上記各段のソートプロセッサに第2の入力手段を備
え、この第2の入力手段から入力した複数のソート済み
レコード列をマージし単一のソート済みレコード列を出
力するものである。
According to a data processor according to the present invention, an n-th sort processor having a memory has two sets of 2 n-1 records each having 2 n-1 records from an ( n-1) -th sort processor. In a pipeline merge sorter for inputting and merging record sequences and outputting a set of sorted record sequences of 2 n records, apart from the first input means for inputting the sorted record sequences, each of the above-mentioned stages is The sort processor is provided with a second input means, and a plurality of sorted record strings input from the second input means are merged to output a single sorted record string.

【0011】また、メモリを有するn段目のソートプロ
セッサがn−1段目のソートプロセッサからそれぞれ2
n-1レコードからなる2組のソート済みレコード列を第
1の入力手段から入力しマージして2nレコードからな
る1組のソート済みレコード列を出力するパイプライン
マージソータにおいて、上記パイプラインマージソータ
において全体のソート処理を繰り返し行うことにより得
られた複数組のソート済みレコード列を格納する記憶装
置、この記憶装置に格納された各組のレコード列から予
め設定された一定長のレコードを読みだし上記各段のソ
ートプロセッサに転送するデータ転送制御装置、上記レ
コードを上記各段のソートプロセッサに入力する第2の
入力手段を備え上記複数組のソート済みレコード列をマ
ージし単一のソート済みレコード列にするものである。
[0011] Further, the n-th sort processor having a memory is two times from the (n-1) -th sort processor.
a pipeline merge sorter for inputting and merging two sets of sorted record strings consisting of n-1 records from a first input means and outputting a set of sorted record rows consisting of 2 n records; A storage device for storing a plurality of sets of sorted record sequences obtained by repeatedly performing the entire sort process in the sorter, and reading a predetermined fixed length record from each set of record sequences stored in the storage device; A data transfer control device for transferring the records to the sort processors of the respective stages; and a second input means for inputting the records to the sort processors of the respective stages. It is a record sequence.

【0012】さらに、上記転送制御装置は、上記各段の
ソートプロセッサの第2の入力手段を監視し、第2の入
力手段のレコード長が予め設定した一定長以下のときは
後続のレコードを上記記憶装置から読みだし当該ソート
プロセッサに転送するものである。
Further, the transfer control device monitors the second input means of the sort processor at each stage, and when the record length of the second input means is equal to or less than a predetermined fixed length, the transfer control apparatus transmits the subsequent record to the second input means. The data is read from the storage device and transferred to the sort processor.

【0013】また、上記各段のソートプロセッサはそれ
ぞれの第2の入力手段を監視し、第2の入力手段のレコ
ード長が予め設定した一定長以下のときは後続のレコー
ドを上記記憶装置から読みだし当該ソートプロセッサに
転送することを上記転送制御装置に要求するものであ
る。
Each of the sort processors in each stage monitors the respective second input means, and when the record length of the second input means is equal to or less than a predetermined length, reads a subsequent record from the storage device. However, the transfer control device requests the transfer control device to transfer the data to the sort processor.

【0014】さらにまた、上記転送制御装置は、上記記
憶装置に格納された各組のレコード列から予め設定され
た一定長のレコードを読みだし格納するバッファを備え
たものである。
Further, the transfer control device includes a buffer for reading and storing a record of a predetermined fixed length from each set of record strings stored in the storage device.

【0015】また、上記転送制御装置は、上記バッファ
を監視し、レコード長が予め設定した一定長以下のとき
は当該レコード列の後続のレコードを上記記憶装置から
読みだし上記バッファに格納するものである。
The transfer control device monitors the buffer, and when the record length is equal to or less than a predetermined length, reads out a record subsequent to the record sequence from the storage device and stores the record in the buffer. is there.

【0016】さらに、上記第1の入力手段に入力された
データを当該ソートプロセッサのメモリに格納するもの
である。
Further, the data inputted to the first input means is stored in a memory of the sort processor.

【0017】また、上記第2の入力手段に入力されたデ
ータを当該ソートプロセッサのメモリに格納するもので
ある。
Further, the data inputted to the second input means is stored in a memory of the sort processor.

【0018】さらにまた、メモリを有するn段目のソー
トプロセッサがn−1段目のソートプロセッサからそれ
ぞれ2n-1レコードからなる2組のソート済みレコード
列を第1の入力手段から入力しマージして2nレコード
からなる1組のソート済みレコード列を出力するパイプ
ラインマージソータにおいて、上記パイプラインマージ
ソータにおいて全体のソート処理を繰り返し行うことに
より得られた複数組のソート済みレコード列を格納する
記憶装置、この記憶装置に格納された各組のレコード列
から予め設定された一定長のレコードを読みだし上記各
段のソートプロセッサに接続されたメモリに転送するデ
ータ転送制御装置、そのメモリに格納されたレコードを
上記各段のソートプロセッサに入力する第2の入力手段
を備え上記複数組のソート済みレコード列をマージし単
一のソート済みレコード列にするものである。
Further, an n-th sort processor having a memory inputs two sets of sorted record strings each consisting of 2 n-1 records from the ( n-1) th sort processor from the first input means and merges them. And outputs a set of sorted record strings consisting of 2 n records, and stores a plurality of sorted record strings obtained by repeatedly performing the entire sort processing in the pipeline merge sorter. A data transfer control device that reads a record of a predetermined length that is set in advance from each set of record strings stored in the storage device, and transfers the read record to a memory connected to the sort processor at each stage. A second input means for inputting the stored records to the sort processors of the respective stages; To merge the over door already record column is intended to be a single sorted record column.

【0019】[0019]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

実施の形態1.図1は本発明の一実施例であるデータ処
理装置を示すものである。図において、111、11
2、113、114は各ソートプロセッサに接続されて
いるメモリである。121、122、123、124は
1次元接続されるソートプロセッサであり、レシーバと
レジスタからなる第1の入力手段161aと同じくレシ
ーバとレジスタからなる第2の入力手段161bを備え
ている。ソートプロセッサ121の出力はソートプロセ
ッサ122の第1の入力手段に接続され、ソートプロセ
ッサ122の出力はソートプロセッサ123の第1の入
力手段に接続され、ソートプロセッサ123の出力はソ
ートプロセッサ124の第1の入力手段に接続されてい
る。ソートプロセッサ121は、第1のモードであるパ
イプラインマージソータとしての回路構成とは別に、第
2のモードとしての図1に示すマージ用としての回路構
成を有しており、両モードは切り替えて使用するように
構成されている。図において、ソートプロセッサ121
は2つの入力を比較して小さい方あるいは大きい方を出
力する比較回路141と、141の一方の入力に接続さ
れ第2のデータ入力手段161bあるいはメモリ111
を選択する選択回路151より構成されている。ソート
プロセッサ122、123、124も同様である。
Embodiment 1 FIG. FIG. 1 shows a data processing apparatus according to one embodiment of the present invention. In the figure, 111, 11
2, 113 and 114 are memories connected to each sort processor. Reference numerals 121, 122, 123, and 124 denote one-dimensionally connected sort processors, each including a first input unit 161a including a receiver and a register, and a second input unit 161b including a receiver and a register. The output of the sort processor 121 is connected to first input means of the sort processor 122, the output of the sort processor 122 is connected to first input means of the sort processor 123, and the output of the sort processor 123 is connected to the first input of the sort processor 124. Connected to the input means. The sort processor 121 has a circuit configuration for merging as shown in FIG. 1 as a second mode, separately from a circuit configuration as a pipeline merge sorter which is a first mode. Is configured to be used. In the figure, the sort processor 121
Is a comparison circuit 141 for comparing two inputs and outputting the smaller or larger one, and a second data input means 161b or memory 111 connected to one input of 141.
Is selected by a selection circuit 151 for selecting the data. The same applies to the sort processors 122, 123, and 124.

【0020】次に動作について説明する。第1のモード
であるソートについては、図7で示した従来例と同一で
あるので説明を省略する。なお、この時各ソートプロセ
ッサの第2の入力手段は使用されない。
Next, the operation will be described. The first mode, sorting, is the same as the conventional example shown in FIG. At this time, the second input means of each sort processor is not used.

【0021】図2は本発明による第2のモードであるマ
ージのプロセスを説明している。図では、4組のソート
済みレコード列を昇順にマージする例を示しており、各
レコード列はそれぞれ2レコードからなる。各ソートプ
ロセッサは、まず、対応するレコード列の先頭レコード
を第2の入力手段より入力し、次に、第1の入力手段か
ら入力されたレコードと第2の入力手段から入力された
レコードを比較し、小さい方のレコードを出力手段より
出力する。今、k段目のソートプロセッサに着目する
と、第1の入力手段からは初段のソートプロセッサから
k−1段目のソートプロセッサに対応するk−1組のレ
コード列の中の最小のレコードが入力され、第2の入力
手段からはk段目のソートプロセッサに対応するレコー
ド列の中の最小のレコードが入力され、結果としてk段
目のソートプロセッサの出力手段からは初段のソートプ
ロセッサからk段目のソートプロセッサに対応するk組
のレコード列の中の最小のレコードが出力される。第2
の入力手段にレコードがなくなった場合は順次後続のソ
ート済みレコードを入力し、上記のプロセスを繰り返す
ことにより、結果として4組のソート済みレコード列は
マージされる。
FIG. 2 illustrates the process of the second mode, the merge, according to the present invention. The figure shows an example in which four sets of sorted record strings are merged in ascending order, and each record string is composed of two records. Each sort processor first inputs the first record of the corresponding record sequence from the second input means, and then compares the record input from the first input means with the record input from the second input means. Then, the smaller record is output from the output means. Now, focusing on the k-th sort processor, the first input means inputs the smallest record in the k-1 set of record strings corresponding to the k-1th sort processor from the first-stage sort processor. Then, the smallest record in the record sequence corresponding to the k-th sort processor is input from the second input means, and as a result, the output means of the k-th sort processor outputs k rows from the first sort processor to the k-th sort processor. The smallest record among the k sets of record strings corresponding to the eye sort processor is output. Second
If there are no more records in the input means, subsequent sorted records are sequentially input, and the above-described process is repeated. As a result, four sets of sorted record strings are merged.

【0022】以上のように実施の形態1によれば、大き
なハードウェアの追加なしに、パイプラインマージソー
タの装置を利用してマージを行なうことが可能になる。
As described above, according to the first embodiment, merging can be performed using a pipeline merge sorter without adding large hardware.

【0023】実施の形態2.図3において、301はデ
ータ処理装置、302はデータ転送制御装置、303は
記憶装置であり、301、303はともに302に接続
されている。また311、312、313、314はデ
ータ転送制御装置302内に位置し、記憶装置303内
のアドレスを保持するアドレスレジスタである。
Embodiment 2 FIG. 3, reference numeral 301 denotes a data processing device, 302 denotes a data transfer control device, 303 denotes a storage device, and both 301 and 303 are connected to 302. Reference numerals 311, 312, 313, and 314 are address registers which are located in the data transfer control device 302 and hold addresses in the storage device 303.

【0024】実施の形態1において述べたマージを行う
第2のモードにおいて、データ転送制御装置302はソ
ートプロセッサ121〜124の第2の入力手段を監視
し、当該レジスタにレコードが存在しないソートプロセ
ッサに対し次のレコードを送る。この時、データ転送制
御装置302内のアドレスレジスタ311〜314はそ
れぞれソートプロセッサ121〜124に対応するレコ
ード列の先頭アドレスを示しており、データ転送制御装
置302はこれらアドレスレジスタの示すアドレスをも
とに記憶装置303よりレコードを読み出し、当該ソー
トプロセッサに転送する。また、アドレスレジスタ31
1〜314は転送したレコードサイズ分だけその内容を
更新し、常にレコード列の先頭アドレスを示すようにす
る。
In the second mode in which merging described in the first embodiment is performed, the data transfer control device 302 monitors the second input means of the sort processors 121 to 124, and switches to the sort processor having no record in the register. The next record is sent. At this time, the address registers 311 to 314 in the data transfer control device 302 indicate the head addresses of the record strings corresponding to the sort processors 121 to 124, respectively, and the data transfer control device 302 uses the addresses indicated by these address registers. The record is read from the storage device 303 and transferred to the sort processor. Also, the address register 31
1 to 314 update the contents by the transferred record size, and always indicate the start address of the record string.

【0025】本実施の形態によれば、データ転送制御装
置302内にアドレスレジスタ311〜314を有して
いるため、各ソートプロセッサとデータ転送制御装置3
02との間の信号線数を大きく増加することなく、パイ
プラインマージソータでマージを行なうことが可能にな
る。
According to the present embodiment, since the data transfer control device 302 has the address registers 311 to 314, each sort processor and the data transfer control device 3
02 can be merged by the pipeline merge sorter without greatly increasing the number of signal lines between the two.

【0026】実施の形態3.図4において、301はデ
ータ処理装置、302はデータ転送制御装置、303は
記憶装置であり、301、303はともに302に接続
されている。また321、322、323、324はそ
れぞれソートプロセッサ121、122、123、12
4内に位置し、記憶装置群303内のアドレスを保持す
るアドレスレジスタである。
Embodiment 3 FIG. 4, reference numeral 301 denotes a data processing device, 302 denotes a data transfer control device, 303 denotes a storage device, and both 301 and 303 are connected to 302. 321, 322, 323, and 324 are sort processors 121, 122, 123, and 12, respectively.
4 is an address register that holds an address in the storage device group 303.

【0027】実施の形態1において述べたマージを行う
第2のモードにおいて、各ソートプロセッサはそれぞれ
アドレスレジスタ321、322、323、324に記
憶装置303内の対応するレコード列の先頭アドレスを
保持し、自ソートプロセッサの第2の入力手段にレコー
ドが存在しなくなった場合には記憶装置303より直接
に、あるいはデータ転送制御装置302を介して間接に
レコードを読み出す。
In the second mode for performing the merging described in the first embodiment, each sort processor holds the head address of the corresponding record string in the storage device 303 in the address registers 321, 322, 323, and 324, respectively. When the record no longer exists in the second input means of the own sort processor, the record is read directly from the storage device 303 or indirectly via the data transfer control device 302.

【0028】本実施の形態によれば、パイプラインマー
ジソータでマージを行なう際に、各ソートプロセッサが
それぞれ対応するレコード列の先頭アドレスを自ら管理
するため、データ転送制御装置302にアドレスレジス
タを設ける場合と比較して信号線の数は増加するが、1
次元接続するソートプロセッサの段数を任意に設定する
ことができる。
According to the present embodiment, when performing merging with the pipeline merge sorter, each sort processor manages the head address of the corresponding record sequence by itself, so that the data transfer control device 302 is provided with an address register. Although the number of signal lines increases as compared with the case,
It is possible to arbitrarily set the number of stages of the sort processor to be dimensionally connected.

【0029】実施の形態4.図5において、301はデ
ータ処理装置、302はデータ転送制御装置、303は
記憶装置であり、301、303はともに302に接続
されている。また311、312、313、314はデ
ータ転送制御装置302内に位置し、記憶装置303内
のアドレスを保持するアドレスレジスタである。また3
31はデータ転送制御装置302内に位置するバッファ
である。
Embodiment 4 5, reference numeral 301 denotes a data processing device, 302 denotes a data transfer control device, 303 denotes a storage device, and both 301 and 303 are connected to 302. Reference numerals 311, 312, 313, and 314 are address registers which are located in the data transfer control device 302 and hold addresses in the storage device 303. 3
Reference numeral 31 denotes a buffer located in the data transfer control device 302.

【0030】実施の形態1において述べたマージを行う
第2のモードにおいて、データ転送制御装置302はア
ドレスレジスタ311〜314の示すアドレスをもとに
記憶装置303よりレコードを読み出してバッファ33
1に格納し、またデータ転送制御装置302はソートプ
ロセッサ121〜124の第2の入力手段を監視し、レ
ジスタにレコードが存在しないソートプロセッサに対し
て、バッファ331よりレコードを転送する。
In the second mode in which merging described in the first embodiment is performed, the data transfer control device 302 reads a record from the storage device 303 based on the addresses indicated by the address registers 311 to 314 and reads the record from the
1 and the data transfer control device 302 monitors the second input means of the sort processors 121 to 124 and transfers the records from the buffer 331 to the sort processors whose records do not exist in the registers.

【0031】本実施例によれば、パイプラインマージソ
ータでマージを行なう際に、レコード列の読み込みのオ
ーバヘッドタイムを短縮することができる。
According to the present embodiment, when performing merging with the pipeline merge sorter, it is possible to reduce the overhead time for reading a record string.

【0032】実施の形態5.上記実施の形態1、2、
3、4では、第2のモードにおいて、第1の入力手段か
ら入力されたレコードと第2の入力手段から入力された
レコードを比較しているが、本実施例ではメモリ111
〜114の全部あるいは一部をバッファメモリとして使
用し、第1の入力手段から入力されたレコードをそのバ
ッファメモリに格納する。各ソートプロセッサは、バッ
ファメモリの先頭レコードと第2の入力手段から入力さ
れたレコードを比較し、小さい方のレコードを出力する
ことにより、マージを行なうことができる。
Embodiment 5 Embodiments 1 and 2,
In the third and fourth modes, in the second mode, the record input from the first input unit is compared with the record input from the second input unit.
All or a part of .about.114 are used as a buffer memory, and records input from the first input means are stored in the buffer memory. Each sort processor can perform merging by comparing the first record in the buffer memory with the record input from the second input means and outputting the smaller record.

【0033】本実施の形態によれば、パイプラインマー
ジソータでマージを行なう際に、特別なバッファを追加
することなくソートプロセッサ間のデータの流れを円滑
化し、結果としてマージに要する時間を短縮することが
できる。
According to the present embodiment, when merging with the pipeline merge sorter, the flow of data between the sort processors is smoothened without adding a special buffer, and as a result, the time required for merging is reduced. be able to.

【0034】実施の形態6.上記実施の形態5では、第
2のモードにおいて、メモリ111〜114の全部ある
いは一部をバッファメモリとして使用し、第1の入力手
段から入力されたレコードをそのバッファメモリに格納
しているが、本実施の形態では第2の入力手段から入力
されたレコードをバッファメモリに格納している。各ソ
ートプロセッサは、第1の入力手段から入力されたレコ
ードとバッファメモリの先頭レコードを比較し、小さい
方のレコードを出力することにより、マージを行なうこ
とができる。
Embodiment 6 FIG. In the fifth embodiment, in the second mode, all or a part of the memories 111 to 114 are used as a buffer memory, and records input from the first input unit are stored in the buffer memory. In the present embodiment, the record input from the second input means is stored in the buffer memory. Each sort processor can perform merging by comparing the record input from the first input means with the first record in the buffer memory and outputting the smaller record.

【0035】本実施の形態によれば、パイプラインマー
ジソータでマージを行なう際に、特別なバッファを追加
することなくレコード列の読み込みのオーバヘッドタイ
ムを短縮することができる。
According to the present embodiment, when performing merging with the pipeline merge sorter, it is possible to reduce the overhead time for reading a record string without adding a special buffer.

【0036】実施の形態7.上記実施の形態5、6で
は、第2のモードにおいて、メモリ111〜114の全
部あるいは一部をバッファメモリとして使用し、第1の
入力手段から入力されたレコードあるいは第2の入力手
段から入力されたレコードのいずれか一方をそのバッフ
ァメモリに格納していたが、本実施の形態ではメモリ1
11〜114の全部あるいは一部をバッファメモリとし
て使用し、第1の入力手段から入力されたレコードおよ
び第2の入力手段から入力されたレコードの両方をその
バッファメモリに格納し、お互いの先頭レコードを比較
し、小さい方のレコードを出力することにより、マージ
を行なうことができる。
Embodiment 7 In the fifth and sixth embodiments, in the second mode, all or a part of the memories 111 to 114 are used as buffer memories, and records input from the first input unit or input from the second input unit are used. One of the records is stored in the buffer memory.
All or a part of the data 11 to 114 is used as a buffer memory, and both the record input from the first input means and the record input from the second input means are stored in the buffer memory. , And merging can be performed by outputting the smaller record.

【0037】本実施の形態によれば、パイプラインマー
ジソータでマージを行なう際に、特別なバッファを追加
することなくソートプロセッサ間のデータの流れを円滑
化し、さらにレコード列の読み込みのオーバヘッドタイ
ムを減らすことができ、マージに要する時間を短縮する
ことができる。
According to the present embodiment, when performing merging with the pipeline merge sorter, the flow of data between the sort processors is smoothened without adding a special buffer, and the overhead time for reading a record sequence is reduced. Thus, the time required for merging can be reduced.

【0038】実施の形態8.図6において、301はデ
ータ処理装置、302はデータ転送制御装置、303は
記憶装置であり、301、303はともに302に接続
されている。また311、312、313、314はデ
ータ転送制御装置302内に位置し、記憶装置303内
のアドレスを保持するアドレスレジスタである。上記実
施例6、7では、第2のモードにおいて、メモリ111
〜114の全部あるいは一部をバッファメモリとして使
用し、第2の入力手段から入力されたレコードをそのバ
ッファメモリに格納しているが、本実施例ではデータ転
送制御装置302がマージ対象となるレコード列をメモ
リ111〜114に直接格納し、ソートプロセッサ10
1〜104はそれぞれメモリ111〜114よりレコー
ドを読み出して、マージを行なう。
Embodiment 8 FIG. 6, reference numeral 301 denotes a data processing device, 302 denotes a data transfer control device, 303 denotes a storage device, and both 301 and 303 are connected to 302. Reference numerals 311, 312, 313, and 314 are address registers which are located in the data transfer control device 302 and hold addresses in the storage device 303. In the sixth and seventh embodiments, in the second mode, the memory 111
To 114 are used as a buffer memory, and the record input from the second input means is stored in the buffer memory. In the present embodiment, the data transfer control device 302 The columns are stored directly in the memories 111 to 114 and the sort processor 10
Records 1 to 104 read the records from the memories 111 to 114, respectively, and perform the merge.

【0039】本実施の形態によれば、パイプラインマー
ジソータでマージを行なう際に、特別なバッファを追加
することなくレコード列の読み込みのオーバヘッドタイ
ムを短縮することができる。また、メモリを第2のデー
タ入力手段に接続することにより、ソートプロセッサの
信号線数を減少することができる。
According to the present embodiment, when performing merging with the pipeline merge sorter, it is possible to reduce the overhead time for reading a record string without adding a special buffer. Further, by connecting the memory to the second data input means, the number of signal lines of the sort processor can be reduced.

【0040】ところで上記説明では、ソートプロセッサ
4個を1次元接続したパイプラインマージソータを例と
したが、本発明はソートプロセッサの個数を限定するも
のではない。
In the above description, a pipeline merge sorter in which four sort processors are connected one-dimensionally is taken as an example, but the present invention does not limit the number of sort processors.

【0041】[0041]

【発明の効果】この発明は、以上説明したように構成さ
れているので、以下に示すような効果を奏する。
Since the present invention is configured as described above, it has the following effects.

【0042】従来、ソートにのみ使用されていたパイプ
ラインマージソータのソートプロセッサに入力手段を追
加することにより、複数のソート済みレコード列のマー
ジを行なうことができるようになる。
By adding input means to a sort processor of a pipeline merge sorter conventionally used only for sorting, a plurality of sorted record strings can be merged.

【0043】また、ソートにのみ使用されていたパイプ
ラインマージソータのソートプロセッサに入力手段を追
加し、ソート済みレコード列を格納する記憶装置、レコ
ードをプロセッサに転送するデータ転送制御装置を備え
たことにより、マージ用のハードウェアを追加すること
なしに高速に大量データのソートが行なえるようにな
る。
[0043] Further, an input means is added to the sort processor of the pipeline merge sorter used only for sorting, and a storage device for storing sorted record strings and a data transfer control device for transferring records to the processor are provided. Accordingly, a large amount of data can be sorted at a high speed without adding hardware for merging.

【0044】さらに、転送制御装置が監視し、第2の入
力手段のレコード長が予め設定した一定長以下のときは
後続のレコードを上記記憶装置から読みだし当該ソート
プロセッサに転送するように構成したので、連続してマ
ージ処理を行うことができる。
Further, the transfer control device monitors, and when the record length of the second input means is equal to or less than a predetermined length, a subsequent record is read from the storage device and transferred to the sort processor. Therefore, merge processing can be performed continuously.

【0045】また、ソートプロセッサが監視し、第2の
入力手段のレコード長が予め設定した一定長以下のとき
は後続のレコードを上記記憶装置から読みだし当該ソー
トプロセッサに転送するよう転送制御装置に要求するよ
うに構成したので、連続してマージ処理を行うことがで
きる。
When the record length of the second input means is equal to or less than a predetermined length monitored by the sort processor, the transfer control device reads out the subsequent record from the storage device and transfers it to the sort processor. Since it is configured to request, the merging process can be performed continuously.

【0046】さらにまた、記憶装置に格納された各組の
レコード列から予め設定された一定長のレコードを読み
だし格納するバッファを備えたので、マージを行なう際
に、レコード列の読み込みのオーバヘッドタイムを短縮
することができる。
Furthermore, since a buffer for reading and storing a record of a predetermined length set from each set of record strings stored in the storage device is provided, an overhead time for reading the record string when performing a merge operation. Can be shortened.

【0047】また、転送制御装置が上記バッファを監視
し、レコード長が予め設定した一定長以下のときは当該
レコード列の後続のレコードを記憶装置から読みだし上
記バッファに格納するように構成したので、連続してマ
ージ処理を行うことができる。
Further, the transfer control device monitors the buffer, and when the record length is equal to or less than a predetermined length, a subsequent record of the record sequence is read from the storage device and stored in the buffer. , The merge process can be performed continuously.

【0048】さらに、第1の入力手段に入力されたデー
タを当該ソートプロセッサのメモリに格納するように構
成したので、ソートプロセッサ間のデータの流れを円滑
化し、結果としてマージに要する時間を短縮することが
できる。
Further, since the data input to the first input means is stored in the memory of the sort processor, the flow of data between the sort processors is smoothed, and as a result, the time required for merging is reduced. be able to.

【0049】また、第2の入力手段に入力されたデータ
を当該ソートプロセッサのメモリに格納するように構成
したので、レコード列の読み込みのオーバヘッドタイム
を短縮することができる。
Further, since the data input to the second input means is stored in the memory of the sort processor, the overhead time for reading the record sequence can be reduced.

【0050】さらにまた、データ転送制御装置がマージ
対象のレコード列をメモリに直接書き込むように構成し
たことにより、マージを行なう際に、レコード列の読み
込みのオーバヘッドタイムを短縮することができ、さら
にソートプロセッサの信号線数を減少することができ
る。
Further, since the data transfer control device is configured to directly write the record string to be merged into the memory, the overhead time for reading the record string can be reduced when performing the merge, and the sorting can be further performed. The number of signal lines of the processor can be reduced.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 この発明の実施の形態1を示す構成図であ
る。
FIG. 1 is a configuration diagram showing a first embodiment of the present invention.

【図2】 この発明の実施の形態1の動作プロセスを示
す説明図である。
FIG. 2 is an explanatory diagram showing an operation process according to the first embodiment of the present invention.

【図3】 この発明の実施の形態2を示す構成図であ
る。
FIG. 3 is a configuration diagram showing a second embodiment of the present invention.

【図4】 この発明の実施の形態3を示す構成図であ
る。
FIG. 4 is a configuration diagram showing a third embodiment of the present invention.

【図5】 この発明の実施の形態4を示す構成図であ
る。
FIG. 5 is a configuration diagram showing a fourth embodiment of the present invention.

【図6】 この発明の実施の形態8を示す構成図であ
る。
FIG. 6 is a configuration diagram showing an eighth embodiment of the present invention.

【図7】 従来例のパイプラインマージソータの構成図
である。
FIG. 7 is a configuration diagram of a conventional pipeline merge sorter.

【図8】 従来例のパイプラインマージソータの動作プ
ロセスを示す説明図である。
FIG. 8 is an explanatory diagram showing an operation process of a conventional pipeline merge sorter.

【図9】 従来例のマージ装置の構成図である。FIG. 9 is a configuration diagram of a conventional merge device.

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

111〜114 メモリ、121〜124 ソートプロ
セッサ、302 データ転送制御装置、303 記憶装
置、331 バッファ、161a〜164a第1の入力
手段、161b〜164b 第2の入力手段
111-114 memory, 121-124 sort processor, 302 data transfer control device, 303 storage device, 331 buffer, 161a-164a first input means, 161b-164b second input means

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 メモリを有するn段目のソートプロセッ
サがn−1段目のソートプロセッサからそれぞれ2n-1
レコードからなる2組のソート済みレコード列を入力し
マージして2nレコードからなる1組のソート済みレコ
ード列を出力するパイプラインマージソータにおいて、
上記ソート済みレコード列を入力する第1の入力手段と
は別に、上記各段のソートプロセッサに第2の入力手段
を備え、この第2の入力手段から入力した複数のソート
済みレコード列をマージし単一のソート済みレコード列
を出力することを特徴とするデータ処理装置。
1. An n-th sort processor having a memory is 2 n-1 from an (n-1) -th sort processor.
In a pipeline merge sorter for inputting and merging two sets of sorted record strings composed of records and outputting a set of sorted record strings composed of 2 n records,
Separately from the first input means for inputting the sorted record strings, the sort processors at each stage are provided with second input means, and a plurality of sorted record strings inputted from the second input means are merged. A data processing device for outputting a single sorted record sequence.
【請求項2】 メモリを有するn段目のソートプロセッ
サがn−1段目のソートプロセッサからそれぞれ2n-1
レコードからなる2組のソート済みレコード列を第1の
入力手段から入力しマージして2nレコードからなる1
組のソート済みレコード列を出力するパイプラインマー
ジソータにおいて、上記パイプラインマージソータにお
いて全体のソート処理を繰り返し行うことにより得られ
た複数組のソート済みレコード列を格納する記憶装置、
この記憶装置に格納された各組のレコード列から予め設
定された一定長のレコードを読みだし上記各段のソート
プロセッサに転送するデータ転送制御装置、上記レコー
ドを上記各段のソートプロセッサに入力する第2の入力
手段を備え上記複数組のソート済みレコード列をマージ
し単一のソート済みレコード列にすることを特徴とする
データ処理装置。
2. An n-th sort processor having a memory is 2 n−1 from a ( n−1) -th sort processor.
Two sets of sorted record strings consisting of records are input from the first input means and merged, and 1 consisting of 2 n records
A pipeline merge sorter for outputting a set of sorted record strings, a storage device for storing a plurality of sets of sorted record strings obtained by repeatedly performing the entire sort processing in the pipeline merge sorter;
A data transfer control device that reads a record of a predetermined length that is set in advance from each set of record rows stored in the storage device and transfers the record to the sort processor of each stage, and inputs the record to the sort processor of each stage. A data processing apparatus comprising a second input unit, wherein a plurality of sets of sorted record strings are merged into a single sorted record string.
【請求項3】 上記転送制御装置は、上記各段のソート
プロセッサの第2の入力手段を監視し、第2の入力手段
のレコード長が予め設定した一定長以下のときは後続の
レコードを上記記憶装置から読みだし当該ソートプロセ
ッサに転送することを特徴とする請求項2記載のデータ
処理装置。
3. The transfer control device monitors the second input means of the sort processor at each stage, and when the record length of the second input means is equal to or less than a predetermined length, the transfer control apparatus transmits the subsequent record to the second processor. 3. The data processing device according to claim 2, wherein the data is read from a storage device and transferred to the sort processor.
【請求項4】 上記各段のソートプロセッサはそれぞれ
の第2の入力手段を監視し、第2の入力手段のレコード
長が予め設定した一定長以下のときは後続のレコードを
上記記憶装置から読みだし当該ソートプロセッサに転送
することを上記転送制御装置に要求することを特徴とす
る請求項2記載のデータ処理装置。
4. The sort processor of each stage monitors each of the second input means, and when the record length of the second input means is equal to or less than a predetermined length, reads a subsequent record from the storage device. 3. The data processing device according to claim 2, wherein the transfer control device is requested to transfer the data to the sort processor.
【請求項5】 上記転送制御装置は、上記記憶装置に格
納された各組のレコード列から予め設定された一定長の
レコードを読みだし格納するバッファを備えたことを特
徴とする請求項2記載のデータ処理装置。
5. The transfer control device according to claim 2, further comprising a buffer for reading out and storing a record of a predetermined fixed length from each set of record strings stored in the storage device. Data processing equipment.
【請求項6】 上記転送制御装置は、上記バッファを監
視し、レコード長が予め設定した一定長以下のときは当
該レコード列の後続のレコードを上記記憶装置から読み
だし上記バッファに格納することを特徴とする請求項5
記載のデータ処理装置。
6. The transfer control device monitors the buffer and, if the record length is equal to or less than a predetermined length, reads a record subsequent to the record sequence from the storage device and stores the read record in the buffer. Claim 5
The data processing device according to claim 1.
【請求項7】 上記第1の入力手段に入力されたデータ
を当該ソートプロセッサのメモリに格納することを特徴
とする請求項1〜請求項6のいずれかに記載のデータ処
理装置。
7. The data processing apparatus according to claim 1, wherein the data input to said first input means is stored in a memory of said sort processor.
【請求項8】 上記第2の入力手段に入力されたデータ
を当該ソートプロセッサのメモリに格納することを特徴
とする請求項1〜請求項7のいずれかに記載のデータ処
理装置。
8. The data processing device according to claim 1, wherein the data input to said second input means is stored in a memory of said sort processor.
【請求項9】 メモリを有するn段目のソートプロセッ
サがn−1段目のソートプロセッサからそれぞれ2n-1
レコードからなる2組のソート済みレコード列を第1の
入力手段から入力しマージして2nレコードからなる1
組のソート済みレコード列を出力するパイプラインマー
ジソータにおいて、上記パイプラインマージソータにお
いて全体のソート処理を繰り返し行うことにより得られ
た複数組のソート済みレコード列を格納する記憶装置、
この記憶装置に格納された各組のレコード列から予め設
定された一定長のレコードを読みだし上記各段のソート
プロセッサに接続されたメモリに転送するデータ転送制
御装置、そのメモリに格納されたレコードを上記各段の
ソートプロセッサに入力する第2の入力手段を備え上記
複数組のソート済みレコード列をマージし単一のソート
済みレコード列にすることを特徴とするデータ処理装
置。
9. The n-th sort processor having a memory is 2 n−1 from the ( n−1) -th sort processor.
Two sets of sorted record strings consisting of records are input from the first input means and merged, and 1 consisting of 2 n records
A pipeline merge sorter for outputting a set of sorted record strings, a storage device for storing a plurality of sets of sorted record strings obtained by repeatedly performing the entire sort processing in the pipeline merge sorter;
A data transfer control device for reading a record of a predetermined length set from each set of record strings stored in the storage device and transferring the record to a memory connected to the sort processor in each of the above stages, and a record stored in the memory A second input means for inputting the data to the sort processors at the respective stages, and merging the plurality of sets of sorted record strings into a single sorted record string.
JP17227396A 1996-07-02 1996-07-02 Data processor Pending JPH1021053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17227396A JPH1021053A (en) 1996-07-02 1996-07-02 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17227396A JPH1021053A (en) 1996-07-02 1996-07-02 Data processor

Publications (1)

Publication Number Publication Date
JPH1021053A true JPH1021053A (en) 1998-01-23

Family

ID=15938863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17227396A Pending JPH1021053A (en) 1996-07-02 1996-07-02 Data processor

Country Status (1)

Country Link
JP (1) JPH1021053A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017145392A1 (en) * 2016-02-26 2017-08-31 三菱電機株式会社 Electrical apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017145392A1 (en) * 2016-02-26 2017-08-31 三菱電機株式会社 Electrical apparatus

Similar Documents

Publication Publication Date Title
US4514826A (en) Relational algebra engine
JPH0728624A (en) Device and method for sorting
US11580055B2 (en) Devices for time division multiplexing of state machine engine signals
US20020065793A1 (en) Sorting system and method executed by plural computers for sorting and distributing data to selected output nodes
US5659733A (en) Sort processing method and apparatus for sorting data blocks using work buffer merge data records while sequentially transferring data records from work buffers
JPS6142031A (en) Sorting processor
JPH1021053A (en) Data processor
US20220138338A1 (en) Data replacement apparatus, data replacement method, and program
JP3061486B2 (en) Data sort processing system
JPS60128529A (en) Merge processing device
JPH07101382B2 (en) Margin processing device
JP2588932B2 (en) Sorting device
JPH03196257A (en) Vector processor
JPH0926872A (en) Pipeline merge sorter
JPH0580977A (en) Data processor
JP3265993B2 (en) Sorting device
JPH06208614A (en) Image processor
JP2591362B2 (en) Data selection processing method
JPH0275018A (en) Merge processing method
JP2895892B2 (en) Data processing device
JPH01226026A (en) Retrieving circuit
JPH0437455B2 (en)
JPS6087491A (en) Memory device control system
JPS62164135A (en) Data processor
JPS6346537A (en) Method for deciding retrieving condition of retrieving processor