JPH02273828A - Internal sorting system - Google Patents

Internal sorting system

Info

Publication number
JPH02273828A
JPH02273828A JP9528089A JP9528089A JPH02273828A JP H02273828 A JPH02273828 A JP H02273828A JP 9528089 A JP9528089 A JP 9528089A JP 9528089 A JP9528089 A JP 9528089A JP H02273828 A JPH02273828 A JP H02273828A
Authority
JP
Japan
Prior art keywords
area
internal
work area
program
data
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
JP9528089A
Other languages
Japanese (ja)
Inventor
Sakae Inoue
栄 井上
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP9528089A priority Critical patent/JPH02273828A/en
Publication of JPH02273828A publication Critical patent/JPH02273828A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To set the work area at a size appropriate to the quantity of data to be sorted and to carry out an internal sorting process with high efficiency regardless of the quantity of data by allocating an internal sorting execution program and a work area to different memory spaces. CONSTITUTION:A main storage 11 includes a user program storing area 12 and a memory space 12a of the area 12 stores an internal sorting execution program. Furthermore a task control area 13 and an internal sorting work area 14 are allocated to the different memory spaces from the area 12 of the storage 11. Therefore the size of the area 14 is never limited by the scale of the program and can be set at the value appropriate to the quantity of data to be sorted. As a result, the internal sorting process is carried out with high efficiency despite a large quantity of data.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は内部ソート方式に関し、特にソート対象とな
るレコード群をメモリの作業エリアに格納してそのレコ
ードからソートストリングを生成する内部ソート方式に
関する。
[Detailed Description of the Invention] [Objective of the Invention] (Industrial Application Field) This invention relates to an internal sorting method, and in particular stores a group of records to be sorted in a working area of a memory and generates a sort string from the records. Regarding the internal sorting method.

(従来の技術) 一般に、ソートとは、人力ファイル中のデータをいくつ
かのソートストリングと称される整列化されたデータ列
に分け、このソートストリング111を併合することに
よって全体を整列化する処理のことを云う。つまり、ソ
ート処理の構造は、ソトストリングの生成段階と、ソー
トストリングの併合段階に大きく分類することができる
。ソートストリングの生成は内部ソートと称されている
(Prior Art) In general, sorting is a process of dividing data in a human file into several sorted data strings called sort strings, and sorting the entire data by merging the sort strings 111. It refers to In other words, the structure of the sorting process can be broadly classified into a sort string generation stage and a sort string merging stage. The generation of sort strings is called internal sorting.

従来、内部ソートを実行する場合には、まずソート対象
となるレコードが主記憶装置のワークエリアに格納され
る。次いで、所定の境界値を基にそのワークエリア内で
レコードが移動され、この移動によって整列化されたソ
ートストリング列が生成される。
Conventionally, when performing internal sorting, records to be sorted are first stored in a work area of a main storage device. Next, records are moved within the work area based on predetermined boundary values, and a sorted string string is generated by this movement.

ここで、内部ソート用のワークエリアは、内部ソート実
行プログラムと同一のメモリ空間に混在した状態で主記
憶装置内に割当てられる。つまり、主記憶装置内の所定
のメモリ領域が複数のセグメントに分割されて、そのセ
グメントの一部がプログラム格納用として割当てられ、
残りのセグメントがワークエリアとして割当てられる。
Here, the work area for internal sorting is allocated in the main storage device in a mixed state in the same memory space as the internal sorting execution program. In other words, a predetermined memory area in the main memory is divided into multiple segments, and some of the segments are allocated for program storage.
The remaining segments are allocated as work areas.

このように、同一のメモリ空間にプログラム領域とワー
クエリアが混在する場合には、ワークエリアの大きさは
プログラム領域の大きさによって制限されてしまう。こ
のため、比較的大きな格納領域を必要とするプログラム
の場合は、ワークエリアとして割当てることができるメ
モリ空間の大きさが減少される。したがって、ワークエ
リアをソート対象となるデータ量に適した大きさに設定
できず、データ量が多いと内部ソート処理の性能が低下
する欠点があった。
In this way, when a program area and a work area coexist in the same memory space, the size of the work area is limited by the size of the program area. Therefore, in the case of a program that requires a relatively large storage area, the amount of memory space that can be allocated as a work area is reduced. Therefore, the work area cannot be set to a size suitable for the amount of data to be sorted, and when the amount of data is large, the performance of internal sort processing deteriorates.

