[go: up one dir, main page]

JPS62239248A - Physical clustering system - Google Patents

Physical clustering system

Info

Publication number
JPS62239248A
JPS62239248A JP61082580A JP8258086A JPS62239248A JP S62239248 A JPS62239248 A JP S62239248A JP 61082580 A JP61082580 A JP 61082580A JP 8258086 A JP8258086 A JP 8258086A JP S62239248 A JPS62239248 A JP S62239248A
Authority
JP
Japan
Prior art keywords
page
frame
area
segment
pages
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
JP61082580A
Other languages
Japanese (ja)
Inventor
Takaaki Seki
関 高明
Akira Yamamoto
彰 山本
Hiroyuki Kitajima
北嶋 弘行
Shiro Nakamura
史朗 中村
Shinichi Fukushima
福嶋 慎一
Toshihiko Tamiya
田宮 敏彦
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 JP61082580A priority Critical patent/JPS62239248A/en
Publication of JPS62239248A publication Critical patent/JPS62239248A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To reduce the time when an external storage device is occupied and I/O loads by storing an updated page close to a frame storing a page before update. CONSTITUTION:When data base information is stored in the external storage device in terms of a data base system employing a shadow paging system, pages are previously stored for the unit of 1-m control areas by securing idle frames. At the time of update, having been updated pages are stored in the idle frames in the control area 1-m where pages to be updated exist. Thus scattering is suppressed, and the number of times seeking and searching the external storage device can be reduced at the time of continuous input of pages.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は物理クラスタリング方式、すなわち、シャドー
ページングをサポー1−シたデータベースシステムにお
いて、更新操作により更新されたページを外部記憶装置
上の空きフレームに格納する方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention uses a physical clustering method, that is, a database system that supports shadow paging. This is related to the method of storing data in .

〔従来の技術〕[Conventional technology]

シャドーページング方式に関しては、例えば、J in
 Gray et al、”The Recovery
 Manager ofthe System RDa
tabase Manager” acm comp−
uting 5urveys、vol、13.&2(1
981)なる文献において論じられている。
Regarding the shadow paging method, for example, J in
Gray et al, “The Recovery
Manager of the System RDa
tabase Manager” acm comp-
uting 5urveys, vol. 13. &2(1
981).

これを要約すれば、シャドーページング方式とは、デー
タベース更新操作を、データベースの実体上ではなく、
そのコピー上で行う方式である。
To summarize, the shadow paging method means that database update operations are performed not on the actual database.
This method is performed on the copy.

ここでは、更新するページ単位にそのコピーを作成する
ものとする。
Here, it is assumed that a copy is created for each page to be updated.

更新操作を施さないデータベース実体の方のページ(群
)をバックアップ・バーバヨン、実体をコヒーシて更新
操作を施すページ(群)をカレント・バージョンと呼ぶ
The page(s) of the database entity on which update operations are not performed is called the backup version, and the page(s) on which the entity is cohered and updated is called the current version.

実体に更新操作を反映させるタイミング、すなわち、現
在のカレント・バージョンをバックアップ・バージョン
とし、以前のバックアップ・バージョンを無効とするタ
イミング(これを「チェックポイント」と呼ぶ)は、シ
ステム破壊の回復の効率化を図るため、ファイルに記録
(「ログ」と呼ぶ)する情報がある一定量蓄積された時
点である。上記チェックポイントは、上記ログ情報が上
記一定量蓄積される度に発生する。
The timing at which update operations are reflected in the entity, that is, the timing at which the current version is made the backup version and the previous backup version is invalidated (this is called a "checkpoint"), determines the efficiency of recovery from system corruption. This is the point at which a certain amount of information has been accumulated to be recorded in a file (referred to as a "log") in order to improve the system's performance. The checkpoint occurs every time the specified amount of log information is accumulated.

〔発明が解決しようとする問題点〕 上述のシャドーページング方式は、更新操作におけるペ
ージが、外部記憶装置(ディスク等)上の別の空き領域
に格納されるため、上記外部記憶装置上で、ページの不
連続化が発生し、ページの入出力処理、特にページを連
続して入力しようとした場合、シーク・サーチ処理が頻
繁に発生するという問題があった。
[Problems to be Solved by the Invention] In the shadow paging method described above, the page in the update operation is stored in a separate free area on the external storage device (disk, etc.). There was a problem in that page input/output processing, especially when trying to input pages consecutively, caused seek/search processing to occur frequently.

本発明のL1的は、従来の物理クラスタリング方式にお
ける上述の如き問題を解消し、ページの連続入力時の前
記外部記憶装置のシーク・サーチ回数を低減する物理ク
ラスタリング方式を提供することにある。
The L1 object of the present invention is to provide a physical clustering method that solves the above-mentioned problems in the conventional physical clustering method and reduces the number of seeks and searches of the external storage device when pages are continuously input.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の上記目的は、シャドーページング方式を採用し
たデータベース・システムにおいて、データベース情報
を外部記憶装置に格納する場合、フレームという物理ブ
ロックの集合単位毎に、空き領域(複数の空きフレーム
)を設けながらページを格納し、更新操作において、カ
レント・バージョン用のページを格納する空き領域をバ
ックアップ・バージョンが存在する。上記フレームの集
合単位(以下、「コントロールエリア」という)内に確
保することによって達成される。
The above object of the present invention is to store database information in an external storage device in a database system that employs a shadow paging method, while providing a free area (a plurality of free frames) for each set of physical blocks called a frame. A backup version exists that stores pages and, in update operations, has free space to store pages for the current version. This is achieved by allocating the above frames within a set unit (hereinafter referred to as a "control area").

〔作用〕[Effect]

本発明は、シャドーページング方式を採用したデータベ
ース・システムにおいて、予め、上記コントロールエリ
ア単位に空きフレームを確保しながらページを格納し、
更新処理時、更新の対象となるページが存在する上記コ
ントロールエリア内の空きフレームに、更新済みのペー
ジ(前記「カレントバージョン」)を格納することによ
り、スキャッタリングを抑制し、ページの連続入力時に
おける外部記憶装置のシーク・サーチ回数を低減するも
のである。
In a database system adopting a shadow paging method, the present invention stores pages while securing free frames in each control area in advance,
During update processing, by storing the updated page (the above-mentioned "current version") in an empty frame in the control area where the page to be updated exists, scattering is suppressed, and when pages are continuously input. This reduces the number of seek searches of external storage devices.

〔実施例〕〔Example〕

