US5623671A - Mutual exclusion control apparatus for mutual exclusion control based on locking and unlocking requests - Google Patents

Mutual exclusion control apparatus for mutual exclusion control based on locking and unlocking requests Download PDF

Info

Publication number
US5623671A
US5623671A US08/403,107 US40310795A US5623671A US 5623671 A US5623671 A US 5623671A US 40310795 A US40310795 A US 40310795A US 5623671 A US5623671 A US 5623671A
Authority
US
United States
Prior art keywords
lock
identifying information
request
lock identifying
holding
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.)
Expired - Fee Related
Application number
US08/403,107
Inventor
Kiyoshi Ando
Toyotugu Kasahara
Jyunichi Kawakubo
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Assigned to NEC CORPORATION reassignment NEC CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: ANDO, KIYOSHI, KASAHARA, TOYOTUGU, KAWAKUBO, JYUNICHI
Application granted granted Critical
Publication of US5623671A publication Critical patent/US5623671A/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • G06F12/1425Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block
    • G06F12/1433Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block for a module or a part of a module
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/30087Synchronisation or serialisation instructions

Definitions

  • the present invention relates to a mutual exclusion control apparatus for controlling mutual exclusion between a plurality of processors.
  • the term "mutual exclusion control” means a control for memory access such that only one of a plurality of processors can access at one time to a resource such as a memory region which is shared by the processors. For example, in a case where the respective processors update a shared variable, a certain one of the processors must exclusively perform a processing including "reading" the shared variable from memory, "modifying” it and “rewriting” the modified shared variable to memory. When another processor accesses the shared variable during this processing of the one processor, the access can not be guaranteed as normal. In order to avoid such situation, it is usual to provide a lock variable correspondingly to each shared variable or shared variable region. The lock variable is locked when one processor accesses to the shared variable and unlocked when the access is terminated. Therefore, the access is guaranteed as normal with the mutual exclusion control such that a processor checks the lock variable when it intends to access the corresponding shared variable and accesses it only when the lock variable is in unlocked state.
  • the lock variables are allocated in a shared memory.
  • the shared memory includes a memory portion for storing the value of lock variables to indicate whether a processor is or is not currently in a critical section.
  • the lock variables may have either an available value indicating that no processor is in a critical section or busy value indicating that processor is in a critical section.
  • U.S. Pat. No. 5,237,694 issued Aug. 17, 1993 discloses a system and method for use in a processing system of the type including a plurality of processor subsystems, each processor subsystem including a processor, and being coupled together and to a shared memory by a common bus.
  • the lock variables are allocated in the shared memory and cached in a lock buffer.
  • the lock buffer can be servicing lock variable accesses from the common bus while the processor's data cache is serving non-lock variable accesses from the processor.
  • the lock buffer works as a cache memory for lock variables, however, the shared memory allocates the lock variables statically.
  • the lock variables are allocated on the lock table in the shared memory statically. Therefore, if the number of the critical section is increased, the number of lock variables is increased correspondingly. Since the number of the processors which require mutual exclusion control at the same time period for practical programs is limited, it is not always necessary to statically allocate all of the lock variables.
  • An object of the present invention is to prevent a region necessary for variable locking from being relatively increased even if the number of the critical section is increased.
  • Another object of the present invention is to unlock the lock variable locked by a processor which has a failure.
  • a mutual exclusion control apparatus in one preferred mode, comprises lock information manage means for dynamically allocating a lock variable which holds a lock identifying information for a region to be accessed exclusively.
  • FIG. 1 is a block diagram showing a configuration of a first embodiment of mutual exclusion control apparatus according to the present invention
  • FIG. 2 is a block diagram showing an example of a construction of a lock request circuit of the first embodiment of the mutual exclusion control apparatus according to the present invention
  • FIG. 3 is a block diagram showing an example of a construction of a lock identifying information comparing circuit of the first embodiment of the mutual exclusion control apparatus according to the present invention
  • FIG. 4 is a timing chart showing an operation of the first embodiment of the mutual exclusion control apparatus according to the present invention.
  • FIG. 5 is a block diagram showing a configuration of a second embodiment of the mutual exclusion control apparatus according to the present invention.
  • mutual exclusion control apparatus comprises a lock request circuit 100 for issuing a lock acquisition request or unlock request, a lock identifying information holding circuit 200 for holding a lock identifying information with respect to currently effective locks, a lock identifying information comparing circuit 300 for determining whether or not the lock identifying information from the lock request circuit 100 is included in the lock identifying information holding circuit 200, and a lock identifying information updating circuit 400 for updating the lock identifying information holding circuit 200 on the basis of the request from the lock request circuit 100.
  • the lock request circuit 100 issues a lock request, that is, the lock acquisition request or the unlock request, on a lock request signal line 101 and a lock identifying information of the lock request on a lock identifying information signal line 102.
  • lock identifying information means an information for identifying a region to be locked, that is, shared region, and includes a number assigned to the region to be locked or an address of the region to be locked, etc. In the first embodiment, an absolute address for the region to be locked is used as the lock identifying information.
  • the lock identifying information holding circuit 200 has n entries each including the "lock identifying information" and a "validness of lock identifying information” indicating whether or not the lock identifying information is currently valid.
  • the "validness of lock identifying information” is shown as “v” in FIG. 1.
  • the shared region corresponding to the lock identifying information registered as valid in the lock identifying information holding circuit 200 is currently in a locked state. That is, the lock identifying information of an entry whose "validness of lock identifying information" indicates “valid” means that the shared region is currently locked.
  • the lock identifying information comparing circuit 300 judges whether or not the lock identifying information corresponding to the lock acquisition request or the unlock request from the lock request circuit 100 is one registered in the lock identifying information holding circuit 200 as a valid information.
  • the lock identifying information updating circuit 400 updates the lock identifying information holding circuit 200 on the basis of the lock acquisition request or the unlock request from the lock request circuit 100. If the request from the lock request circuit 100 is a lock acquisition request and corresponding lock identifying information is not registered in the lock identifying information holding circuit 200, the lock identifying information updating circuit 400 acquires a new entry to register the lock identifying information in the lock identifying information holding circuit 200. It cannot update the lock identifying information holding circuit 200 if the same lock identifying information is registered already or there is no new entry to be obtained. An information of whether or not the lock acquisition is possible is returned to the lock request circuit 100. When the request from the lock request circuit 100 is an unlock request, an entry containing a corresponding lock identifying information is invalidated.
  • the lock request circuit 100 includes an instruction register 110 for storing instructions to be executed, a group of registers 120 for storing data temporarily, a decoder 130 for decoding instructions, instruction latches A-C (141,161, 181) for holding instructions in respective stages, an address ALU (arithmetic and logical unit) 150, an X register 142 and a Y register 143 which hold input operands of the address ALU 150, a logical address register 162 for holding a result of operation in the address ALU 150, a TLB (Translation Look-aside Buffer) 170 for address translation; and an absolute address register 182 for holding absolute addresses.
  • ALU arithmetic and logical unit
  • X register 142 X register
  • Y register 143 which hold input operands of the address ALU 150
  • a logical address register 162 for holding a result of operation in the address ALU 150
  • TLB Translation Look-aside Buffer
  • an absolute address register 182 for holding absolute addresses.
  • lock instructions are further classified into instructions which use the logical address as lock identifying information and instructions which use the absolute address as lock identifying information.
  • a lock instruction is based on the logical address
  • a content of the X register assigned by x field and a content of the Y register assigned by y field are added to obtain a logical address which, after being translated into an absolute address by indexing the TLB 170, is used as the lock identifying information.
  • a content of the X register assigned by x field and a content of the Y register assigned by y field are added to obtain an absolute address which is used as the lock identifying information.
  • An instruction code field of the instruction register 110 is decoded by the decoder 130 and then held in the instruction latches A-C (141, 161, 181) sequentially.
  • a content of the instruction latch C (181) is output to the lock request signal line 101.
  • the x field and y field of the instruction register 110 indicate register numbers corresponding to the respective registers 120.
  • the register 120 specified by the register numbers of the x and y fields is read out or written in.
  • the read data are held in the X register 142 and the Y register 143.
  • the address ALU 150 adds the values of the X and Y registers 142 and 143 to produce a logical address and stores the result in a logical address register 162.
  • the TLB 170 is to realize an address translating function by associative memory and translates the logical address into the absolute address.
  • a selector 171 selects one of the output of the TLB 170 and the value held in the logical address register 162 according to a content of the instruction latch B (161) and holds it in an absolute address register 182.
  • the absolute address held in the absolute address register 182 is output to the lock identifying information signal line 102.
  • the lock identifying information comparing circuit 300 includes an input register 310 for holding the lock identifying information from the lock identifying information signal line 102, comparators 321-32n for comparing the lock identifying information of the input register 310 with lock identifying information of the respective entries of the lock identifying information holding circuit 200; and registers 331-33n for holding results of comparisons in the respective comparators 321-32n.
  • the comparators 321-32n correspond to the respective entries of the lock identifying information holding circuit 200 and compare the lock identifying information of the respective entries with the lock identifying information of the input register 310 to find any coincidence.
  • the validness of the respective entries of the lock identifying information holding circuit 200 are input to the comparators 321-32n through the signal line 20. That is, the entry or entries whose validness indicate "invalid" are excluded from comparison.
  • the result of comparison thus obtained from the comparators 331-33n is sent to the lock identifying information updating circuit 400 through a signal line 301. Further, the lock identifying information of the input register 310 is supplied through a signal line 302 to the lock identifying information updating circuit 400 and held in an input register 410 (not shown) thereof.
  • the lock identifying information updating circuit 400 acquires a new entry in the lock identifying information holding circuit 200 by the lock identifying information of the input register 410 according to the result of comparison from the lock identifying information comparing circuit 300.
  • the lock identifying information updating circuit 400 invalidates a corresponding entry. This invalidation can be realized by making the validation of the entry "invalid".
  • the update of the lock identifying information holding circuit 200 is performed through a signal line 401. When a lock is acquired, the validness of the respective entries of the lock identifying information holding circuit 200 are referenced through the signal line 201.
  • a lock acquisition instruction has been held in the instruction register 110.
  • the data are read out from the registers 120 and held in the X register 142 and the Y register 143.
  • the result of address operation by the address ALU 150 is held in the logical address register 162.
  • the result of address translation by the TLB 170 is held in the absolute address register 182 even if the instruction of the instruction latch B 161 is a lock instruction based on logical address.
  • the above mentioned absolute address is held in the input register 310.
  • the absolute address in the input register 310 of the lock identifying information comparing circuit 300 is held in the input register 410 of the lock identifying information updating circuit 400.
  • a second embodiment of the mutual exclusion control apparatus according to the present invention will be described in detail with reference to FIG. 5.
  • the mutual exclusion control apparatus has a similar configuration to that of the first embodiment except that it includes processor identifiers (PIDs) of respective entries of a lock identifying information circuit 200.
  • the PID is an identifier assigned to each processor.
  • the identifier of a processor which locks a shared region is held in the PID field.
  • the PID is supplied from a lock request circuit 100 to the lock identifying information holding circuit 200 and a lock, identifying information comparing circuit 300 through a lock requesting processor ID signal line 103.
  • an unlock instruction instructs an unlocking by the processor ID.
  • a value stored in a location assigned by x field of an X register is used as the PID, in addition to the first embodiment.
  • a PID given by a lock request circuit 100 is compared with the PID of the lock identifying information holding circuit 200, in addition to the first embodiment.
  • a basic configuration for performing the above-mentioned comparison is similar to that of the comparators of the first embodiment shown in FIG. 3.
  • a lock identifying information updating circuit 400 invalidates all of entries of the lock identifying information holding circuit 200 which indicate coincidence.