(発明が解決しようとする課題) 従来では内部ソート用のプログラムとワークエリアが同
一のメモリ空間に混在されており、ワークエリアをソー
ト対象となるデータ量に適した大きさに設定できない欠
点があった。
(Problem to be solved by the invention) Conventionally, an internal sorting program and a work area are mixed in the same memory space, which has the disadvantage that the work area cannot be set to a size appropriate for the amount of data to be sorted. Ta.

この発明は前述の事情に鑑みなされたもので、ワークエ
リアの大きさをデータ瓜に応じて設定できるようにし、
データ量に関係な(内部ソート処理を効率良く実行でき
る内部ソート方式を提供することを目的とする。
This invention was made in view of the above-mentioned circumstances, and allows the size of the work area to be set according to the data size.
The purpose of this paper is to provide an internal sorting method that can efficiently perform internal sorting processing that is related to the amount of data.

[発明の構成] (課題を解決するための手段) この発明は、ソート対象となるレコード群を整列化され
たレコード列に分割してソートストリングを生成する内
部ソート方式において、内部ソート実行プログラムが第
1メモリ領域に格納されるメモリ手段と、前記プログラ
ムに従って動作制御され、そのプログラムによって指定
された大きさの作業領域を前記メモリ手段の第2のメモ
リ領域に割当てると共に、その割当てた作業6r+域に
ソトχ−t Sとなるレコードを格納してそのレコード
からソートストリングを生成する内部ソート実行手段と
を具備することを特徴とする。
[Structure of the Invention] (Means for Solving the Problem) The present invention provides an internal sorting method in which a group of records to be sorted is divided into arranged record strings to generate a sort string. A memory means stored in a first memory area, whose operation is controlled according to the program, and a work area of a size specified by the program is allocated to a second memory area of the memory means, and the allocated work area 6r+ The present invention is characterized by comprising an internal sorting execution means for storing records that are sorted χ-t S and generating a sorting string from the records.

(作用) この内部ソート方式においては、内部ソート実行プログ
ラムとは別のメモリ空間にワークエリアが割当てられる
。このワークエリアの大きさは、そのプログラムによっ
て指定される。このため、ワークエリアの大きさがプロ
グラムの大きさによって制限されることがなくなり、ワ
ークエリアをソート対象のデータ量に適した大きさに設
定できる。したがって、データ量が多い場合でも、内部
ソート処理を効率良く実行できる。
(Operation) In this internal sorting method, a work area is allocated to a memory space separate from that of the internal sort execution program. The size of this work area is specified by the program. Therefore, the size of the work area is no longer limited by the size of the program, and the work area can be set to a size suitable for the amount of data to be sorted. Therefore, even when the amount of data is large, internal sort processing can be executed efficiently.

(実施例) 以下、図面を参照してこの発明の詳細な説明する。(Example) Hereinafter, the present invention will be described in detail with reference to the drawings.

第1図にこの発明の一実施例に係る内部ソート方式を実
現するシステム構成を示す。CPUl0は、図示しない
人力ファイルからソート対象となるレコード(データ)
1洋を読み出し、それを主記憶装置11に格納して内部
ソート処理を実行する。このCPUl0による内部ソー
ト処理は、主記憶装置11に格納される内部ソート実行
プログラムに従って実行される。
FIG. 1 shows a system configuration for realizing an internal sorting method according to an embodiment of the present invention. CPU10 is a record (data) to be sorted from a human file (not shown)
1, stores it in the main storage device 11, and executes internal sort processing. This internal sorting process by the CPU 10 is executed according to an internal sorting execution program stored in the main storage device 11.

主記憶装置11はユーザプログラム格納領域憶12をf
i L、このユーザプログラム格納6fI域12内のメ
モリ空間1イは前述の内部ソート用実行プログラムが格
納されている。さらに、主記憶装置11には、ユーザプ
ログラム割当て領域12とは別のメモリ空間ニ、タスク
コントロール領域!3および内部ソート用ワークエリア
14がそれぞれ割当てられている。
The main storage device 11 has a user program storage area 12 f
iL, memory space 1a in this user program storage 6fI area 12 stores the above-mentioned internal sorting execution program. Furthermore, the main storage device 11 includes a memory space separate from the user program allocation area 12, a task control area! 3 and an internal sorting work area 14 are respectively allocated.

タスクコントロール領域13は、領域12aの内部ノー
ト実行プログラムと内部ソート用ワークエリア14間の
インターフェースをとるためのプログラム格納領域であ
る。内部ソート用ワークエリア14には内部ソート対象
となるレコード群が格納されると共に、このワークエリ
ア14内でソートストリングを作成するためのレコード
の移動が行われる。
The task control area 13 is a program storage area for providing an interface between the internal note execution program in the area 12a and the internal sorting work area 14. The internal sort work area 14 stores a group of records to be internally sorted, and records are moved within this work area 14 to create a sort string.

このレコードの移動は、所定の境界値に従って実行され
る。
This record movement is performed according to predetermined boundary values.

次に第2図のフローチャートを参照して第1図に示した
この発明のシステムにおけるワークエリアの割当て動作
を説明する。
Next, the work area allocation operation in the system of the present invention shown in FIG. 1 will be explained with reference to the flowchart in FIG.

まず、Bfi域L2aの内部ソート実行プログラムが起
動されると、CPUIIはそのプログラム内のワ−クエ
リア割当て命令に従ってその命令により指定された大き
さの領域を内部ソート用ワークエリアI4として主記憶
装置■1内に割当てる(ステップAI)。この場合、内
部ソート用ワークエリア14は、内部ソート実行プログ
ラム格納領域12aと別のメモリ空間に割当てられる。
First, when the internal sort execution program in the Bfi area L2a is started, the CPU II follows the work area allocation instruction in the program and uses the area specified by that instruction as the internal sort work area I4 in the main memory. 1 (step AI). In this case, the internal sort work area 14 is allocated to a memory space different from the internal sort execution program storage area 12a.

次いで、内部ソート用ワークエリア14にアドレスが割
当てられ、これによって内部ソート用ワークエリア14
にセグメン!・構造が導入される(ステップA2)。そ
して、内部ソート実行プログラムのインターフェース命
令によって、内部ソート用ワークエリア14のアドレス
が認識される。これにより、領域12aの内部ソート実
行プログラムと内部ソート用ワークエリア14がタスク
コントロール領域13によって間接的に結合される(ス
テップA3)。
Next, an address is assigned to the internal sorting work area 14, and thereby the internal sorting work area 14
Segmen to! - A structure is introduced (step A2). Then, the address of the internal sort work area 14 is recognized by the interface command of the internal sort execution program. As a result, the internal sort execution program in the area 12a and the internal sort work area 14 are indirectly coupled through the task control area 13 (step A3).

このようにして、ワークエリア14の割当て処理が実行
されると、ソート対象となるレコード群が図示しない人
力ファイルから読み出されてワークエリア14に格納さ
れる。そして、所定の境界値を基に各レコードがそのワ
ークエリア14内で移動されてソートストリングが生成
される。
When the work area 14 allocation process is executed in this way, a group of records to be sorted are read out from a manual file (not shown) and stored in the work area 14. Each record is then moved within its work area 14 based on predetermined boundary values to generate a sort string.

この内部ソート方式にあっては、内部ソート実行プログ
ラムとは別のメモリ空間に内部ソート用ワークエリア1
4が割当てられる。このワークエリア14の大きさは、
その内部ソート実行プログラムによって指定される。こ
のため、ワークエリア14の大きさがプログラムの大き
さによって制限されることがなくなり、ワークエリア1
4をソート対象のデータ量に適した大きさに設定できる
。したがって、データ量が多い場合でも、内部ソート処
理を効率良(実行できる。
In this internal sort method, an internal sort work area 1 is located in a memory space separate from the internal sort execution program.
4 is assigned. The size of this work area 14 is
Specified by its internal sort executor. Therefore, the size of the work area 14 is no longer limited by the size of the program, and the size of the work area 14 is no longer limited by the size of the program.
4 can be set to a size suitable for the amount of data to be sorted. Therefore, even when the amount of data is large, internal sort processing can be performed efficiently.

さらに、内部ソート実行プログラムと内部ソート用ワー
クエリア14が互いに独立したメモリ空間に存在するた
め、プログラム内のコード部やデータ部がワークエリア
14内のデータ移動によって破壊される危険性も無くな
るので、データ保護の実現ら図れる。
Furthermore, since the internal sort execution program and the internal sort work area 14 exist in mutually independent memory spaces, there is no risk that the code section or data section within the program will be destroyed by data movement within the work area 14. Data protection can be achieved.

し発明の効果] 以上のように、この発明によれば、内部ソート実行プロ
グラムとワークエリアがそれぞれ異なるメモリ空間に割
当てられるので、ワークエリアをソート対象となるデー
タ量に適した大きさに設定することができ、データ量に
関係なく内部゛ノート処理を効率良く実行することが可
能になる。
[Effects of the Invention] As described above, according to the present invention, the internal sort execution program and the work area are allocated to different memory spaces, so the work area is set to a size suitable for the amount of data to be sorted. This makes it possible to efficiently execute internal note processing regardless of the amount of data.

【図面の簡単な説明】 第1図はこの発明の一実施例に係るシステム構成を示す
図、第2図は第1図に示したシステムにおけるワークエ
リアの割当て処理を説明するフローチャー1・である。 10・・・CPU、II・・・主記憶装置、12・・・
ユーザプログラム割当て領域、12a・・・内部ソート
実行プログラム格納領域、13・・・タスクコントロー
ル領域、14・・・内部ソート用ワークエリア。 第1図 出願人代理人  弁理士 鈴江武彦 第2図
[Brief Description of the Drawings] Fig. 1 is a diagram showing a system configuration according to an embodiment of the present invention, and Fig. 2 is a flowchart 1 explaining work area allocation processing in the system shown in Fig. 1. be. 10...CPU, II...Main storage device, 12...
User program allocation area, 12a... Internal sort execution program storage area, 13... Task control area, 14... Work area for internal sorting. Figure 1 Applicant's agent Patent attorney Takehiko Suzue Figure 2

Claims (1)

【特許請求の範囲】 ソート対象となるレコード群を整列化されたレコード列
に分割してソートストリングを生成する内部ソート方式
において、 内部ソート実行プログラムが第1メモリ領域に格納され
るメモリ手段と、前記プログラムに従って動作制御され
、そのプログラムによって指定された大きさの作業領域
を前記メモリ手段の第2のメモリ領域に割当てると共に
、その割当てた作業領域にソート対象となるレコードを
格納してそのレコードからソートストリングを生成する
内部ソート実行手段とを具備することを特徴とする内部
ソート方式。
[Scope of Claims] An internal sort method that generates a sort string by dividing a group of records to be sorted into arranged record strings, comprising: memory means in which an internal sort execution program is stored in a first memory area; The operation is controlled according to the program, and a work area of a size specified by the program is allocated to the second memory area of the memory means, and records to be sorted are stored in the allocated work area, and records are sorted from the records. 1. An internal sorting method, comprising: internal sort execution means for generating a sort string.
JP9528089A 1989-04-17 1989-04-17 Internal sorting system Pending JPH02273828A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9528089A JPH02273828A (en) 1989-04-17 1989-04-17 Internal sorting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9528089A JPH02273828A (en) 1989-04-17 1989-04-17 Internal sorting system

Publications (1)

Publication Number Publication Date
JPH02273828A true JPH02273828A (en) 1990-11-08

Family

ID=14133365

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9528089A Pending JPH02273828A (en) 1989-04-17 1989-04-17 Internal sorting system

Country Status (1)

Country Link
JP (1) JPH02273828A (en)

Similar Documents

Publication Publication Date Title
US6725448B1 (en) System to optimally create parallel processes and recording medium
JP2003167737A (en) Stack use method
JPH02273828A (en) Internal sorting system
JP3520527B2 (en) Data management method
JPH06214803A (en) Virtual space block arranging system
JP3296027B2 (en) Compilation method when using additional registers of load store type processor
JPH06266619A (en) Page saving/restoring device
JPH09114661A (en) Register controller
JPS63126030A (en) Sort processing system
JPH0340053A (en) Control system for plural communication procedures
JP2000235551A (en) Data base arrangement retrieval control method and recording medium
JPS6381526A (en) Sort input/output buffer management system
JP2000035809A (en) Programmable controller
JPH04280324A (en) Storage management device
JPH01120624A (en) Address allocation system for program module
JPS63276629A (en) Sorting system for record in file
JPH0546399A (en) Overlay linker
JPS6325730A (en) Bundling system for plural segments within object program
JPS60181945A (en) Address extension controlling system
JPH04116742A (en) Memory allocation system in virtual storage system
JPH04170643A (en) Optimum segmentation determining system
JPH05108369A (en) System for managing program area resident priority
JPH0484346A (en) Storing area managing device
JP2004021344A (en) Compiler, and register assignment method to in-loop variable
JPH04102918A (en) Sorting processing system