JPH05342070A - File information managing method - Google Patents

File information managing method

Info

Publication number
JPH05342070A
JPH05342070A JP4149254A JP14925492A JPH05342070A JP H05342070 A JPH05342070 A JP H05342070A JP 4149254 A JP4149254 A JP 4149254A JP 14925492 A JP14925492 A JP 14925492A JP H05342070 A JPH05342070 A JP H05342070A
Authority
JP
Japan
Prior art keywords
file
file information
memory
child
parent
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
JP4149254A
Other languages
Japanese (ja)
Inventor
Keigo Fujimori
敬悟 藤森
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP4149254A priority Critical patent/JPH05342070A/en
Publication of JPH05342070A publication Critical patent/JPH05342070A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To efficiently manage file information by shortening an access time required for opening the same file by plural processes. CONSTITUTION:When a master file 10 opens a file 16, a file information table 18b is prepared in an extention system area 18a possessed by a file information managing part 18. When a slave process 12 issues an open instruction to the same file 16, the file information table 18b is copied in a memory 12a for slave process.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、プロセスがファイルを
オープンした場合におけるファイル情報の管理方法に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of managing file information when a process opens a file.

【0002】[0002]

【従来の技術】図3には、従来のファイル情報管理方法
の概念が模式的に示されている。図において、親プロセ
ス10と子プロセス12は、いずれもソフトウエア(例
えば、アプリケーションプログラムなど)で構成され
る。子プロセス12は、親プロセス10で例えばフォー
ク命令が実行された際に生成されるものであり、親プロ
セス10自体をコピーしたものに相当している。
2. Description of the Related Art FIG. 3 schematically shows the concept of a conventional file information management method. In the figure, both the parent process 10 and the child process 12 are configured by software (for example, application program). The child process 12 is generated when, for example, a fork instruction is executed in the parent process 10, and corresponds to a copy of the parent process 10 itself.

【0003】ここで、各プロセス10,12は、例え
ば、主記憶上に、いずれも自己専用の記憶領域(メモ
リ)10a,12aを保有しており、これらのメモリ1
0a,12aには、後述するように、ファイル情報テー
ブル10b,12bが格納される。
Here, each of the processes 10 and 12 has its own dedicated storage areas (memory) 10a and 12a on the main memory.
File information tables 10b and 12b are stored in 0a and 12a as described later.

【0004】これらのプロセス10,12は、いわゆる
オペレーティングシステム(OS)上で実行されるもの
であり、そのOSには、この従来例において、データ管
理モジュール14が含まれ、ファイル16等についての
データ入出力を管理している。
These processes 10 and 12 are executed on a so-called operating system (OS). The OS includes a data management module 14 in this conventional example, and data about files 16 and the like. It manages I / O.

【0005】ここで、ファイル16は、記憶装置上のデ
ータベースや漢字辞書等に相当する。そして、上述した
ファイル情報は、このファイル16のレコードの長さや
数、属性や日付等を表すデータである。
Here, the file 16 corresponds to a database on a storage device, a kanji dictionary, or the like. The file information described above is data representing the length and number of records in the file 16, attributes, dates, and the like.

【0006】次に、従来のファイル情報テーブルの作成
方法について説明する。
Next, a conventional method of creating a file information table will be described.

【0007】まず、親プロセス10の実行中に、ファイ
ル16がオープンされ、その後、親プロセス10によっ
て子プロセス12が生成される。このファイル16のオ
ープンの際、データ管理モジュール14は、親プロセス
10についてのファイル情報テーブルを作成し、そして
親プロセス用メモリ10aへそのファイル情報テーブル
10bを送る。
First, the file 16 is opened during execution of the parent process 10, and then the parent process 10 creates a child process 12. When the file 16 is opened, the data management module 14 creates a file information table for the parent process 10 and sends the file information table 10b to the parent process memory 10a.

【0008】一方、子プロセス12が、同一のファイル
16をオープンする場合においても、上記と同様の処理
が実行される。すなわち、データ管理モジュール14を
介して、ファイル16がオープンされ、そのファイル1
6に関するファイル情報テーブルが作成され、それが子
プロセス用のメモリ12aにテーブル12bとして書き
込まれる。
On the other hand, when the child process 12 opens the same file 16, the same process as above is executed. That is, the file 16 is opened via the data management module 14, and the file 1
A file information table for 6 is created and written in the child process memory 12a as a table 12b.

