JP2000003287A - Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control program - Google Patents
Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control programInfo
- Publication number
- JP2000003287A JP2000003287A JP10164478A JP16447898A JP2000003287A JP 2000003287 A JP2000003287 A JP 2000003287A JP 10164478 A JP10164478 A JP 10164478A JP 16447898 A JP16447898 A JP 16447898A JP 2000003287 A JP2000003287 A JP 2000003287A
- Authority
- JP
- Japan
- Prior art keywords
- shared resource
- access
- exclusive control
- exclusive
- shared
- 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 title claims abstract description 203
- 230000008569 process Effects 0.000 claims abstract description 110
- 230000008859 change Effects 0.000 claims abstract description 56
- 238000012545 processing Methods 0.000 claims abstract description 20
- 230000010365 information processing Effects 0.000 claims abstract description 10
- 230000007717 exclusion Effects 0.000 claims description 34
- 238000004891 communication Methods 0.000 claims description 13
- 230000006866 deterioration Effects 0.000 abstract 1
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 40
- 238000012508 change request Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、共有リソースの排
他制御装置、排他制御方法及び排他制御プログラムを記
録した記録媒体に関し、特に、複数のプロセスが共有し
て参照され、通常は内容の変更が行われない共有リソー
スを有するコンピュータシステムに適合する共有リソー
スの排他制御装置、排他制御方法及び排他制御プログラ
ムを記録した記録媒体に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an exclusive control apparatus, an exclusive control method, and a recording medium for recording an exclusive control program for a shared resource. The present invention relates to an exclusive control apparatus, an exclusive control method, and an exclusive control program for a shared resource suitable for a computer system having a shared resource that is not performed.
【0002】[0002]
【従来の技術】一般に、コンピュータシステムにおいて
は、同一の共有リソースに対して複数のプロセスが同時
にアクセスしないように、共有リソースの排他制御装置
が採用されている。2. Description of the Related Art In general, a computer system employs a shared resource exclusive control device so that a plurality of processes do not access the same shared resource at the same time.
【0003】図10に示すように、従来の共有リソース
の排他制御装置は、複数のプロセス50・・・と、それ
らのプロセス50が共通して参照する共有リソース51
と、共有リソース51に排他的にアクセスするための共
有リソースアクセス排他手段52と、共有リソース51
の内容を変更する共有リソース変更手段53とから構成
されている。As shown in FIG. 10, a conventional shared resource exclusive control apparatus includes a plurality of processes 50... And a shared resource 51 which the processes 50 commonly refer to.
A shared resource access exclusion unit 52 for exclusively accessing the shared resource 51;
And a shared resource changing means 53 for changing the content of the shared resource.
【0004】従来の共有リソースの排他制御装置によれ
ば、通常の共有リソース51の内容に変更があった場合
に、共有リソース変更手段53が共有リソース51の内
容を変更するにあたり、変更中にプロセス50が共有リ
ソース51を参照してしまうことによる処理の矛盾発生
を防止するために、共有リソース変更手段53もプロセ
ス50もすべて、共有リソース51をアクセスする場合
には、共有リソースアクセス排他手段52を利用して、
共有リソース51を同時にアクセスしないようにする排
他制御を常時行っていた(以下、従来例1という)。According to the conventional shared resource exclusive control apparatus, when the content of the ordinary shared resource 51 is changed, the shared resource changing means 53 changes the content of the shared resource 51 during the change. In order to prevent inconsistency in processing caused by the 50 referring to the shared resource 51, when both the shared resource changing unit 53 and the process 50 access the shared resource 51, the shared resource access exclusive unit 52 is set. Use
Exclusive control to prevent simultaneous access to the shared resource 51 has always been performed (hereinafter referred to as Conventional Example 1).
【0005】また、特開平5ー313923号公報に
は、複数のタスクによって共有される資源に対して各タ
スクから発行される資源獲得要求をその発行順に受け付
けて待ち行列を作成する共有資源排他制御テーブルと、
その待ち行列に従って1つの共有資源に対する複数タス
クの同時アクセスを排除する共有資源排他制御処理部
と、を備えた共有資源の排他制御装置において、資源獲
得要求にその発行時点で優先順位を付加し、この優先順
位に従って資源獲得要求の排他制御を実行することを特
徴とする共有資源の排他制御装置が開示されている。Japanese Patent Application Laid-Open No. 5-313923 discloses a shared resource exclusion control in which a resource acquisition request issued from each task to a resource shared by a plurality of tasks is received in the order of issuance and a queue is created. Table and
A shared resource exclusion control unit comprising: a shared resource exclusion control processing unit for eliminating simultaneous access of a plurality of tasks to one shared resource according to the queue; An exclusive control apparatus for shared resources, characterized in that exclusive control of a resource acquisition request is executed according to the priority order.
【0006】この従来の共有資源の排他制御装置によれ
ば、後から要求を発行したタスクでも処理の優先度によ
って先に要求を発行したタスクを追い越して資源を獲得
することができ、共有資源の排他制御における資源の獲
得・解放が迅速かつ確実に行われる、としている(以
下、従来例2という)。According to the conventional exclusive control apparatus for shared resources, even a task that has issued a request later can acquire a resource by overtaking the task that has issued the request earlier according to the processing priority. It is described that acquisition and release of resources in exclusive control are performed quickly and reliably (hereinafter referred to as Conventional Example 2).
【0007】[0007]
【発明が解決しようとする課題】例えば、通信回線や端
末等の情報を含んでいるネットワーク構成情報は、通信
回線や端末の構成内容に変更がなければ参照のみである
ので、プロセスでアクセスするにあたり、排他制御を行
う必要がない。For example, network configuration information including information on communication lines and terminals is only referred to if there is no change in the configuration of communication lines and terminals. It is not necessary to perform exclusive control.
【0008】しかし、従来例1及び従来例2の共有資源
の排他制御装置では、本来であれば、共有リソースの変
更が必要ない場合であっても排他制御を行うことになる
ため、共有リソースのアクセス時に排他制御によるプロ
セス待ち(wait)が発生する。その結果、システム
の処理性能が低下するという課題がある。However, the shared resource exclusive control devices of the first and second prior arts normally perform the exclusive control even when the change of the shared resources is not necessary. At the time of access, a process wait (wait) occurs due to exclusive control. As a result, there is a problem that the processing performance of the system is reduced.
【0009】本発明は、上記課題を解決するためになさ
れたものであり、共有リソースの内容を変更しない通常
時に排他制御によるプロセス待ち状態を回避し、システ
ムの処理性能の低下を防止できる共有リソースの排他制
御装置、排他制御方法及び排他制御プログラムを記録し
た記録媒体を提供することを目的とする。SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and it is an object of the present invention to avoid a process waiting state due to exclusive control at a normal time when the content of a shared resource is not changed, and to prevent a decrease in system processing performance. An exclusive control device, an exclusive control method, and a recording medium that records an exclusive control program.
【0010】[0010]
【課題を解決するための手段】本発明の共有リソースの
排他制御装置は、情報処理を行う複数のプロセスと、そ
の複数のプロセスによって共有される共有リソースと、
プロセスの共有リソースへのアクセスの排他制御を行
い、共有リソースへのアクセスが同時に複数のプロセス
で処理が行われないようにする共有リソースアクセス排
他手段と、共有リソースの内容を変更する共有リソース
変更手段と、共有リソースの内容を変更する必要が生じ
た場合に、共有リソース変更手段からの要求に基づい
て、プロセスに対し、共有リソースアクセス排他手段を
使用して共有リソースへのアクセスに排他制御を行うよ
うに要求する共有リソースアクセス方法変更手段と、を
有することを特徴とするものである。According to the present invention, there is provided a shared resource exclusive control apparatus comprising: a plurality of processes for performing information processing; a shared resource shared by the plurality of processes;
A shared resource access exclusion unit that performs exclusive control of access to a shared resource of a process so that access to the shared resource is not performed by multiple processes at the same time, and a shared resource change unit that changes the content of the shared resource When the content of the shared resource needs to be changed, exclusive control is performed on the access to the shared resource to the process using the shared resource access exclusive unit based on the request from the shared resource changing unit. And a shared resource access method changing means for making a request as described above.
【0011】上記プロセスは、共有リソースアクセス排
他手段を使用して共有リソースへのアクセスに排他制御
を行う必要があるか否かのアクセス方法判断情報を備
え、共有リソースアクセス方法変更手段は、共有リソー
スの内容を変更する必要が生じた場合に、プロセスのア
クセス方法判断情報を排他制御の必要があるという情報
に変更する。The above-mentioned process includes access method determination information as to whether or not it is necessary to perform exclusive control on access to the shared resource by using the shared resource access exclusion means. When it is necessary to change the content of the process, the access method determination information of the process is changed to information that exclusive control is necessary.
【0012】上記共有リソース変更手段は、共有リソー
スアクセス排他手段から共有リソースのアクセス権を取
得して、共有リソースの変更を行い、共有リソースの変
更後に、共有リソースのアクセス権の放棄を共有リソー
スアクセス排他手段に要求する。The shared resource changing means obtains the access right of the shared resource from the shared resource access exclusive means, changes the shared resource, and, after the change of the shared resource, releases the access right of the shared resource to the shared resource access. Request exclusive means.
【0013】上記共有リソースアクセス方法変更手段
は、共有リソースの変更後に、共有リソース変更手段か
らの要求に基づいて、プロセスに対し、共有リソースア
クセス排他手段を使用して共有リソースへのアクセスに
排他制御を行わないように要求する。[0013] The shared resource access method changing means, after the shared resource is changed, performs exclusive control on the process to access the shared resource using the shared resource access exclusive means based on the request from the shared resource changing means. Request not to do so.
【0014】上記共有リソースアクセス方法変更手段
は、共有リソースの変更後に、共有リソース変更手段か
らの要求に基づいて、プロセスのアクセス方法判断情報
を排他制御の必要がないという情報に変更する。After the shared resource is changed, the shared resource access method changing means changes the access method determination information of the process to information that does not require exclusive control, based on a request from the shared resource changing means.
【0015】上記共有リソースアクセス排他手段は、共
有リソースのアクセス権取得待ち状態にあるプロセス又
は共有リソース変更手段が存在する場合に、最も長時間
アクセス権取得待ち状態にあるプロセス又は共有リソー
ス変更手段にアクセス権を付与して、共有リソースへの
アクセスを許可する。[0015] The shared resource access exclusion means, when there is a process or a shared resource changing means waiting for the acquisition of the access right of the shared resource, to the process or the shared resource changing means which is in the waiting state for the access right for the longest time. Grant access to grant access to shared resources.
【0016】上記共有リソースは、例えば、複数のプロ
セスによって共有される通信回線情報や端末情報等を含
むネットワーク構成情報である。The shared resource is, for example, network configuration information including communication line information and terminal information shared by a plurality of processes.
【0017】本発明の共有リソースの排他制御方法は、
情報処理を行う複数のプロセスの共有リソースへのアク
セスの排他制御を行い、共有リソースへのアクセスが同
時に複数のプロセスで処理が行われないようにする共有
リソースの排他制御方法において、通常時は、プロセス
が共有リソースに排他制御を行うことなくアクセスで
き、共有リソースの内容を変更する必要が生じた場合
に、プロセスに対し、共有リソースへのアクセスに排他
制御を行うように要求する、ことを特徴とするものであ
る。An exclusive control method for a shared resource according to the present invention comprises:
In a shared resource exclusive control method for performing exclusive control of access to a shared resource by a plurality of processes that perform information processing so that access to the shared resource is not performed by a plurality of processes at the same time, When the process can access the shared resource without performing the exclusive control, and when the content of the shared resource needs to be changed, the process requests the process to perform the exclusive control on the access to the shared resource. It is assumed that.
【0018】本発明の記録媒体は、情報処理を行う複数
のプロセスの共有リソースへのアクセスの排他制御を行
い、共有リソースへのアクセスが同時に複数のプロセス
で処理が行われないようにする排他制御プログラムを記
録した記録媒体において、通常時は、プロセスが共有リ
ソースに排他制御を行うことなくアクセスできるように
する処理と、共有リソースの内容を変更する必要が生じ
た場合に、プロセスに対し、共有リソースへのアクセス
に排他制御を行うように要求する処理と、をコンピュー
タに実行させるための排他制御プログラムを記録したこ
とを特徴とするものである。The recording medium of the present invention performs exclusive control of access to a shared resource by a plurality of processes for performing information processing, and prevents exclusive access to a shared resource from being performed by a plurality of processes at the same time. Normally, on a recording medium on which a program is recorded, a process for enabling a process to access a shared resource without performing exclusive control, and a process for sharing a process when the content of the shared resource needs to be changed. It is characterized by recording an exclusive control program for causing a computer to execute a process for requesting exclusive access control to access to a resource and to execute the process.
【0019】本発明によれば、通常は共有リソースのア
クセスを排他制御を使用せずに行い、共有リソースの内
容を変更する際には、内容変更中にプロセスが変更途中
の内容を参照してしまうことによる処理の矛盾発生を防
止するために、一時的に排他制御を使用することが可能
となる。According to the present invention, usually, the access to the shared resource is performed without using the exclusive control, and when the content of the shared resource is changed, the process refers to the content being changed during the content change. In order to prevent the occurrence of inconsistency in the processing due to the exclusion, exclusive control can be temporarily used.
【0020】[0020]
【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。図1は、本発明に係る共有
リソースの排他制御装置の構成を示すブロック図であ
る。Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a shared resource exclusive control apparatus according to the present invention.
【0021】図1に示すように、本発明に係る共有リソ
ースの排他制御装置は、互いに連携しながら情報処理を
行う複数のプロセス1・・・と、それらのプロセス1が
共通して参照する動作環境情報等の共有リソース2と、
共有リソース2を排他的にアクセスするための共有リソ
ースアクセス排他手段3と、共有リソース2の内容を変
更する共有リソース変更手段4と、共有リソース2のア
クセス方法(排他制御を使用する方法と排他制御を使用
しない方法)を変更する共有リソースアクセス方法変更
手段5と、から構成されている。プロセス1は、共有リ
ソース2をアクセスして処理を行っている。プロセス1
の共有リソース2に対する排他制御は、プロセス1内の
アクセス方法判断情報6に基づいて判断され、使用され
たり、使用されなかったりする。なお、アクセス方法判
断情報6は、初期状態として、「排他制御の必要なし」
に設定されている。As shown in FIG. 1, the exclusive resource control apparatus for shared resources according to the present invention performs a plurality of processes 1... Shared resources 2 such as environmental information,
A shared resource access exclusion unit 3 for exclusively accessing the shared resource 2, a shared resource change unit 4 for changing the content of the shared resource 2, an access method of the shared resource 2 (a method using exclusive control and an exclusive control And a shared resource access method changing means 5 for changing the method that does not use. The process 1 accesses the shared resource 2 and performs processing. Process 1
The exclusive control for the shared resource 2 is determined based on the access method determination information 6 in the process 1 and is used or not used. It should be noted that the access method determination information 6 has an initial state of “no need for exclusive control”.
Is set to
【0022】共有リソースアクセス排他手段3は、シス
テムで用意されているロックセマフォ等を使用し、共有
リソース2へのアクセスの排他制御を行い、共有リソー
ス2へのアクセスが同時に複数のプロセス1で処理が行
われないようにする。The shared resource access exclusion means 3 performs exclusive control of access to the shared resource 2 using a lock semaphore or the like prepared in the system, and access to the shared resource 2 is processed by a plurality of processes 1 at the same time. Is not done.
【0023】共有リソースアクセス方法変更手段5は、
共有リソース変更手段4から要求を受け、プロセス1に
対して、共有リソース2のアクセス方法の変更(排他制
御の使用、排他制御の不使用)を要求し、全プロセス1
からの変更完了を待ち合わせて、共有リソース変更手段
4に変更の完了を通知する。The shared resource access method changing means 5 comprises:
Upon receiving a request from the shared resource changing unit 4, the process 1 requests the process 1 to change the access method of the shared resource 2 (use exclusive control or not use exclusive control).
After waiting for the completion of the change, the shared resource changing means 4 is notified of the completion of the change.
【0024】一方、共有リソースアクセス方法変更手段
5からの変更要求を受けたプロセス1は、アクセス方法
判断情報6を変更要求にあわせて、排他制御を使用する
必要あり、または排他制御を使用する必要なしに変更す
る。On the other hand, the process 1 that has received the change request from the shared resource access method changing means 5 needs to use the exclusive control or use the exclusive control in accordance with the access method determination information 6 in accordance with the change request. Change to none.
【0025】共有リソース変更手段4は、共有リソース
2の変更を行う場合、共有リソースアクセス方法変更手
段5に、共有リソース2のアクセスに関して、排他制御
を使用するように変更を要求し、共有リソースアクセス
方法変更手段5からの完了通知を待ち、完了通知後に共
有リソース2のアクセス権の取得を共有リソースアクセ
ス排他手段3に要求してアクセス権を取得後、共有リソ
ース2の変更を実行する。When the shared resource 2 is changed, the shared resource changing means 4 requests the shared resource access method changing means 5 to change the access to the shared resource 2 so that exclusive control is used. It waits for a completion notification from the method changing unit 5, requests the shared resource access exclusion unit 3 to acquire the access right of the shared resource 2 after the completion notification, acquires the access right, and changes the shared resource 2.
【0026】共有リソース2の変更後、共有リソース変
更手段4は、共有リソースアクセス排他手段3に共有リ
ソース2のアクセス権の放棄を要求し、共有リソースア
クセス方法変更手段5に排他制御を使用しないように変
更を要求して、共有リソースアクセス排他手段3からの
変更完了通知を待って処理を完了する。After the change of the shared resource 2, the shared resource changing means 4 requests the shared resource access exclusive means 3 to relinquish the access right of the shared resource 2, and prevents the shared resource access method changing means 5 from using the exclusive control. , And waits for a change completion notification from the shared resource access exclusion unit 3 to complete the process.
【0027】このようにして、通常は共有リソース2へ
のアクセスを排他制御を使用することなく行うことで、
通常の処理において排他制御による待ち状態を発生させ
ることなく、処理性能の低下を回避でき、共有リソース
2を変更する必要が生じた時には、プロセス1の共有リ
ソース2へのアクセスに排他制御を使用するようアクセ
ス方法を一時的に変更することで、共有リソース2の変
更中に他のプロセス1が共有リソース2をアクセスして
処理に矛盾を発生させることを防止する。As described above, normally, the access to the shared resource 2 is performed without using the exclusive control.
It is possible to avoid a decrease in processing performance without causing a wait state due to exclusive control in normal processing, and when it becomes necessary to change the shared resource 2, the exclusive control is used for the process 1 to access the shared resource 2. By temporarily changing the access method as described above, it is possible to prevent another process 1 from accessing the shared resource 2 during the change of the shared resource 2 and causing inconsistency in processing.
【0028】図2乃至図7は、本発明の動作を説明する
ためのフローチャートである。FIGS. 2 to 7 are flowcharts for explaining the operation of the present invention.
【0029】図2は、プロセス1の共有リソース2への
アクセスの流れを示すフローチャートである。まず、プ
ロセス1は、共有リソース2をアクセスする必要が発生
した場合、プロセス1が保持しているアクセス方法判断
情報6をチェックし、排他制御の必要があるか否かを判
断する(ステップA1)。FIG. 2 is a flowchart showing the flow of access of the process 1 to the shared resource 2. First, when the process 1 needs to access the shared resource 2, the process 1 checks the access method determination information 6 held by the process 1 and determines whether or not the exclusive control is necessary (step A1). .
【0030】アクセス方法判断情報6が「排他制御の必
要なし」であった場合は、共有リソースアクセス排他手
段3の排他制御を使用することなく、共有リソース2の
アクセスを行う(ステップA5)。なお、アクセス方法
判断情報6の初期状態は、「排他制御の必要なし」と設
定されており、通常、プロセス1は、共有リソース2を
排他制御なしでアクセスしている。If the access method determination information 6 indicates "no need for exclusive control", the shared resource 2 is accessed without using the exclusive control of the shared resource access exclusion means 3 (step A5). Note that the initial state of the access method determination information 6 is set to "no need for exclusive control", and the process 1 normally accesses the shared resource 2 without exclusive control.
【0031】アクセス方法判断情報6が、「排他制御の
必要あり」であった場合、共有リソースアクセス排他手
段3に共有リソース2のアクセス権の取得を要求する
(ステップA2)。If the access method determination information 6 indicates that "exclusive control is required", the access requesting unit 3 requests the shared resource access exclusion unit 3 to acquire the access right of the shared resource 2 (step A2).
【0032】共有リソース2のアクセス権の取得に失敗
した場合、共有リソースアクセス排他手段3により、共
有リソース2のアクセス権の取得が成功するまでプロセ
ス1は、待ち状態になる(ステップA6)。If the acquisition of the access right of the shared resource 2 fails, the process 1 enters a waiting state until the acquisition of the access right of the shared resource 2 is successfully performed by the shared resource access exclusion means 3 (step A6).
【0033】共有リソース2のアクセス権の取得に成功
した場合、プロセス1は、共有リソース2のアクセスを
行い(ステップA3)、共有リソースアクセス排他手段
3に共有リソース2のアクセス権の放棄を要求し(ステ
ップA4)、プロセス1の共有リソース2のアクセスが
完了する。If the access right of the shared resource 2 is successfully obtained, the process 1 accesses the shared resource 2 (step A3), and requests the shared resource access exclusion means 3 to release the access right of the shared resource 2. (Step A4), the access of the shared resource 2 of the process 1 is completed.
【0034】図3は、プロセス1の共有リソース2への
アクセス方法変更の流れを示すフローチャートである。
まず、プロセス1が共有リソースアクセス方法変更手段
5より、共有リソース2のアクセス方法の変更が要求さ
れる(ステップB1)。FIG. 3 is a flowchart showing the flow of changing the access method of the process 1 to the shared resource 2.
First, the process 1 requests the shared resource access method changing means 5 to change the access method of the shared resource 2 (step B1).
【0035】次いで、変更要求の内容を確認する(ステ
ップB2)。「排他制御の必要なし」に変更した場合
は、プロセス1内のアクセス方法判断情報6を「排他制
御の必要なし」に変更する(ステップB5)。Next, the contents of the change request are confirmed (step B2). If it is changed to "no need for exclusive control", the access method determination information 6 in the process 1 is changed to "no need for exclusive control" (step B5).
【0036】共有リソースアクセス方法変更手段5から
の要求内容が、「排他制御の必要あり」であった場合、
プロセス1内のアクセス方法判断情報6を「排他制御の
必要あり」に変更する(ステップB3)。When the content of the request from the shared resource access method changing means 5 is "necessity of exclusive control",
The access method determination information 6 in the process 1 is changed to "exclusive control is necessary" (step B3).
【0037】アクセス方法判断情報6の変更が完了した
後、共有リソースアクセス方法変更手段5に共有リソー
スアクセス方法変更の完了を通知する(ステップB
4)。After the change of the access method determination information 6 is completed, the completion of the change of the shared resource access method is notified to the shared resource access method changing means 5 (step B).
4).
【0038】これにより、プロセス1の以降の共有リソ
ース2へのアクセスが、共有リソースアクセス方法変更
手段5の要求(共有リソース2のアクセスに排他制御を
使用するか、使用しないか)に合致したアクセスを行う
ようになる。Accordingly, the access to the shared resource 2 subsequent to the process 1 is performed in accordance with the request of the shared resource access method changing means 5 (whether the exclusive control is used for the access to the shared resource 2 or not). Will do.
【0039】図4は、共有リソースアクセス方法変更手
段5の共有リソース2のアクセス方法変更の流れを示す
フローチャートである。まず、共有リソースアクセス方
法変更手段5は、共有リソース変更手段4からの共有リ
ソース2のアクセス方法の変更要求を受ける(ステップ
C1)。FIG. 4 is a flowchart showing a flow of changing the access method of the shared resource 2 by the shared resource access method changing means 5. First, the shared resource access method changing unit 5 receives a request for changing the access method of the shared resource 2 from the shared resource changing unit 4 (step C1).
【0040】要求されたアクセス方法の変更内容を確認
し(ステップC2)、「排他制御の必要なし」の場合、
全プロセス1に対して、共有リソース2のアクセスを
「排他制御の必要なし」に変更するように要求する(ス
テップC6)。The contents of the change in the requested access method are confirmed (step C2).
A request is made to all processes 1 to change the access of the shared resource 2 to "no need for exclusive control" (step C6).
【0041】共有リソース変更手段4の要求内容が「排
他制御の必要あり」の場合、全プロセス1に対して、共
有リソース2のアクセスを「排他制御の必要あり」に変
更するように要求する(ステップC3)。When the content of the request from the shared resource changing means 4 is "necessity of exclusive control", all the processes 1 are requested to change the access of the shared resource 2 to "necessity of exclusive control" ( Step C3).
【0042】その後、共有リソースアクセス方法変更手
段5は、プロセス1すべてからのアクセス方法変更の完
了通知がされたかを確認する(ステップC4)。Thereafter, the shared resource access method changing means 5 confirms whether or not the completion of the access method change has been notified from all the processes 1 (step C4).
【0043】プロセス1すべてからのアクセス方法変更
の完了通知を受けた場合、共有リソース変更手段4に共
有リソース2のアクセス方法の変更の完了を通知する
(ステップC5)。When the completion of the change of the access method is received from all the processes 1, the completion of the change of the access method of the shared resource 2 is notified to the shared resource changing means 4 (step C5).
【0044】これにより、共有リソースアクセス方法変
更手段5による共有リソース2へのアクセス方法の変更
処理が完了した後は、全プロセス1の共有リソース2へ
のアクセス方法がすべて、共有リソース変更手段4の要
求内容(排他制御を使用するか、排他制御を使用しな
い)にあったものに変更される。Thus, after the process of changing the access method to the shared resource 2 by the shared resource access method changing means 5 is completed, all the access methods of the process 1 to the shared resource 2 are changed by the shared resource changing means 4. It is changed to the one that matches the request content (using exclusive control or not using exclusive control).
【0045】図6は、共有リソースアクセス排他手段3
の共有リソース2のアクセス権取得の流れを示すフロー
チャートである。まず、共有リソースアクセス排他手段
3は、プロセス1または共有リソース変更手段4から、
共有リソース2のアクセス権の取得の要求を受ける(ス
テップE1)。FIG. 6 shows the shared resource access exclusion means 3
9 is a flowchart showing a flow of acquiring an access right of the shared resource 2 of FIG. First, the shared resource access exclusion unit 3 sends the process 1 or the shared resource changing unit 4
A request to acquire the access right to the shared resource 2 is received (step E1).
【0046】次いで、既に他のプロセス1または共有リ
ソース変更手段4がアクセス権を取得済みであるか確認
する(ステップE2)。Next, it is confirmed whether another process 1 or the shared resource changing means 4 has already acquired the access right (step E2).
【0047】他のプロセス1または共有リソース変更手
段4がアクセス権を取得していない場合、アクセス権の
取得を要求したプロセス1または共有リソース変更手段
4にアクセス権を付与し、共有リソース2のアクセスを
許可する(ステップE3)。When the other process 1 or the shared resource changing unit 4 has not acquired the access right, the access right is given to the process 1 or the shared resource changing unit 4 which has requested the acquisition of the access right, and the access to the shared resource 2 is performed. Is permitted (step E3).
【0048】他のプロセス1または共有リソース変更手
段4がアクセス権を取得していた場合、アクセス権の取
得を要求したプロセス1または共有リソース変更手段4
を待ち状態にし、アクセス権の取得待ち状態とする(ス
テップE4)。If the other process 1 or the shared resource changing means 4 has acquired the access right, the process 1 or the shared resource changing means 4 which has requested the access right is obtained.
Is set to a waiting state, and a state of waiting for acquisition of an access right is set (step E4).
【0049】図7は、共有リソースアクセス排他手段3
の共有リソース2のアクセス権放棄の流れを示すフロー
チャートである。まず、共有リソースアクセス排他手段
3は、プロセス1または共有リソース変更手段4から、
共有リソース2のアクセス権の放棄の要求を受ける(ス
テップF1)。FIG. 7 shows shared resource access exclusion means 3
5 is a flowchart showing a flow of relinquishing the access right of the shared resource 2 of FIG. First, the shared resource access exclusion unit 3 sends the process 1 or the shared resource changing unit 4
A request to relinquish the access right to the shared resource 2 is received (step F1).
【0050】次いで、他のプロセス1または共有リソー
ス変更手段4で、共有リソース2のアクセス権取得待ち
状態のものが存在しないかチェックする(ステップF
2)。Next, the other process 1 or the shared resource changing means 4 checks whether or not there is a shared resource 2 waiting for access right acquisition (step F).
2).
【0051】アクセス権取得待ち状態のものが存在しな
い場合、アクセス権の放棄を要求したプロセス1または
共有リソース変更手段4にアクセス権の放棄要求の完了
を通知する(ステップF5)。When there is no access right waiting state, the completion of the access right release request is notified to the process 1 or the shared resource changing unit 4 which has requested the access right release (step F5).
【0052】共有リソース2のアクセス権取得待ち状態
のプロセス1または共有リソース変更手段4が存在する
場合、それらのうちで最も長時間アクセス権待ち状態に
しているプロセス1または共有リソース変更手段4のひ
とつにアクセス権を付与し、待ち状態から解放、共有リ
ソース2のアクセスを許可する(ステップF3)。When there is the process 1 or the shared resource changing unit 4 waiting for the access right of the shared resource 2, one of the process 1 or the shared resource changing unit 4 which has been waiting for the access right for the longest time among them. , The access right is released from the waiting state, and the access to the shared resource 2 is permitted (step F3).
【0053】共有リソース2のアクセス権放棄を要求し
たプロセス1または共有リソース変更手段4にアクセス
権放棄の完了を通知する(ステップF4)。The process 1 or the shared resource changing means 4 which has requested the release of the access right of the shared resource 2 is notified of the completion of the release of the access right (step F4).
【0054】図5は、共有リソース変更手段4による共
有リソース2の変更の流れを示すフローチャートであ
る。まず、共有リソース変更手段4を使用して共有リソ
ース2の変更を行う場合、まず共有リソース2のアクセ
スに排他制御を使用するように変更するため、共有リソ
ースアクセス方法変更手段5に共有リソース2のアクセ
ス方法を「排他制御の必要あり」に変更するように要求
する(ステップD1)。FIG. 5 is a flowchart showing the flow of changing the shared resource 2 by the shared resource changing means 4. First, when the shared resource 2 is changed using the shared resource changing unit 4, first, the shared resource 2 is changed to use exclusive control for access to the shared resource 2. A request is made to change the access method to "necessary exclusive control" (step D1).
【0055】次いで、共有リソースアクセス方法変更手
段5からの完了通知がされたかを確認する(ステップD
2)。Next, it is confirmed whether or not a completion notification has been received from the shared resource access method changing means 5 (step D).
2).
【0056】共有リソースアクセス方法変更手段5から
の完了通知を受けた後(ステップD2)(したがって、
プロセス1のすべてが、共有リソース2のアクセスに排
他制御を使用するように変更された後)、共有リソース
アクセス排他手段3に共有リソース2のアクセス権の取
得を要求する(ステップD3)。After receiving the completion notification from the shared resource access method changing means 5 (step D2) (therefore,
After all the processes 1 are changed to use exclusive control for accessing the shared resource 2), the process 1 requests the shared resource access exclusion means 3 to acquire the access right of the shared resource 2 (step D3).
【0057】共有リソース2のアクセス権の取得に失敗
した場合は、共有リソースアクセス排他手段3により、
共有リソース変更手段4は待ち状態になる(ステップD
9)。If the acquisition of the access right for the shared resource 2 fails, the shared resource access exclusion means 3
The shared resource changing unit 4 enters a waiting state (step D).
9).
【0058】共有リソース2のアクセス権の取得に成功
した場合(したがって、プロセス1が共有リソース2の
アクセスを行っていないことが保証される)、共有リソ
ース2にアクセスし、その内容を変更する(ステップD
4)。If the access right to the shared resource 2 has been successfully acquired (therefore, it is guaranteed that the process 1 has not accessed the shared resource 2), the shared resource 2 is accessed, and its contents are changed ( Step D
4).
【0059】共有リソース変更手段4の共有リソース2
の変更完了後、共有リソースアクセス排他手段3に共有
リソース2のアクセス権の放棄を要求し(ステップD
5)、必要なくなった共有リソース2のアクセスのため
の排他制御を行わないようにするために、共有リソース
アクセス方法変更手段5に共有リソース2のアクセスを
「排他制御の必要なし」に変更するように要求する(ス
テップD6)。そして、共有リソースアクセス方法変更
手段5からの完了通知を確認する(ステップD7)。The shared resource 2 of the shared resource changing means 4
After the change of the shared resource 2 is completed, a request is made to the shared resource access exclusion means 3 to release the access right of the shared resource 2 (step D).
5) In order not to perform exclusive control for access to the shared resource 2 that is no longer needed, the shared resource access method change unit 5 changes the access to the shared resource 2 to “no need for exclusive control”. (Step D6). Then, the completion notification from the shared resource access method changing unit 5 is confirmed (step D7).
【0060】共有リソースアクセス方法変更手段5から
の完了通知を受け(したがって、プロセス1のすべて
が、共有リソース2のアクセスに排他制御を行わないよ
うになっている)、処理が終了する(ステップD8)。When the completion notification is received from the shared resource access method changing means 5 (therefore, all the processes 1 do not perform exclusive control on the access to the shared resource 2), and the process ends (step D8). ).
【0061】本発明によれば、通常は共有リソース2の
アクセスを排他制御を使用せずに行い、共有リソース2
の内容を変更する際には、内容変更中にプロセス1が変
更途中の内容を参照してしまうことによる処理の矛盾発
生を防止するために、一時的に排他制御を使用すること
が可能となる。そのため、複数のプロセス1が共有して
参照され、通常は内容の変更が行われない共有リソース
2を持つコンピュータシステムで、プロセス1が停止す
ることなしに内容を更新するシステムの場合に、共有リ
ソース2の内容を変更しない通常時における排他制御使
用によるプロセス待ち状態を回避し、システムの処理性
能の低下を防止できる。According to the present invention, the access to the shared resource 2 is normally performed without using the exclusive control,
When the content is changed, exclusive control can be temporarily used in order to prevent inconsistency in processing due to the process 1 referring to the content being changed during the content change. . Therefore, in the case of a computer system having a shared resource 2 that is shared and referenced by a plurality of processes 1 and whose contents are not normally changed, in the case of a system that updates the contents without stopping the processes 1, the shared resources It is possible to avoid a process waiting state due to the use of exclusive control in a normal state where the contents of No. 2 are not changed, and to prevent a reduction in the processing performance of the system.
【0062】図8は、本発明に係る共有リソース2の排
他制御装置を、通信回線を介して端末とデータ送受信を
行って情報処理を行うオンラインシステムに適用した場
合における構成を示すブロック図である。FIG. 8 is a block diagram showing a configuration in a case where the exclusive control device for the shared resource 2 according to the present invention is applied to an online system for performing information processing by transmitting and receiving data to and from a terminal via a communication line. .
【0063】図8に示すシステムは、通信回線20を介
して端末21とデータ送受信を行って、情報処理を行う
オンラインシステムであって、システムの処理性能を向
上させる目的で複数のプロセス11によって処理が行わ
れている。The system shown in FIG. 8 is an online system for performing information processing by transmitting and receiving data to and from the terminal 21 via the communication line 20. The system is processed by a plurality of processes 11 in order to improve the processing performance of the system. Has been done.
【0064】このシステムは、全プロセス11によって
参照され、回線情報や端末情報等を含んでいるネットワ
ーク構成情報12と、ロックセマフォを使用することで
制御を行うネットワーク構成情報アクセス排他手段13
と、各プロセス11内に存在して、ネットワーク構成情
報12のアクセスにネットワーク構成情報アクセス排他
手段13を使用して排他制御を行うか否かの判断に使用
するアクセス方法判断情報16と、全プロセス11にネ
ットワーク構成情報12のアクセス方法の変更を要求す
るネットワーク構成情報アクセス方法変更手段15と、
オンラインシステムの稼働中に通信回線や端末の追加、
削除、属性の変更を、ネットワーク構成情報12に反映
させるためのネットワーク構成情報変更手段14とから
構成されている。This system is referred to by all processes 11 and includes network configuration information 12 including line information and terminal information, and network configuration information access exclusion means 13 for controlling by using a lock semaphore.
Access method determination information 16 existing in each process 11 and used to determine whether or not to perform exclusive control using the network configuration information access exclusion means 13 to access the network configuration information 12; A network configuration information access method changing unit 15 for requesting the network 11 to change the access method of the network configuration information 12;
Adding communication lines and terminals while the online system is running,
It is composed of a network configuration information change unit 14 for reflecting deletion and attribute change in the network configuration information 12.
【0065】ネットワーク構成情報12は、通信回線や
端末の構成内容(追加、削除、属性等)の変更がなけれ
ば、参照のみであるため、プロセス11でアクセスする
にあたり、排他制御を行う必要はないので、プロセス1
1は排他制御なしでアクセスを行っている。The network configuration information 12 is only referred to if there is no change in the configuration contents (addition, deletion, attribute, etc.) of the communication line or the terminal. Therefore, it is not necessary to perform exclusive control when accessing in the process 11. So process 1
No. 1 performs access without exclusive control.
【0066】しかし、オンラインシステム稼働中に、通
信回線や端末の構成内容に変更を行い、その変更をシス
テムを停止させることなく反映させたい場合、プロセス
11がネットワーク構成情報12を参照している最中に
ネットワーク構成情報12を変更してしまうと、その処
理に矛盾を生じる可能性がある。However, when the configuration of the communication line or the terminal is changed during the operation of the online system and it is desired to reflect the change without stopping the system, the process 11 refers to the network configuration information 12. If the network configuration information 12 is changed during the process, inconsistency may occur in the processing.
【0067】そこで、ネットワーク構成情報12の変更
中は、変更が完了するまで、プロセス11がアクセスし
ないことを保証する必要がある。Therefore, during the change of the network configuration information 12, it is necessary to guarantee that the process 11 does not access until the change is completed.
【0068】そのため、オンラインシステム稼働中に通
信回線や端末の構成内容に変更が発生した場合、ネット
ワーク構成情報変更手段14は、ネットワーク構成情報
アクセス方法変更手段15に対して、プロセス11のネ
ットワーク構成情報12のアクセスをネットワーク構成
情報アクセス排他手段13を使用して排他制御を行うよ
うに要求する。Therefore, when a change occurs in the configuration of the communication line or the terminal while the online system is operating, the network configuration information changing means 14 sends the network configuration information of the process 11 to the network configuration information access method changing means 15. A request is made to use the network configuration information access exclusion means 13 to perform exclusion control on the access 12.
【0069】ネットワーク構成情報アクセス方法変更手
段15は、その要求を受けて、全プロセス11にネット
ワーク構成情報12のアクセスに排他制御を使用するよ
うに要求し、全プロセス11からの変更完了を待ち合わ
せる。In response to the request, the network configuration information access method changing means 15 requests all processes 11 to use exclusive control for accessing the network configuration information 12 and waits for the completion of the change from all processes 11.
【0070】ネットワーク構成情報12のアクセスに排
他制御を使用するように変更要求を受けたプロセス11
は、そのプロセス11のアクセス方法判断情報16を、
ネットワーク構成情報12のアクセスには排他制御が必
要と変更し、ネットワーク構成情報アクセス方法変更手
段15に完了を通知する。Process 11 receiving a change request to use exclusive control to access network configuration information 12
The access method determination information 16 of the process 11
The access to the network configuration information 12 is changed to require exclusive control, and the completion is notified to the network configuration information access method change unit 15.
【0071】以降、そのプロセス11は、ネットワーク
構成情報12をアクセスするのにネットワーク構成情報
アクセス排他手段13を使用して、排他制御を使用する
ようになる。Thereafter, the process 11 uses the network configuration information access exclusion means 13 to access the network configuration information 12 and uses exclusive control.
【0072】ネットワーク構成情報アクセス方法変更手
段15は、全プロセス11からの変更完了通知を受けて
(したがって、この時点で、全プロセス11がネットワ
ーク構成情報12のアクセスに排他制御を使用している
ことが保証される)、ネットワーク構成情報変更手段1
4に変更要求の完了を通知する。The network configuration information access method changing means 15 receives the change completion notification from all the processes 11 (therefore, at this point, all the processes 11 use exclusive control to access the network configuration information 12). Is guaranteed), network configuration information changing means 1
4 is notified of the completion of the change request.
【0073】ネットワーク構成情報アクセス方法変更手
段15からの変更完了を受けたネットワーク構成情報変
更手段14は、ネットワーク構成情報アクセス排他手段
13を使用してネットワーク構成情報12のアクセス権
を取得し、取得に成功した後(したがって、どのプロセ
ス11もネットワーク構成情報12にアクセスしていな
いことが保証される)、通信回線や端末の構成内容をネ
ットワーク構成情報12に反映する。Upon receiving the change completion from the network configuration information access method changing unit 15, the network configuration information changing unit 14 acquires the access right of the network configuration information 12 by using the network configuration information access exclusive unit 13. After the success (therefore, it is guaranteed that no process 11 has accessed the network configuration information 12), the configuration of the communication line or the terminal is reflected in the network configuration information 12.
【0074】ネットワーク構成情報12への反映が完了
した後にネットワーク構成情報変更手段14は、ネット
ワーク構成情報12のアクセス権の放棄をネットワーク
構成情報アクセス排他手段13を使用して行い、プロセ
ス11のネットワーク構成情報12のアクセス方法を、
排他制御を使用しないような状態に戻すために、ネット
ワーク構成情報アクセス方法変更手段15に、排他制御
を使用しないように変更を要求する。After the reflection on the network configuration information 12 is completed, the network configuration information changing unit 14 abandons the access right of the network configuration information 12 by using the network configuration information access exclusive unit 13, and How to access information 12
In order to return to a state in which exclusive control is not used, a request is made to the network configuration information access method changing means 15 so that exclusive control is not used.
【0075】ネットワーク構成情報12のアクセス方法
を排他制御を使用しないように変更を要求を受けたネッ
トワーク構成情報アクセス方法変更手段15は、全プロ
セス11に、ネットワーク構成情報12のアクセスに排
他制御を使用しないように変更を要求して、全プロセス
11からの完了通知を待ち合わせる。The network configuration information access method changing means 15 which has received a request to change the access method of the network configuration information 12 so as not to use the exclusive control uses the exclusive control for the access of the network configuration information 12 to all the processes 11. A change request is made so as not to wait, and the completion notification from all processes 11 is waited for.
【0076】ネットワーク構成情報12のアクセスを排
他制御を使用しないように変更を要求された各プロセス
11は、そのプロセス11のアクセス方法判断情報16
を、ネットワーク構成情報12のアクセスには、排他制
御が必要なしと変更し、ネットワーク構成情報アクセス
方法変更手段15に変更の完了を通知する。Each process 11 which has been requested to change the access of the network configuration information 12 so as not to use the exclusive control, accesses the access method determination information 16 of the process 11.
Is changed to require no exclusive control to access the network configuration information 12, and the completion of the change is notified to the network configuration information access method change unit 15.
【0077】以降、そのプロセス11は、ネットワーク
構成情報12のアクセスに排他制御を使用しないように
なる。Thereafter, the process 11 does not use the exclusive control for accessing the network configuration information 12.
【0078】ネットワーク構成情報アクセス方法変更手
段15は、全プロセス11からの変更完了通知を受けて
(したがって、この時点で、全プロセス11がネットワ
ーク構成情報12のアクセスに排他制御を使用しないこ
とが保証される)、ネットワーク構成情報変更手段14
に変更要求の完了を通知する。The network configuration information access method changing means 15 receives the change completion notification from all processes 11 (therefore, at this point, it is guaranteed that all processes 11 do not use exclusive control to access network configuration information 12). ), Network configuration information changing means 14
Notify the completion of the change request.
【0079】ネットワーク構成情報変更手段14は、ネ
ットワーク構成情報アクセス方法変更手段15からの完
了通知を受けて、ネットワーク構成情報12の変更処理
が完了する。The network configuration information changing unit 14 receives the completion notification from the network configuration information access method changing unit 15, and completes the process of changing the network configuration information 12.
【0080】図9は、本発明の他の形態の構成を示すブ
ロック図である。本発明の他の形態は、上記説明された
共有リソース2の排他制御処理をコンピュータに実行さ
せるためのプログラム(排他制御処理プログラム)を記
録した記録媒体30を有する。この記録媒体30は、磁
気ディスク、CD−ROM、半導体メモリその他の記録
媒体であってもよい。FIG. 9 is a block diagram showing the configuration of another embodiment of the present invention. Another embodiment of the present invention has a recording medium 30 that records a program (exclusive control processing program) for causing a computer to execute the exclusive control processing of the shared resource 2 described above. The recording medium 30 may be a magnetic disk, a CD-ROM, a semiconductor memory, or another recording medium.
【0081】排他制御処理プログラムは、記録媒体30
から排他制御装置に読み込まれ、排他制御装置は、排他
制御処理プログラムに従い、通常時は、プロセス1が共
有リソース2に排他制御を行うことなくアクセスできる
ようにする処理と、共有リソース2を変更する必要が生
じた場合に、プロセス1に対し、共有リソース2へのア
クセスに排他制御を行うように要求する処理等を行う。The exclusive control processing program is stored in the storage medium 30
The exclusive control device reads the shared resource 2 from the shared resource 2 according to the exclusive control processing program, and normally changes the shared resource 2 and the process for enabling the process 1 to access the shared resource 2 without performing the exclusive control. When the necessity arises, processing for requesting the process 1 to perform exclusive control on access to the shared resource 2 is performed.
【0082】本発明は、上記実施の形態に限定されるこ
とはなく、特許請求の範囲に記載された技術的事項の範
囲内において、種々の変更が可能である。The present invention is not limited to the above-described embodiment, and various modifications can be made within the technical scope described in the claims.
【0083】[0083]
【発明の効果】本発明によれば、通常は共有リソースの
アクセスを排他制御を使用せずに行い、共有リソースの
内容を変更する際には、内容変更中にプロセスが変更途
中の内容を参照してしまうことによる処理の矛盾発生を
防止するために、一時的に排他制御を使用することが可
能となる。そのため、複数のプロセスが共有して参照さ
れ、通常は内容の変更が行われない共有リソースを持つ
コンピュータシステムで、プロセスの停止することなし
に内容を更新するシステムの場合に、共有リソースの内
容を変更しない通常時における排他制御使用によるプロ
セス待ち状態を回避し、システムの処理性能の低下を防
止できる。According to the present invention, usually, the access of the shared resource is performed without using the exclusive control, and when the content of the shared resource is changed, the process refers to the content being changed during the content change. In order to prevent the occurrence of inconsistency in the processing due to the above, exclusive control can be temporarily used. Therefore, in a computer system that has shared resources that are shared and referenced by multiple processes and whose contents do not normally change, if the system updates the contents without stopping the processes, the contents of the shared resources are updated. It is possible to avoid a process waiting state due to the use of exclusive control in a normal state where no change is made, and to prevent a decrease in the processing performance of the system.
【図1】本発明に係る共有リソースの排他制御装置の構
成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a shared resource exclusive control apparatus according to the present invention.
【図2】プロセスの共有リソースへのアクセスの流れを
示すフローチャートである。FIG. 2 is a flowchart illustrating a flow of access to a shared resource of a process.
【図3】プロセスの共有リソースへのアクセス方法変更
の流れを示すフローチャートである。FIG. 3 is a flowchart illustrating a flow of changing an access method of a process to a shared resource.
【図4】共有リソースアクセス方法変更手段の共有リソ
ースのアクセス方法変更の流れを示すフローチャートで
ある。FIG. 4 is a flowchart showing a flow of changing a shared resource access method by a shared resource access method changing unit.
【図5】共有リソース変更手段による共有リソースの変
更の流れを示すフローチャートである。FIG. 5 is a flowchart showing a flow of changing a shared resource by a shared resource changing unit.
【図6】共有リソースアクセス排他手段の共有リソース
のアクセス権取得の流れを示すフローチャートである。FIG. 6 is a flowchart illustrating a flow of acquiring an access right to a shared resource by a shared resource access exclusion unit.
【図7】共有リソースアクセス排他手段の共有リソース
のアクセス権放棄の流れを示すフローチャートである。FIG. 7 is a flowchart showing a flow of relinquishing a shared resource access right by a shared resource access exclusion unit.
【図8】本発明に係る共有リソースの排他制御装置を、
通信回線を介して端末とデータ送受信を行って情報処理
を行うオンラインシステムに適用した場合における構成
を示すブロック図である。FIG. 8 shows an exclusive control apparatus for shared resources according to the present invention;
1 is a block diagram illustrating a configuration in a case where the present invention is applied to an online system that performs information processing by transmitting and receiving data to and from a terminal via a communication line.
【図9】本発明の他の形態の構成を示すブロック図であ
る。FIG. 9 is a block diagram showing a configuration of another embodiment of the present invention.
【図10】従来の共有リソースの排他制御装置の構成を
示すブロック図である。FIG. 10 is a block diagram showing a configuration of a conventional shared resource exclusive control device.
1:プロセス 2:共有リソース 3:共有リソースアクセス排他手段 4:共有リソース変更手段 5:共有リソースアクセス方法変更手段 6:アクセス方法判断情報 11:プロセス 12:ネットワーク構成情報 13:ネットワーク構成情報アクセス排他手段 14:ネットワーク構成情報変更手段 15:ネットワーク構成情報アクセス方法変更手段 16:アクセス方法判断情報 20:通信回線 21:端末 30:記録媒体 1: Process 2: Shared resource 3: Shared resource access exclusion means 4: Shared resource change means 5: Shared resource access method change means 6: Access method determination information 11: Process 12: Network configuration information 13: Network configuration information access exclusion means 14: Network configuration information changing means 15: Network configuration information access method changing means 16: Access method determination information 20: Communication line 21: Terminal 30: Recording medium
Claims (9)
と、 前記プロセスの共有リソースへのアクセスの排他制御を
行い、共有リソースへのアクセスが同時に複数のプロセ
スで処理が行われないようにする共有リソースアクセス
排他手段と、 前記共有リソースの内容を変更する共有リソース変更手
段と、 前記共有リソースの内容を変更する必要が生じた場合
に、前記共有リソース変更手段からの要求に基づいて、
前記プロセスに対し、前記共有リソースアクセス排他手
段を使用して共有リソースへのアクセスに排他制御を行
うように要求する共有リソースアクセス方法変更手段
と、 を有することを特徴とする共有リソースの排他制御装
置。A plurality of processes for performing information processing, a shared resource shared by the plurality of processes, and exclusive control of access to the shared resource of the process, wherein a plurality of processes simultaneously access the shared resource. A shared resource access exclusion unit that prevents processing in the shared resource, a shared resource change unit that changes the content of the shared resource, and a shared resource change unit when the content of the shared resource needs to be changed. Based on the request from
A shared resource access method changing unit for requesting the process to perform exclusive control on access to the shared resource using the shared resource access exclusive unit; and a shared resource exclusive control device. .
ス排他手段を使用して共有リソースへのアクセスに排他
制御を行う必要があるか否かのアクセス方法判断情報を
備え、 前記共有リソースアクセス方法変更手段は、前記共有リ
ソースの内容を変更する必要が生じた場合に、前記プロ
セスのアクセス方法判断情報を排他制御の必要があると
いう情報に変更する、 ことを特徴とする請求項1に記載の共有リソースの排他
制御装置。2. The shared resource access method changing unit, wherein the process includes access method determination information as to whether or not it is necessary to perform exclusive control on access to the shared resource using the shared resource access exclusive unit. 2. The shared resource according to claim 1, wherein, when the content of the shared resource needs to be changed, the access method determination information of the process is changed to information that exclusive control is necessary. Exclusive control unit.
ソースアクセス排他手段から共有リソースのアクセス権
を取得して、共有リソースの変更を行い、共有リソース
の変更後に、共有リソースのアクセス権の放棄を前記共
有リソースアクセス排他手段に要求することを特徴とす
る請求項1又は2に記載の共有リソースの排他制御装
置。3. The shared resource changing unit obtains a shared resource access right from the shared resource access exclusive unit, changes the shared resource, and releases the shared resource access right after changing the shared resource. 3. The shared resource exclusive control apparatus according to claim 1, wherein the shared resource access exclusive control unit requests the shared resource access exclusive unit.
は、前記共有リソースの変更後に、前記共有リソース変
更手段からの要求に基づいて、前記プロセスに対し、前
記共有リソースアクセス排他手段を使用して共有リソー
スへのアクセスに排他制御を行わないように要求するこ
とを特徴とする請求項1乃至3のいずれか1つの項に記
載の共有リソースの排他制御装置。4. The shared resource access method changing means, after the shared resource is changed, uses the shared resource access exclusive means for the process based on a request from the shared resource changing means. The exclusive resource control apparatus for shared resources according to any one of claims 1 to 3, wherein a request is made not to perform exclusive control on access to the shared resource.
は、前記共有リソースの変更後に、前記共有リソース変
更手段からの要求に基づいて、前記プロセスのアクセス
方法判断情報を排他制御の必要がないという情報に変更
する、ことを特徴とする請求項4に記載の共有リソース
の排他制御装置。5. The shared resource access method changing means, after changing the shared resource, changes the access method determination information of the process to information indicating that there is no need for exclusive control based on a request from the shared resource changing means. The shared resource exclusive control device according to claim 4, wherein the exclusive resource control device changes the shared resource.
有リソースのアクセス権取得待ち状態にあるプロセス又
は共有リソース変更手段が存在する場合に、最も長時間
アクセス権取得待ち状態にあるプロセス又は共有リソー
ス変更手段にアクセス権を付与して、共有リソースへの
アクセスを許可することを特徴とする、請求項1乃至5
のいずれか1つの項に記載の共有リソースの排他制御装
置。6. The shared resource access exclusion means, if there is a process or a shared resource changing means waiting for the access right acquisition of the shared resource, the process or the shared resource change waiting state for the longest time. 6. The method according to claim 1, wherein an access right is given to the means, and access to the shared resource is permitted.
An exclusive control apparatus for a shared resource according to any one of the above items.
って共有される通信回線情報や端末情報等を含むネット
ワーク構成情報であることを特徴とする共有リソースの
排他制御装置。7. A shared resource exclusive control apparatus according to claim 1, wherein said shared resource is network configuration information including communication line information and terminal information shared by a plurality of processes.
ースへのアクセスの排他制御を行い、共有リソースへの
アクセスが同時に複数のプロセスで処理が行われないよ
うにする共有リソースの排他制御方法において、 通常時は、前記プロセスが共有リソースに排他制御を行
うことなくアクセスでき、 前記共有リソースの内容を変更する必要が生じた場合
に、前記プロセスに対し、共有リソースへのアクセスに
排他制御を行うように要求する、 ことを特徴とする共有リソースの排他制御方法。8. A shared resource exclusive control method for performing exclusive control of access to a shared resource by a plurality of processes performing information processing so that access to the shared resource is not performed by a plurality of processes at the same time. Normally, the process can access the shared resource without performing the exclusive control, and when the content of the shared resource needs to be changed, the process performs the exclusive control on the access to the shared resource for the process. A method for exclusive control of shared resources.
ースへのアクセスの排他制御を行い、共有リソースへの
アクセスが同時に複数のプロセスで処理が行われないよ
うにする排他制御プログラムを記録した記録媒体におい
て、 通常時は、前記プロセスが共有リソースに排他制御を行
うことなくアクセスできるようにする処理と、 前記共有リソースの内容を変更する必要が生じた場合
に、前記プロセスに対し、共有リソースへのアクセスに
排他制御を行うように要求する処理と、 をコンピュータに実行させるための排他制御プログラム
を記録した記録媒体。9. A recording in which an exclusive control program for performing exclusive control of access to a shared resource by a plurality of processes for performing information processing and preventing access to the shared resource from being performed by a plurality of processes at the same time is recorded. In the medium, in a normal state, a process for allowing the process to access the shared resource without performing the exclusive control, and when the content of the shared resource needs to be changed, the process A recording medium that records a process of requesting exclusive access control for access to the computer and an exclusive control program for causing a computer to execute the process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10164478A JP2000003287A (en) | 1998-06-12 | 1998-06-12 | Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10164478A JP2000003287A (en) | 1998-06-12 | 1998-06-12 | Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2000003287A true JP2000003287A (en) | 2000-01-07 |
Family
ID=15793947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP10164478A Pending JP2000003287A (en) | 1998-06-12 | 1998-06-12 | Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2000003287A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002304304A (en) * | 2001-04-04 | 2002-10-18 | Denso Corp | Process execution device, processing program loaded in the same, and recording medium |
JP2017107394A (en) * | 2015-12-09 | 2017-06-15 | 株式会社デンソー | Vehicle controller |
JP2022048200A (en) * | 2021-05-26 | 2022-03-25 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | Device for acquiring information, electronic apparatus, storage medium, and computer program |
-
1998
- 1998-06-12 JP JP10164478A patent/JP2000003287A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002304304A (en) * | 2001-04-04 | 2002-10-18 | Denso Corp | Process execution device, processing program loaded in the same, and recording medium |
US7120913B2 (en) | 2001-04-04 | 2006-10-10 | Denso Corporation | Processing execution apparatus having data reference limiting function |
JP2017107394A (en) * | 2015-12-09 | 2017-06-15 | 株式会社デンソー | Vehicle controller |
JP2022048200A (en) * | 2021-05-26 | 2022-03-25 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | Device for acquiring information, electronic apparatus, storage medium, and computer program |
JP7289381B2 (en) | 2021-05-26 | 2023-06-09 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | Methods and devices for acquiring information, electronic devices, storage media, and computer programs |
US12131165B2 (en) | 2021-05-26 | 2024-10-29 | Beijing Baidu Netcom Science Technology Co., Ltd. | Method and apparatus for acquiring information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5956712A (en) | Byte range locking in a distributed environment | |
JP2557189B2 (en) | Device operation method | |
JP2561696B2 (en) | Shared area management method in network system | |
US5734909A (en) | Method for controlling the locking and unlocking of system resources in a shared resource distributed computing environment | |
US7792980B2 (en) | Distributed locking protocol with asynchronous token prefetch and relinquish | |
US5987550A (en) | Lock mechanism for shared resources in a data processing system | |
US5978839A (en) | Data sharing method in a plurality of computer systems | |
JPH04308961A (en) | Means and apparatus for notifying state of synchronous locking of occupied process | |
US8103754B1 (en) | Reserving a shared volume in a multiple node data storage system | |
JPH04182858A (en) | Shared memory management system | |
CN118377741A (en) | Atomic operation execution system, method and device | |
JPH04284548A (en) | Data base exclusive controlling system | |
JP2000003287A (en) | Exclusive controller for shared resource, method therefor and recording medium for recording exclusive control program | |
JP2000003302A (en) | Exclusive access control method for shared memory | |
US20030140189A1 (en) | Method and apparatus for resource sharing in a multi-processor system | |
US5062046A (en) | Multiple processor system having a correspondence table for transferring processing control between instruction processors | |
USRE42578E1 (en) | Synchronization using commitment | |
JP2001222382A (en) | Disk device | |
JP2915612B2 (en) | Shared area management method | |
JPH04367037A (en) | Computer system | |
JPH07160645A (en) | Common resource exclusive control method in multiprocessor system | |
JPS6265137A (en) | User task priority control method | |
CN119621268A (en) | A Linux system multi-interrupt rapid response asynchronous processing method, device, electronic device and medium | |
JPH10320259A (en) | Additinal type cd sharing system | |
KR100825724B1 (en) | Object-based storage system using PMEM useful for high speed transmission with DMA and method thereof |