Claims
- 1. A subsystem for managing semaphores for a multi-threaded processing system comprising:
a memory having a plurality of storage areas, each of the storage areas including a first part for storing at least one indicia for identifying at least one unique semaphore from a plurality of semaphores utilized by the multi-threaded processing system and a second part for storing an indicia for indicating a locked status for the stored semaphore; first logic circuit responsive to a semaphore lock request from a thread for examining the contents of all of the storage areas to determine if a locked semaphore corresponding to the requested semaphore is stored in any of the storage areas; second logic circuit responsive to the first logic circuit for storing the requested semaphore in a storage area along with a locked status if the requested semaphore is not found in the search and notifying the requesting thread that the request is granted; third logic circuit responsive to the first logic circuit for rejecting the request if the same locked semaphore is found in the memory and is locked by the requesting thread; and, fourth logic circuit responsive to the first and third logic circuits for holding the semaphore request in abeyance if the same locked semaphore is found in the memory but is not locked by the requesting thread.
- 2. The subsystem set forth in claim 1 in which the fourth logic circuit completes the semaphore lock request with an indication that the semaphore was locked if the request includes a set time out enable bit.
- 3. The subsystem set forth in claims 1 or 2 including:
fifth logic circuit responsive to an unlock request from a thread for accessing a memory location associated with the thread for changing the stored semaphore status from locked to unlocked.
- 4. The subsystem set forth in claim 3 including:
sixth logic circuit responsive to an exit signal from a thread for examining the storage location associated with the thread providing the exit signal to determine if the semaphore is unlocked and for unlocking the semaphore if it is locked and generating a semaphore locked at exit error message.
- 5. A subsystem for managing semaphores for a multi-threaded processing system comprising:
a memory having a plurality of storage areas one for each of the threads in the multi-threaded processing system, each of the storage areas including a first part for storing at least one indicia for identifying at least one unique semaphore from a plurality of semaphores utilized by the multi-threaded processing system and a second part for storing an indicia for indicating a semaphore locked status for the stored semaphore; first logic circuit responsive to a request for a semaphore from a thread for examining the contents of all of the storage areas to determine if a locked semaphore corresponding to the requested semaphore is stored in any of the storage areas; second logic circuit for storing the requested semaphore in the storage area associated with the requesting thread along with a status indicating a locked semaphore if the requested semaphore is not found in the search and notifying the requesting thread that the request is granted; third logic circuit for rejecting the request if the same locked semaphore is found in the memory associated with the requesting thread; and fourth logic circuit for holding the semaphore request in abeyance if the same locked semaphore is found in a memory not associated with the requesting thread.
- 6. The subsystem set forth in claim 5 in which the fourth logic circuit completes the semaphore lock request with an indication that no semaphore was locked if the request includes a set time out enable bit.
- 7. The subsystem set forth in claims 5 or 6 including:
fifth logic circuit responsive to an unlock signal from a thread for accessing a memory location associated with the thread for changing the stored semaphore status from locked to unlocked.
- 8. The subsystem set forth in claim 7 including:
sixth logic circuit responsive to an exit signal from a thread for examining the storage location associated with the thread providing the exit signal to determine if the semaphore is unlocked and for unlocking the semaphore if it is locked and generating a semaphore locked at exit error message.
- 9. In a multi-threaded processing system a method for managing semaphores comprising the following steps:
establishing a memory having a plurality of storage areas each of which includes a first part for storing at least one indicia for identifying at least one unique semaphore from a plurality of semaphores utilized by the multi-threaded processing system and a second part for storing an indicia for indicating a locked status for the stored semaphore; receiving a semaphore lock request from a thread, examining the contents of all of the storage areas to determine if a locked semaphore corresponding to the requested semaphore is stored in any of the storage areas; if a locked semaphore corresponding to the requested semaphore is not found storing the requested semaphore in a storage area along with a locked status indicia and notifying the requesting thread that the request is granted; rejecting the request if the same locked semaphore is found in the memory and is locked by the requesting thread; and, holding the semaphore request in abeyance if the same locked semaphore is found in the memory but is not locked by the requesting thread.
- 10. The method set forth in claim 9 in which the semaphore lock request is completed with an indication that no semaphore was locked if the request includes a set time out enable bit.
- 11. The method set forth in claims 9 or 10 in which:
in response to an unlock signal from a thread changing the stored semaphore status from locked to unlocked in the storage location associated with the thread.
- 12. The method set forth in claim 11 including:
examining in response to an exit signal from a thread the storage location associated with the thread providing the exit signal to determine if the semaphore is unlocked and unlocking the semaphore if is locked and generating a semaphore locked at exit error message.
- 13. In a multi-threaded processing system a method for managing semaphores comprising the following steps:
establishing a memory having a storage areas for each of the threads each of which includes a first part for storing at least one indicia for identifying at least one unique semaphore from a plurality of semaphores utilized by the multi-threaded processing system and a second part for storing an indicia for indicating a locked status for the stored semaphore; receiving a semaphore lock request from a thread, examining the contents of all of the storage areas to determine if a locked semaphore corresponding to the requested semaphore is stored in any of the storage areas; if a locked semaphore corresponding to the requested semaphore is not found storing the requested semaphore in a predetermined storage area along with a locked status indicia and notifying the requesting thread that the request is granted; rejecting the request if the same locked semaphore is found in the memory and is locked by the requesting thread; and, holding the semaphore request in abeyance if the same locked semaphore is found in the memory but is not locked by the requesting thread.
- 14. The method set forth in claim 13 in which the semaphore lock request is completed with an indication that no semaphore was locked if the request includes a set time out enable bit.
- 15. The method set forth in claims 13 or 14 in which:
in response to an unlock signal from a thread changing the stored semaphore status from locked to unlocked in the storage location associated with the thread.
- 16. The method set forth in claim 15 including:
examining in response to an exit signal from a thread the storage location associated with the thread providing the exit signal to determine if the semaphore is unlocked and unlocking the semaphore if is locked and generating a semaphore locked at exit error message.
- 17. The subsystem set forth in claim 1 in which the memory is a content addressable memory and the contents are searched for the thread ID.
- 18. The subsystem set forth in claim 1 in which the memory has a different location associated with each thread and thread ID is used to address that location.
Parent Case Info
[0001] This application claims the benefit of the filing date of provisional application Serial No. 60/301602, filed Jun. 27, 2001.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60301602 |
Jun 2001 |
US |