JPH11249937A - Computer system - Google Patents

Computer system

Info

Publication number
JPH11249937A
JPH11249937A JP10045941A JP4594198A JPH11249937A JP H11249937 A JPH11249937 A JP H11249937A JP 10045941 A JP10045941 A JP 10045941A JP 4594198 A JP4594198 A JP 4594198A JP H11249937 A JPH11249937 A JP H11249937A
Authority
JP
Japan
Prior art keywords
file
data
command
auxiliary storage
storage device
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
JP10045941A
Other languages
Japanese (ja)
Inventor
Tetsuo Tsujioka
哲夫 辻岡
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP10045941A priority Critical patent/JPH11249937A/en
Publication of JPH11249937A publication Critical patent/JPH11249937A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a computer system which improves the performance of the file read/write speed for an auxiliary storage device. SOLUTION: This computer system is provided with a file system 14, which issues a read instruction or a write instruction based on a file operation instruction from a user program 13 as a file operation function, and a device driver 16 which issues a control instruction to a control circuit 17 which performs file read/write control for an auxiliary storage device 18, based on the instruction issued from the file system 14. The device driver 16 controls the control circuit 17 so that direct data transfer may be performed between the auxiliary storage device 18 and user data 19.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、補助記憶装置に対
してファイルを高速に読み書き可能なコンピュータシス
テムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system capable of reading and writing files to and from an auxiliary storage device at high speed.

【0002】[0002]

【従来の技術】コンピュータシステムでは、ユーザープ
ログラムから各種デバイスへの操作等を容易にするため
オペレーティングシステム(以下”OS”と略記する)
が備えられている。そしてOSの1つの機能として、補
助記憶装置に対するデータの読み書きをする機能、すな
わちファイル操作機能が提供される。図5は、コンピュ
ータシステムにおけるファイル操作の概念を示した一従
来例である。図のようにファイル操作を実現するため
に、ファイルシステム24、中間バッファ25、デバイ
スドライバ26という階層構造によりその機能提供がな
されている。このように階層構造で機能を提供するの
は、機能の汎用性を高めるためである。なお、これらフ
ァイルシステム24、中間バッファ25、デバイスドラ
イバ26は、ユーザ−プログラム23等により不正なア
クセスを防止すべく、アクセス権限の高いカーネルモー
ド22において動作する。一方、ファイルシステム24
が提供するインターフェースを利用して補助記憶装置2
8に対するファイル操作を行うユーザプログラム23
は、アクセス権限の低いユーザ−モード21において動
作する。なお、図5において破線で示すライン20の左
側がファイル操作命令の流れを示し、右側がファイルデ
ータの流れを示している。この図を用いて、ファイル操
作における動作を説明すると以下のようになる。
2. Description of the Related Art In a computer system, an operating system (hereinafter abbreviated as "OS") is used in order to facilitate a user program to operate various devices.
Is provided. As one function of the OS, a function of reading and writing data from and to an auxiliary storage device, that is, a file operation function is provided. FIG. 5 is a conventional example showing the concept of file operation in a computer system. As shown in the figure, in order to realize a file operation, the functions are provided by a hierarchical structure of a file system 24, an intermediate buffer 25, and a device driver 26. The reason for providing the functions in a hierarchical structure is to enhance the versatility of the functions. The file system 24, the intermediate buffer 25, and the device driver 26 operate in the kernel mode 22 having a high access right in order to prevent unauthorized access by the user program 23 or the like. On the other hand, the file system 24
Storage device 2 using the interface provided by
User program 23 that performs file operations on file 8
Operates in the user mode 21 having a low access right. In FIG. 5, the left side of the dashed line 20 shows the flow of the file operation command, and the right side shows the flow of the file data. The operation in the file operation will be described with reference to FIG.

【0003】補助記憶装置28内に納められたファイル
を読み出す場合、まず、ユーザープログラム23からフ
ァイルへの書き込み命令がファイルシステム24に伝え
られる。ファイルシステム24は、その命令の解析を行
い、そのファイルが補助記憶装置28のどの位置に記録
されているかを得て、その位置の読み出し命令を中間バ
ッファ25に伝える。中間バッファ25は、受け取った
読み出し命令を、中間バッファ25のデータ領域サイズ
単位で読み出すように、順次、デバイスドライバ26に
命令を発行する。デバイスドライバは、制御回路27を
制御して、経路30に示すように補助記憶装置28から
中間バッファ25のデータ領域にデータを転送する。中
間バッファ25は、経路31で示すように転送されたデ
ータをユーザーモード21内のユーザーデータ29に転
送する。中間バッファ25によって、すべての分割され
た読み出し命令の処理が終わると、ユーザープログラム
に制御がもどる。
When reading a file stored in the auxiliary storage device 28, first, a command to write a file from the user program 23 is transmitted to the file system 24. The file system 24 analyzes the command, obtains the location of the file in the auxiliary storage device 28, and transmits the read command of the location to the intermediate buffer 25. The intermediate buffer 25 sequentially issues the received read command to the device driver 26 so as to read the read command in units of the data area size of the intermediate buffer 25. The device driver controls the control circuit 27 to transfer data from the auxiliary storage device 28 to the data area of the intermediate buffer 25 as shown by the path 30. The intermediate buffer 25 transfers the data transferred as indicated by the path 31 to the user data 29 in the user mode 21. When the processing of all divided read commands is completed by the intermediate buffer 25, control returns to the user program.