【0009】[0009]

【発明が解決しようとする課題】以上のように、従来の
方法においては、親プロセス及び子プロセスがファイル
オープン命令を発する毎に、ファイルからファイル情報
を得て、そのファイル情報がそれぞれのプロセスが管理
するメモリに格納されていた。
As described above, in the conventional method, each time a parent process and a child process issue a file open command, file information is obtained from the file and the file information is obtained by each process. It was stored in the memory it manages.

【0010】したがって、オープンされるファイル数が
多くなると、ファイルのアクセス回数も多くなり、情報
処理装置(コンピュータ)の時間性能を低下させるとい
う問題があった。ゆえに、重複するアクセスを省略する
ことが要望されていた。
Therefore, when the number of opened files increases, the number of times of accessing the files also increases, which causes a problem that the time performance of the information processing apparatus (computer) is deteriorated. Therefore, it has been desired to omit duplicate access.

【0011】本発明は、上記従来の課題に鑑みなされた
ものであり、その目的は、複数のプロセスがファイルを
オープンする際に要するアクセス時間を短縮して、効率
的なファイル情報の管理を行うことのできるファイル情
報管理方法を提供することにある。
The present invention has been made in view of the above-mentioned conventional problems, and an object thereof is to shorten the access time required for a plurality of processes to open a file and perform efficient management of file information. It is to provide a method of managing file information that can be done.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、親プロセス及び子プロセスがオープンし
たファイルのファイル情報をテーブルとして各プロセス
に対応付けて管理するファイル情報管理方法であって、
前記親プロセスがオープンしたファイルのファイル情報
を所定の共有メモリ上にテーブルとして格納し、前記子
プロセスが同一ファイルに対してオープン命令を発した
場合に、前記共有メモリ上の前記ファイル情報テーブル
を前記子プロセスの管理するメモリ上にコピーすること
を特徴とする。
In order to achieve the above object, the present invention is a file information management method for managing file information of files opened by a parent process and a child process as a table in association with each process. hand,
The file information of the file opened by the parent process is stored as a table on a predetermined shared memory, and when the child process issues an open command to the same file, the file information table on the shared memory is stored. It is characterized by copying on the memory managed by the child process.

【0013】[0013]

【作用】上記構成によれば、親プロセスがファイルをオ
ープンさせると、所定の共有メモリ上に当該ファイルの
ファイル情報テーブルが作成される。そして、子プロセ
スが、同一ファイルをオープンさせるべくオープン命令
を発すると、当該ファイルへのアクセスなしに、前記共
有メモリ上のファイル情報テーブルが子プロセス用メモ
リに直接コピーされる。
According to the above structure, when the parent process opens a file, a file information table of the file is created on a predetermined shared memory. When the child process issues an open command to open the same file, the file information table on the shared memory is directly copied to the child process memory without accessing the file.

【0014】[0014]

【実施例】以下、本発明の好適な実施例を図面に基づい
て説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will be described below with reference to the drawings.

【0015】図1には、本実施例の情報処理装置の構成
が概念的に示されており、この情報処理装置において
は、本発明に係るファイル情報管理方法が適応される。
なお、図3に示した従来の構成と同一の構成には同一符
号を付し、その説明を省略する。
FIG. 1 conceptually shows the configuration of the information processing apparatus of this embodiment, and the file information management method according to the present invention is applied to this information processing apparatus.
It should be noted that the same components as those of the conventional configuration shown in FIG. 3 are designated by the same reference numerals and the description thereof will be omitted.

【0016】図1において、本実施例においては、親プ
ロセス10及び子プロセス12と、データ管理モジュー
ル14と、の間に「ファイル情報管理部18」が設けら
れている。このファイル情報管理部18は、上記データ
管理モジュール14と共に、OSの一部として存在する
ものである。
In FIG. 1, in this embodiment, a "file information management unit 18" is provided between the parent process 10 and the child process 12 and the data management module 14. The file information management unit 18 exists as a part of the OS together with the data management module 14.

