Thread coordination during large computer process shutdown
AssigneeSap SE
InventorsRobert Schneider, Roman Vinogradov
Life of this patent
Estimating the term…
Abstract
In an example embodiment, a solution is provided that places all threads under control to prevent a scenario where a thread attempts to access memory that has already been released as part of a large computer system shutdown. While this solution address potential instability caused by a parallel processing shutdown technique, it can also be more broadly applied in any large computer system shutdown process to prevent crashes or other issues.
Claims20
A system comprising:
- at least one hardware processor;
- and
- a computer-readable medium storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising, based on a determination that a computer process is to be shut down:
- preventing each processing thread of a plurality of processing threads from spawning any new processing threads;
- sending a dedicated signal to each processing thread of the plurality of processing threads, the dedicated signal indicating that each processing thread should stop current processing and wait for instructions;
- retrieving information about all processing threads known to an operating system kernel;
- determining whether a total number of all processing threads known to the operating system kernel is equal to a total number of processing threads that received the dedicated signal;
- in response to a determination that the total number of all processing threads known to the operating system kernel is equal to a total number of processing threads that received the dedicated signal, repeating the retrieving information about all processing threads known to the operating system kernel and determining whether the total number of all processing threads known to the operating system kernel has changed;
- and
- in response to a determination that the total number of all processing threads known to the operating system kernel has not changed, instructing all processing threads known to shut down resources of the computer process.
A method comprising, based on a determination that a computer process should be shut down:
- preventing each processing thread of a plurality of processing threads from spawning any new processing threads;
- sending a dedicated signal to each processing thread of the plurality of processing threads, the dedicated signal indicating that each processing thread should stop current processing and wait for instructions;
- retrieving information about all processing threads known to an operating system kernel;
- determining whether a total number of all processing threads known to the operating system kernel is equal to a total number of processing threads that received the dedicated signal;
- in response to a determination that the total number of all processing threads known to the operating system kernel is equal to a total number of processing threads that received the dedicated signal, repeating the retrieving information about all processing threads known to the operating system kernel and determining whether the total number of all processing threads known to the operating system kernel has changed;
- and
- in response to a determination that the total number of all processing threads known to the operating system kernel has not changed, instructing all processing threads known to shut down resources of the computer process.
A non-transitory machine-readable medium storing instructions which, when executed by one or more processors, cause the one or more processors to perform operations comprising based on a determination that a computer process should be shut down:
- preventing each processing thread of a plurality of processing threads from spawning any new processing threads;
- sending a dedicated signal to each processing thread of the plurality of processing threads, the dedicated signal indicating that each processing thread should stop current processing and wait for instructions;
- retrieving information about all processing threads known to an operating system kernel;
- determining whether a total number of all processing threads known to the operating system kernel is equal to a total number of processing threads that received the dedicated signal;
- in response to a determination that the total number of all processing threads known to the operating system kernel is equal to a total number of processing threads that received the dedicated signal, repeating the retrieving information about all processing threads known to the operating system kernel and determining whether the total number of all processing threads known to the operating system kernel has changed;
- and
- in response to a determination that the total number of all processing threads known to the operating system kernel has not changed, instructing all processing threads known to shut down resources of the computer process.
Dependencies are inferred from the claim text.