以下、本発明の実施例を図面に基づいて詳細に説明する
Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は、本発明の一実施例を示すデータベース・シス
テムの構成図である。図において、1は中央処理装置(
以下、rCPUJという)、2は主記憶装置、3はチャ
ネル、4は下記ディスク装置5を制御するコントローラ
、5は外部記憶装置としてのディスク装置を示している
。ディスク装置5は、データベース情報を格納する複数
のエクステント(「ファイル」に相当する)、およびデ
ータベース情報を管理するディレクトリを保持する。
FIG. 1 is a configuration diagram of a database system showing an embodiment of the present invention. In the figure, 1 is the central processing unit (
2 is a main storage device, 3 is a channel, 4 is a controller that controls a disk device 5 described below, and 5 is a disk device as an external storage device. The disk device 5 holds a plurality of extents (corresponding to "files") that store database information and a directory that manages database information.

11はデータベースに対し検索、更新等のアクセス要求
を発行するプログラムであるデータアクセス要求部であ
る。12はデータベース情報を主記憶上に保持するプロ
グラムであるバッファ管理部であり、後述するバッファ
部21のページ入出力用バッファを管理する。13は本
実施例の要部であるストレージ管理部であり、物理空間
と論理的なデータベース空間とのマツピングを行い、デ
ータベースの使用状況を管理するプログラムである。1
4は入出力管理部であり、前記ディスク装置5と主記憶
装置2との間におけるフレーム単位のデータの入出力を
処理するプログラムである。
Reference numeral 11 denotes a data access request unit which is a program that issues access requests such as searches and updates to the database. A buffer management unit 12 is a program that holds database information on the main memory, and manages a page input/output buffer of a buffer unit 21, which will be described later. Reference numeral 13 denotes a storage management unit which is a main part of this embodiment, and is a program that performs mapping between physical space and logical database space and manages the usage status of the database. 1
Reference numeral 4 denotes an input/output management section, which is a program that processes data input/output in units of frames between the disk device 5 and the main storage device 2.

21はバッファ部であり、データベース情報のアクセス
対象のページ(論理ブロック)を保持するページ入力用
バッファ(群)から成っている。22はディレクトリ部
であり、データベースの物理的な構成に関する制御情報
を保持する複数の管理ブロックから成り、上記ストレー
ジ管理部13により、該管理ブロック内の情報がアクセ
スされる。ディレクトリは前述の如く、ディスク装置5
に格納されているが、データベース処理開始時、ストレ
ージ管理部13からの入出力管理部14に対するディレ
クトリの主記憶常駐要求により、主記憶装置2上にロー
ディングされるものとする。
Reference numeral 21 denotes a buffer unit, which consists of a page input buffer (group) that holds pages (logical blocks) to be accessed for database information. Reference numeral 22 denotes a directory section, which consists of a plurality of management blocks that hold control information regarding the physical configuration of the database, and the information in the management blocks is accessed by the storage management section 13. As mentioned above, the directory is on disk device 5.
However, at the start of database processing, it is assumed that the directory is loaded onto the main storage device 2 by a request from the storage management section 13 to the input/output management section 14 to make the directory resident in the main memory.

ディレクトリ部22は、エクステント管理ブロック22
A、テーブル管理ブロック22B、ページフレーム・マ
ツピングブロック22Gおよびコントロールエリア管理
ブロック22Dの各ブロックで構成され、主としてデー
タベース情報を格納する、論理的なアドレス空間(ペー
ジの集合)と、「フレーム」という物理ブロックの集合
である物理的なアドレス空間との関連付け(マツピング
)を行うための情報を有する。次に、ディレクトリ内の
各管理ブロックについて説明する。
The directory section 22 includes an extent management block 22
A. It is composed of the table management block 22B, page frame mapping block 22G, and control area management block 22D, and has a logical address space (a collection of pages) that mainly stores database information, and a "frame". It has information for mapping with a physical address space that is a collection of physical blocks. Next, each management block within the directory will be explained.

第2図(A)〜(D)は上記ディレクトリ部22の詳細
を示す図である。
FIGS. 2(A) to 2(D) are diagrams showing details of the directory section 22. As shown in FIG.

第2図(A)はエクステント管理ブロック(群)22A
を示すものでデータベース情報を格納するフレAsの集
合体であるエクステントを管理する機能を有する。エク
ステントの詳細を第3図に示す。
FIG. 2(A) shows extent management block(s) 22A.
It has a function of managing extents, which are collections of frames As that store database information. The details of the extent are shown in FIG.

ページ格納時、エクステン1〜内はフレーt1の集合単
位、すなわち、コン1へロールエリア単位に空き領域(
空きフレーム)を設けるため、上記コントロールエリア
を、複数のフレームの集合単位から成るセグメン1−の
集合体により構成し、ページ情報格納時、上記セグメン
ト毎に空きフレームを確保するようにする。
When storing a page, the free space (inside extension 1) is set in units of frame t1, that is, in units of roll area to controller 1.
In order to provide an empty frame (empty frame), the control area is constituted by an aggregate of segments 1-, which is a unit of a plurality of frames, and an empty frame is secured for each segment when page information is stored.

第3図に示す、エクステント管理ブロック(群)22A
内のコントロールエリアとセグメントのサイズ(フレー
ム数)は、エクステント確保時、システムで予め設定し
ているデフオル1〜値に従い、前記データアクセス要求
部11がストレージ管理部13に要求して設定するもの
である。上記フレーム数はユーザがパラメータにより変
更することも可能である。エクステント管理ブロック(
群)22Aは、上述の如く構成されるエクステントを管
理するため第2図(A)に示す如き構成を有するもので
ある。
Extent management block(s) 22A shown in FIG.
The size of the control area and segment (number of frames) in the data access request unit 11 requests the storage management unit 13 to set the size (number of frames) of the control area and segment within the storage area, according to the default 1 to value set in advance in the system when securing an extent. be. The number of frames can also be changed by the user using parameters. Extent management block (
The group 22A has a configuration as shown in FIG. 2(A) in order to manage the extents configured as described above.

次に、テーブル管理ブロック22Bは、テーブル(リレ
ーションの表)を上記エクステントのコントロールエリ
ア単位に格納し、アクセスするための管理情報を有する
。また、ページフレーム・マツピングブロック(群)2
2Cは、エクステント単位に存在し、先頭から1.2,
3.・・・と配列番号が付けられており、また、各ペー
ジ対応の、カレント・バージョンのページが格納された
フレームのアドレスであるカレント・フレームアドレス
と、バックアップ・バージョンのページが格納されたフ
レームのアドレスであるバックアップ・フレームアドレ
スとを保持しており、ページという論理ブロックと、フ
レームという物理ブロックへのマツピングを管理する。
Next, the table management block 22B has management information for storing and accessing tables (tables of relations) in control areas of the extents. In addition, page frame mapping block (group) 2
2C exists in extent units, 1.2 from the beginning,
3. ..., and the current frame address, which is the address of the frame where the current version of the page is stored, and the address of the frame where the backup version of the page is stored, corresponding to each page. It holds the backup frame address, which is an address, and manages the mapping between logical blocks called pages and physical blocks called frames.

なお、上記両フレーム1組をマツプエントリと称し、こ
れはページ番号に対応するものである。
Incidentally, one set of both of the above-mentioned frames is called a map entry, which corresponds to a page number.

上記ページ番号は、先頭のページフレーム・マツピング
ブロック22Cの、最初のマツプエントリから順に1.
2,3.・・・と割付け1次のページフレーl\・マツ
ピングブロックの先頭は、1つ前の該マツピングブロッ
クの最終ページ番号+1から。
The above page numbers are 1.
2, 3. ...and the first page frame of the layout l\・The beginning of the mapping block starts from the last page number of the previous mapping block +1.

順に割当てられる。従って、該マツピングブロックのあ
るマツプエントリのページ番号は、次のようにして算出
する。
Assigned sequentially. Therefore, the page number of the map entry containing the mapping block is calculated as follows.

(マツプエントリのページ番号) =(該ブロックの配列番号−1) ×(該ブロック内のマツプのエントリ数)+該ブロック
内におけるマツプエントリ順位コントロールエリア管理
ブロック(群)22Dは、上記エクステン1〜内の各コ
ン1〜ロールエリア毎に存在し、先頭のコントロールエ
リア番号を1″′とし、以下、コントロールエリアに順
次番号を割付ける。これは、コントロールエリア管理ブ
ロック(群)の配列番号に対応する。また、コントロー
ルエリア管理ブロック(群)22Dは、コントロールエ
リア内のフレー11の使用、未使用を管理する。同一テ
ーブルのページを格納したコントロールエリア管理ブロ
ックを識別するため、本管理ブロックは、直前と直後の
コントロールエリア管理プロッりのポインタを有する。
(Page number of map entry) = (Array number of the block - 1) × (Number of map entries in the block) + Map entry order control area management block (group) 22D in the block has the above extensions 1 to 1. The first control area number is 1'', and numbers are assigned to the control areas sequentially. This corresponds to the array number of the control area management block (group). In addition, the control area management block (group) 22D manages the use and non-use of frames 11 in the control area.In order to identify control area management blocks that store pages of the same table, this management block Contains pointers to the immediately preceding and succeeding control area management plots.

以下、上述の如く構成された本実施例の動作を説明する
。説明は、第6図(A)〜(L)に基づいて行う。
The operation of this embodiment configured as described above will be explained below. The explanation will be based on FIGS. 6(A) to 6(L).

(1)テーブル作成時の空き領域確保 第6図(A)〜(E)に基づいて説明する。第6図(A
)は本処理の全般的な流れを示し、第6図(B)〜(E
)はその詳細を示している。
(1) Securing free space when creating a table will be explained based on FIGS. 6(A) to 6(E). Figure 6 (A
) shows the general flow of this process, and Figures 6(B) to (E
) shows the details.

まず、テーブルを作成し、それをエクステントに格納す
る場合について説明する。CPUI内のデータアクセス
要求部11からストレージ管理部13に、テーブル作成
要求を発行する。このとき、テーブルID、1セグメン
ト当りの空きフレーム数および当テーブルを格納するエ
クステントのiDを渡す。ス1−レージ管理部13は空
きのテーブル管理ブロック(群)22Bを探し、それら
を第2図(B)の″テーブル■[) II 、 II空
きフレーム数/セグメンl−II。
First, we will explain the case of creating a table and storing it in an extent. A table creation request is issued from the data access request unit 11 in the CPUI to the storage management unit 13. At this time, the table ID, the number of free frames per segment, and the ID of the extent storing this table are passed. The storage management unit 13 searches for empty table management blocks (groups) 22B and stores them in the ``table ■[) II, II number of empty frames/segment l-II'' in FIG. 2(B).

“エクステントID”のエリアに格納する。Store it in the “extent ID” area.

次に、データアクセス要求部11はバッファ管理部12
にテーブルの情報を渡し、それをエクステン1〜に格納
するよう要求する。バッファ管理部12はページを確保
してページ入出力用バッファに割当て、エクステント内
からフレームを確保し、該フレームにそのページ(バッ
ファ内容)を格納する処理を行う。そのため、まず、ス
トレージ管理部13をコールし、ページを確保する。
Next, the data access request unit 11
Pass the table information to and request that it be stored in extensions 1~. The buffer management unit 12 secures a page and allocates it to a page input/output buffer, secures a frame from within the extent, and performs processing to store the page (buffer contents) in the frame. Therefore, first, the storage management unit 13 is called and a page is secured.

ス1〜’  ”’管理部13は、ページフレーム・マツ
ピングブロック(群)22Cをサーチし、カレント・フ
レームアドレスとバックアップ・フレームアドレスが共
に“0(ページ未確保)″のところを、該当ページとし
て割当てる。このとき、割当て済みのフラグとして、I
I IF FT 11をカレント・フレームアドレスの
エリアにセットする。そして、このエリアがページフレ
ーム・マツピングブロック22Cの先頭から何番目かを
算出し、これをページ番号とする(処理30.40〜4
7)。
The management unit 13 searches the page frame mapping block (group) 22C, and selects the corresponding page where both the current frame address and the backup frame address are "0 (page not secured)". At this time, I is assigned as an assigned flag.
I IF FT Set 11 to the current frame address area. Then, calculate the number of this area from the beginning of the page frame mapping block 22C, and use this as the page number (processes 30.40 to 4).
7).

バッファ管理部12は、受取ったページ番号をハソファ
部21の未割当てのページ入出力用バッファに割当てる
(処理31)。そして、ページ入出力用バッファにテー
ブルの情報をセットシ、それをエクステントに格納する
(処理32)。そのため、バッファ管理部12はストレ
ージ管理部13をコールし、空きフレームを確保する(
処理50〜59)。ス1−レージ管理部13は、上記テ
ーブルIDを有するテーブル管理ブロック22Bの、当
該テーブル用先頭コントロールエリアポインタが指すコ
ントロールエリア管理ブロック22Dから、ポインタを
辿りながら、制御フラグが1(フレーム確保OK)”の
管理ブロックを、サーチして求める。
The buffer management unit 12 allocates the received page number to the unallocated page input/output buffer of the sofa unit 21 (processing 31). Then, table information is set in the page input/output buffer and stored in the extent (processing 32). Therefore, the buffer management unit 12 calls the storage management unit 13 to secure an empty frame (
Processing 50-59). The storage management unit 13 traces the pointer from the control area management block 22D pointed to by the table head control area pointer of the table management block 22B having the table ID, and sets the control flag to 1 (frame reservation OK). ” Search and find the management block.

求めたコントロールブロックを、空き領域用のフレーム
を除き、セグメン1一単位に、空きフレーム(ページ番
号が格納されていない)が確保可能か否か判定し空きフ
レームを求める。より詳細に言えば、求めたコンI〜ロ
ールエリア管理ブロックから空きフレームを確保するた
め、当該エクステン1〜管理ブロツク22Aから1セグ
メントサイズ(フレーム数)″を、また、当該テーブル
管理ブロックから″空きフレーt1数/セグメント″を
求め、両者の差をパ確保可能フレーム数/セグメント″
とし、セグメントの先頭から該確保可能フレーム数/セ
グメントまでの間に、ページ番号が格納されているか否
かを判定する。
For the obtained control blocks, excluding frames for free areas, it is determined whether or not free frames (no page numbers are stored) can be secured for each segment 1, and free frames are obtained. More specifically, in order to secure an empty frame from the obtained control block I~roll area management block, one segment size (number of frames)'' from the relevant extension 1~management block 22A, and ``free frame'' from the relevant table management block. Find the number of frames t1/segment'' and calculate the difference between the two as the number of frames/segment that can be secured.
Then, it is determined whether a page number is stored between the beginning of the segment and the number of retrievable frames/segment.

空きフレームがなければ次のセグメントについて同様の
処理を行う。空きフレームがあれば、当該コン1−ロー
ルエリアのフレーt1対応のエリアにページ番号をセッ
トし、1前記コントロ一ルエリア番号、フレーム番号を
、1)f記ページフレーム・マツピングブロック22C
における該当ページ用カレン1〜フレームアドレス用の
エリアおよびバックアップフレーム用のエリアにセット
する。ここで、コン1ヘロールエリア番号とは、前述の
如く、エクステン1−の先頭から何番目のコントロール
エリアかを示しており、コントロールエリア管理ブロッ
クの配列番号に対応するものである。また、フレtz番
号とは、上記コンI〜ロールエリア管理ブロックの先頭
から何番目のフレームかを示すものである。
If there is no free frame, the same process is performed for the next segment. If there is an empty frame, set a page number in the area corresponding to frame t1 of the control 1-roll area, and set the control area number and frame number to 1) f page frame mapping block 22C.
Set in the Karen 1 for the corresponding page to area for frame address and area for backup frame. Here, as described above, the controller area number indicates the number of the control area from the beginning of the extension 1-, and corresponds to the array number of the control area management block. Further, the frame tz number indicates the number of the frame from the beginning of the control I to roll area management block.