【0004】一方、補助記憶装置28に対しファイルを
書き込む場合、まず、ユーザープログラム23からファ
イルへの書き込み命令がファイルシステム24に伝えら
れる。ファイルシステム24は、そのファイルを補助記
憶装置28のどの位置に記録すべきかを計算し、その位
置への書き込み命令を中間バッファ25に伝える。中間
バッファ25は、受け取った書き込み命令を、中間バッ
ファ25のデータ領域サイズ単位で書き込むように、順
次、デバイスドライバ26に命令を発行する。それとと
もに、中間バッファ25は、経路31に示すように、順
次、そのデータ領域サイズでユーザーデータ29を中間
バッファに転送する。一方、デバイスドライバ26は、
制御回路27に対し、経路30に示すように中間バッフ
ァ25のデータ領域から補助記憶装置28にデータを転
送すよう制御する。以上のようにして、ファイル操作が
中間バッファ25を介して行われる。
On the other hand, when writing a file to the auxiliary storage device 28, first, a write command to the file is transmitted from the user program 23 to the file system 24. The file system 24 calculates a position in the auxiliary storage device 28 where the file is to be recorded, and transmits a write command to the position to the intermediate buffer 25. The intermediate buffer 25 sequentially issues instructions to the device driver 26 so as to write the received write instruction in units of the data area size of the intermediate buffer 25. At the same time, the intermediate buffer 25 sequentially transfers the user data 29 to the intermediate buffer with the data area size as shown in the path 31. On the other hand, the device driver 26
The control circuit 27 controls the transfer of data from the data area of the intermediate buffer 25 to the auxiliary storage device 28 as shown by the path 30. As described above, the file operation is performed via the intermediate buffer 25.

【0005】[0005]

【発明が解決しようとする課題】ここでコンピュータシ
ステムは、OS上の制御プログラムによって制御されて
いる。OSは、ユーザーモードとカーネルモードの2つ
のモードで動作しており、上述のようにユーザープログ
ラム23はユーザーモード21で、ファイルシステム2
4以下のプログラムはカーネルモード22で動作してい
る。ユーザーモード内のデータ領域とカーネルモード内
のデータ領域は、OSによって別々に管理されており、
両者間でデータの転送を行う場合は、中間バッファ25
を経由して行うことになっている。この中間バッファ2
5は、通常64キロバイト程度のデータ領域サイズのバ
ッファ領域を複数個持ち、このサイズ以上の大きさのデ
ータを転送する場合は、転送命令を複数回数に分けて実
行することになる。一方、コンピュータシステムで用い
られる補助記憶装置28は、できるだけ大きいサイズ単
位で読み出しまたは書き込みを実行した方が、良い性能
が得られる。しかし、中間バッファ25は、中間バッフ
ァ25のデータ領域サイズでの読み出しまたは書き込み
命令を発行するため、この部分が補助記憶装置28とユ
ーザーデータ29間におけるデータ転送性能のボトルネ
ックとなっている。すなわち、補助記憶装置と中間バッ
ファ間の転送、および、中間バッファとユーザーデータ
間の転送の2度転送が実行されるために、効率が悪くな
る。また、前者の転送は補助記憶装置の制御回路を用い
たハードウェア転送が適用されるのに対して、後者の転
送は一般にソフトウェアで実現されていることが多く、
この点による性能劣化も大きい。
Here, the computer system is controlled by a control program on the OS. The OS operates in two modes: a user mode and a kernel mode. As described above, the user program 23 operates in the user mode 21 and the file system 2 operates in the user mode.
The programs 4 and below operate in the kernel mode 22. The data area in the user mode and the data area in the kernel mode are managed separately by the OS.
When transferring data between the two, the intermediate buffer 25
Is to be done via This intermediate buffer 2
Reference numeral 5 generally has a plurality of buffer areas each having a data area size of about 64 kilobytes. When transferring data having a size larger than this size, the transfer command is executed in a plurality of times. On the other hand, in the auxiliary storage device 28 used in the computer system, better performance is obtained when reading or writing is performed in the largest possible size unit. However, since the intermediate buffer 25 issues a read or write command in the data area size of the intermediate buffer 25, this portion is a bottleneck in data transfer performance between the auxiliary storage device 28 and the user data 29. That is, the transfer between the auxiliary storage device and the intermediate buffer and the transfer between the intermediate buffer and the user data are performed twice, so that the efficiency is reduced. In addition, the former transfer is applied by hardware transfer using a control circuit of the auxiliary storage device, whereas the latter transfer is generally realized by software in many cases.
Performance degradation due to this point is also large.

【0006】本発明はこのような事情に鑑みてなされた
もので、補助記憶装置に対するファイルの読み出し速度
および書き込み速度の性能を改善するコンピュータシス
テムを提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of such circumstances, and has as its object to provide a computer system that improves the performance of a file reading speed and a writing speed with respect to an auxiliary storage device.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明のうち請求項1に記載の発明は、ファイル操
作機能として、少なくとも、ユーザプログラムからのフ
ァイル操作命令に基づき読み出し命令もしくは書き込み
命令を発行するファイルシステムと、該ファイルシステ
ムの発行する命令に基づき補助記憶装置にファイルの読
み書き制御を行う制御回路への制御命令を発行するデバ
イスドライバとを実行するコンピュータシステムであっ
て、前記デバイスドライバは、前記補助記憶装置と指定
されるユーザーデータ間で直接データ転送を行うよう前
記制御回路を制御することを特徴とするコンピュータシ
ステムである。また、請求項2に記載の発明は、請求項
1に記載のコンピュータシステムにおいて、前記ファイ
ルシステムが、前記デバイスドライバに対し読み出し命
令もしくは書き込み命令を直接発行することを特徴とし
ている。
In order to achieve the above object, according to the first aspect of the present invention, as a file operation function, at least a read instruction or a write instruction based on a file operation instruction from a user program is provided. A computer system for executing a file system that issues instructions, and a device driver that issues control instructions to a control circuit that performs read / write control of a file in an auxiliary storage device based on the instructions issued by the file system. The computer system is characterized in that the driver controls the control circuit so as to directly transfer data between the auxiliary storage device and designated user data. According to a second aspect of the present invention, in the computer system according to the first aspect, the file system directly issues a read command or a write command to the device driver.