【0017】ファイル情報管理部18は、OSが管理す
るシステム領域(例えば、主記憶上のOS管理領域)の
一部として、自己が直接管理する拡張システム領域18
aを保有している。この拡張システム領域18aは、O
Sが管理するため、親プロセス10及び子プロセス12
の共有メモリとして機能する。
The file information management unit 18 is a part of a system area managed by the OS (for example, an OS management area on the main memory) and is an extended system area 18 directly managed by itself.
owns a. This extended system area 18a is O
Since S manages, parent process 10 and child process 12
Function as a shared memory of.

【0018】本実施例において、この拡張システム領域
18aには、親プロセス10がファイル16をオープン
した場合、データ管理モジュール14が出力するファイ
ル情報がテーブル18bとして格納される。但し、後述
するように、この処置は選択でき、場合に応じて、親プ
ロセス用メモリ10aにファイル情報テーブル10b
(内容は18bと同じ)を作成することもできる。
In this embodiment, when the parent process 10 opens the file 16, the extended system area 18a stores the file information output by the data management module 14 as a table 18b. However, as will be described later, this measure can be selected, and depending on the case, the file information table 10b is stored in the parent process memory 10a.
(The content is the same as 18b) can also be created.

【0019】このように、親プロセス10がファイル1
6をオープンした場合、ファイル情報テーブルが、共有
メモリとしての拡張システム領域18aに作成される。
そして、そのファイル情報テーブル18aは、後述する
ように、子プロセス12のファイルオープン命令が出さ
れると同時に、子プロセス12用のメモリ12bにコピ
ーされる。つまり、本実施例では、子プロセスのファイ
ルオープンの際に、再度、ファイル16からファイル情
報を読み出し、さらに子プロセス12のメモリ12aに
ファイル情報テーブルを作成する重複した煩雑さを回避
して、ファイル情報テーブルを即コピーして、アクセス
時間の短縮化を図るものである。
In this way, the parent process 10 has the file 1
When No. 6 is opened, the file information table is created in the extended system area 18a as the shared memory.
Then, as will be described later, the file information table 18a is copied to the memory 12b for the child process 12 at the same time when the file open command of the child process 12 is issued. That is, in this embodiment, when the file is opened by the child process, the file information is read again from the file 16 and the duplication of creating the file information table in the memory 12a of the child process 12 is avoided. The information table is immediately copied to shorten the access time.

【0020】なお、本実施例では、説明容易化のため、
データ管理モジュール14とファイル情報管理部18と
を別個の存在としたが、もちろんデータ管理モジュール
14がファイル情報管理部18を包含しその機能を果た
してもよい。
In this embodiment, for ease of explanation,
Although the data management module 14 and the file information management unit 18 are provided separately, the data management module 14 may of course include the file information management unit 18 and fulfill its function.

【0021】次に、本実施例のファイル情報部18の具
体的な動作について、図1を参照しながら、図2を用い
て説明する。なお、以下の説明では、親プロセス、子プ
ロセス、孫プロセス(前記子プロセスの子に当たるプロ
セス)が存在する場合について説明する。但し、それ以
上階層化されていても本実施例を適応できる。
Next, the specific operation of the file information section 18 of this embodiment will be described with reference to FIG. 1 and FIG. In the following description, a case will be described in which a parent process, a child process, and a grandchild process (processes that are children of the child process) exist. However, the present embodiment can be applied even if the layers are further hierarchized.