上述の如く、フレー11を確保した後、当該コントロー
ルエリアの確保可能なフレームすべてをページ対応に割
当てた場合、当該コントロールエリア管理ブロックの制
御フラグに2(空き領域用以外フレーム確保不可)″を
セットする。もし、テーブル管理ブロック22Bの当該
テーブル用先頭コントロールエリアポインタが0(コン
トロールエリア未確保)″の場合、および、当該テーブ
ル情報を格納したコン1−ロールエリア対応の最終チェ
ーンのコンI−ロールエリア管理ブロック内にある制御
フラグが’2”(空き領域用以外フレーム確保不可)の
場合、当該テーブルID対応のテーブル管理ブロック2
2B内に存在する“エクステントID″′を求め、当該
エクステントIDに関する情報を有するエクステント管
理ブロック22A内の、先頭コントロールエリア管理ブ
ロックポインタの指すコントロールエリア管理ブロック
から、新たに、空きのコントロールエリア管理ブロック
(群)22Dをサーチ(制御フラグが“O”)シ、空き
の当該テーブル用コン1〜ロールエリアを確保する(処
理60〜67)。
As mentioned above, after securing frame 11, if all the frames that can be secured in the control area are assigned to the page, the control flag of the control area management block is set to 2 (frames other than those for free space cannot be secured)''. If the first control area pointer for the table in the table management block 22B is 0 (control area not secured), and if the control area pointer of the last chain corresponding to the control area that stores the table information is If the control flag in the area management block is '2' (frames other than those for free space cannot be secured), the table management block 2 corresponding to the table ID
2B, and search for a new free control area management block from the control area management block pointed to by the first control area management block pointer in the extent management block 22A that has information regarding the extent ID. (Group) 22D is searched (control flag is "O") and a vacant controller 1 to roll area for the table is secured (processes 60 to 67).

このとき、確保した本管理ブロックの制御フラグをRI
 11にする。確保した本管理ブロックを、同テーブル
用コントロールエリア管理ブロックの最終チェーン、つ
まり、第2図(D)のコン1〜ロールエリアブロツク2
2D内の、次のコントロールエリア管理ブロックポイン
タ、1つ前のコントロールエリア管理ブロックポインタ
に示すように、両エリアにコン!−ロールエリア管理ブ
ロックの配列番号をセットする。もしくは、第2図(B
)のテーブル管理ブロック22Bの当該テーブル用先頭
コントロールエリアポインタの内容が“0″の場合、コ
ンI・ロールエリア未確保のため、そのポインタに、確
保したコントロールエリア管理ブロック22Bをチェー
ンする。
At this time, the control flag of the secured main management block is set to RI.
Make it 11. The secured main management block is used as the final chain of control area management blocks for the same table, that is, control area blocks 1 to 2 in Figure 2 (D).
As shown in the next control area management block pointer and the previous control area management block pointer in 2D, both areas are con! - Set the array number of the roll area management block. Or, Figure 2 (B
) If the content of the first control area pointer for the table in the table management block 22B is "0", the control area management block 22B is chained to that pointer because the control area/roll area is not secured.

その後、前述のフレーム確保処理(処理33)を行う。Thereafter, the frame securing process (process 33) described above is performed.

確保したフレームのアドレスとして、フレーム番号と当
該コントロールエリアの番号をバッファ管理部12に返
す。バッファ管理部12はフレームアドレスと当ページ
対応のページ入出力用バッファのアドレス、エクステン
トIDを入出力管理部14に渡し当ページを出力するよ
う要求する(処理34)。入出力管理部14は上記情報
を基に、前記ディスク装置5上に存在する該当エクステ
ン1〜内のフレー11にページを格納する。エクステン
ト内に1ページを格納する度に上述の処理を行う。これ
により、コン1〜ロールエリア単位に空き領域を設けな
がらテーブルのページを連続的に格納することが可能に
なる。
The frame number and the number of the control area are returned to the buffer management unit 12 as the address of the secured frame. The buffer management unit 12 passes the frame address, the address of the page input/output buffer corresponding to this page, and the extent ID to the input/output management unit 14 and requests that the page be outputted (processing 34). Based on the above information, the input/output management unit 14 stores the page in the frame 11 in the corresponding extensions 1 to 1 existing on the disk device 5. The above process is performed every time one page is stored in an extent. This makes it possible to continuously store the pages of the table while providing free space in units of controller 1 to roll areas.