【0008】また、請求項3に記載の発明は、請求項2
に記載のコンピュータシステムにおいて、前記ファイル
システムが、前記制御回路から前記ユーザ−データに直
接アクセス可能か否か判断し、直接アクセス可能な場合
に前記デバイスドライバに対し読み出し命令もしくは書
き込み命令を直接発行することを特徴としている。ま
た、請求項4に記載の発明は、請求項2に記載のコンピ
ュータシステムにおいて、前記ファイルシステムが、フ
ァイルデータの読み出し命令もしくはファイルデータの
書き込み命令を発行するときのみ前記デバイスドライバ
に対し読み出し命令もしくは書き込み命令を直接発行す
ることを特徴としている。
[0008] Further, the invention described in claim 3 is based on claim 2.
The computer system according to claim 1, wherein the file system determines whether the user-data is directly accessible from the control circuit, and directly issues a read command or a write command to the device driver when the user system is directly accessible. Features. According to a fourth aspect of the present invention, in the computer system according to the second aspect, a read command or a read command to the device driver is issued only when the file system issues a file data read command or a file data write command. It is characterized in that a write instruction is issued directly.

【0009】[0009]

【発明の実施の形態】以下、本発明の一実施形態による
コンピュータシステムを図面を参照して説明する。図2
は、本発明のコンピュータシステムの一構成例を示す図
である。図よりコンピュータシステム1は、補助記憶装
置18に対するファイル操作に関する構成として、プロ
グラムの実行等を行うCPU(中央演算装置)2、プロ
グラムがロードされたり、データ領域の確保が行われる
メモリ3、それらを接続するバス5を備える。なお、こ
こでいうコンピュータシステム1は、いわゆるパーソナ
ルコンピュータ、ワークステーション、ワードプロセッ
サといった補助記憶装置に対しファイル操作を行うシス
テムのことをいう。メモリ3はRAM(Random Access
Memory)等により構成される。そして、コンピュータシ
ステム1の立ち上げ等の時点で、カーネルモードで動作
するファイルシステム14、デバイスドライバ16、中
間バッファ15はプログラムとして提供されるファイル
のロードによりメモリ3上に記憶されたり、領域の確保
が行われたりする。そして、ユーザープログラム実行開
始時点で、ユーザープログラムがメモリ3上にロードさ
れ、必要に応じてユーザーデータ領域19’が確保され
る。なお、ここで言う中間バッファ15は、いわゆるバ
ッファ領域のほか、ファイルシステム14からの命令に
よりバッファ領域を経由したデータのやり取りを行うプ
ログラムも含むものとする。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a computer system according to an embodiment of the present invention will be described with reference to the drawings. FIG.
FIG. 1 is a diagram showing a configuration example of a computer system of the present invention. As shown in the figure, the computer system 1 includes a CPU (Central Processing Unit) 2 for executing a program and the like, a memory 3 on which a program is loaded and a data area is secured, and A bus 5 for connection is provided. Here, the computer system 1 refers to a system that performs file operations on an auxiliary storage device such as a so-called personal computer, workstation, or word processor. Memory 3 is RAM (Random Access)
Memory). When the computer system 1 starts up, the file system 14, the device driver 16, and the intermediate buffer 15 operating in the kernel mode are stored in the memory 3 by loading a file provided as a program, or an area is secured. Is done. Then, at the start of the execution of the user program, the user program is loaded onto the memory 3, and the user data area 19 'is secured if necessary. The intermediate buffer 15 here includes a program for exchanging data via the buffer area in accordance with an instruction from the file system 14, in addition to a so-called buffer area.

【0010】一方、デバイスドライバ16の命令に従い
補助記憶装置18を制御する制御回路17は、所定のイ
ンターフェース4を介してコンピュータシステム1のバ
ス5と接続される。なお、この制御回路17は、具体例
としてSCISモードやPCIカード等として提供され
る。補助記憶装置18は、バードディスク、フロッピー
ディスク、光磁気ディスク、コンパクトディスク、フラ
ッシュメモリ等の不揮発性の記録媒体およびそれらのド
ライブ機構により構成される。なお、ここで言う補助記
憶装置18は、コンピュータシステム1の外部に設けら
れる場合とコンピュータシステム1に内蔵される場合と
がある。補助記憶装置18を構成する記録媒体は、一般
的にセクタと呼ばれる所定の記録ブロックサイズで管理
が行われる。なお、記録媒体に記録される領域は、ファ
イルデータを記録するデータ領域42と、このデータ領
域42に記録されるファイルデータの管理を行うための
FAT(File Allocation Table)領域41とに大別さ
れる。なお、FAT領域41には、記録されるファイル
名等のアトリビュート情報、ファイルの配置情報、ファ
イルのディレクトリエントリの情報等が記録されてい
る。また、このFAT領域を参照することにより、デー
タ領域のどの部分が未使用領域となっているか分かる。
ここでいうFATは、ファイルデータの管理を行うため
のテーブル情報の総称のことをいう。よって、例えばU
NIXにおけるi−nodeもこれに含まれる。なお、
このコンピュータシステム1には図示しないインターフ
ェースを介してCRT(Cathode Ray Tube)等の表示装
置3や、マウス、キーボード等の入力装置7が接続され
る。
On the other hand, a control circuit 17 for controlling an auxiliary storage device 18 in accordance with a command from a device driver 16 is connected to the bus 5 of the computer system 1 via a predetermined interface 4. The control circuit 17 is provided as a SCIS mode or a PCI card as a specific example. The auxiliary storage device 18 is composed of a non-volatile recording medium such as a bird disk, a floppy disk, a magneto-optical disk, a compact disk, a flash memory, and a drive mechanism for them. Note that the auxiliary storage device 18 here may be provided outside the computer system 1 or may be built in the computer system 1. The recording medium constituting the auxiliary storage device 18 is managed with a predetermined recording block size generally called a sector. The area recorded on the recording medium is roughly divided into a data area 42 for recording file data and a FAT (File Allocation Table) area 41 for managing file data recorded in the data area 42. You. In the FAT area 41, attribute information such as a file name to be recorded, file arrangement information, information on a file directory entry, and the like are recorded. Further, by referring to the FAT area, it is possible to know which part of the data area is an unused area.
The FAT here is a general term for table information for managing file data. Thus, for example, U
The i-node in NIX is also included in this. In addition,
A display device 3 such as a CRT (Cathode Ray Tube) and an input device 7 such as a mouse and a keyboard are connected to the computer system 1 via an interface (not shown).