Abstract

A mutual exclusion control is performed with dynamically, allocated lock variables. A lock request circuit issues a lock acquisition request or an unlock request. A lock identifying information holding circuit holds an identifying information related to a currently valid lock. A lock identifying information comparing circuit judges whether or not a lock identifying information from the lock request circuit is included in the lock identifying information holding circuit. A lock identifying information updating circuit updates the lock identifying information holding circuit on the basis of the request from the lock request circuit.

Description

BACKGROUND OF THE INVENTION
The present invention relates to a mutual exclusion control apparatus for controlling mutual exclusion between a plurality of processors.
The term "mutual exclusion control" means a control for memory access such that only one of a plurality of processors can access at one time to a resource such as a memory region which is shared by the processors. For example, in a case where the respective processors update a shared variable, a certain one of the processors must exclusively perform a processing including "reading" the shared variable from memory, "modifying" it and "rewriting" the modified shared variable to memory. When another processor accesses the shared variable during this processing of the one processor, the access can not be guaranteed as normal. In order to avoid such situation, it is usual to provide a lock variable correspondingly to each shared variable or shared variable region. The lock variable is locked when one processor accesses to the shared variable and unlocked when the access is terminated. Therefore, the access is guaranteed as normal with the mutual exclusion control such that a processor checks the lock variable when it intends to access the corresponding shared variable and accesses it only when the lock variable is in unlocked state.
In the prior art, the lock variables are allocated in a shared memory. The shared memory includes a memory portion for storing the value of lock variables to indicate whether a processor is or is not currently in a critical section. The lock variables may have either an available value indicating that no processor is in a critical section or busy value indicating that processor is in a critical section.
For example, U.S. Pat. No. 5,237,694, issued Aug. 17, 1993 discloses a system and method for use in a processing system of the type including a plurality of processor subsystems, each processor subsystem including a processor, and being coupled together and to a shared memory by a common bus. The lock variables are allocated in the shared memory and cached in a lock buffer. The lock buffer can be servicing lock variable accesses from the common bus while the processor's data cache is serving non-lock variable accesses from the processor. The lock buffer works as a cache memory for lock variables, however, the shared memory allocates the lock variables statically.
In the prior art mentioned above, the lock variables are allocated on the lock table in the shared memory statically. Therefore, if the number of the critical section is increased, the number of lock variables is increased correspondingly. Since the number of the processors which require mutual exclusion control at the same time period for practical programs is limited, it is not always necessary to statically allocate all of the lock variables.
Further, there is another problem that, when there is a failure in a processor which locks the lock variable, it is not easy to unlock the lock variable.
SUMMARY OF THE INVENTION
An object of the present invention is to prevent a region necessary for variable locking from being relatively increased even if the number of the critical section is increased.
Another object of the present invention is to unlock the lock variable locked by a processor which has a failure.
In order to achieve the above objects, a mutual exclusion control apparatus according to the present invention in one preferred mode, comprises lock information manage means for dynamically allocating a lock variable which holds a lock identifying information for a region to be accessed exclusively.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram showing a configuration of a first embodiment of mutual exclusion control apparatus according to the present invention;
FIG. 2 is a block diagram showing an example of a construction of a lock request circuit of the first embodiment of the mutual exclusion control apparatus according to the present invention;
FIG. 3 is a block diagram showing an example of a construction of a lock identifying information comparing circuit of the first embodiment of the mutual exclusion control apparatus according to the present invention;
FIG. 4 is a timing chart showing an operation of the first embodiment of the mutual exclusion control apparatus according to the present invention; and
FIG. 5 is a block diagram showing a configuration of a second embodiment of the mutual exclusion control apparatus according to the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
A first embodiment of mutual exclusion control apparatus of the present invention will be described with respect to FIGS. 1 to 4.
Referring to FIG. 1, mutual exclusion control apparatus according to the first embodiment of the present invention comprises a lock request circuit 100 for issuing a lock acquisition request or unlock request, a lock identifying information holding circuit 200 for holding a lock identifying information with respect to currently effective locks, a lock identifying information comparing circuit 300 for determining whether or not the lock identifying information from the lock request circuit 100 is included in the lock identifying information holding circuit 200, and a lock identifying information updating circuit 400 for updating the lock identifying information holding circuit 200 on the basis of the request from the lock request circuit 100.
The lock request circuit 100 issues a lock request, that is, the lock acquisition request or the unlock request, on a lock request signal line 101 and a lock identifying information of the lock request on a lock identifying information signal line 102. The term "lock identifying information" means an information for identifying a region to be locked, that is, shared region, and includes a number assigned to the region to be locked or an address of the region to be locked, etc. In the first embodiment, an absolute address for the region to be locked is used as the lock identifying information.
The lock identifying information holding circuit 200 has n entries each including the "lock identifying information" and a "validness of lock identifying information" indicating whether or not the lock identifying information is currently valid. The "validness of lock identifying information" is shown as "v" in FIG. 1. The shared region corresponding to the lock identifying information registered as valid in the lock identifying information holding circuit 200 is currently in a locked state. That is, the lock identifying information of an entry whose "validness of lock identifying information" indicates "valid" means that the shared region is currently locked.
The lock identifying information comparing circuit 300 judges whether or not the lock identifying information corresponding to the lock acquisition request or the unlock request from the lock request circuit 100 is one registered in the lock identifying information holding circuit 200 as a valid information.
The lock identifying information updating circuit 400 updates the lock identifying information holding circuit 200 on the basis of the lock acquisition request or the unlock request from the lock request circuit 100. If the request from the lock request circuit 100 is a lock acquisition request and corresponding lock identifying information is not registered in the lock identifying information holding circuit 200, the lock identifying information updating circuit 400 acquires a new entry to register the lock identifying information in the lock identifying information holding circuit 200. It cannot update the lock identifying information holding circuit 200 if the same lock identifying information is registered already or there is no new entry to be obtained. An information of whether or not the lock acquisition is possible is returned to the lock request circuit 100. When the request from the lock request circuit 100 is an unlock request, an entry containing a corresponding lock identifying information is invalidated.
Referring to FIG. 2, the lock request circuit 100 includes an instruction register 110 for storing instructions to be executed, a group of registers 120 for storing data temporarily, a decoder 130 for decoding instructions, instruction latches A-C (141,161, 181) for holding instructions in respective stages, an address ALU (arithmetic and logical unit) 150, an X register 142 and a Y register 143 which hold input operands of the address ALU 150, a logical address register 162 for holding a result of operation in the address ALU 150, a TLB (Translation Look-aside Buffer) 170 for address translation; and an absolute address register 182 for holding absolute addresses.
Among instructions held in the instruction register 110, it is assumed that there are two lock instructions, a lock acquisition request instruction and an unlock request instruction. These lock instructions are further classified into instructions which use the logical address as lock identifying information and instructions which use the absolute address as lock identifying information. In a case where the lock instruction is based on the logical address, a content of the X register assigned by x field and a content of the Y register assigned by y field are added to obtain a logical address which, after being translated into an absolute address by indexing the TLB 170, is used as the lock identifying information. In a case where the lock instruction is based on the absolute address, a content of the X register assigned by x field and a content of the Y register assigned by y field are added to obtain an absolute address which is used as the lock identifying information.
An instruction code field of the instruction register 110 is decoded by the decoder 130 and then held in the instruction latches A-C (141, 161, 181) sequentially. A content of the instruction latch C (181) is output to the lock request signal line 101. The x field and y field of the instruction register 110 indicate register numbers corresponding to the respective registers 120. The register 120 specified by the register numbers of the x and y fields is read out or written in. The read data are held in the X register 142 and the Y register 143.
The address ALU 150 adds the values of the X and Y registers 142 and 143 to produce a logical address and stores the result in a logical address register 162.
The TLB 170 is to realize an address translating function by associative memory and translates the logical address into the absolute address. A selector 171 selects one of the output of the TLB 170 and the value held in the logical address register 162 according to a content of the instruction latch B (161) and holds it in an absolute address register 182. The absolute address held in the absolute address register 182 is output to the lock identifying information signal line 102.
Referring to FIG. 3, the lock identifying information comparing circuit 300 includes an input register 310 for holding the lock identifying information from the lock identifying information signal line 102, comparators 321-32n for comparing the lock identifying information of the input register 310 with lock identifying information of the respective entries of the lock identifying information holding circuit 200; and registers 331-33n for holding results of comparisons in the respective comparators 321-32n. The comparators 321-32n correspond to the respective entries of the lock identifying information holding circuit 200 and compare the lock identifying information of the respective entries with the lock identifying information of the input register 310 to find any coincidence. In this comparing operation, the validness of the respective entries of the lock identifying information holding circuit 200 are input to the comparators 321-32n through the signal line 20. That is, the entry or entries whose validness indicate "invalid" are excluded from comparison.
The result of comparison thus obtained from the comparators 331-33n is sent to the lock identifying information updating circuit 400 through a signal line 301. Further, the lock identifying information of the input register 310 is supplied through a signal line 302 to the lock identifying information updating circuit 400 and held in an input register 410 (not shown) thereof.
When the lock request from the lock request circuit 100 is a lock acquisition request, the lock identifying information updating circuit 400 acquires a new entry in the lock identifying information holding circuit 200 by the lock identifying information of the input register 410 according to the result of comparison from the lock identifying information comparing circuit 300. On the other hand, when the lock request from the lock request circuit 100 is an unlock request, the lock identifying information updating circuit 400 invalidates a corresponding entry. This invalidation can be realized by making the validation of the entry "invalid". The update of the lock identifying information holding circuit 200 is performed through a signal line 401. When a lock is acquired, the validness of the respective entries of the lock identifying information holding circuit 200 are referenced through the signal line 201. If there is no available entry, it is impossible to acquire a new entry, that is, it is impossible to newly set a lock identifying information. Therefore, in this case, a notice that it is impossible to acquire a lock is sent to the lock request circuit 100 through the signal line 402. Similarly, when a lock is acquired, a notice that a lock is acquired is sent to the lock request circuit 100 through the signal line 402.
Now, an operation of the first embodiment as mentioned above will be described.
Referring to FIG. 4, at a time instance T=T0, a lock acquisition instruction has been held in the instruction register 110. At a time instance T=T1, the data are read out from the registers 120 and held in the X register 142 and the Y register 143. At a time instance T=T2, the result of address operation by the address ALU 150 is held in the logical address register 162. At a time instance T=T3, the result of address translation by the TLB 170 is held in the absolute address register 182 even if the instruction of the instruction latch B 161 is a lock instruction based on logical address.
At a time instance T=T4, the above mentioned absolute address is held in the input register 310. At a time instance T=T5, the absolute address held in the input register 310 is compared as the lock identifying information with lock identifying information of the respective entries of the lock identifying information holding circuit 200. The result of comparisons is held in the registers 331-33n at the time instance T=T5. At the same time instance, the absolute address in the input register 310 of the lock identifying information comparing circuit 300 is held in the input register 410 of the lock identifying information updating circuit 400. At a time instance T=T6, the result of comparisons of the registers 331-33n is totally held in a reply register 430 (not shown) of the lock identifying information updating circuit 400 and an existence or absence of lock acquisition is returned to the lock request circuit 100 through the signal line 402.
As described, according to the first embodiment of the present invention in which a lock identifying information is held in the lock identifying information holding circuit when required, unlike the prior art in which all lock variables are statically held, mutual exclusion controls corresponding in number to entries of the lock identifying information holding circuit can be done simultaneously at the maximum.
A second embodiment of the mutual exclusion control apparatus according to the present invention will be described in detail with reference to FIG. 5.
Referring to FIG. 5, the mutual exclusion control apparatus according to the second embodiment of the present invention has a similar configuration to that of the first embodiment except that it includes processor identifiers (PIDs) of respective entries of a lock identifying information circuit 200. The PID is an identifier assigned to each processor. The identifier of a processor which locks a shared region is held in the PID field. The PID is supplied from a lock request circuit 100 to the lock identifying information holding circuit 200 and a lock, identifying information comparing circuit 300 through a lock requesting processor ID signal line 103.
In the second embodiment, an unlock instruction instructs an unlocking by the processor ID. In this case, a value stored in a location assigned by x field of an X register is used as the PID, in addition to the first embodiment.
In the lock identifying information comparing circuit 300, a PID given by a lock request circuit 100 is compared with the PID of the lock identifying information holding circuit 200, in addition to the first embodiment. A basic configuration for performing the above-mentioned comparison is similar to that of the comparators of the first embodiment shown in FIG. 3.
Responding to the unlock instruction with the PID, a lock identifying information updating circuit 400 invalidates all of entries of the lock identifying information holding circuit 200 which indicate coincidence.
As described, according to the second embodiment of the present invention, it is possible to easily perform an unlocking even when a processor which acquired a lock becomes unable to unlock for some reason.
In summary, according to the present invention in which a lock identifying information is acquired in the lock identifying information holding circuit when required, unlike the prior art in which all lock variables are statically held. Therefore, mutual exclusion controls corresponding in number to entries of the lock identifying information holding circuit at most can be done at the same time period.
Further, according to the present invention, it is possible to specify a lock identifying information strictly by using the absolute address of shared variable as a lock identifying information.
In addition, it is possible to unlock easily even when a processor which acquired a lock becomes unable to unlock for some reason.