(2)テーブルの更新 次に、テーブル内の情報を更新する場合のカレントバー
ジョンのページの格納方法につき、第6図(F)〜(L
)に基づいて説明する。第6図(F)は本処理の全般的
な流れを示し、第6図(G)〜(L)はその詳細を示し
ている。
(2) Updating the table Next, we will explain how to store the current version of the page when updating the information in the table.
). FIG. 6(F) shows the general flow of this process, and FIGS. 6(G) to (L) show its details.

まず、当該テーブルの更新対象となる情報を格納したペ
ージを見つけるため、データアクセス要求部11から、
バッファ管理部12に当該テーブルよりのページを取得
し、ページ情報を入力せよという要求が発せられる。バ
ッファ管理部12は、まずページ入出力用バッファ21
の中から、空きのバッファを確保する。そして、テーブ
ルIDをストレージ管理部13に渡し、ページ番号を取
得するよう要求する(処理70)。ストレージ管理部1
3は、テーブルIDに対応するテーブル管理ブロック2
2Bの先頭コン]−ロールエリア管理ブロック22Bの
先頭コントロールエリア管理ブロック22D内のページ
番号格納用エリアから順にページ番号を得てバッファ管
理部12に返す。
First, in order to find the page that stores the information to be updated in the table, the data access request unit 11 requests
A request is issued to the buffer management unit 12 to obtain a page from the table and input page information. The buffer management unit 12 first stores the page input/output buffer 21.
Allocate an empty buffer from within. Then, the table ID is passed to the storage management unit 13 and a request is made to obtain the page number (process 70). Storage management section 1
3 is table management block 2 corresponding to the table ID
2B's top control]--Page numbers are obtained in order from the page number storage area in the top control area management block 22D of the roll area management block 22B and returned to the buffer management section 12.

次に、バッファ管理部12は、ストレージ管理部13に
テーブルIDとページ番号を渡し、ページ番号から当該
エクステント内のフレームアドレスにマツピングするよ
う要求する。ストレージ管理部13は渡されたテーブル
IDに対応するテーブル管理ブロック22Bをサーチし
、該当する管理ブロック内からエクステントIDを得、
該エクステントIDに対応したエクステント管理ブロッ
ク22Aからページフレーム・マツピングブロック22
Cを求める。
Next, the buffer management unit 12 passes the table ID and page number to the storage management unit 13, and requests mapping from the page number to a frame address within the extent. The storage management unit 13 searches the table management block 22B corresponding to the passed table ID, obtains the extent ID from within the corresponding management block,
From the extent management block 22A corresponding to the extent ID to the page frame mapping block 22
Find C.

ストレージ管理部’13は、上で求めたページフレーム
・マツピングブロック22Cの該当ページ番号に対応し
たカレント・フレームアドレスおよびバックアップ・フ
レームアドレスを取得し、それをバッファ管理部12に
返す。バッファ管理部12は、上記両フレームアドレス
を確保したページ入出力用バッファに格納し、そのカレ
ント・フレームアドレスを基に入出力管理部14にペー
ジ入力要求を発行し、該ページをバッファ部21の、確
保したページ入出力用バッファに得る(処理80〜83
)。
The storage management unit '13 acquires the current frame address and backup frame address corresponding to the corresponding page number of the page frame mapping block 22C determined above, and returns them to the buffer management unit 12. The buffer management unit 12 stores both of the above frame addresses in the secured page input/output buffer, issues a page input request to the input/output management unit 14 based on the current frame address, and transfers the page to the buffer unit 21. , obtained in the secured page input/output buffer (processes 80 to 83
).

データアクセス要求部11は、更新の対象となる情報が
存在するページの場合、上記ページ人出力バッファのペ
ージ情報を更新する(処理71.72)。
If the page includes information to be updated, the data access request unit 11 updates the page information in the page output buffer (processes 71 and 72).

更新の対象となる情報が該ページ内に存在しない場合は
、バッファ管理部12に次のページをページ入出力用バ
ッファに入力するよう要求し前述の処理を行う。すなわ
ち、重複してページを入力しない(処理74.75)。
If the information to be updated does not exist in the page, the buffer management unit 12 is requested to input the next page into the page input/output buffer, and the above-described process is performed. That is, duplicate pages are not input (processes 74 and 75).

データアクセス要求部11は、更新後のページをエクス
テントに格納するため、バッファ管理部12にページ出
力要求を発行する(処理73)。バッファ管理部12は
、該当するページ入出力用バッファから、以前に格納し
たカレント・フレームアドレスおよびバックアップ・フ
レームアドレスの両アドレスを得、両アドレスを比較す
る。
The data access request unit 11 issues a page output request to the buffer management unit 12 in order to store the updated page in the extent (processing 73). The buffer management unit 12 obtains both the previously stored current frame address and backup frame address from the corresponding page input/output buffer, and compares the two addresses.

両アドレスが等しくない場合には、カレント・フレーム
アドレスを指定して、入出力管理部14にページ入出力
用バッファに格納済みのページを出力するよう要求する
(処理94)。また、上記両アドレスが等しい場合には
、1)η記カレント・バージョンのページ(更新済みの
ページ)を格納するため、新しくフレームを確保する必
要がある。
If the two addresses are not equal, the current frame address is specified and a request is made to the input/output management unit 14 to output the page already stored in the page input/output buffer (processing 94). Furthermore, if the above two addresses are the same, it is necessary to allocate a new frame in order to store the 1) current version page (updated page).

そのため、バッファ管理部12からストレージ管理部1
3へ、テーブルID、ページ番号、バックアップ・フレ
ームアドレスを渡し、フレームを確保するよう要求する
(処理90〜92)。ス1−レージ管理部13は、バッ
クアップ・フレームアドレスとしてコン1−ロールエリ
ア番号とフレーム番号を得、また、前述の如く、テーブ
ルIDから該当テーブル管理ブロック22I3を求め、
そのブロック中に保持しているエクステントIDから該
当エクステント管理ブロック22Aを求めて、コントロ
ールエリアのフレーム数およびセグメントのフレーム数
を得る。
Therefore, from the buffer management unit 12 to the storage management unit 1
The table ID, page number, and backup frame address are passed to No. 3 to request that the frame be secured (processes 90 to 92). The storage management unit 13 obtains the controller area number and frame number as the backup frame address, and also obtains the corresponding table management block 22I3 from the table ID as described above.
The corresponding extent management block 22A is determined from the extent ID held in the block, and the number of frames in the control area and the number of frames in the segment are obtained.

これらの情報から、バックアップ・バージョンのページ
が存在するセグメン1一番号を算出し、該セグメント内
に存在する空きフレームを確保するため、そのセグメン
トの先頭フレームから最終フレーム(先頭フレーム番号
子セグメントサイズ)に対応する、コントロールエリア
管理ブロック22D内のページ番号格納用エリアがパ0
(すなわち、ページ番号がセットされていない空きフレ
ーzs)”であるか否かを判定する(処理100〜10
4)。
From this information, calculate the segment 1 number in which the backup version page exists, and in order to secure an empty frame within the segment, start from the first frame of the segment to the last frame (first frame number child segment size) The page number storage area in the control area management block 22D corresponding to
(i.e., empty frame zs for which no page number is set)" (processes 100 to 10
4).

上記ページ番号格納エリアが0′″であれば、そこへペ
ージ番号をセットする。これにより、当該セグメント内
にカレン1−・バージョン用ページのフレームを確保す
ることができる。
If the page number storage area is 0'', a page number is set there.Thereby, it is possible to secure a frame for the Karen 1-version page in the segment.

次に、そのページ番号格納用エリアが、当該コン1〜ロ
ールエリア管理ブロツク22Dの先頭にあるページ番号
格納用エリアから何番目にあるかを算出してそれをフレ
ーム番号とする。そして、フレーム確保を要求したペー
ジにおいて、該当するエクステント用ページフレーム・
マツピングブロック22C内の、そのページに対応する
カレント・フレームアドレスのエリアに、確保したフレ
ームの番号、確保したフレーt1が存在するコントロー
ルエリア番号をセラ1〜しく処理105〜107)、そ
の後、バッファ管理部12に、確保したカレント・フレ
ームアドレスを返す(処理108)。
Next, the number of the page number storage area from the top page number storage area of the control 1 to roll area management block 22D is calculated and used as the frame number. Then, on the page that requested frame reservation, the page frame for the corresponding extent is
In the area of the current frame address corresponding to that page in the mapping block 22C, the number of the secured frame and the control area number where the secured frame t1 exists are processed 105 to 107), and then the buffer The secured current frame address is returned to the management unit 12 (process 108).

バッファ管理部12は、上記カレント・フレームアドレ
スと、更新済みページ情報とを格納したページ入出力用
バッファのアドレスを入出力管理部14に渡し、エクス
テントへの出力要求を発行することにより、更新したペ
ージを二りステント内の指定フレームに格納する(処理
93)。
The buffer management unit 12 passes the address of the page input/output buffer storing the current frame address and the updated page information to the input/output management unit 14, and issues an output request to the extent, thereby updating the page information. The page is stored in a designated frame within the second stent (process 93).