【0011】以下では、補助記憶装置18に対するコン
ピュータシステム1のファイル操作の動作を図を用いて
説明する。図1は、本発明のコンピュータシステム1に
おけるファイル操作の動作概念を示した図である。図1
において、アクセス権限の高いカーネルモード12では
ファイルシステム14、中間バッファ15、デバイスド
ライバ16が動作し、比較的アクセス権限の低いユーザ
ーモード11ではユーザープログラム13が動作する。
なお、図1において破線で示すライン10の左側がファ
イル操作命令の流れを示し、右側がファイルデータの流
れを示している。また図3は、コンピュータシステム1
におけるファイル操作の動作を示したフローチャートで
ある。以下では、図3を中心に図1を参照しながらファ
イル操作の動作を順次説明する。まず、ユーザープログ
ラム13がファイル操作命令を発行すると、ファイルシ
ステム14はそのファイル操作命令の受け付けを行う
(ステップS1)。ここで、”ファイル操作命令”と
は、補助記憶装置18に対するファイルの読み出し命令
あるいは書き込み命令のことを言うものとする。なお、
ファイル操作命令中には、メモリ3内におけるユーザー
データ19の先頭アドレス、操作対象となるファイル名
などファイル操作に必要な情報も含まれる。
Hereinafter, the operation of the file operation of the computer system 1 for the auxiliary storage device 18 will be described with reference to the drawings. FIG. 1 is a diagram showing an operation concept of a file operation in the computer system 1 of the present invention. FIG.
, The file system 14, the intermediate buffer 15, and the device driver 16 operate in the kernel mode 12 having high access authority, and the user program 13 operates in the user mode 11 having relatively low access authority.
In FIG. 1, the left side of the dashed line 10 shows the flow of the file operation command, and the right side shows the flow of the file data. FIG. 3 shows the computer system 1
6 is a flowchart showing the operation of a file operation in FIG. Hereinafter, the operation of the file operation will be sequentially described with reference to FIG. First, when the user program 13 issues a file operation command, the file system 14 accepts the file operation command (step S1). Here, the “file operation command” refers to a file read command or a file write command to the auxiliary storage device 18. In addition,
The file operation command also includes information necessary for file operation, such as the start address of the user data 19 in the memory 3 and the name of the file to be operated.

【0012】次に、ファイルシステム1は、ファイル操
作命令の解析を行い、FATを参照することにより、そ
のファイルが補助記憶装置18のどの位置に記録されて
いるか、またはどの位置に記録すべきなのかという配置
情報を得る(ステップS2)。ここで、FATの参照
は、補助記憶装置18内のFAT領域41を参照する場
合と、このFAT領域41のデータの一部もしくは全部
をメモリ3に予め読み込んでおき、それを参照する場合
とがある。次に、ファイルシステム14は、カーネルモ
ード12からファイルの読み出し先または書き込み元と
なるユーザーデータ19が見えるか、すなわち制御回路
17からユーザーデータ19に直接アクセス可能か否か
を判断する(ステップS3)。この判断により、制御回
路17からユーザーデータ19に直接アクセス可能な場
合にも、不可能な場合にも対応可能となる。
Next, the file system 1 analyzes the file operation command and refers to the FAT to determine in which position of the auxiliary storage device 18 the file is recorded, or in which position. Is obtained (step S2). Here, the FAT is referred to when referring to the FAT area 41 in the auxiliary storage device 18 or when reading a part or all of the data of the FAT area 41 into the memory 3 in advance and referring to it. is there. Next, the file system 14 determines from the kernel mode 12 whether the user data 19 from which the file is to be read or written is visible, that is, whether or not the control circuit 17 can directly access the user data 19 (step S3). With this determination, it is possible to cope with the case where the user data 19 is directly accessible from the control circuit 17 and the case where it is not possible.

【0013】アクセスが不可能であった場合、ファイル
システム14は従来方式と同様に中間バッファ15に対
しステップS2で得た配置情報に基づいて補助記憶装置
18からデータの読み出し命令または書き込み命令を順
次発行する(ステップS4)。中間バッファ15は中間
バッファ15のデータ領域サイズ単位でデバイスドライ
バ16および制御回路17経由で補助記憶装置18にア
クセスし、ユーザーデータ19と補助記憶装置18間の
データ転送を中間バッファ15のデータ領域を介して実
行する(ステップS5)。
If the access is not possible, the file system 14 sequentially issues a data read command or a write command from the auxiliary storage device 18 to the intermediate buffer 15 based on the arrangement information obtained in step S2, as in the conventional system. Issue (step S4). The intermediate buffer 15 accesses the auxiliary storage device 18 via the device driver 16 and the control circuit 17 in units of the data area size of the intermediate buffer 15 and transfers data between the user data 19 and the auxiliary storage device 18 to the data area of the intermediate buffer 15. (Step S5).

