JPS6353656A - Storage area control method for secondary storage part - Google Patents

Storage area control method for secondary storage part

Info

Publication number
JPS6353656A
JPS6353656A JP61197922A JP19792286A JPS6353656A JP S6353656 A JPS6353656 A JP S6353656A JP 61197922 A JP61197922 A JP 61197922A JP 19792286 A JP19792286 A JP 19792286A JP S6353656 A JPS6353656 A JP S6353656A
Authority
JP
Japan
Prior art keywords
file
area
list
secondary storage
file list
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
JP61197922A
Other languages
Japanese (ja)
Inventor
Yoshihiro Suzuki
良宏 鈴木
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP61197922A priority Critical patent/JPS6353656A/en
Publication of JPS6353656A publication Critical patent/JPS6353656A/en
Pending legal-status Critical Current

Links

Landscapes

  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To efficiently use the storage area of a secondary storage part by allocating continuous areas according to a file list when a new file is generated and updating the contents on the file list if unnecessary files show up. CONSTITUTION:When a garbage collection request enters an I/O control part 11, it is transmitted to a control part 15. The file list of a primary storage part 14 is sequentially referred. A film number whose state identifier is idle is deleted, and a collation list is generated in order to advance subsequent file numbers by as much as the deletion. Next, the file list is again referred to from top to bottom in sequence. A file is read, and the start address and size of the file concerned are set. If the file has statement regarding the file numbers, they are again numbered according to the collation table which has been generated. The read-out file is rewritten at a new start address that is advanced by an area to be collected as garbage. Similarly files from next to final are rewritten.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、マルチプロセッサシステムにおいて、二次記
憶部上の大容量のファイルに要する記憶領域を管理する
方法に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a method for managing the storage area required for large-capacity files on a secondary storage unit in a multiprocessor system.

従来の技術 二次記憶部上にファイルに要する領域を割り当てる方法
の一つとして、ファイル作成の際に、必要な全領域を一
度に連続した領域として割り当てる方法がある。この方
法で割り当てられた連続領域のファイルで直接にアクセ
スを行なえば、二次記憶媒体に使用するヘッドの移動が
最小で済むため、ファイルに対して高速にアクセスを行
なうことができる。
BACKGROUND OF THE INVENTION One method of allocating an area required for a file on a secondary storage unit is to allocate all the necessary area at once as a continuous area when creating a file. Direct access to a file in a contiguous area allocated in this manner minimizes the movement of the head used for the secondary storage medium, making it possible to access the file at high speed.

発明が解決しようとする問題点 しかしながら、上記の方法では、ファイルの大きさが不
揃いである場合、連続した領域の割り付けのために未使
用領域が断片化する。このため、これらの断片化した未
使用領域をまとめる方法(以下ガーベッジコレクション
という)の必要性が生ずるという問題点があった。
Problems to be Solved by the Invention However, in the above method, if the file sizes are uneven, the unused area becomes fragmented due to the allocation of continuous areas. Therefore, there is a problem in that a method for collecting these fragmented unused areas (hereinafter referred to as garbage collection) is required.

本発明はこのような問題点を解決するもので、このガー
ベッジコレクションを容易に行なうことができ、さらに
、ファイル領域の割り当て、解放も容易に行なうことが
でき、これにより二次記憶部の記憶領域を効率よく利用
することができる記憶領域の管理方法を提供することを
目的とするものである。
The present invention solves these problems by making it possible to easily perform garbage collection, and also to easily allocate and release file areas, thereby reducing the storage area of the secondary storage unit. The purpose of this invention is to provide a storage area management method that allows efficient use of storage areas.

問題点を解決するための手段 本発明は上記問題点を解決するために、ファイルの記憶
領域の管理テーブルとしてファイルリストを設け、新た
にファイルが作成された場合には、このファイルリスト
をもとに連続領域を割り当て、また不要になったファイ
ルが出た場合にはこのファイルリストの内容を更新する
ものである。
Means for Solving the Problems In order to solve the above problems, the present invention provides a file list as a file storage area management table, and when a new file is created, this file list is used as the basis for creating a new file. It allocates a continuous area to the file list, and updates the contents of this file list when a file is no longer needed.

作用 上記構成により、ファイル作成時には、必要な連続領域
をそれぞれ固有のファイルナンバーを割り付けることに
より割り当て、このファイルナンバーによりファイルリ
ス1−の該当部分を読み出す。
Operation With the above configuration, when creating a file, necessary continuous areas are allocated by assigning each unique file number, and the corresponding portion of the file list 1- is read out using this file number.