もし、当該セグメント内に空きフレームがなければ、バ
ックアップ・バージョンのページが存在するコントロー
ルエリア内の他のセグメントの空きフレーム(空き領域
用のフレームも含む)を確保する(処理109〜114
)。
If there is no free frame in the segment, free frames (including frames for free space) in other segments in the control area where the backup version page exists are secured (processes 109 to 114).
).

以上の処理を、ページの更新毎に行う。The above processing is performed every time a page is updated.

上記実施例によれば、更新前のページが格納されたフレ
ームの近くに、更新後のページを格納することが可能に
なり、また、ページアクセスの際の、外部記憶装置のシ
ーク・サーチ回数が低減できるとともに、外部記憶装置
の占有時間および入出力負荷の低減が可能になるという
効果がある。
According to the above embodiment, the updated page can be stored near the frame in which the unupdated page is stored, and the number of seeks and searches of the external storage device when accessing the page can be reduced. This has the effect of making it possible to reduce the time occupied by the external storage device and the input/output load.

次に、本発明の他の実施例として、データベース再編集
時、前記空きフレームの大きさを、ページ(群)の更新
回数(分布)に従って、ダイナミックに変更しながら確
保するようにした例を示す。
Next, as another embodiment of the present invention, an example will be shown in which, when re-editing the database, the size of the free frame is dynamically changed and secured according to the number of updates (distribution) of the page(s). .

本実施例と1前述の実施例との構成上の差違は。The difference in structure between this embodiment and the first embodiment described above is as follows.

本実施例においては、下記の如き付加機能を有する如く
構成した点にある。
The present embodiment is configured to have the following additional functions.

すなわち、 (1)前記ディレクトリ部22内のテーブル管理ブロッ
ク22B内に、テーブルの再編成時、コントロールエリ
ア内の空き領域量をダイナミックに変更するための統計
情報の1つとしての、テーブルの更新回数をカウントす
るエリアを有すること。
That is, (1) The number of table updates is stored in the table management block 22B in the directory section 22 as one of the statistical information for dynamically changing the amount of free space in the control area when reorganizing the table. have an area for counting.

(2)コントロールエリア内に格納されたページの更新
状況を把握し、再編成時に、コントロールエリア内の空
き領域量をダイナミックに変更するため、コントロール
エリアを構成するセグメント単位に空き領域を変更する
方式とし、0「記コントロールエリア管理ブロック22
D内に、セグメント対応に、該当セグメント対内で更新
されたページの更新回数をカウントするエリアを有する
こと6以下、上述の如き特徴を有する本実施例の動作を
説明する。なお1本実施例の動作は、大部分が先の実施
例の動作と同じであるため、以下の説明においては、先
の実施例と異なる部分のみを説明することにする。
(2) A method of changing the free space in units of segments that make up the control area in order to grasp the update status of pages stored in the control area and dynamically change the amount of free space in the control area when reorganizing. and 0 "control area management block 22
In D, there is provided an area corresponding to each segment to count the number of updates of a page updated within the corresponding segment pair.6 Below, the operation of this embodiment having the above-mentioned characteristics will be explained. Note that since most of the operations of this embodiment are the same as those of the previous embodiment, only the parts that are different from the previous embodiment will be explained in the following description.

第4図(A)、(B)は、上に説明した本実施例の特徴
であるポインタ1〜す22部内のテーブル管理ブロック
と、コントロールエリア管理ブロックの詳細な構成を示
すものである。
FIGS. 4A and 4B show detailed configurations of the table management blocks in the pointer 1 to 22 parts and the control area management block, which are the features of this embodiment described above.

すなわち、第4図(A)は、先の実施例におけるテーブ
ル管理ブロック22Bに対応するテーブル管理ブロック
22Eを示すものであり、両者の相違点は、本実施例に
係るテーブル管理ブロック22Eが上に述べたテーブル
の更新回数カウントエリア、および、後述するテーブル
再編成用先頭コントロールエリア管理ブロック・ポイン
タを有する点にある。
That is, FIG. 4(A) shows a table management block 22E corresponding to the table management block 22B in the previous embodiment, and the difference between the two is that the table management block 22E according to the present embodiment is on the top. It has the above-mentioned table update count area and a table reorganization head control area management block pointer, which will be described later.

また、第4図(B)は、先の実施例におけるコントロー
ルエリア管理ブロック22Dに対応するコントロールエ
リア管理ブロック22Fを示すものであり、両者の相違
点は、本実施例に係るコントロールエリア管理ブロック
22Fが上に述べたセグメント対応の管理エリアを有す
る点にある。
Further, FIG. 4(B) shows a control area management block 22F corresponding to the control area management block 22D in the previous embodiment, and the difference between the two is that the control area management block 22F according to the present embodiment is The main feature is that it has the segment-compatible management area mentioned above.

(1)テーブル作成時の空き領域確保 この動作は、先の実施例に示した動作と全く同じである
(1) Securing free space when creating a table This operation is exactly the same as the operation shown in the previous embodiment.

(2)テーブルの更新 ここでは、テーブル内の情報を更新する場合のカレント
・バージョンのページ格納方法、およびテーブル再編成
用の統計情報取得方法について説明する。
(2) Updating a table Here, a method for storing pages of the current version when updating information in a table and a method for acquiring statistical information for table reorganization will be explained.

まず、当該テーブルの更新対象となる情報を格納したペ
ージを見つけるため、データアクセス要求部11から、
バッファ管理部12に当該テーブルよりのページを取得
し、ページ情報を入力せよという要求が発せられる。バ
ッファ管理部12は、テーブルIDをストレージ管理部
13に渡し、ページ番号を取得するよう要求する。ここ
までは、先の実施例と同様である。
First, in order to find the page that stores the information to be updated in the table, the data access request unit 11 requests
A request is issued to the buffer management unit 12 to obtain a page from the table and input page information. The buffer management unit 12 passes the table ID to the storage management unit 13 and requests it to obtain the page number. The process up to this point is the same as the previous embodiment.

ス1−レージ管理部13は、統計情報として、テーブル
の更新回数をカウントするため、テーブル再編成用のテ
ーブル管理ブロック22E内の、テーブル更新回数カウ
ントエリアに1″′を加算した後。
The storage management unit 13 adds 1'' to the table update count area in the table management block 22E for table reorganization in order to count the number of table updates as statistical information.

テーブルIDに対応するテーブル管理ブロック22Eの
、先頭コン1−ロールエリア管理ブロック・ポインタが
指すコントロールエリア管理ブロック22F内のページ
番号格納用エリアから順にページ番号を得て、バッファ
管理部12に返す。
Page numbers are sequentially obtained from the page number storage area in the control area management block 22F pointed to by the first control 1-roll area management block pointer of the table management block 22E corresponding to the table ID, and returned to the buffer management unit 12.