【0014】一方、アクセスが可能であった場合は、フ
ァイルシステム14は、ステップS2で得た配置情報に
基づいて補助記憶装置18からのデータの読み出し命令
または書き込み命令をデバイスドライバ16に対して直
接発行する(ステップS6)。この時、可能な限りデー
タの転送回数が少なくなるように命令の発行を行うもの
とする。これにより、データ転送回数が少なくなり、転
送効率が高まるからである。ファイルシステム14から
の命令に基づき、デバイスドライバ16は、制御回路1
7に対し補助記憶装置18とユーザーデータ19間のデ
ータ転送を図1の経路20に示すようにダイレクトに実
行するよう制御する(ステップS7)。制御回路17
は、データのハードウェア転送を行うことから高い転送
効率がえられる。なお、ここで行われるデータの転送方
法として、DMA(Direct Memory Access)転送等が用
いられる。
On the other hand, if the access is possible, the file system 14 sends a data read command or a write command from the auxiliary storage device 18 directly to the device driver 16 based on the arrangement information obtained in step S2. Issue (step S6). At this time, the instruction is issued so that the number of data transfers is reduced as much as possible. Thereby, the number of times of data transfer is reduced, and the transfer efficiency is increased. Based on an instruction from the file system 14, the device driver 16
7 is controlled so as to directly execute data transfer between the auxiliary storage device 18 and the user data 19 as shown by the path 20 in FIG. 1 (step S7). Control circuit 17
In this method, high transfer efficiency can be obtained because data is transferred by hardware. Note that as a data transfer method performed here, DMA (Direct Memory Access) transfer or the like is used.

【0015】そして、ユーザープログラム13の発行し
た命令によるファイル操作が終わると、ユーザープログ
ラム13に制御が戻される。一般に、ファイルのデータ
部分の読み書き時には中間バッファ15を介しないで転
送可能であり、ステップS6、S7による処理が行われ
る。なお、ここでいう”ファイルデータ”とはFAT情
報以外のデータのことを言い、図2のデータ領域42に
記録されるデータのことを言う。一方、FAT情報、例
えば、ファイルの配置情報や、ファイルのアトリビュー
ト、ディレクトリエントリの情報などは、動作の安定の
ために中間バッファ15を介して転送されることが好ま
しい。なお、FAT情報はその情報量が少ないためたと
え中間バッファ15を介して転送されたとしても全体的
な転送効率の低下につながることはない。よって、ファ
イルシステム14は、ステップS3において、ファイル
データの読み書きか、それ以外のデータの読み書きかに
よりステップS6に進むか、ステップS4に進むかを判
断するようにしてもよい。
When the file operation based on the command issued by the user program 13 is completed, the control is returned to the user program 13. Generally, when reading and writing the data portion of the file, the data can be transferred without passing through the intermediate buffer 15, and the processes in steps S6 and S7 are performed. The “file data” here refers to data other than FAT information, and refers to data recorded in the data area 42 in FIG. On the other hand, it is preferable that FAT information, for example, file arrangement information, file attributes, directory entry information, and the like be transferred via the intermediate buffer 15 for stable operation. Since the amount of FAT information is small, even if the FAT information is transferred via the intermediate buffer 15, it does not lead to a decrease in the overall transfer efficiency. Therefore, the file system 14 may determine in step S3 whether to proceed to step S6 or step S4 depending on whether to read or write file data or to read or write other data.

【0016】以上説明したファイル操作がコンピュータ
システム1においてなされるため、中間バッファ15を
介しないデータ転送が可能となる。これにより、制御回
路17とユーザーデータ19の間の転送は、制御回路1
7のハードウェア転送機能を用いて実行されるためCP
U2の処理が介在することなく高速なデータ転送が実現
できる。また、ハードウェア転送ではデータの読み出し
と書き込みを1回で実行も可能になることからも、高速
なデータ転送を実現できる。さらに、ファイルのデータ
量が大きくても、ファイルシステム14から発行される
読み出しまたは書き込み命令が、中間バッファ15のデ
ータ領域サイズ単位での読み出しまたは書き込み命令に
分割されることがなくなり、転送回数が削減が図れる。
また、中間バッファ15によるデータのソフトウェア転
送という処理もなくなる。よって、補助記憶装置18に
対するファイルの読み出し速度および書き込み速度の性
能を改善することができるようになる。さらに、ユーザ
ーデータ19がカーネルモードからアクセス可能である
場合には、図1に示す経路20を使って直接データ転送
を実行することから、データ転送の頻度を低下させるこ
とが可能である。
Since the above-described file operation is performed in the computer system 1, data transfer without the intermediate buffer 15 is possible. Thus, the transfer between the control circuit 17 and the user data 19 is performed by the control circuit 1
7 using the hardware transfer function
High-speed data transfer can be realized without the intervention of U2 processing. Further, in hardware transfer, data can be read and written in a single operation, so that high-speed data transfer can be realized. Further, even if the data amount of the file is large, the read or write command issued from the file system 14 is not divided into read or write commands in units of the data area size of the intermediate buffer 15, thereby reducing the number of transfers. Can be achieved.
Further, the process of software transfer of data by the intermediate buffer 15 is also eliminated. Therefore, the performance of the reading speed and the writing speed of the file with respect to the auxiliary storage device 18 can be improved. Further, when the user data 19 is accessible from the kernel mode, the data transfer is executed directly using the path 20 shown in FIG. 1, so that the frequency of the data transfer can be reduced.