ファイルの削除時には使用した連続領域を解放し、ガー
ベッジコレクションが必要な際にはこれを容易に行なう
ことができる。
When a file is deleted, the used contiguous space is freed and garbage collection can be easily performed when necessary.

実施例 以下本発明の一実施例を図面に基づいて説明する。第1
図は本発明の一実施例における二次記憶部の記憶領域管
理装置の概略ブロック図を示す。
EXAMPLE An example of the present invention will be described below based on the drawings. 1st
The figure shows a schematic block diagram of a storage area management device for a secondary storage unit in an embodiment of the present invention.

この実施例では、マルチプロセッサシステムにおいて、
他プロセツサからの要求に応じて、ファイル領域の割り
当て、解放、ファイルの読み出し、書き込み、また、二
次記憶装置の記憶領域についてガーベッジコレクション
を行なうなどの機能を有する。11はマルチプロセッサ
システムにおける他プロセツサからの入出力制御部、1
2はハードディスクなどの二次記憶部の制御装置、13
は二次記憶部である。この二次記憶装置3の中の記憶領
域が本実施例で示す記憶領域管理装置の管理対象であり
、ファイルの管理テーブルとしてのファイルリストが設
けられている。14は半導体記憶などの一次記憶部であ
り、ファイルリストは本装置の運用開始時に二次記憶部
13から一次記憶部14にロードされる。15は本装置
合体の制御部である。
In this example, in a multiprocessor system,
It has functions such as allocating and releasing file areas, reading and writing files, and performing garbage collection on storage areas of secondary storage devices in response to requests from other processors. 11 is an input/output control unit from other processors in a multiprocessor system;
2 is a control device for a secondary storage unit such as a hard disk, 13
is the secondary storage section. The storage area in this secondary storage device 3 is the object of management by the storage area management device shown in this embodiment, and a file list is provided as a file management table. 14 is a primary storage unit such as a semiconductor memory, and the file list is loaded from the secondary storage unit 13 to the primary storage unit 14 when the device starts operating. Reference numeral 15 is a control unit for combining the present device.

このファイルリストで管理される領域は、第2図に示す
ように、二次記憶部13の記憶領域の全域に対して番地
の若い方から順番に並んでおり、ファイルリスト」二で
、大きなファイルナンバーの管理領域が小さなファイル
ナンバーの管理領域よりも前にくるということはなく、
記憶領域はファイルリスト上に順番を変えずに1対1に
写像している形となる。
As shown in Figure 2, the areas managed by this file list are arranged in order from the smallest address to the entire storage area of the secondary storage unit 13. The number management area will never come before the smaller file number management area,
The storage areas are mapped one-to-one on the file list without changing the order.

次に二次記憶部13に展開されるファイルリストの構成
について第3図を用いて説明する。ここでファイルナン
バーはファイルリスト中には書かれない。ファイルナン
バーはファイルリストを参照する際のインデックス値と
して用いられる。
Next, the structure of the file list developed in the secondary storage unit 13 will be explained using FIG. 3. Here, the file number is not written in the file list. The file number is used as an index value when referring to the file list.

第3図において、3]には、ファイルリスト中で該当フ
ァイルナンバーが示す領域の状態識別子が記述されてお
り、この識別子の内容により、該当領域が使用中である
か否かが示される。該当領域が使用中でない場合、その
ファイルナンバーはファイルに対しては使われておらず
、このファイルナンバーは次にこの領域に割り当てられ
るファイルに与えられる。32には、該当領域の開始番
地が記述されている。33には、該当領域がファイルに
使用されている場合、そのファイルに使用されている領
域の大きさが記述されている。34には、該当領域自身
の大きさが記述されている。つまり、この領域にファイ
ルを割り当てようとする場合、割り当てることのできる
最大のファイルの大きさを示す。したがって、この該当
領域の大きさは通常は最初にこの領域に割り当てられた
ファイルの大きさに等しく、現在割り当てられているフ
ァイルの大きさはこの該当領域に比して/J)さいか、
もしくは等しい。つまり、該当領域の大きさから現在の
ファイルの大きさを引いた領域が、ガーベッジコレクシ
ョンの対象となる領域である。
In FIG. 3, 3] describes the status identifier of the area indicated by the corresponding file number in the file list, and the contents of this identifier indicate whether or not the corresponding area is in use. If the area is not in use, that file number is not used for a file, and this file number will be given to the next file allocated to this area. 32 describes the starting address of the corresponding area. 33, if the corresponding area is used for a file, the size of the area used for the file is described. 34 describes the size of the corresponding area itself. In other words, when attempting to allocate a file to this area, it indicates the maximum file size that can be allocated. Therefore, the size of this area is usually equal to the size of the file originally allocated to this area, and the size of the currently allocated file is compared to this area.
or equal. In other words, the area obtained by subtracting the current file size from the size of the relevant area is the area to be garbage collected.