Claims (3)

What is claimed is:
1. A mutual exclusion control apparatus for a mutual exclusion control upon receipt of a locking acquisition request or an unlocking request from lock request means, comprising:
lock identifying information holding means having at least one entry for holding a lock identifying information for identifying a region indicated by said lock request means as a target of mutual exclusion control;
lock identifying information comparing means for judging whether or not the lock identifying information from said lock request means is included in said lock identifying information holding means; and
lock identifying information updating means for updating said lock identifying information holding means based on a request from said lock request means, wherein
said lock identifying information holding means holds in each entry thereof a processor number related to a processor which has set the lock identifying information of the entry,
said lock identifying information comparing means judges whether or not a processor number related to an unlock request from said lock request means is included in the respective entries of said lock identifying information holding means,
said lock identifying information updating means invalidates any entry for which a coincidence of processor number is detected in said lock identifying information comparing means,
wherein all entries of said lock identifying information holding means determined by said lock identifying information comparing means as including a processor number matching the unlock request are invalidated even if the corresponding processor is unable to unlock, and
wherein said lock request means includes:
an instruction register for storing instructions to be executed;
a plurality of registers for temporarily storing data;
a decoder for decoding the instructions stored in said instruction register;
a plurality of instruction latches for holding said instructions in respective stages;
an address arithmetic logic unit for performing arithmetic operations on input operands and for outputting an arithmetic result of the input operands;
a plurality of operand registers for holding the input operands of the address arithmetic logic unit;
a logic address register for holding the arithmetic result of the address arithmetic logic unit;
a translation lookaside buffer for performing address translation; and
an absolute address register for holding absolute addresses.
2. The mutual exclusion control apparatus claimed in claim 1, wherein the region identified by the lock identifying information includes an identification number.
3. The mutual exclusion control apparatus claimed in claim 1, wherein said lock identifying comparing means further comprises:
an input register for holding the lock identifying information from said lock request means;
a plurality of comparators for comparing the lock identifying information held in said input register with lock identifying information of said at least one entry of said lock identifying information holding means; and
a plurality of output registers for holding results of the comparisons performed by said plurality of comparators.
US08/403,107 1994-03-16 1995-03-13 Mutual exclusion control apparatus for mutual exclusion control based on locking and unlocking requests Expired - Fee Related US5623671A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP6045823A JPH07262140A (en) 1994-03-16 1994-03-16 Exclusive controller
JP6-045823 1994-03-16