【0017】次に、具体例としてOSにUNIXを用い
た場合のコンピュータシステム1におけるファイル操作
を説明する。図4は、OSとしてUNIXを備えた場合
のファイル操作の動作概念を示した図である。なお、コ
ンピュータシステムの装置構成やファイル操作における
動作フローは、基本的に図2、図3と同様である。図4
において、符号32はユーザープログラムを、符号33
はバーチャルファイルシステムを、符号34はUNIX
ファイルシステムを、符号35はバッファキャッシュ
(中間バッファ)を、符号36はデバイスドライバのソ
フトウェアスタックを表している。なお、ユーザープロ
グラム32はユーザーモードで動作し、バーチャルファ
イルシステム33、UNIXファイルシステム34、バ
ッファキャッシュ35、デバイスドライバ36はカーネ
ルモードで動作する。また、符号37はハードディスク
等の補助記憶装置の制御回路を、符号38は補助記憶装
置を表し、1つの制御回路37により複数の補助記憶装
置38が制御される例を示している。また、符号39は
ユーザープログラム上のユーザーデータである。そし
て、符号40は補助記憶装置38とユーザーデータ39
間のデータ転送経路、符号41はファイルデータの読み
書き以外の命令経路、符号42はファイルデータの読み
書きの場合の命令経路を表している。
Next, a file operation in the computer system 1 when UNIX is used as the OS will be described as a specific example. FIG. 4 is a diagram showing an operation concept of file operation when UNIX is provided as the OS. Note that the device configuration of the computer system and the operation flow in file operation are basically the same as those in FIGS. FIG.
, Reference numeral 32 denotes a user program, and reference numeral 33 denotes a user program.
Is a virtual file system, 34 is UNIX
Reference numeral 35 denotes a buffer cache (intermediate buffer), and reference numeral 36 denotes a software stack of a device driver. The user program 32 operates in a user mode, and the virtual file system 33, UNIX file system 34, buffer cache 35, and device driver 36 operate in a kernel mode. Reference numeral 37 denotes a control circuit of an auxiliary storage device such as a hard disk, and reference numeral 38 denotes an auxiliary storage device. An example in which one control circuit 37 controls a plurality of auxiliary storage devices 38 is shown. Reference numeral 39 denotes user data on the user program. Reference numeral 40 denotes an auxiliary storage device 38 and user data 39.
Reference numeral 41 denotes an instruction path other than reading / writing of file data, and reference numeral 42 denotes an instruction path in reading / writing of file data.

【0018】OSとしてUNIXを備えた場合のファイ
ル操作の動作は以下のようになる。なお、ここでは、フ
ァイルデータの読み書きの場合のみユーザーデータ39
と補助記憶装置38でデータの転送が直接行われるよう
に制御されるものとする。ユーザープログラム32がフ
ァイルデータを読み書きする場合、命令経路42のよう
に読み出しおよび書き込み命令が伝えられる。すなわ
ち、ユーザープログラム32がread関数(ファイル
データの読み出し関数)やwrite関数(ファイルデ
ータの書き込み関する)などを使ってファイルデータを
読み書きする命令を発行すると、その下位の関数によっ
てバーチャルファイルシステム33経由でUNlXファ
イルシステム34に命令が伝えられる(ステップS
1)。
The operation of file operation when UNIX is provided as the OS is as follows. Here, the user data 39 is read only when reading / writing file data.
And the auxiliary storage device 38 is controlled so that data transfer is performed directly. When the user program 32 reads and writes file data, read and write commands are transmitted as in the command path 42. That is, when the user program 32 issues a command to read or write file data using a read function (read function of file data), a write function (related to writing of file data), or the like, a lower-level function sends the command through the virtual file system 33. The command is transmitted to the UNX file system 34 (step S
1).

【0019】UNIXファイルシステム34は、その命
令がファイル操作命令であることを判定すると、バッフ
ァキャッシュ36の機構を介さずに、デバイスドライバ
36に設けられた特別な処理関数(ダイレクトアクセス
関数)を直接呼び出して、ファイルデータの読み出し、
あるいは書き込み命令を伝える(ステップS6)。な
お、制御回路37のハードウェアを用いた高速なデータ
転送を行う場合は、ここまでの段階のどこかで、カーネ
ルモードからユーザーモード内のメモリ空間が見えるよ
うに、m1ock(メモリーロック)に相当する関数を
用いてユーザーデータ39を物理メモリ空間にマップす
る処理(マップ処理)を完了しておく必要がある。これ
は、仮想記憶におけるページフォルトによる処理性能の
劣化を抑えるためである。そして最後に、デバイスドラ
イバ36内のダイレクトアクセス関数は、読み出し命令
の場合、補助記憶装置38からユーザーデータ39へ、
書き込みの場合はユーザーデータ39から補助記憶装置
38にデータをダイレクトに転送するように、制御回路
37に命令を発行する。そして、経路40に示すように
バッファキャッシュを経由しないファイルデータの転送
が行われる(ステップS7)。
When the UNIX file system 34 determines that the instruction is a file operation instruction, the UNIX file system 34 directly executes a special processing function (direct access function) provided in the device driver 36 without going through the mechanism of the buffer cache 36. Call to read file data,
Alternatively, a write command is transmitted (step S6). When high-speed data transfer using the hardware of the control circuit 37 is performed, it corresponds to m1ock (memory lock) so that the memory space in the user mode can be seen from the kernel mode somewhere in this stage. It is necessary to complete the process of mapping the user data 39 to the physical memory space using the function (mapping process). This is to suppress processing performance degradation due to page faults in the virtual storage. And finally, in the case of a read command, the direct access function in the device driver 36 reads the data from the auxiliary storage device 38 to the user data 39.
In the case of writing, an instruction is issued to the control circuit 37 so that the data is directly transferred from the user data 39 to the auxiliary storage device 38. Then, as shown in the path 40, the transfer of the file data is performed without passing through the buffer cache (step S7).

