JPS62197843A - File access system - Google Patents
File access systemInfo
- Publication number
- JPS62197843A JPS62197843A JP61040800A JP4080086A JPS62197843A JP S62197843 A JPS62197843 A JP S62197843A JP 61040800 A JP61040800 A JP 61040800A JP 4080086 A JP4080086 A JP 4080086A JP S62197843 A JPS62197843 A JP S62197843A
- Authority
- JP
- Japan
- Prior art keywords
- file
- logic
- memory
- space
- disk
- 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
Links
- 238000000034 method Methods 0.000 claims description 7
- 239000000872 buffer Substances 0.000 description 9
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
〈産業上の利用分野〉
本発明はデータ処理システムにおいてディスクファイル
をアクセスするファイルアクセス方式に関する。DETAILED DESCRIPTION OF THE INVENTION <Field of Industrial Application> The present invention relates to a file access method for accessing disk files in a data processing system.
〈従来の技術〉
ファイルの高速アクセスを可能にするために、ファイル
データの内の今後使用される可能性の高いデータをいく
つかメモリ内に蓄えることによりディスクへの物理的な
アクセスの回数を減らすためのキャッシャバッファが用
いられる。このキャッシュバッファに備えるデータを選
定する手法として、L RU (Least Rece
ntly Used )ロジックが用いられる。キャッ
シュバッファは、そのアドレス空間としてn個の固定さ
れたセクタ単位のデータを保存する。<Conventional technology> In order to enable high-speed file access, some of the file data that is likely to be used in the future is stored in memory, thereby reducing the number of physical accesses to the disk. A cache buffer is used for this purpose. As a method for selecting data to be stored in this cache buffer, LRU (Least Receive
ntly Used ) logic is used. The cache buffer stores data in units of n fixed sectors as its address space.
一般のデータ処理においては、キャッシュバッファの数
が多い方がディスクへのアクセス回数を減らすことが可
能となるが、いたずらに大きくするとキャッシュバッフ
ァ内のデータサーチのオーバヘッドが大きくなるばかり
でなく、アクセスするデータ量が少ない時のメモリの使
用効率を低下させていた。In general data processing, it is possible to reduce the number of accesses to the disk by increasing the number of cache buffers, but if the number of cache buffers is increased unnecessarily, not only will the overhead of searching for data in the cache buffer become large, but also the number of accesses will be reduced. Memory usage efficiency was reduced when the amount of data was small.
〈発明の目的〉
本発明は上記事情に鑑みてなされたものであり、メモリ
の使用効率の向上と処理の高速化を実現したファイルア
クセス方式の提供を目的とする。<Object of the Invention> The present invention has been made in view of the above circumstances, and aims to provide a file access method that achieves improved memory usage efficiency and faster processing.
〈発明の概要〉
本発明においては、CPUが直接アクセスする論理空間
のうち空いている論理空間をファイルI/O用の論理空
間として割り付け、プログラム処理に必要とするファイ
ルデータを格納しておくとともに、このファイルI/O
用論理空間の管理テーブルによってファイル管理を行な
う。さらに、ファイルのアクセスに対してフォールトが
発生すると、ディスクとファイルI/O用論理空間との
間で仮想記憶処理(デマンドページング)を行う。<Summary of the Invention> In the present invention, an empty logical space directly accessed by the CPU is allocated as a logical space for file I/O, and file data required for program processing is stored. This file I/O
File management is performed using the logical space management table. Further, when a fault occurs in accessing a file, virtual storage processing (demand paging) is performed between the disk and the logical space for file I/O.
つまり、メモリ (実行用)□メモリ (ファイルl/
O)の転送処理とメモリ (ファイルI /O)□ディ
スクファイルの転送処理とを分離する。In other words, memory (for execution) □ memory (file l/
Separate the transfer processing of O) from the transfer processing of memory (file I/O)□ disk files.
このようにすることにより、従来のキャッシュバッファ
を用いた場合のデータサーチ数を減らすことができ、高
速処理が実現される。また、ファイルI/O用論理空間
とプログラム格納空間を合わせて仮想記憶管理を行なう
ことにより、メモリを効率的に使用することができる。By doing so, the number of data searches when using a conventional cache buffer can be reduced, and high-speed processing can be achieved. Furthermore, memory can be used efficiently by managing virtual memory by combining the logical space for file I/O and the program storage space.
〈実施例〉
本実施例のファイルアクセス方式は下記の処理手順から
なる。<Example> The file access method of this example consists of the following processing steps.
i)システムプログラムがメモリを割り当て可能かつア
クセス可能な論理空間内にファイルI/O用論理空間を
設ける。i) Provide a logical space for file I/O within a logical space to which memory can be allocated and accessed by system programs.
ii)オープンされているファイルは、ファイル■/O
用論理空間内にファイルの全領域をカバーできるサイズ
の論理空間を割り当てる。ii) The open file is file■/O
Allocate a logical space that is large enough to cover the entire area of the file.
iii )プログラムのファイルI/Oは、全てii)
で割り当てたファイルI/O用論理空間とプログラムと
のメモリ間転送として処理される。iii) All program file I/O ii)
It is processed as a memory-to-memory transfer between the file I/O logical space allocated in and the program.
iv)ディスク内のファイル領域へのIloは、iii
)の過程で発生したアクセスフォールトで起動された
仮想記憶管理のロジックにより実行される。iv) Ilo to the file area in the disk is iii
) is executed by the virtual memory management logic activated by an access fault that occurs during the process.
ファイルI/Oは、a)ファイルのオープン。File I/O consists of a) opening a file;
b)ファイルデータのIlo、c)ファイルのクローズ
のシーケンスで行なわれる。以下、このシーケンスの詳
細を図面に基づいて説明する。This is performed in the sequence of b) Ilo of file data, and c) closing of the file. The details of this sequence will be explained below based on the drawings.
a)ファイルのオープン
プログラム1よりファイルI/Oロジック2に対してこ
れから入出力するファイル名を通知する。a) The file open program 1 notifies the file I/O logic 2 of the file name to be input/output from now on.
ファイルI/Oロジック2は、指定されたファイルの全
領域をカバーできるサイズの連続領域を確保し、ファイ
ル領域管理テーブル3にファイル名とこの連続領域のス
タート論理アドレスを登録する(もちろん、連続領域で
なくてもよいが、ここ・では簡単のために連続領域とす
る)。この時、すでにディスク上にデータを有するファ
イルについては、使用しているディスクの領域情報をフ
ァイル領域管理テーブル7に登録する。The file I/O logic 2 secures a continuous area large enough to cover the entire area of the specified file, and registers the file name and the start logical address of this continuous area in the file area management table 3 (of course, the continuous area (Although it does not have to be a continuous area here for simplicity, it is assumed to be a continuous area). At this time, for files that already have data on the disk, area information of the disk in use is registered in the file area management table 7.
b)ファイルのIlo
プログラム1は、ファイル名とファイル内オフセット、
プログラム内バッファアドレス、■/Oサイズ、■/O
の種類をパラメータとしてファイルI/Oロジック2に
対してファイルI/Oを要求する。ファイルI/Oロジ
ック2は、ファイル名とファイル内オフセットを基にフ
ァイル領域管理テーブル3を参照して対応するファイル
I/O用論理空間4内の論理アドレスを求める。プログ
ラム内バッファと求められたファイルI/O用論理空間
内領域との間でI/Oサイズ分のメモリ転送を行う。メ
モリ転送の方向は、Iloの種類により定められる。こ
のメモリ転送時にファイルI/O用論理空間4にメモリ
が割り当てられていないときは、メモリアクセスフォー
ルトが発生し、デマンドページングロジック5が起動さ
れ、ファイルI/O用論理空間4内の該当領域に物理メ
モリを割り当て、ファイル領域管理テーブル3を更新す
る。続いて、ファイルI/Oロジック6が働き、ディス
ク8からデータをファイル!/O用論理空間4に読み込
む(すでにディスク8にファイルデータが登録されてい
るとき)か、ディスク8の空ブロックをファイルに割り
当て、ファイル領域管理テーブル7にその情報を登録す
る(ファイル拡張時)。この後、上述のメモリ転送の動
作に戻る。b) File Ilo Program 1 includes the file name and offset within the file,
Buffer address in program, ■/O size, ■/O
A file I/O request is made to the file I/O logic 2 using the type of file as a parameter. The file I/O logic 2 refers to the file area management table 3 based on the file name and intra-file offset to find the corresponding logical address in the logical space 4 for file I/O. Memory transfer for the I/O size is performed between the program buffer and the determined file I/O logical space area. The direction of memory transfer is determined by the type of Ilo. If memory is not allocated to the file I/O logical space 4 during this memory transfer, a memory access fault occurs, the demand paging logic 5 is activated, and the corresponding area in the file I/O logical space 4 is allocated. Allocate physical memory and update the file area management table 3. Next, the file I/O logic 6 operates to transfer data from the disk 8 to the file! /O logical space 4 (when file data is already registered on disk 8), or allocate an empty block on disk 8 to the file and register the information in file area management table 7 (when expanding the file) . After this, the process returns to the memory transfer operation described above.
C)ファイルのクローズ
プログラム1がファイルI/Oロジック2に対してクロ
ーズするファイル名を通知する。ファイル■/Oロジッ
ク2は、ファイルI/Oロジック6にファイルのクロー
ズを指示する。ファイル!/Oロジツク6は、ファイル
I/O用論理空間4内に残っているメモリデータをファ
イル領域管理テーブル7の情報を用いてディスク8に書
き出す。C) The file close program 1 notifies the file I/O logic 2 of the name of the file to be closed. File ■/O logic 2 instructs file I/O logic 6 to close the file. File! The /O logic 6 writes the memory data remaining in the file I/O logical space 4 to the disk 8 using the information in the file area management table 7.
ファイルI/O用論理空間4内のこのファイル用に割り
当てている物理メモリを解放し、ファイル領域管理テー
ブル3.ファイルI/O用論理空間4並びにファイル領
域管理テーブル7からこのファイル用の情報を全て消去
する。The physical memory allocated for this file in the file I/O logical space 4 is released, and the file area management table 3. All information for this file is deleted from the file I/O logical space 4 and the file area management table 7.
〈発明の効果〉
以上説明したように本発明においては、システム内で使
用されるファイルの全領域をシステムの論理空間に写像
させて管理することにより、キャッシュバッファ管理の
ロジックをプログラム部の仮想記憶管理のロジックと共
有するようにしたので、メモリの使用効率を高めるとと
もに、処理の高速化が実現できる。<Effects of the Invention> As explained above, in the present invention, the entire area of files used within the system is mapped and managed in the logical space of the system, and the cache buffer management logic is integrated into the virtual memory of the program section. Since it is shared with the management logic, it is possible to improve memory usage efficiency and speed up processing.
図面は本発明実施例の機能構成を示すブロック図である
。
1・−プログラム
2.6−・−ファイルI/Oロジック
3.7・・−ファイル領域管理テーブル4−ファイルI
/O用論理空間
5−デマンドページングロジック
8・−・ディスクThe drawing is a block diagram showing the functional configuration of an embodiment of the present invention. 1.-Program 2.6--File I/O logic 3.7.--File area management table 4-File I
/O logical space 5 - Demand paging logic 8 --- Disk
Claims (1)
間として割り付け、プログラム処理に必要なファイルデ
ータをこのファイルI/O用論理空間に格納し、このフ
ァイルI/O用論理空間の管理テーブルによってファイ
ル管理を行なうとともに、ファイルI/O用論理空間と
ディスクファイルとの間で仮想記憶管理を行なうことを
特徴とするファイルアクセス方式。Allocate an empty logical space in memory as a logical space for file I/O, store file data necessary for program processing in this logical space for file I/O, and use the management table of this logical space for file I/O to A file access method characterized by performing file management and virtual memory management between a file I/O logical space and a disk file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61040800A JPS62197843A (en) | 1986-02-26 | 1986-02-26 | File access system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61040800A JPS62197843A (en) | 1986-02-26 | 1986-02-26 | File access system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS62197843A true JPS62197843A (en) | 1987-09-01 |
Family
ID=12590704
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61040800A Pending JPS62197843A (en) | 1986-02-26 | 1986-02-26 | File access system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS62197843A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01239654A (en) * | 1988-03-19 | 1989-09-25 | Hitachi Ltd | Data input/output system |
-
1986
- 1986-02-26 JP JP61040800A patent/JPS62197843A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01239654A (en) * | 1988-03-19 | 1989-09-25 | Hitachi Ltd | Data input/output system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100278328B1 (en) | Cache miss buffer | |
JP3816586B2 (en) | Method and system for generating prefetch instructions | |
JP2007011523A (en) | Data look-ahead method and computer system | |
JPS62197843A (en) | File access system | |
US6804754B1 (en) | Space management in compressed main memory | |
JP3875358B2 (en) | Storage device, storage method, and recording medium | |
JPH0460730A (en) | Cache control system | |
WO2023217255A1 (en) | Data processing method and device, processor and computer system | |
JP2912657B2 (en) | File access processor | |
JPS6237754A (en) | Virtual extension storage system | |
JP2002108704A (en) | Disk cache control system | |
JPH01251248A (en) | Cache control system for stack data structure | |
JPH0553912A (en) | Control method for cache memory | |
JPH0363741A (en) | Disk cache device | |
JPS5894182A (en) | Buffer memory managing system | |
JPH064447A (en) | Asynchronous i/o processing system | |
JPH04291642A (en) | Cache control system | |
JPH06131264A (en) | Cache memory control system | |
JPH04280337A (en) | Virtual storage computer system | |
JP2002259209A (en) | Arithmetic processing system | |
JPS63143658A (en) | Memory control system | |
JPH057740B2 (en) | ||
JPH0447344B2 (en) | ||
JPS63142416A (en) | Input/output control system | |
JPH04205535A (en) | Copy on write system |