Claims
- 1. A method of handling a critical signal resulting from the execution of a thread in a multi-threaded process having a critical signal thread, the method comprising:detecting a critical signal caused by the thread in the multi-threaded process; invoking the critical signal thread to handle the critical signal caused by the thread; and terminating by the critical signal thread resources and connections associated with the particular thread that caused the critical signal without terminating resources and connections of other threads in the multi-threaded process that were not associated with the critical signal; whereby the other threads in the multi-threaded process are unaffected by the critical signal and resulting termination of the resources and connections of the thread, thereby allowing other threads in the multi-threaded process to remain functional.
- 2. A method as recited in claim 1 further including initializing the critical signal thread such that particular signals are recognized by the multi-threaded process.
- 3. A method as recited in claim 1 wherein invoking the critical signal thread further includes executing a critical signal handler wherein the critical signal handler is a module in the critical signal thread.
- 4. A method as recited in claim 1 wherein invoking the critical signal thread further includes reading a signal queue maintained by an operating system.
- 5. A method as recited in claim 1 wherein terminating resources and connections associated with the thread further includes:closing files opened by the thread; unlocking files locked by the thread; and sending an informational message to a client.
- 6. A method as recited in claim 1 wherein terminating resources and connections associated with the thread further includes deleting references to the thread in a shared memory and clearing memory associated with the multi-threaded process of references to the thread.
- 7. A method as recited in claim 1 wherein terminating resources and connections associated with the thread further includes instructing a polling thread contained in the multi-threaded process to store polling on the thread.
- 8. A method as recited in claim 1 that further includes refusing activation of new threads in the multi-threaded process after the thread has caused the critical signal.
- 9. A method as recited in claim 1 that further includes making a core file of the multi-threaded process at the time the thread caused the critical signal.
- 10. The method as recited in claim 1, wherein the critical signal is sent in response to a signal received from computer hardware associated with an operating system.
- 11. The method as recited in claim 1, wherein the critical signal is received by the thread from an operating system.
- 12. The method as recited in claim 1, wherein the critical signal thread determines from the critical signal that the critical signal thread should terminate resources and connections associated with the particular thread that caused the critical signal.
- 13. The method as recited in claim 1, wherein the multi-threaded process is performed in a multi-threaded operating system.
- 14. The method as recited in claim 1, wherein the critical signal is caused only by the thread in the multi-threaded process.
- 15. The method as recited in claim 1, wherein the critical signal is not caused by threads other than the thread in the multi-threaded process.
- 16. A method as recited in claim 2 wherein initializing the critical signal thread further includes registering operating system signals as critical signals thereby enabling the critical signal thread to detect the registered operating system signals.
- 17. A method as recited in claim 3 further including exiting the critical signal handler thereby allowing the critical signal thread to process a next incoming critical signal.
- 18. The method as recited in claim 12, further comprising:closing a file opened by the thread if the file is not opened by other threads.
- 19. The method as recited in claim 12, further comprising:marking a file as unlocked if the file was locked by the thread and the file was not locked by other threads.
- 20. The method as recited in claim 12, wherein the critical signal handler instructs an input polling thread to no longer poll the thread.
- 21. The method as recited in claim 13, wherein the thread represents a connection between a client and a server, the method further comprising:sending a message by the critical signal handler indicating that the connection has been closed.
- 22. A method of sustaining a multi-threaded process when a thread within the multi-threaded process crashes, the method comprising:organizing a data space for each thread in a plurality of threads in the multi-threaded process such that each data space is substantially independent from the other data spaces; executing a crash thread in the multi-threaded process, the crash thread processing one or more signals from an operating system the signals being associated with to a crashing thread in the multi-threaded process; terminating the crashing thread by the crash thread, thereby releasing system resources and clearing connections associated with the crashing thread; and allowing other threads in the multi-threaded process to continue functioning uncorrupted thereby preventing termination of the entire process.
- 23. A method as recited in claim 22 wherein the data space for each thread further includes a plurality of private structures internal to the thread such that a reduced amount of unused data is maintained by the thread.
- 24. A method as recited in claim 22 wherein executing a crash thread further includes registering critical signals in the process when the process is invoked thereby enabling the detection of the critical signals by the multi-threaded process.
- 25. A method as recited in claim 22 wherein executing a crash thread further includes making a function call to handle a particular critical signal wherein the function is a component of the crash thread.
- 26. A method as recited in claim 22 wherein executing a crash thread further includes reading a next incoming signal from a signal queue.
- 27. A method as recited in claim 22 wherein terminating the crashing thread further includes:terminating all connections associated with the crashing thread; deleting all references in memory to the crashing thread; and closing all files associated with the crashing thread.
- 28. A method as recited in claim 22 wherein terminating the crashing thread further includes instructing an input polling thread contained in the multi-threaded process to discontinue detecting input events directed to the crashing thread.
- 29. The method as recited in claim 22, wherein terminating the crashing thread is performed by the crash thread.
- 30. A method as recited in claim 27 wherein deleting all references in memory to the crashing thread further includes:clearing all data cells in a shared memory used exclusively by the crashing thread; clearing all references to the crashing thread in other non-exclusive data cells in the shared memory; and clearing any references to the crashing thread in a local process memory.
- 31. A computer system having a multi-threaded process capable of executing a plurality of active connection threads, the system comprising:a critical signal thread arranged to detect a critical signal generated externally to the process and to handle termination operations for an offending one of the plurality of active connection threads associated with the critical signal without requiring termination of the entire process in response to the detected critical signal; and a signal handler arranged to delete references to the offending thread in response to the critical signal and discontinue operations between the offending thread and files in the computer system while allowing other active connection threads within the process to continue operation; whereby the computer system is arranged such that when a critical signal is generated for a particular offending active connection thread within the process, the other active connection threads continue operating within the process.
- 32. A computer system as recited in claim 31 wherein the signal handler is contained in the critical signal thread.
- 33. A computer system as recited in claim 31 further comprising a signal register for registering critical signals thereby enabling the critical signal thread to detect and process such critical signals.
- 34. A computer system as recited in claim 31 wherein the computer system includes a plurality of multi-threaded processes, the computer system further comprising a shared memory accessible by the plurality of multi-threaded process wherein the shared memory contains information on each thread in the plurality of threads.
- 35. A computer system as recited in claim 31 further comprising a signal queue arranged to temporarily store incoming signals before they are processed by the critical signal thread.
- 36. A computer system as recited in claim 31 further comprising an input polling thread contained within the process wherein the critical signal thread instructs the input polling thread to discontinue polling for input events directed to the offending thread.
- 37. A computer system as recited in claim 31 further comprising a core file generator arranged to generate a core file when the process receives a critical signal.
- 38. A computer-readable medium containing programming instructions for handling critical signals resulting from the execution of a thread in a multi-threaded process having a critical signal thread, the computer-readable medium comprising computer program code devices configured to cause a computer to execute the steps of:detecting a critical signal caused by a particular thread in a particular multi-threaded process; invoking a critical signal thread to handle the critical signal caused by the particular thread; terminating by the critical signal thread resources and connections associated with the particular thread that caused the critical signal wherein other threads in the particular process are unaffected by the critical signal and the termination of the resources and connections of the particular thread; and allowing other threads in the particular process to remain functional.
- 39. A computer-readable medium as recited in claim 38 further including computer program code devices configured to register operating system signals thereby enabling the critical signal thread to detect the registered signals.
- 40. A computer-readable medium as recited in claim 38 wherein the computer program code devices configured to cause a computer to invoke a critical signal thread to handle the critical signal further includes computer program code devices configured to cause a computer to execute the step of executing a critical signal handler wherein the critical signal handler is a module in the critical signal thread.
- 41. A computer-readable medium as recited in claim 38 wherein the computer program code devices configured to cause a computer to terminate resources and connections associated with the particular thread that caused the critical signal further includes computer program code devices configured to cause a computer to execute the steps of:closing files opened by the particular thread; unlocking files locked by the particular thread; and sending an informational message to a client.
- 42. A computer-readable medium as recited in claim 38 wherein the computer program code devices configured to cause a computer to terminate resources and connections associated with the particular thread that caused the critical signal further include computer program code devices configured to cause a computer to execute the step of deleting references to the particular thread in a shared memory and clearing memory associated with the particular process of any references to the particular thread.
- 43. A computer-readable medium containing programming instructions for maintaining a multi-threaded process when a thread within the process crashes, the computer-readable medium comprising computer program code devices configured to cause a computer to execute the steps of:organizing a data space for each thread in a plurality of threads in the multi-threaded process such that each data space is substantially independent from the other data spaces; executing a crash thread in the multi-threaded process, the crash thread being adapted for processing one or more signals from an operating system the signals being directed to an offending thread in the multi-threaded process; and terminating the offending thread thereby releasing system resources and clearing connections associated with the offending thread; wherein the other threads in the multi-threaded process are not corrupted and can continue functioning thereby preventing termination of the entire process.
- 44. A computer system having a multi-threaded process capable of executing a plurality of active connection threads, the system comprising:a means for detecting a critical signal generated externally to the process and to handle termination operations for an offending one of the plurality of active connection threads associated with the critical signal without requiring termination of the entire process in response to the detected critical signal; and a means for deleting references to the offending thread in response to the critical signal and discontinuing operations between the offending thread and files in the computer system while allowing other active connection threads within the process to continue operation; whereby the computer system is arranged such that when a critical signal is generated for a particular offending active connection thread within the process, the other active connection threads continue operating within the process.
- 45. A computer system as recited in claim 44 further comprising a means for registering critical signals thereby enabling the critical signal thread to detect and process such critical signals.
- 46. A computer system having a multi-threaded process capable of executing a plurality of active connection threads, the system comprising:a means for detecting a critical signal caused by a particular thread in a particular multi-threaded process; a means for invoking a critical signal thread to handle the critical signal caused by the particular thread; and a means for terminating resources and connections associated with the particular thread that caused the critical signal; wherein other threads in the particular process are unaffected by the critical signal and the resulting termination of the resources and connections of the particular thread thereby allowing the other threads in the particular process to remain functional.
- 47. A computer system having a multi-threaded process capable of executing a plurality of active connection threads, the system comprising:a means for organizing a data space for each thread in a plurality of threads such that each data space is substantially independent from the other data spaces; a means for executing a crash thread in the process, the crash thread for processing signals from an operating system directed to an offending thread; and a means for terminating the offending thread thereby releasing system resources and clearing connections associated with the offending thread; wherein the other threads in the multi-threaded process are not corrupted and can continue functioning thereby preventing termination of the entire process.
Parent Case Info
This application is related to U.S. patent application Ser. Nos. 09/067,537, filed on the same date herewith and commonly assigned, entitled “HIGH PERFORMANCE MESSAGE STORE,” 09/067,497, filed on the same date herewith and commonly assigned, entitled “METHOD AND APPARATUS FOR HIGH PERFORMANCE ACCESS TO DATA IN A MESSAGE STORE”, 09/067,546, filed on the same date herewith and commonly assigned, entitled “METHOD AND APPARATUS FOR DETECTING INPUT DIRECTED TO A THREAD IN A MULTI-THREADED PROCESS,” which are incorporated herein by reference.
US Referenced Citations (6)
Number |
Name |
Date |
Kind |
5305455 |
Anschuetz et al. |
Apr 1994 |
A |
5555747 |
Rogers et al. |
Sep 1996 |
A |
5940827 |
Hapner et al. |
Aug 1999 |
A |
6073131 |
Roberti |
Jun 2000 |
A |
6119145 |
Ikeda et al. |
Sep 2000 |
A |
6199992 |
Beall et al. |
Jan 2001 |
B1 |
Non-Patent Literature Citations (1)
Entry |
Crispin, M., “Internet Message Access Protocol,” University of Washington, (1996), pp. 1-93. |