【0020】次に、ファイルデータ以外の情報、例え
ば、ディレクトリエントリ情報や、ファイル配置情報な
どを読み出す場合(ステップS3)は、従来方式と同じ
通常の経路41を使って読み書きを行う。すなわち、読
み出し命令および書き込み命令はバッファキャッシュ3
5に伝えられ(ステップS4)、バッファキャッシュ3
5は、データを一旦バッファキャッシュ35内のメモリ
領域に蓄えてからデータを転送するといった処理を行う
(ステップS5)。このメモリ領域は、常に物理メモリ
空間に割り当てられているため、マップ処理の必要はな
い。また、バッファメモリ領域とユーザーメモリ39間
の転送はソフトウェアによる転送のため、UNlXのペ
ージフォルトの機能によって自動的にユーザーメモリ3
9のマップ処理が行われる。なお、UNIXでは、カー
ネルモードから直接ユーザーモードのメモリ空間にアク
セスできる場合とできない場合があるため、図3のステ
ップS3に示す判断が必要となる。上述のようにコンピ
ュータシステム1において、OSとしてUNIXを備え
場合のファイル操作の動作が行われる。
Next, when information other than file data, for example, directory entry information and file arrangement information is read (step S3), reading and writing are performed using the same ordinary path 41 as the conventional method. That is, the read command and the write command are transmitted to the buffer cache 3
5 (step S4), the buffer cache 3
5 performs a process of temporarily storing data in a memory area in the buffer cache 35 and then transferring the data (step S5). Since this memory area is always allocated to the physical memory space, there is no need to perform a map process. Since the transfer between the buffer memory area and the user memory 39 is performed by software, the user memory 3 is automatically transferred by the page fault function of the UNlX.
Nine map processes are performed. In UNIX, since the memory space in the user mode can or cannot be directly accessed from the kernel mode, the determination shown in step S3 in FIG. 3 is necessary. As described above, in the computer system 1, the file operation is performed when UNIX is provided as the OS.

【0021】以上説明したようにユーザーデータと補助
記憶装置間で直接データの転送が行われる。よって、中
間バッファを介することがなくなり補助記憶装置に対す
る読み出し速度、書き込み速度の向上がはかれる。ま
た、ファイルシステムは、中間バッファを介さずにデバ
イスドライバに直接読み書き命令を発行するので、大き
いファイルサイズの読み書き命令であっても1回の命令
としてデバイスドライバに伝えることが可能となる。そ
の結果、ユーザーデータと補助記憶装置間のデータ転送
を1回で実現させることが可能でとなる。補助記憶装置
においてファイルデータは一般に連続した領域に記録さ
れるのでその効果は大きい。また、転送効率は、データ
量の大きいファイルデータの転送速度に大きく依存する
ことから、少なくともファイルデータの転送においてユ
ーザーデータと補助記憶装置間での直接転送を行うこと
により、転送効率を高めることができる。また、ファイ
ルシステムやデバイスドライバに新たな機能を追加する
のみで補助記憶装置に対する読み出し速度、書き込み速
度の向上がはかれることから、従来のファイルの記録形
式、制御回路の回路構成等をなんら変更することなく高
速なファイルの入出力を行うことができるようになる。
なお、図1のファイルシステム14及びデバイスドライ
バ16の機能を含むOSのプログラムをコンピュータ読
み取り可能な記録媒体に記録して、この記録媒体に記録
されたプログラムをコンピュータシステムに読み込ま
せ、ファイル操作を行うようにしてもよい。以上、この
発明の実施形態を図面を参照して詳述してきたが、具体
的な構成はこの実施形態に限られるものではなく、この
発明の要旨を逸脱しない範囲の機能変更も含まれる。
As described above, data is directly transferred between the user data and the auxiliary storage device. Therefore, the data does not pass through the intermediate buffer, and the reading speed and the writing speed for the auxiliary storage device can be improved. Further, since the file system issues a read / write command directly to the device driver without passing through the intermediate buffer, even a read / write command having a large file size can be transmitted to the device driver as one command. As a result, data transfer between the user data and the auxiliary storage device can be realized at one time. The effect is great because file data is generally recorded in a continuous area in the auxiliary storage device. Further, since the transfer efficiency greatly depends on the transfer speed of file data having a large data amount, the transfer efficiency can be increased by performing direct transfer between the user data and the auxiliary storage device at least in the transfer of the file data. it can. In addition, since the reading speed and writing speed for the auxiliary storage device can be improved only by adding new functions to the file system and device driver, there is no need to change the conventional file recording format, circuit configuration of the control circuit, etc. High-speed file input and output.
An OS program including the functions of the file system 14 and the device driver 16 shown in FIG. 1 is recorded on a computer-readable recording medium, and the program recorded on this recording medium is read by a computer system to perform file operations. You may do so. As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the embodiments, and includes a functional change within a scope not departing from the gist of the present invention.

【0022】[0022]

【発明の効果】以上説明したように、本発明によるコン
ピュータシステムによれば、ファイルデータの読み出し
または書き込みを中間バッファを介さないで行うことに
よって、補助記憶装置とユーザーデータ間のデータ転送
をダイレクトに行うことが可能となる。よって、補助記
憶装置に対するファイルの読み出し速度および書き込み
速度の性能が改善される。
As described above, according to the computer system of the present invention, by reading or writing file data without using an intermediate buffer, data transfer between the auxiliary storage device and user data can be performed directly. It is possible to do. Therefore, the performance of the reading speed and writing speed of the file with respect to the auxiliary storage device is improved.

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

【図1】 本発明のコンピュータシステムにおけるファ
イル操作の動作概念を示した図である。
FIG. 1 is a diagram showing an operation concept of a file operation in a computer system of the present invention.

【図2】 本発明のコンピュータシステムの構成を示す
図である。
FIG. 2 is a diagram showing a configuration of a computer system of the present invention.

【図3】 ファイル操作の動作を示したフローチャート
である。
FIG. 3 is a flowchart showing an operation of a file operation.

【図4】 オペレーティングシステムとしてUNIXを
備えた場合のファイル操作の動作概念を示した図であ
る。
FIG. 4 is a diagram showing an operation concept of a file operation when UNIX is provided as an operating system.

【図5】 従来のファイル操作の動作概念を示した図で
ある。
FIG. 5 is a diagram showing an operation concept of a conventional file operation.

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