次に、本明細書第16ページ17行目から、第20ペー
ジ11行[1までに示した動作を順次行う。なお、この
間の記載における、テーブル管理ブロック22B ハ同
22 Eと、コン1−ロールエリア管理ブロック22D
は同22Fと、それぞれ読替えるものとする。
Next, the operations shown in page 16, line 17 of this specification to page 20, line 11 [1] are sequentially performed. In addition, in this description, the table management block 22B, the same 22E, and the control 1-roll area management block 22D.
shall be read as 22F.

また、コン1−ロールエリア番号のセット動作を行う際
、同時に、テーブルの再編成を行う場合の空き領域確保
の予aIす用統計値を取るため、カレント・バージョン
のページが存在するセグメント番号から、それに対応す
るセグメン1〜対応管理エリア内のセグメント内更新ペ
ージカウントエリアにrt 1 uを加算する。
In addition, when performing the controller 1 roll area number set operation, at the same time, in order to obtain statistical values to reserve free space when reorganizing the table, the page number of the current version is calculated from the segment number where the page of the current version exists. , rt 1 u is added to the intra-segment update page count area in the corresponding management area of segment 1 to the corresponding management area.

次に、本明細書第20ページ12行目から、第21ペー
ジ5行目までに示した動作を行う。
Next, the operations shown from line 12 on page 20 to line 5 on page 21 of this specification are performed.

(3)テーブルの再編成 次に、テーブルの再編成について説明する。(3) Reorganization of tables Next, table reorganization will be explained.

テーブルの更新、追加により、コントロールエリア内の
空き領域がす入で使用され、新たにコントロールエリア
が確保される頻度が高くなった場合、データベース・シ
ステムが自動的にテーブルの再編成の必要性を把握し、
テーブルの再編成を行う。また、ユーザからのテーブル
再編成要求が発せられた場合も同様に行う。
When tables are updated or added, free space in the control area is quickly used up, and if new control areas are allocated more frequently, the database system automatically detects the need to reorganize tables. Understand,
Reorganize the table. The same process is also performed when a table reorganization request is issued by a user.

テーブルの再編成を行う場合、まず、テーブルの情報を
格納した全コン1へロールエリアについて再編成を行う
よう、テーブルIDを、データアクセス要求部11から
ストレージ管理部13に渡して要求する。
When reorganizing a table, first, the data access requesting unit 11 passes the table ID to the storage management unit 13 to request that all controllers 1 storing table information reorganize their roll areas.

ストレージ管理部13は、ディレクトリ部22内の上記
テーブルIDに対応するテーブル管理ブロック22Eを
求め、その中の当該テーブル用先頭コン1−ロールエリ
ア管理ブロック・ポインタから、当テーブルの先頭コン
トロールエリア管理ブロックを1()る。
The storage management unit 13 obtains the table management block 22E corresponding to the above-mentioned table ID in the directory unit 22, and uses the leading control area management block pointer for the table in the table management block 22E to find the leading control area management block of the table. 1().

次に、ス1−レージ管理部13は、先頭コントロールエ
リア管理ブロックに対応するコントロールエリアから、
セグメント単位に必要と予測される空き領域(空きフレ
ーム)を算出し、新しく確保したコントロールエリアへ
上記算出した空き領域を設けながら、ページ情報を移す
処理を行う。
Next, the storage management unit 13 controls the control area from the control area corresponding to the first control area management block.
The free space (free frame) that is predicted to be necessary for each segment is calculated, and the page information is transferred while providing the calculated free space to the newly secured control area.

上記セグメント単位に、必要と予測される空き領域を算
出する方法は、例えば、下記のいずれかによることがで
きる。
As a method for calculating the estimated necessary free space for each segment, for example, one of the following methods can be used.

(1)テーブルの再編成までの期間内に発生したテーブ
ル更新処理において、セグメント単位に、更新したペー
ジの最大数を求めて、その最大ページ数分の空き領域を
確保する方式。この場合、テーブルの更新毎に、セグメ
ント単位の最大ページ更新数を統計情報として取得する
(1) A method of determining the maximum number of updated pages for each segment in table update processing that occurs during the period before table reorganization, and securing free space for the maximum number of pages. In this case, each time the table is updated, the maximum number of page updates per segment is acquired as statistical information.

(2)セグメント単位に、更新したページの平均ページ
数を求め、そのページ数分の空き領域を確保する方式。
(2) A method of determining the average number of updated pages for each segment and securing free space for that number of pages.

ここでは、後者の、平均ページ数分の空き領域を確保す
る方式を採用するものとして、説明を続ける。
Here, the explanation will be continued assuming that the latter method of securing free space for the average number of pages is adopted.

この方式における平均ページ数の算出は、一定期間内に
、該セグメント内で更新されたページ総数を、同一期間
内にテーブルが更新された回数で割れば良い。以下に、
算出式を示す。
The average number of pages in this method can be calculated by dividing the total number of pages updated within a given segment by the number of times the table was updated within the same period. less than,
The calculation formula is shown below.

(確保すべき空きフレーム数) テーブルが更新された回数 なお、前述の、更新されたページの最大数分の空き領域
を確保する方式の場合は (確保すべき空きフレーム数) =一定期間内における 該セグメント内の最大更新ページ数 となる。
(Number of free frames to be secured) Number of times the table has been updated In the case of the above-mentioned method of securing free space for the maximum number of updated pages, (Number of free frames to be secured) = Number of times the table has been updated within a certain period of time. This is the maximum number of updated pages within the segment.

前者の算出式に必要な値として、テーブルが更新された
回数を、当該テーブルIDのテーブル管理ブロック22
E内の、テーブルの更新回数カラン1−エリアから得、
該セグメント内の更新ページカラン1〜数は、当該テー
ブル用のコントロールエリア管理ブロック22Fにおけ
るセグメン1一対応管理エリア内のセグメント内更新ペ
ージカウントエリア(第4図参照)から得る(処理12
0〜123)。
As a value necessary for the former calculation formula, the number of times the table has been updated is stored in the table management block 22 of the table ID.
Obtain the number of updates of the table in E from Callan 1-area,
The number of updated pages in the segment is obtained from the intra-segment updated page count area (see FIG. 4) in the segment 1-corresponding management area in the control area management block 22F for the table (processing 12).
0-123).

上記セグメン1へ内更新ページカウント数およびテーブ
ルが更新された回数は、テーブルのコントロールエリア
が再編成された場合、リセットされるものとする。この
リセッ1−はス1−レージ管理部1:3が行う。
It is assumed that the update page count number in segment 1 and the number of times the table has been updated are reset when the control area of the table is reorganized. This reset 1- is performed by the storage management unit 1:3.

次に、ストレージ管理部13は、上記セグメント内のペ
ージを移すべき、新コントロールエリアを確保する。
Next, the storage management unit 13 secures a new control area to which the pages in the segment are to be transferred.

まず、新コン1〜ロールエリアが確保されているか否か
を判定するため、該テーブルIDに対応するテーブル管
理ブロック22E内の再編成用先頭コン1〜ロールエリ
ア管理ブロツク・ポインタがII OIIであるか否か
をチェックする。rr Ouの場合は、コントロールエ
リア管理ブロック22Fの制御フラグが0(コントロー
ルエリア空き)″の管理ブロックをサーチし、空きのコ
ントロールエリア管理ブロックを確保する。
First, in order to determine whether or not the new controller 1~roll area is secured, it is determined that the reorganization head controller 1~roll area management block pointer in the table management block 22E corresponding to the table ID is II OII. Check whether or not. In the case of rr Ou, a management block whose control flag of the control area management block 22F is 0 (control area empty) is searched, and an empty control area management block is secured.

このとき確保した本管理ブロックの制御フラグを“1(
フレーム確保OK)”にし、当テーブルIDに対応する
テーブル管理ブロックの再編成用先頭コントロールエリ
ア管理ブロック・ポインタのエリアに、本管理ブロック
の先頭アドレスをセットする(処理124,127,1
28)。
At this time, set the control flag of the main management block secured to “1 (
Frame reservation OK)" and set the start address of this management block in the reorganization start control area management block pointer area of the table management block corresponding to this table ID (processes 124, 127, 1).
28).

もし、再編成用コントロールエリア管理ブロック・ポイ
ンタが“0゛′でなければ、すでにコントロールエリア
が確保されているわけで、先頭コントロールエリア管理
ブロックの次のコントロールエリア管理ブロック・ポイ
ンタを辿り、制御フラグがII I 11のコントロー
ルエリア管理ブロックを得る(処理125)。
If the control area management block pointer for reorganization is not "0'', it means that the control area has already been secured, and the next control area management block pointer of the first control area management block is followed, and the control flag is obtains the control area management block of II I 11 (process 125).

更に、再編成の対象となるコントロールエリア管理ブロ
ックの、該セグメント内のページを移すため、確保、も
しくは、探し得たコントロールエリア管理ブロックに、
新セグメン1−を確保する。
Furthermore, in order to move the pages within the segment of the control area management block to be reorganized, the control area management block that has been secured or found,
Secure new segment 1-.

まず、新セグメントの先頭フレームを得るためには、当
該コン1〜ロールエリア管理ブロツク22Fの先頭から
セグメント対応管理エリアが0(未割当セグメン1−)
′のものを求め、これより1つ前のセグメント対応管理
エリアからセグメント内格納最終フレーム番号を得る。
First, in order to obtain the first frame of a new segment, the segment corresponding management area is set to 0 (unallocated segment 1-) from the beginning of the control 1 to roll area management block 22F.
', and obtain the last frame number stored in the segment from the segment corresponding management area one before this.

このフレーム番号+1が、新たに確保するセグメントの
先頭フレーム番号である。これを、求めたセグメント対
応管理エリアの、セグメント内格納先頭フレーム番号の
エリア(第5図参照)にセットする(処理132.13
:3)。
This frame number +1 is the first frame number of the newly secured segment. This is set in the area of the first frame number stored in the segment (see Figure 5) of the obtained segment correspondence management area (process 132.13).
:3).

その後、再編成の対象となるセグメント内のページを、
新コン1−ロールエリアの確保したセグメン1〜に格納
するため、ストレージ管理部13は、バッファ管理部1
2に対し、再編成の対象となるセグメント対応のフレー
ム管理エリア内に、ページ番号がセットされているフレ
ーム番号(複数)および該セグメントを含むコントロー
ルエリアの番号。
The pages within the segment targeted for reorganization are then
In order to store data in segments 1 to 1 secured in the new controller 1-roll area, the storage management unit 13 stores the data in the buffer management unit 1.
2, frame numbers (plurality) in which page numbers are set in the frame management area corresponding to the segment to be reorganized and the number of the control area containing the segment.

エクステントIDを渡し、セグメント内に格納されてい
る全ページをバッファ部21のページ入出力用バッファ
に入力せよという要求(処理134)を発行する。
It passes the extent ID and issues a request (process 134) to input all pages stored in the segment to the page input/output buffer of the buffer unit 21.