Publications (1)

Publication Number Publication Date
US5623671A true US5623671A (en) 1997-04-22

Family

ID=12729977

Family Applications (1)

Application Number Title Priority Date Filing Date
US08/403,107 Expired - Fee Related US5623671A (en) 1994-03-16 1995-03-13 Mutual exclusion control apparatus for mutual exclusion control based on locking and unlocking requests

Country Status (2)

Country Link
US (1) US5623671A (en)
JP (1) JPH07262140A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5893157A (en) * 1997-05-28 1999-04-06 International Business Machines Corporation Blocking symbol control in a computer system to serialize accessing a data resource by simultaneous processor requests
US5895492A (en) * 1997-05-28 1999-04-20 International Business Machines Corporation Processor associated blocking symbol controls for serializing the accessing of data resources in a computer system
US5895494A (en) * 1997-09-05 1999-04-20 International Business Machines Corporation Method of executing perform locked operation instructions for supporting recovery of data consistency if lost due to processor failure, and a method of recovering the data consistency after processor failure
US6088757A (en) * 1998-08-28 2000-07-11 International Business Machines Corporation Computer program means and device for conducting high performance locking facility in a loosely coupled environment
US6108757A (en) * 1997-02-28 2000-08-22 Lucent Technologies Inc. Method for locking a shared resource in multiprocessor system
US6141734A (en) * 1998-02-03 2000-10-31 Compaq Computer Corporation Method and apparatus for optimizing the performance of LDxL and STxC interlock instructions in the context of a write invalidate protocol
US6173375B1 (en) * 1997-02-28 2001-01-09 Lucent Technologies Inc. Method for accessing a shared resource in a multiprocessor system
US6185650B1 (en) 1998-08-28 2001-02-06 International Business Machines Corporation High performance locking facility
US6189007B1 (en) 1998-08-28 2001-02-13 International Business Machines Corporation Method and apparatus for conducting a high performance locking facility in a loosely coupled environment
US6253274B1 (en) 1998-08-28 2001-06-26 International Business Machines Corporation Apparatus for a high performance locking facility
US6289410B1 (en) * 1996-07-18 2001-09-11 Electronic Data Systems Corporation Method and system for maintaining consistency of shared objects based upon instance variable locking
US20040205392A1 (en) * 2000-11-07 2004-10-14 Yuguang Wu Generic fault-tolerant locking mechanism for multiprocessor systems
US20050022047A1 (en) * 2003-07-21 2005-01-27 Oracle International Corporation Conditional data access after database system failure
US20080040560A1 (en) * 2006-03-16 2008-02-14 Charles Brian Hall Lightweight Single Reader Locks
US10360079B2 (en) 2017-06-16 2019-07-23 GM Global Technology Operations LLC Architecture and services supporting reconfigurable synchronization in a multiprocessing system

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4890222A (en) * 1984-12-17 1989-12-26 Honeywell Inc. Apparatus for substantially syncronizing the timing subsystems of the physical modules of a local area network
US4984153A (en) * 1988-04-27 1991-01-08 Unisys Corporation Storage locking control for a plurality of processors which share a common storage unit
US5130710A (en) * 1989-10-18 1992-07-14 Pitney Bowes Inc. Microcomputer-controlled electronic postage meter having print wheels set by separate D.C. motors
US5142676A (en) * 1988-12-28 1992-08-25 Gte Laboratories Incorporated Separate content addressable memories for storing locked segment addresses and locking processor identifications for controlling access to shared memory
US5175837A (en) * 1989-02-03 1992-12-29 Digital Equipment Corporation Synchronizing and processing of memory access operations in multiprocessor systems using a directory of lock bits
US5237694A (en) * 1991-05-30 1993-08-17 Advanced Micro Devices, Inc. Processing system and method including lock buffer for controlling exclusive critical problem accesses by each processor
US5249285A (en) * 1988-08-01 1993-09-28 Stenograph Corporation RAM lock device and method for a text entry system
US5263146A (en) * 1989-07-27 1993-11-16 Nec Corporation Multiprocessor system including an exclusive access controller with lock request holding and grant circuits
US5276847A (en) * 1990-02-14 1994-01-04 Intel Corporation Method for locking and unlocking a computer address
US5321825A (en) * 1991-06-18 1994-06-14 Advanced Micro Devices, Inc. Processing system with lock spaces for providing critical section access
US5339397A (en) * 1990-10-12 1994-08-16 International Business Machines Corporation Hardware primary directory lock
US5341491A (en) * 1990-06-29 1994-08-23 Digital Equipment Corporation Apparatus and method for ensuring that lock requests are serviced in a multiprocessor system
US5430860A (en) * 1991-09-17 1995-07-04 International Business Machines Inc. Mechanism for efficiently releasing memory lock, after allowing completion of current atomic sequence
US5442755A (en) * 1989-12-25 1995-08-15 Hitachi, Ltd. Multi-processor system with lock address register in each processor for storing lock address sent to bus by another processor

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5621260A (en) * 1979-07-27 1981-02-27 Nec Corp Access unit
US4858116A (en) * 1987-05-01 1989-08-15 Digital Equipment Corporation Method and apparatus for managing multiple lock indicators in a multiprocessor computer system
JPH0573412A (en) * 1991-09-11 1993-03-26 Nec Corp Exclusive control system in multi-processor system
JPH05158781A (en) * 1991-12-06 1993-06-25 Toshiba Corp Exclusive flag management device for shared memory system

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4890222A (en) * 1984-12-17 1989-12-26 Honeywell Inc. Apparatus for substantially syncronizing the timing subsystems of the physical modules of a local area network
US4984153A (en) * 1988-04-27 1991-01-08 Unisys Corporation Storage locking control for a plurality of processors which share a common storage unit
US5249285A (en) * 1988-08-01 1993-09-28 Stenograph Corporation RAM lock device and method for a text entry system
US5142676A (en) * 1988-12-28 1992-08-25 Gte Laboratories Incorporated Separate content addressable memories for storing locked segment addresses and locking processor identifications for controlling access to shared memory
US5175837A (en) * 1989-02-03 1992-12-29 Digital Equipment Corporation Synchronizing and processing of memory access operations in multiprocessor systems using a directory of lock bits
US5263146A (en) * 1989-07-27 1993-11-16 Nec Corporation Multiprocessor system including an exclusive access controller with lock request holding and grant circuits
US5130710A (en) * 1989-10-18 1992-07-14 Pitney Bowes Inc. Microcomputer-controlled electronic postage meter having print wheels set by separate D.C. motors
US5442755A (en) * 1989-12-25 1995-08-15 Hitachi, Ltd. Multi-processor system with lock address register in each processor for storing lock address sent to bus by another processor
US5276847A (en) * 1990-02-14 1994-01-04 Intel Corporation Method for locking and unlocking a computer address
US5341491A (en) * 1990-06-29 1994-08-23 Digital Equipment Corporation Apparatus and method for ensuring that lock requests are serviced in a multiprocessor system
US5339397A (en) * 1990-10-12 1994-08-16 International Business Machines Corporation Hardware primary directory lock
US5237694A (en) * 1991-05-30 1993-08-17 Advanced Micro Devices, Inc. Processing system and method including lock buffer for controlling exclusive critical problem accesses by each processor
US5321825A (en) * 1991-06-18 1994-06-14 Advanced Micro Devices, Inc. Processing system with lock spaces for providing critical section access
US5430860A (en) * 1991-09-17 1995-07-04 International Business Machines Inc. Mechanism for efficiently releasing memory lock, after allowing completion of current atomic sequence

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6289410B1 (en) * 1996-07-18 2001-09-11 Electronic Data Systems Corporation Method and system for maintaining consistency of shared objects based upon instance variable locking
US6108757A (en) * 1997-02-28 2000-08-22 Lucent Technologies Inc. Method for locking a shared resource in multiprocessor system
US6173375B1 (en) * 1997-02-28 2001-01-09 Lucent Technologies Inc. Method for accessing a shared resource in a multiprocessor system
US5893157A (en) * 1997-05-28 1999-04-06 International Business Machines Corporation Blocking symbol control in a computer system to serialize accessing a data resource by simultaneous processor requests
US5895492A (en) * 1997-05-28 1999-04-20 International Business Machines Corporation Processor associated blocking symbol controls for serializing the accessing of data resources in a computer system
US5895494A (en) * 1997-09-05 1999-04-20 International Business Machines Corporation Method of executing perform locked operation instructions for supporting recovery of data consistency if lost due to processor failure, and a method of recovering the data consistency after processor failure
US6141734A (en) * 1998-02-03 2000-10-31 Compaq Computer Corporation Method and apparatus for optimizing the performance of LDxL and STxC interlock instructions in the context of a write invalidate protocol
US6189007B1 (en) 1998-08-28 2001-02-13 International Business Machines Corporation Method and apparatus for conducting a high performance locking facility in a loosely coupled environment
US6185650B1 (en) 1998-08-28 2001-02-06 International Business Machines Corporation High performance locking facility
US6253274B1 (en) 1998-08-28 2001-06-26 International Business Machines Corporation Apparatus for a high performance locking facility
US6088757A (en) * 1998-08-28 2000-07-11 International Business Machines Corporation Computer program means and device for conducting high performance locking facility in a loosely coupled environment
US20040205392A1 (en) * 2000-11-07 2004-10-14 Yuguang Wu Generic fault-tolerant locking mechanism for multiprocessor systems
US7171581B2 (en) * 2000-11-07 2007-01-30 At&T Corp. Fault-tolerant match-and-set locking mechanism for multiprocessor systems
US7536582B1 (en) * 2000-11-07 2009-05-19 At&T Corp. Fault-tolerant match-and-set locking mechanism for multiprocessor systems
US20050022047A1 (en) * 2003-07-21 2005-01-27 Oracle International Corporation Conditional data access after database system failure
US7284151B2 (en) * 2003-07-21 2007-10-16 Oracle International Corporation Conditional data access after database system failure
US20080040560A1 (en) * 2006-03-16 2008-02-14 Charles Brian Hall Lightweight Single Reader Locks
US10360079B2 (en) 2017-06-16 2019-07-23 GM Global Technology Operations LLC Architecture and services supporting reconfigurable synchronization in a multiprocessing system