【0022】いずれかのプロセスがファイル16をオー
プンする命令を発すると、S101で、そのプロセスの
直ぐ上の親にあたるプロセスが存在し、かつ、その親に
あたるプロセスが既に「共有メモリ使用」を指定して当
該ファイルをオープンしているかを判断する。例えば、
本ルーチンが開始されたプロセスが親プロセスであれ
ば、「No」となり、S102に処理が移行する。ま
た、子プロセスであれば、S101の条件判断の結果に
よって、処理がS102又はS105に移行する。孫プ
ロセスでも同様であるが、ここで、その孫プロセスから
みて親に当たるプロセスは、前記子プロセスとなる。す
なわち、階層のどの段階にあっても、「親」と「子」と
の関係を判断しつつ本ルーチンが実行されることにな
る。
When any of the processes issues a command to open the file 16, in S101, there is a parent process immediately above the process, and the parent process already specifies "use shared memory". To determine if the file is open. For example,
If the process in which this routine is started is the parent process, the result is "No", and the process proceeds to S102. If it is a child process, the process proceeds to S102 or S105 depending on the result of the condition determination in S101. The same applies to the grandchild process, but here, the process that is a parent from the viewpoint of the grandchild process is the child process. That is, at any stage of the hierarchy, this routine is executed while judging the relationship between the "parent" and the "child".

【0023】S102では、本ルーチンに入ってきたプ
ロセスについて、「共有メモリ使用」の指定がされてい
るか判断される。ここで、「共有メモリ使用」は、各プ
ロセスでユザーが指定できる。
In step S102, it is determined whether "use of shared memory" has been designated for the process that has entered this routine. Here, "use of shared memory" can be specified by the user in each process.

【0024】S102で「Yes」の場合には、S10
3で、自己の子に当たるプロセスのために、ファイル情
報テーブル18bが拡張システム領域18aに作成され
る。一方、S102で、「No」の場合には、S104
で、従来同様に、親プロセス10用のメモリ10aにフ
ァイル情報テーブル10bが作成される。
If "Yes" in S102, S10
At 3, the file information table 18b is created in the extended system area 18a for the process corresponding to its own child. On the other hand, if “No” in S102, S104
Then, as in the conventional case, the file information table 10b is created in the memory 10a for the parent process 10.

【0025】さて、S101で「Yes」の場合には、
S105において、上記S102同様に、本ルーチンに
入ってきたプロセスについて、「共有メモリ使用」の指
定がされているか判断される。
Now, in the case of "Yes" in S101,
In step S105, as in step S102, it is determined whether "use shared memory" has been designated for the process that has entered this routine.

【0026】S105で「No」の場合には、S106
において、S103で作成された拡張システム領域18
a上のファイル情報テーブル18bが子プロセスのメモ
リ12aにコピーされる。
If "No" in S105, S106
In, the extended system area 18 created in S103
The file information table 18b on a is copied to the memory 12a of the child process.

【0027】S105で「Yes」の場合には、S10
7で、拡張システム領域18aに記憶された親及び子プ
ロセス用のファイル情報テーブルが、子及び孫プロセス
用として拡張システム領域18a自体にコピーされる。
なお、このコピーは必ずしも必要でなく、同一のファイ
ル情報テーブルを、親、子、孫で共有しても構わない。
If "Yes" in S105, S10
At 7, the file information tables for parent and child processes stored in the extended system area 18a are copied to the extended system area 18a itself for child and grandchild processes.
Note that this copying is not always necessary, and the same file information table may be shared by the parent, child, and grandchild.

【0028】なお、上記実施例においては、拡張システ
ム領域18aにファイル16についてのファイル情報の
全部がテーブルとして格納されたが、ファイル情報のう
ち共有される一部の情報をファイル情報テーブルとして
拡張システム領域18a上に作成しても良い。これによ
り、拡張システム領域を有効利用でき、オープンするフ
ァイルの数が多くなった場合においてもプロセス実行へ
の悪影響を防止することが可能となる。
In the above embodiment, all of the file information about the file 16 is stored as a table in the extended system area 18a, but some of the shared file information is used as a file information table. It may be created on the area 18a. This makes it possible to effectively use the extended system area and prevent adverse effects on process execution even when the number of open files increases.

【0029】[0029]

【発明の効果】以上説明したように、本発明によれば、
所定の共有メモリ上にファイル情報テーブルが作成さ
れ、子プロセスのオープン命令に対し、その子プロセス
用メモリに前記ファイル情報テーブルがコピーされるの
で、ファイル情報を読み出す際のアクセス時間を短縮化
して、効率的なファイル情報の管理を行うことが可能と
なる。
As described above, according to the present invention,
A file information table is created on a predetermined shared memory, and the file information table is copied to the child process memory in response to the open instruction of the child process. It is possible to manage the file information as a whole.

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