バッファ管理部12は、まず、入力するページ数(フレ
ーム数)分のページ入出力用バッファを確保し、受取っ
たエクステン1〜ID、コントロールエリア番号および
フレーム番号(複数)を、入出力管理部14に渡し、該
当フレーム内のページ入力を要求する。
The buffer management unit 12 first secures page input/output buffers for the number of input pages (number of frames), and transfers the received extension 1 to ID, control area number, and frame number (plurality) to the input/output management unit 14. and requests page input within the corresponding frame.

入出力管理部14は、上記情報を基に、外部記憶装置5
上に存在する該当エクステント内のフレームからページ
を取得し、ページ入出力用バッファに格納する。
The input/output management unit 14 uses the external storage device 5 based on the above information.
Acquires a page from the frame in the corresponding extent that exists above and stores it in the page input/output buffer.

上述の処理を、各ページ毎に行う。The above process is performed for each page.

バッファ管理部12は、全フレームについてページを、
上記ページ人出カバソファに格納したことを入出力管理
部14から受け、ストレージ管理部13に報告する。
The buffer management unit 12 stores pages for all frames,
It receives from the input/output management section 14 that the page has been stored in the page turnout sofa, and reports it to the storage management section 13.

次に、ス1−レージ管理部13は、ページ入出力バッフ
ァにあるページ(複数)を、ページ番号の昇順に新しく
確保したセグメンI−に格納するよう、バッファ管理部
12にページ番号を渡して要求する。
Next, the storage management unit 13 passes the page numbers to the buffer management unit 12 so that the pages in the page input/output buffer are stored in the newly secured segment I in ascending order of page numbers. request.

そのため、まず、ス1−レージ管理部13は、ページを
格納する新セグメント対応のセグメント対応管理工“リ
アから、先に求めたセグメント内格納先頭フレーム番号
を得、バッファ管理部12に対し、ページ人出カバラフ
γ内にある一番若いページ番号のページを、先頭フレー
ム番号のフレームに格納するよう要求する。
Therefore, first, the storage management unit 13 obtains the previously obtained in-segment storage first frame number from the segment support management unit ``rear'' corresponding to the new segment in which the page is to be stored, and sends the page to the buffer management unit 12. A request is made to store the page with the lowest page number in the crowd cover rough γ in the frame with the first frame number.

バッファ管理部12は、ストレージ管理部13から先頭
フレーム番号、そのフレームが存在するコントロールエ
リア番号、そのコントロールエリアが存在するエクステ
ン1−のIDを受取り、一番若いページ番号のページを
格納しているページ人出カバソファを、指定のフレーム
に出力するよう、入出力管理部14に要求する。
The buffer management unit 12 receives from the storage management unit 13 the first frame number, the control area number where the frame exists, and the ID of extension 1- where the control area exists, and stores the page with the lowest page number. The input/output management unit 14 is requested to output the page cover sofa in a specified frame.

入出力管理部14は上記情報を基に、外部記憶装置5−
Hに存在する該当エクステント内のフレームにページを
出力する。
Based on the above information, the input/output management unit 14 stores the external storage device 5-
The page is output to a frame within the corresponding extent existing in H.

ページ出力後、ス1−レージ管理部13は、該エクステ
ント対応のページフレーlトマッピングブロック22C
の出力ページ番号に対応するカレント・フレームアドレ
スおよびバックアップ・フレー11アドレスのエリアに
、今回出力したページのコントロールエリアの番号と、
フレーム番号とをセットする(処理135〜142)。
After outputting the page, the storage management unit 13 outputs the page frame mapping block 22C corresponding to the extent.
In the current frame address and backup frame 11 address areas corresponding to the output page number of , the control area number of the page output this time and
The frame number is set (processes 135 to 142).

以下同様に、ページをセグメント内に出力し、カレント
・アドレスおよびバックアップ・アドレスを変更する処
理を、ページ入出力用バッファ内のページ番号の昇順に
、順次、フレーム番号+1の処理を行いながら行う。
Similarly, the process of outputting a page into a segment and changing the current address and backup address is performed in ascending order of page numbers in the page input/output buffer while processing frame numbers +1.

これにより、再編成対象のセグメント内のページ(複数
)を、新しく確保したセグメントに、若い順に格納する
As a result, the pages in the segment to be reorganized are stored in the newly allocated segment in descending order of size.

次に、新セグメントに空き領域(空きフレーム)を設定
した場合の最終フレーム番号を求めるために、新しく確
保したセグメントにおいて、一番後のページを格納して
いるフレームの番号に、先に算出した上記セグメント対
内に確保すべきフレーム数を加算し、その値を、当該セ
グメントに対応するセグメン1へ対応管理エリアのセグ
メンI−内格納最終フレーム番号(第5図参照)にセッ
トする。
Next, in order to find the final frame number when free space (free frame) is set in the new segment, in the newly allocated segment, add the previously calculated number to the frame number that stores the last page. The number of frames to be secured in the segment pair is added and the value is set to the last frame number stored in segment I of the management area for segment 1 corresponding to the segment (see FIG. 5).

以上か一つのセグメントについての再編成処理である。The above is a reorganization process for one segment.

以降のセグメン1〜についても、これらの処理を同様に
行い、当コン1−ロールエリアの全セグメン1〜のペー
ジを移し終えたら、当コン1へロールエリア対応のコン
1−ロールエリア管理ブロック22F内の、次のコン1
−ロールエリア管理ブロックポインタから、次のコン1
−ロールエリア管理ブロックを求め、同様に、次のコン
トロールエリアのセグメントについての処理を行う。
Perform these processes in the same way for the subsequent segments 1~, and once all pages of segment 1~ of this controller 1-roll area have been transferred, transfer the controller 1-roll area management block 22F corresponding to the roll area to this controller 1. next con 1 in
- From the roll area management block pointer, the next controller
- Find the roll area management block and similarly process the next control area segment.

もし、コン1−ロールエリア(再編成用)において。If in the control 1-roll area (for reorganization).

セグメントに充分な割当て可能フレームが確保できない
場合は、当(再編成用)コントロールエリア対応のコン
1−ロールエリア管理ブロックにおける制御フラグをl
(2H) (空き領域用以外フレーム確保不可)にセッ
トし、1官述と同様に新しくコントロールエリアを確保
し、そのコントロールエリアにセグメントを確保する。
If enough allocatable frames cannot be secured for the segment, set the control flag in the control 1-roll area management block corresponding to the control area (for reorganization) to l.
(2H) Set (frames cannot be secured except for free space), secure a new control area as in 1., and secure a segment in that control area.

当テーブル内の全コントロールエリアのセグメン1−の
再編成処理終了後、再編成前のコントロールエリア管理
ブロックを消去するため、該当テーブル管理ブロック2
2Eの当該テーブル用先頭コンi−ロールエリア管理ブ
ロックポインタが指す、コントロールエリア管理ブロッ
クからチェーンを辿りながら、順次、制御フラグを′○
(空き状態)″にし、ブロック内の他のエリアを消去し
て行く。その後、I核テーブル管理ブロック内の再編成
用先頭コントロールエリア管理ブロックポインタの値を
、当該テーブル用先頭コントロールエリア管理ブロック
ポインタに移し、再編成用の当管理ブロックポインタの
エリアを削除(処理146〜148)する。
After the reorganization process for segment 1- of all control areas in this table is completed, the corresponding table management block 2 is deleted in order to erase the control area management block before reorganization.
While tracing the chain from the control area management block pointed to by the first control i-roll area management block pointer for the table in 2E, set the control flags in sequence.
(empty state)" and erase other areas in the block. Then, change the value of the reorganization start control area management block pointer in the I core table management block to the start control area management block pointer for the table. The area of the management block pointer for reorganization is deleted (processes 146 to 148).

上記実施例によれば、更新前のページが格納されたフレ
ームの近くに、更新後のページを格納することが可能に
なり、また、ページアクセスの際の、外部記憶装置のシ
ーク・サーチ回数が低減できるとともに、外部記憶装置
の占有時間および入出力負荷の低減が可能になるという
効果があるばかりでなく、テーブルの再編成時に、ペー
ジの更新頻度に対応した空き領域(空きフレーZS)を
確保できるという効果もある。
According to the above embodiment, the updated page can be stored near the frame in which the unupdated page is stored, and the number of seeks and searches of the external storage device when accessing the page can be reduced. This not only has the effect of reducing the time occupied by the external storage device and the input/output load, but also secures free space (free frame ZS) corresponding to the page update frequency when reorganizing tables. There is also the effect that it can be done.

このため、予め、一定敵の空き領域を確保する第一の実
施例に示した方式に比較して、外部記憶装置」−に格納
されたページの不連続化の防止に大きな効果があり、ま
た、更新頻度が少ないページの格納エリアにおける空き
領域量を減らすことにより、ページ格納エリアの節約が
できるという効果もある。
Therefore, compared to the method shown in the first embodiment in which a certain amount of free space is secured in advance, this method is more effective in preventing pages stored in the external storage device from becoming discontinuous. Another effect is that the page storage area can be saved by reducing the amount of free space in the storage area for pages that are updated less frequently.