次に上記実施例の動作について説明する。ここではファ
イルリストの有効性を述べるために、最初にファイル領
域の割り当て方法を、次に領域の削除方法を、最後にガ
ーベッジコレクションの方法を述べる。ファイル領域の
割り当て方法の手順を第4図に示す。入出力制御部11
にファイル領域の割り当ての要求が入り、この要求は制
御部15に送られる。制御部】5は一次記憶部14のフ
ァイルリスl−を順に参照する。この際、状態識別子が
空き状態を示しており、かつ該当領域の大きさが要求さ
れるファイルの大きさ以上であるような領域を探し、対
応するファイルナンバーの値を入出力制御部11へ返す
Next, the operation of the above embodiment will be explained. Here, in order to describe the effectiveness of the file list, we will first describe a file area allocation method, then an area deletion method, and finally a garbage collection method. FIG. 4 shows the procedure for allocating a file area. Input/output control section 11
A request for allocating a file area is input to the controller 15, and this request is sent to the control unit 15. The control unit 5 sequentially refers to the file list l- in the primary storage unit 14. At this time, it searches for an area whose status identifier indicates a free status and whose size is greater than or equal to the requested file size, and returns the value of the corresponding file number to the input/output control unit 11. .

次に、ファイル領域の解放の手順を第5図に示す。入出
力制御部11に解放要求が入った場合、この要求は制御
部15に送られる。制御部15は、−次記憶部14のフ
ァイルリストを通知されたファイルナンバーで参照する
。この際、状態識別子を使用中から空き状態に変更し、
ファイルの大きさをOにする。以上で処理は終了し、終
了通知を入出力制御部IIへ返す。
Next, the procedure for releasing the file area is shown in FIG. When a release request is received by the input/output control section 11, this request is sent to the control section 15. The control unit 15 refers to the file list in the next storage unit 14 using the notified file number. At this time, change the status identifier from in use to free,
Set the file size to O. The process is now complete, and a completion notification is returned to the input/output control unit II.

最後に、ガーベッジコレクションの手順を第6図に示す
。入出力制御部11にガーベッジコレクションの要求が
入り、この要求は制御部15へ送られる。制御部15は
一次記憶部14のファイルリストを順に参照し、状態識
別子が空き状態になっているファイルナンバーを削除し
、後続のファイルナンバーをその分だけ前に詰めるため
の対照表を作成する。次にファイルリストを再び上から
順に参照し、ファイルを読み出し、該当ファイルの開始
番地、該当ファイルの大きさをセラ1〜しなおし、ファ
イル中にファイルナンバーに関する記述がある際には、
先に作成した対照表をもとにファイルナンバーを付は替
える。その後読み出したファイルをガーベッジコレクシ
ョンの対象領域分だけ詰めた新開始番地から書き直す。
Finally, the garbage collection procedure is shown in FIG. A request for garbage collection enters the input/output control section 11, and this request is sent to the control section 15. The control unit 15 sequentially refers to the file list in the primary storage unit 14, deletes file numbers whose status identifiers are empty, and creates a comparison table for moving subsequent file numbers forward by that amount. Next, refer to the file list again in order from the top, read the file, change the starting address of the file and the size of the file from cell number 1, and if there is a description of the file number in the file,
Change the file numbers based on the comparison table created earlier. After that, the read file is rewritten from the new starting address, which is filled in by the area subject to garbage collection.

これを順に最後のファイルまで行うことでガーベッジコ
レクションの処理が完了する。
Garbage collection processing is completed by performing this in order until the last file.

発明の効果 以上本発明によれば、ファイルリストを用いることで、
ガーベッジコレクションを容易に行なうことができ、こ
のファイルリストは二次記憶部上の記憶領域の割り当て
、解放に当たっても有効に用いることができ、これによ
って二次記憶部の記憶領域を効率良く利用することがで
きる。
Effects of the Invention According to the present invention, by using a file list,
Garbage collection can be easily performed, and this file list can be effectively used when allocating and releasing storage areas on the secondary storage unit, thereby making it possible to use the storage area of the secondary storage unit efficiently. Can be done.

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

