System and method for safing of asynchronous interrupts
AssigneeInternational Business Machines Corporation
InventorsTsuneo Horiguchi, Eric L. Porter, Richard Tallman
Life of this patent
Estimating the term…
Abstract
Processing of an asynchronous signal directed to a thread comprising a software routine executing in a computer system such that data consistency is maintained is discussed. Such processing proceeds by determining whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data. The routine is asynchronously interrupted and the signal is processed immediately if the routine is signal safe. If the routine is not signal safe, then the routine is not asynchronously interrupted and processing of the signal is deferred to a time when the signal may be processed without possibly causing inconsistency of data.
Claims14
A method of processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system such that data consistency is maintained, comprising the steps of:
- (1) determining one or more characteristics of the routine;
- (2) determining from said one or more characteristics of the routine whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data without requiring the use of a locking mechanism;
- (3) asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- (4) deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data.
A method of processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system such that data consistency is maintained, comprising the steps of:
- (1) determining whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data, step (1) further comprising the steps of:
- (a) determining whether the routine is part of a user written application program;
- (b) determining whether the routine is capable of enabling and disabling asynchronous interrupts;
- (c) concluding that the routine is signal safe if it is determined that the routine is part of a user written application program and the routine is capable of enabling and disabling asynchronous interrupts;
- (d) concluding that the routine is not signal safe if it is determined that the routine is not part of a user written application program;
- and
- (e) concluding that the routine is not signal safe if it is determined that the routine is not capable of enabling and disabling asynchronous interrupts;
- (2) asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- (3) deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data.
A method of processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system, having an invocation stack comprising a plurality of stack frames, the stack frames associated with routines executing in the computer system, and in which a stub routine in maintained in the computer system, the stub routine when invoked in the computer system enabling the computer system to process any deferred signals, such that data consistency is maintained, comprising the steps of:
- (1) determining whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data;
- (2) asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- (3) deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data, step (3) further comprising the steps of:
- (a) searching for a signal sate routine associated with one of the stack frames in the invocation stack;
- and
- (b) if a signal safe routine is found in step (a), inserting a new stack frame associated with the stub routine into a return mechanism of the invocation stack such that the stub routine is invoked just prior to returning to the signal safe routine found in step (a).
A system for processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system such that data consistency is maintained, comprising:
- characteristic determining means for determining one or more characteristics of the routine;
- signal safe determining means for determining from said one or more characteristics of the routine whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data without requiring the use of a locking mechanism;
- means for asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- deferring means for deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data.
A system for processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system such that data consistency is maintained, comprising:
- signal safe determining means for determining whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data, wherein said signal safe determining means further comprises:
- means for determining whether the routine is part of a user written application program;
- conformance determining means for determining whether the routine is capable of enabling and disabling asynchronous interrupts;
- means for concluding that the routine is signal safe if it is determined that the routine is part of a user written application program and the routine is capable of enabling and disabling asynchronous interrupts;
- means for concluding that the routine is not signal safe if it is determined that the routine is not part of a user written application program;
- and
- means for concluding that the routine is not signal safe if it is determined that the routine is not capable of enabling and disabling asynchronous interrupts;
- means for asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- deferring means for deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data.
A system for processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system, having an invocation stack comprising a plurality of stack frames, the stack frames associated with routines executing in the computer system, and in which a stub routine in maintained in the computer system, the stub routine when invoked in the computer system enabling the computer system to process any deferred signals, such that data consistency is maintained, comprising:
- signal safe determining means for determining whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data;
- means for asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- deferring means for deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data, wherein said deferring means further comprises:
- searching means for searching for a signal safe routine associated with one of the stack frames in the invocation stack:
- and
- means for inserting, if a signal safe routine is found by said searching means, a new stack frame associated with the stub routine into a return mechanism of the invocation stack, such that the stub routine is invoked just prior to returning to the signal safe routine found by said searching means.
A method of processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system such that data consistency is maintained, comprising the steps of:
- (1) determining whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data, step (1) further comprising the steps of:
- (a) determining whether the routine is from a run-time software library;
- and
- (b) concluding that the routine is not signal safe if it is determined that the routine is from a run-time software library;
- (2) asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- (3) deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data.
A system for processing an asynchronous signal directed to a thread comprising a software routine executing in a computer system such that data consistency is maintained, comprising:
- signal safe determining means for determining whether the routine is signal safe such that processing of the routine may be interrupted in order to process the signal without possibly causing inconsistency of data, wherein said signal safe determining means further comprises:
- means for determining whether the routine is from a run-time software library;
- and
- means for concluding that the routine is not signal safe if it is determined that the routine is from a run-time software library;
- means for asynchronously interrupting the routine and processing the signal immediately if the routine is signal safe;
- and
- deferring means for deferring processing of the signal if the routine is not signal safe to a time when the signal may be processed without possibly causing inconsistency of data.
Dependencies are inferred from the claim text.