Also Published As

Publication number Publication date
JPH07262140A (en) 1995-10-13

Similar Documents

Publication Publication Date Title
US5623671A (en) Mutual exclusion control apparatus for mutual exclusion control based on locking and unlocking requests
US5761734A (en) Token-based serialisation of instructions in a multiprocessor system
US5295251A (en) Method of accessing multiple virtual address spaces and computer system
JP2675961B2 (en) Methods for locking pages in real memory
EP0327798B1 (en) Control method and apparatus for zero-origin data spaces
US4891749A (en) Multiprocessor storage serialization apparatus
US5761729A (en) Validation checking of shared memory accesses
US5539895A (en) Hierarchical computer cache system
EP0507063A1 (en) Cross-invalidate directory method and means
KR890004994B1 (en) Address translation control system
JPS6022377B2 (en) Address control method
US5946717A (en) Multi-processor system which provides for translation look-aside buffer address range invalidation and address translation concurrently
US7552254B1 (en) Associating address space identifiers with active contexts
US4970643A (en) Mechanism for lock-up free cache operation with a remote address translation unit
US5787477A (en) Multi-processor cache coherency protocol allowing asynchronous modification of cache data
US5893156A (en) Lock control apparatus and method including controlling means for setting a lock variable status
JPH01302444A (en) Logical address cache control system
US7181576B2 (en) Method for synchronizing a cache memory with a main memory
Wilkes et al. A comparison of protection lookaside buffers and the PA-RISC protection architecture
US5390312A (en) Access look-aside facility
US6374334B1 (en) Data processing apparatus with a cache controlling device
US5305458A (en) Multiple virtual storage system and address control apparatus having a designation table holding device and translation buffer
EP0442474B1 (en) Apparatus and method for controlling cache memory
JPH06139149A (en) Multiple virtual space control device
JPH071489B2 (en) Computer device and method for detecting and correcting data inconsistency in a cache data array in a computer device

Legal Events

Date Code Title Description
AS Assignment

Owner name: NEC CORPORATION, JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:ANDO, KIYOSHI;KASAHARA, TOYOTUGU;KAWAKUBO, JYUNICHI;REEL/FRAME:007386/0826

Effective date: 19950216

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

FPAY Fee payment

Year of fee payment: 8

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees
STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20090422