1 コンピュータシステム 2 CPU 3 メモリ 5 バス 6 表示装置 7 入力装置 11 ユーザーモード 12 カーネル
モード 13 ユーザープログラム 14 ファイル
システム 15 中間バッファ 16 デバイス
ドライバ 17 制御回路 18 補助記憶
装置 19 ユーザーデータ 19’ ユーザ
ーデータ領域 20 データ転送経路 41 FAT領
域 42 データ領域
DESCRIPTION OF SYMBOLS 1 Computer system 2 CPU 3 Memory 5 Bus 6 Display device 7 Input device 11 User mode 12 Kernel mode 13 User program 14 File system 15 Intermediate buffer 16 Device driver 17 Control circuit 18 Auxiliary storage device 19 User data 19 'User data area 20 Data Transfer path 41 FAT area 42 Data area

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 ファイル操作機能として、少なくとも、
ユーザプログラムからのファイル操作命令に基づき読み
出し命令もしくは書き込み命令を発行するファイルシス
テムと、該ファイルシステムの発行する命令に基づき補
助記憶装置にファイルの読み書き制御を行う制御回路へ
の制御命令を発行するデバイスドライバとを実行するコ
ンピュータシステムであって、 前記デバイスドライバは、前記補助記憶装置と指定され
るユーザーデータ間で直接データ転送を行うよう前記制
御回路を制御することを特徴とするコンピュータシステ
ム。
1. The file operation function includes at least:
A file system that issues a read command or a write command based on a file operation command from a user program, and a device that issues a control command to a control circuit that performs file read / write control on an auxiliary storage device based on the command issued by the file system A computer system for executing a driver, wherein the device driver controls the control circuit so as to directly transfer data between the auxiliary storage device and designated user data.
【請求項2】 前記ファイルシステムは、前記デバイス
ドライバに対し読み出し命令もしくは書き込み命令を直
接発行することを特徴とする請求項1記載のコンピュー
タシステム。
2. The computer system according to claim 1, wherein the file system issues a read command or a write command directly to the device driver.
【請求項3】 前記ファイルシステムは、前記制御回路
から前記ユーザ−データに直接アクセス可能か否か判断
し、直接アクセス可能な場合に前記デバイスドライバに
対し読み出し命令もしくは書き込み命令を直接発行する
ことを特徴とする請求項2記載のコンピュータシステ
ム。
3. The file system according to claim 1, wherein the control circuit determines whether the user data is directly accessible or not, and when the user data is directly accessible, directly issues a read command or a write command to the device driver. 3. The computer system according to claim 2, wherein:
【請求項4】 前記ファイルシステムは、ファイルデー
タの読み出し命令もしくはファイルデータの書き込み命
令を発行するときのみ前記デバイスドライバに対し読み
出し命令もしくは書き込み命令を直接発行することを特
徴とする請求項2記載のコンピュータシステム。
4. The file system according to claim 2, wherein the file system issues a read command or a write command directly to the device driver only when issuing a file data read command or a file data write command. Computer system.
JP10045941A 1998-02-26 1998-02-26 Computer system Pending JPH11249937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10045941A JPH11249937A (en) 1998-02-26 1998-02-26 Computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10045941A JPH11249937A (en) 1998-02-26 1998-02-26 Computer system

Publications (1)

Publication Number Publication Date
JPH11249937A true JPH11249937A (en) 1999-09-17

Family

ID=12733311

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10045941A Pending JPH11249937A (en) 1998-02-26 1998-02-26 Computer system

Country Status (1)

Country Link
JP (1) JPH11249937A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004054934A (en) * 2002-06-26 2004-02-19 Microsoft Corp Driver model in which process mode is independent
JP2005276211A (en) * 2004-03-22 2005-10-06 Microsoft Corp Efficient data transfer to/from storage medium of computing device
JP2013037588A (en) * 2011-08-09 2013-02-21 Kyocera Document Solutions Inc Image forming apparatus, and image forming program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004054934A (en) * 2002-06-26 2004-02-19 Microsoft Corp Driver model in which process mode is independent
JP2005276211A (en) * 2004-03-22 2005-10-06 Microsoft Corp Efficient data transfer to/from storage medium of computing device
US8645435B2 (en) 2004-03-22 2014-02-04 Microsoft Corporation Efficient data transfer to/from storage medium of computing device
JP2013037588A (en) * 2011-08-09 2013-02-21 Kyocera Document Solutions Inc Image forming apparatus, and image forming program

Similar Documents

Publication Publication Date Title
US8738890B2 (en) Coupled symbiotic operating system
US8185687B2 (en) Semiconductor storage device and method of controlling semiconductor storage device
JP3627915B2 (en) BOOT BLOCK FLASH MEMORY CONTROL CIRCUIT, IC MEMORY CARD WITH THE SAME, SEMICONDUCTOR STORAGE DEVICE, AND BOOT BLOCK FLASH MEMORY METHOD
JPH1063551A (en) Information processor
KR20020032136A (en) Large capacity auxiliary storage device using memory
JPH11249937A (en) Computer system
JP2004206424A (en) Data processing device and data transfer method for data processing device
US7382970B2 (en) Process control manager for audio/video file system
JP2000222285A (en) Memory power managing device
JPH09231069A (en) Method and device for information processing
JP2994917B2 (en) Storage system
JP2748410B2 (en) ImPP program startup method
JP2964504B2 (en) Document processing device
JPH0644139A (en) Disk cache system and its page rewrite control method
JP2842697B2 (en) Data I / O method by virtual file
JPS6212555B2 (en)
JPH05334012A (en) Large capacity disk controller
JPH05158782A (en) Storage device
JPS62108346A (en) Inter-process communication system
JPH05225055A (en) Information processor
JPH03208142A (en) File sharing method
JPH04340143A (en) Digital computer
JPH04280337A (en) Virtual storage computer system
JPH06290107A (en) Cache memory control system
JPS59133656A (en) Data processing system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040706

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041102