第1図は本発明の一実施例における二次記憶部の記憶領
域管理装置の概略ブロック図、第2図はファイルリスト
と二次記憶部の全記憶領域との写像関係を示す図、第3
図はファイルリストの構成図、第4図はファイルに用い
る記憶領域の割り当て手順を示すフロー図、第5図は記
憶領域の解放手順を示すフロー図、第6図はガーベッジ
コレクションの手順を示すフロー図である。 11・・・入出力制御部、12・・・二次記憶制御部、
13・・・二次記憶部、14・・・−次記憶部、15・
・・全装置の制御部。 代理人   森  本  義  弘 第2区 二々工?禮傾城 第3図 37    3zJj    Jll 第4図 第5図 第6図
FIG. 1 is a schematic block diagram of a storage area management device of a secondary storage unit in an embodiment of the present invention, FIG. 2 is a diagram showing a mapping relationship between a file list and all storage areas of the secondary storage unit, and FIG.
Figure 4 is a flowchart showing the configuration of a file list, Figure 4 is a flowchart showing the procedure for allocating the storage area used for files, Figure 5 is a flowchart showing the procedure for releasing the storage area, and Figure 6 is a flowchart showing the procedure for garbage collection. It is a diagram. 11... Input/output control unit, 12... Secondary storage control unit,
13...Secondary storage section, 14...-secondary storage section, 15.
...Control unit for all devices. Agent Yoshihiro Morimoto 2nd ward Futadako? 37 3zJj Jll Figure 4 Figure 5 Figure 6

Claims (1)

【特許請求の範囲】[Claims] 1、二次記憶部上の記憶領域の管理用テーブルとして設
けたファイルリストを用い、ファイルに要する全領域を
連続した記憶領域として管理する二次記憶部の記憶領域
管理方法。
1. A storage area management method for a secondary storage unit that uses a file list provided as a storage area management table on the secondary storage unit to manage the entire area required for a file as a continuous storage area.
JP61197922A 1986-08-22 1986-08-22 Storage area control method for secondary storage part Pending JPS6353656A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61197922A JPS6353656A (en) 1986-08-22 1986-08-22 Storage area control method for secondary storage part

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61197922A JPS6353656A (en) 1986-08-22 1986-08-22 Storage area control method for secondary storage part

Publications (1)

Publication Number Publication Date
JPS6353656A true JPS6353656A (en) 1988-03-07

Family

ID=16382507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61197922A Pending JPS6353656A (en) 1986-08-22 1986-08-22 Storage area control method for secondary storage part

Country Status (1)

Country Link
JP (1) JPS6353656A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0520142A (en) * 1991-07-15 1993-01-29 Nec Corp Block managing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0520142A (en) * 1991-07-15 1993-01-29 Nec Corp Block managing system

Similar Documents

Publication Publication Date Title
US10515018B2 (en) Using shared virtual memory resources for performing memory-mapping
JP2005031929A (en) Management server for assigning storage area to server, storage device system, and program
EP0694831A2 (en) Computer system having storage unit provided with data compression function andmethod of management of storage area thereof
JPS6353656A (en) Storage area control method for secondary storage part
US9170929B2 (en) Memory controller
CN117435343A (en) Memory management method and device
JPH06214874A (en) Memory managing system
JPS63200257A (en) Program loading system for computer
JPH01191221A (en) Dynamic assignment managing system for magnetic disk area
JPH05120094A (en) File managing system
JP2833814B2 (en) I / O buffer allocation method
JPH06259292A (en) On-line garbage collection method for external storage device
JP3022829B2 (en) Automatic storage device allocation device
JPS6084647A (en) Structure memory controller
JPS59756A (en) Dasd space managing system
CN117724990A (en) NVM space allocation method and device
JP3542894B2 (en) File system
JPS60140448A (en) Storage hierarchy control system
JPS63298647A (en) Selection allocating system for working area
JPH05324433A (en) Data base input control system
JPH02193231A (en) File space free area management system
JPH0793192A (en) File managing method
JPH08249225A (en) Memory management device
JPH02193232A (en) System for retrieving free area in file
JPH06141359A (en) Private automatic exchange