上記実施例においては、コン1−ロールエリア内の空き
領域量をダイナミックに変更する場合、セグメント単位
に空き領域を変更する方式を説明したが、より実用的に
は、空き領域をコン1−ロールエリア単位に変更する方
式も可能である。
In the above embodiment, when dynamically changing the amount of free space in the control 1-roll area, a method was explained in which the free space is changed in segment units. A method of changing on an area basis is also possible.

この場合には、例えば、第4図(B)に示したコン1〜
ロールエリア管理ブロツク22F゛内に、セグメント対
応管理エリア(第5図参照)群の代りに、コン1−ロー
ルエリア内更新ページカウントエリアを設け、ここに、
コントロールエリア単位の更新ページ数をカラン1へす
るようにすれば良い。
In this case, for example, the controllers 1 to 1 shown in FIG.
In the roll area management block 22F, a control 1-roll area update page count area is provided instead of the segment corresponding management area group (see Figure 5), and here,
The number of updated pages for each control area may be set to 1.

上述の如く構成した場合には、テーブルの再編成時に、
比較的小さな記憶容量で、ページの更新頻度に対応した
空き領域の確保が達成できるという効果を奏するもので
ある。
If configured as above, when reorganizing the table,
This has the effect that a free area corresponding to the page update frequency can be secured with a relatively small storage capacity.

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

以上述べた如く、本発明によれば、更新前のページが格
納されたフレームの近くに、更新後のページを格納する
ことが可能になり、また、ページアクセスの際の、外部
記憶装置のシーク・サーチ回数が低減できるとともに、
外部記憶装置の占有時間および入出力負荷の低減が可能
になるという効果がある。
As described above, according to the present invention, it is possible to store an updated page near the frame in which the page before the update is stored, and it is also possible to・The number of searches can be reduced, and
This has the effect that the time occupied by the external storage device and the input/output load can be reduced.

また、第二の実施例に示した如く、空き領域量を更新回
数に従ってダイナミックに変更するようにした場合には
、更に高効率の管理が可能になるという効果がある。
Further, as shown in the second embodiment, when the amount of free space is dynamically changed according to the number of updates, there is an effect that even more efficient management becomes possible.

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

第1図は本発明の一実施例を示すデータベース・システ
t1の構成図、第2図(A)〜(D)はその特徴である
ディレクトリ部の詳細を示す図、第3図は第2図(A)
に示したエクステン1−管理ブロック(群)の詳細を示
す図、第4図(A)、(B)は本発明の他の実施例の特
徴であるブイレフ)〜り部の詳細を示す図、第5図は第
4図(B)に示したセグメント対応管理エリアの詳細を
示す図、第6図(A)〜(L)は実施例の動作を示す処
理フローチャートである。 1 : CI)U、 11:データアクセス要求部、1
2:バッファ管理部、13:ストレージ管理部、14:
入出力管理部、2:主記憶装置、21:ページ入出力バ
ッファ、22:ティレフ1へり部、22A:エクステン
ト管理ブロック、22B 、 22E :テーブル管理
ブロック、22C:ページフレーム・マツピングブロッ
ク、22D 、 22F :コン1へロールエリア管理
ブロック、5:ディスク装置。 第   1   図 第   2   図 2A 2B 第   2   図 第   2   図 第   3   図 第   5   図 第   6   図囚 4図 (B)       22F 第   6   図03) 第   6   図 fc) 第   6   図の) 第  6  図CF) 第   6   図(G) 第   6   図 ■
FIG. 1 is a configuration diagram of a database system t1 showing an embodiment of the present invention, FIGS. (A)
Figures 4(A) and 4(B) are diagrams showing details of the extension 1 management block (group) shown in FIG. FIG. 5 is a diagram showing details of the segment corresponding management area shown in FIG. 4(B), and FIGS. 6(A) to (L) are processing flowcharts showing the operation of the embodiment. 1: CI) U, 11: Data access request unit, 1
2: Buffer management section, 13: Storage management section, 14:
Input/output management unit, 2: Main storage device, 21: Page input/output buffer, 22: Tiref 1 edge section, 22A: Extent management block, 22B, 22E: Table management block, 22C: Page frame mapping block, 22D, 22F: Roll area management block to controller 1, 5: Disk device. Figure 1 Figure 2 Figure 2A 2B Figure 2 Figure 2 Figure 3 Figure 5 Figure 6 Figure 4 (B) 22F Figure 6 Figure 03) Figure 6 fc) Figure 6) Figure 6 CF) Figure 6 (G) Figure 6 ■

Claims (1)

【特許請求の範囲】 1、シャドーページング方式を採用したデータベース・
システムが稼動する計算機システムにおいて、外部記憶
装置上にページを格納する場合、ページを格納するフレ
ームの集合単位毎に空きフレームを設けて、更新処理時
に、更新対象のページが格納されたフレームの近くに、
更新済みページを格納することを特徴とする物理クラス
タリング方式。 2、シャドーページング方式を採用したデータベース・
システムが稼動する計算機システムにおいて、外部記憶
装置上にページを格納する場合、ページを格納するフレ
ームの集合単位毎に空きフレームを設けて、更新処理時
に、更新対象のページが格納されたフレームの近くに、
更新済みページを格納すると同時に、更新対象となった
ページが存在する前記フレームの集合単位対応に更新回
数をカウントし、データベース再編集時、前記フレーム
の集合単位に設ける空きフレームの数を、前記更新回数
に従ってダイナミックに変更することを特徴とする物理
クラスタリング方式。
[Claims] 1. A database that adopts a shadow paging method.
When storing pages on an external storage device in a computer system in which the system operates, an empty frame is provided for each set of frames that store pages, and during update processing, an empty frame is provided near the frame in which the page to be updated is stored. To,
A physical clustering method characterized by storing updated pages. 2. Database that uses shadow paging method
When storing pages on an external storage device in a computer system in which the system operates, an empty frame is provided for each set of frames that store pages, and during update processing, an empty frame is provided near the frame in which the page to be updated is stored. To,
At the same time as storing the updated page, the number of updates is counted for each set of frames in which the page to be updated exists, and when the database is re-edited, the number of free frames provided for each set of frames is calculated by updating the A physical clustering method that dynamically changes according to the number of times.
JP61082580A 1986-04-09 1986-04-09 Physical clustering system Pending JPS62239248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61082580A JPS62239248A (en) 1986-04-09 1986-04-09 Physical clustering system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61082580A JPS62239248A (en) 1986-04-09 1986-04-09 Physical clustering system

Publications (1)

Publication Number Publication Date
JPS62239248A true JPS62239248A (en) 1987-10-20

Family

ID=13778416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61082580A Pending JPS62239248A (en) 1986-04-09 1986-04-09 Physical clustering system

Country Status (1)

Country Link
JP (1) JPS62239248A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0540682A (en) * 1990-06-08 1993-02-19 Internatl Business Mach Corp <Ibm> High available trouble-resistant relocation of storage device having atomicity
US5940832A (en) * 1994-03-10 1999-08-17 Fujitsu Limited Dynamic database structuring method and apparatus, and database clustering method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0540682A (en) * 1990-06-08 1993-02-19 Internatl Business Mach Corp <Ibm> High available trouble-resistant relocation of storage device having atomicity
US5940832A (en) * 1994-03-10 1999-08-17 Fujitsu Limited Dynamic database structuring method and apparatus, and database clustering method and apparatus

Similar Documents

Publication Publication Date Title
US8909887B1 (en) Selective defragmentation based on IO hot spots
US6490666B1 (en) Buffering data in a hierarchical data storage environment
US20030093442A1 (en) Storage apparatus acquiring static information related to database management system
JPH02300949A (en) Memory control
EP0606461A1 (en) Computer method and system for allocating and freeing memory
CN111522507B (en) A low-latency file system address space management method, system and medium
US20030217075A1 (en) Method for reserving pages of database
US10976946B2 (en) Method and computer system for managing blocks
CN105468541B (en) A kind of buffer memory management method towards lucidification disposal intelligent terminal
CN113485832B (en) Method and device for carrying out distribution management on physical memory pool and physical memory pool
JPH10333949A (en) Data storage control system
CN108804571B (en) Data storage method, device and equipment
US10180901B2 (en) Apparatus, system and method for managing space in a storage device
US6691121B1 (en) Method and apparatus for online and dynamic extension of IMS data entry databases
CN111859038A (en) A method and device for data heat statistics in a distributed storage system
JPS62239248A (en) Physical clustering system
JPS59220853A (en) Disc cache system
JPH07182220A (en) Distributed file system and file caching method thereof
JPH06110743A (en) Database relocation parallel processing method
CN115905259A (en) Pure column type updating method and device supporting row-level concurrent control
JP3020512B2 (en) File data management method
KR20200121986A (en) A computer program for providing space managrment for data storage in a database management system
CN107330118A (en) A kind of method and device of storage COS files
JPH0581091A (en) Data processor
JP2903605B2 (en) File area management processing method