【図1】本発明に係るファイル情報管理方法が適応され
る情報処理装置の構成を示す概念図である。
FIG. 1 is a conceptual diagram showing a configuration of an information processing apparatus to which a file information management method according to the present invention is applied.

【図2】図1に示すファイル情報管理部18の動作を示
すフローチャートである。
FIG. 2 is a flowchart showing an operation of a file information management section 18 shown in FIG.

【図3】従来のファイル情報管理方法の概念を示す概念
図である。
FIG. 3 is a conceptual diagram showing the concept of a conventional file information management method.

【符号の説明】 10 親プロセス 12 子プロセス 14 データ管理モジュール 16 ファイル 18 ファイル情報管理部 18a 拡張システム領域[Explanation of Codes] 10 Parent Process 12 Child Process 14 Data Management Module 16 File 18 File Information Management Unit 18a Extended System Area

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 親プロセス及び子プロセスがオープンし
たファイルのファイル情報をテーブルとして各プロセス
に対応させて管理するファイル情報管理方法であって、 前記親プロセスがオープンしたファイルのファイル情報
を所定の共有メモリ上にテーブルとして格納し、前記子
プロセスが同一ファイルに対してオープン命令を発した
場合に、前記共有メモリ上の前記ファイル情報テーブル
を前記子プロセスの管理するメモリ上にコピーすること
を特徴とするファイル情報管理方法。
1. A file information management method for managing file information of files opened by a parent process and a child process as a table in association with each process, wherein file information of files opened by the parent process is shared in a predetermined manner. A file is stored in a memory as a table, and when the child process issues an open command to the same file, the file information table in the shared memory is copied to a memory managed by the child process. How to manage file information.
JP4149254A 1992-06-09 1992-06-09 File information managing method Pending JPH05342070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4149254A JPH05342070A (en) 1992-06-09 1992-06-09 File information managing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4149254A JPH05342070A (en) 1992-06-09 1992-06-09 File information managing method

Publications (1)

Publication Number Publication Date
JPH05342070A true JPH05342070A (en) 1993-12-24

Family

ID=15471243

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4149254A Pending JPH05342070A (en) 1992-06-09 1992-06-09 File information managing method

Country Status (1)

Country Link
JP (1) JPH05342070A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100695188B1 (en) * 2003-12-15 2007-03-19 레노보 (싱가포르) 피티이. 엘티디. Method and system of accessing at least one target file in a computer system with an operating system with file locking implemented at file-open time

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100695188B1 (en) * 2003-12-15 2007-03-19 레노보 (싱가포르) 피티이. 엘티디. Method and system of accessing at least one target file in a computer system with an operating system with file locking implemented at file-open time

Similar Documents

Publication Publication Date Title
US6564215B1 (en) Update support in database content management
US5881378A (en) Device accessing a database using one of old definition information and new definition information based on an access request
US6115738A (en) Input/output device information management method and apparatus for multi-computers
US5778389A (en) Method and system for synchronizing computer file directories
US20060150178A1 (en) Method and system for updating application design
JP2002528789A (en) Apparatus and method for creating modeling tools
JPH07262072A (en) File controller
JP3727076B2 (en) Program management method and apparatus
JP2004318288A (en) Method and device for processing data and its processing program
JPH0816396A (en) Data management system
US7539971B2 (en) System and method for registering and deploying stored procedures and triggers into a device database
JPH05342070A (en) File information managing method
JPH04344955A (en) Temporary change method for access right
US7225196B2 (en) Data conversion method and computer system therefor
JPH04260141A (en) Data shared processor
JPS6312300B2 (en)
JPH05158777A (en) Data management system
JPH04336341A (en) File access control system
JPH03226837A (en) Generation of repository
Hancock Tru64 Unix file system administration handbook
JP2781691B2 (en) Failure information reference method
JP2000148566A (en) Disk storage device with correctable data managing function
JPH0340042A (en) Multiple accessing device
JPS63314642A (en) Control processing system for selected product
Huang The implementation of relational data base management systems on micro-computers