← Back to Patent Explorer
US5515538A Expired / Lapsed US ⏱️ 0.0 years remaining

Apparatus and method for interrupt handling in a multi-threaded operating system kernel

Assignee: Sun Microsystems Inc
•
Filing: 1994-03-29
•
Granted: 1996-05-07
•
Expires: 2014-03-29
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract The disclosed invention is a method and apparatus for use in handling interrupts in a data processing system where the kernel is preemptible, has real-time scheduling ability, and which supports multithreading and tightly-coupled multiprocessors. The invention more specifically provides a technique for servicing interrupts in a processor by means of kernel interrupt handler threads which service the interrupt from start to finish. For efficiency, the interrupt handler threads do not require a complete context switch unless the interrupt handler thread is blocked. The kernel makes use of preprepared interrupt handler threads for additional efficiency, and these interrupt handler threads are not subjected to inordinate delays caused by the phenomenon of interrupt priority inversion if they do become blocked.

Inventors

  • 👤 Steven R. Kleiman

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-29 04:25
CPC Classifications
G; G06; G06F; G06F9/00; G06F9/06; G06F9/46; G06F9/48; G06F9/4806; G06F9/4812; G06F9/52

Claims Analysis

Total Claims: 28
Claim 1
Independent Claim 138 words
In a computer system having a central processing unit (CPU), with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; and c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt, said interrupt service being completed without the use of a non-thread routine, said non-thread routine being one which is restricted to be runnable in a non-thread environment, said first interrupt handler thread synchronization primitives in lieu of locking-out other interrupts.
Claim 2
Dependent Claim 138 words
In a computer system having a central processing unit (CPU), with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; and c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt, said interrupt service being completed without the use of a non-thread routine, said non-thread routine being one which is restricted to be runnable in a non-thread environment, said first interrupt handler thread synchronization primitives in lieu of locking-out other interrupts.
Claim 3
Dependent Claim 39 words
The method of claim 1 comprising the additional step of transferring execution control to a highest priority thread which is waiting to run, said transfer of execution control occurring upon completion of processing by said first interrupt handler thread.
Claim 4
Dependent Claim 25 words
The method of claim 1 further comprising the additional step of executing said first interrupt handler thread without saving the context of said interrupted thread.
Claim 5
Dependent Claim 84 words
The method according to claim 1 further comprising the steps of: a) recognizing that a condition has occurred wherein a second thread blocks the further execution of said first interrupt handler thread; b) performing by said blocked first interrupt handler thread the operations necessary to save a complete context of said interrupted thread; c) putting to sleep said blocked first interrupt handler thread until said blocking condition is cleared; and d) transferring execution control to a highest priority thread which is waiting to run.
Claim 6
Dependent Claim 37 words
The method according to claim 4 comprising the additional step of transferring by said blocked interrupt handler thread a dispatching priority level of said blocked interrupt handler thread to the second thread that is causing the block.
Claim 7
Dependent Claim 18 words
The method according to claim 1 wherein said first interrupt handler thread is a pre-prepared interrupt handler thread.
Claim 8
Dependent Claim 20 words
The method according to claim 1 wherein said computer system is a tightly-coupled multi-processor system having a plurality of CPUs.
Claim 9
Dependent Claim 168 words
A computer system having a CPU, with at least one executing thread which has a context, said at least one executing thread being processed by said CPU, said computer system comprising: a) a computer containing a first interrupt recognition mechanism for recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) a first interrupt control mechanism, coupled to said first interrupt recognition mechanism for transferring execution control from the interrupted thread to a machine instruction corresponding to said first external interrupt; and c) an interrupt processing mechanism, coupled to said first interrupt control mechanism for activating a first interrupt handler thread to execute an interrupt service related to said first interrupt, said interrupt service being completed without the use of a non-thread routine, said non-thread routine being one which is restricted to be runnable in a non-thread environment, said first interrupt handler thread using thread synchronization primitives in lieu of locking-out other interrupts.
Claim 10
Dependent Claim 168 words
A computer system having a CPU, with at least one executing thread which has a context, said at least one executing thread being processed by said CPU, said computer system comprising: a) a computer containing a first interrupt recognition mechanism for recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) a first interrupt control mechanism, coupled to said first interrupt recognition mechanism for transferring execution control from the interrupted thread to a machine instruction corresponding to said first external interrupt; and c) an interrupt processing mechanism, coupled to said first interrupt control mechanism for activating a first interrupt handler thread to execute an interrupt service related to said first interrupt, said interrupt service being completed without the use of a non-thread routine, said non-thread routine being one which is restricted to be runnable in a non-thread environment, said first interrupt handler thread using thread synchronization primitives in lieu of locking-out other interrupts.
Claim 11
Dependent Claim 35 words
The computer system as recited in claim 8 further comprising a second interrupt control mechanism, coupled to said interrupt processing mechanism for transferring execution control to a highest priority thread that is waiting to run.
Claim 12
Dependent Claim 125 words
The computer system as recited in claim 9 further comprising: a) a second interrupt recognition mechanism portion of said CPU, for recognizing that a condition has occurred wherein a second thread blocks further execution of said first interrupt handler thread; b) a first processor device, coupled to said second interrupt recognition mechanism, for performing by said blocked first interrupt handler thread, operations necessary to save a complete context of said interrupted thread; c) a second processor device, coupled to said first processor device, for putting to sleep said blocked first interrupt handler thread until said blocking condition is cleared; and d) a first transfer device, coupled to said second processor device, for transferring execution control to a highest priority thread that is waiting to run.
Claim 13
Dependent Claim 48 words
The computer system recited in claim 10 further comprising a second transfer device coupled to said second processor device, for transferring by said blocked first interrupt handler thread a dispatching priority level of said blocked first interrupt handler thread to the second thread that is causing said block.
Claim 14
Dependent Claim 34 words
The computer system as recited in claim 8 further comprising a processing mechanism, coupled to said interrupt processing mechanism, for executing said first interrupt handler thread without saving the context of said interrupted thread.
Claim 15
Dependent Claim 19 words
The computer system recited in claim 8 wherein said first interrupt handler thread is a pre-prepared interrupt handler thread.
Claim 16
Dependent Claim 21 words
The computer system recited in claim 8 wherein said computer system is a tightly-coupled multi-processor system having a plurality of CPUs.
Claim 17
Dependent Claim 172 words
In a computer system having a CPU, with at least one executing thread which has a context, a method performed of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; c) activating a first interrupt handler thread; and d) executing said first interrupt handler thread to perform an interrupt service related to said first external interrupt without saving said context of said interrupted thread if said first interrupt handler thread is not itself preempted before completing said interrupt service, said first interrupt handler thread using thread synchronization primitives in lieu of locking-out other interrupts whereby processing time is saved by not having to execute a context switch for every interrupt service and whereby other interrupts are not locked out for an unbounded period of time.
Claim 18
Dependent Claim 172 words
In a computer system having a CPU, with at least one executing thread which has a context, a method performed of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; c) activating a first interrupt handler thread; and d) executing said first interrupt handler thread to perform an interrupt service related to said first external interrupt without saving said context of said interrupted thread if said first interrupt handler thread is not itself preempted before completing said interrupt service, said first interrupt handler thread using thread synchronization primitives in lieu of locking-out other interrupts whereby processing time is saved by not having to execute a context switch for every interrupt service and whereby other interrupts are not locked out for an unbounded period of time.
Claim 19
Dependent Claim 189 words
A computer system having a CPU, with at least one executing thread which has a context, said computer system comprising: a) a computer containing a first interrupt recognizing mechanism for recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) a first interrupt control mechanism, coupled to said computer for transferring execution control from said interrupted thread to a machine instruction corresponding to said first interrupt; c) an interrupt processing mechanism, coupled to said first interrupt control mechanism for activating a first interrupt handler thread; and d) an interrupt handler thread mechanism, coupled to said interrupt processing mechanism for executing said first interrupt handler thread without saving said context of said interrupted thread if said first interrupt handier thread is not itself preempted before completing said interrupt service, said first interrupt handler thread using thread synchronization primitives in lieu of locking-out other interrupts whereby processing time is saved by not having to execute a context switch for every interrupt service and whereby other interrupts are not locked out for an unbounded period of time.
Claim 20
Dependent Claim 189 words
A computer system having a CPU, with at least one executing thread which has a context, said computer system comprising: a) a computer containing a first interrupt recognizing mechanism for recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) a first interrupt control mechanism, coupled to said computer for transferring execution control from said interrupted thread to a machine instruction corresponding to said first interrupt; c) an interrupt processing mechanism, coupled to said first interrupt control mechanism for activating a first interrupt handler thread; and d) an interrupt handler thread mechanism, coupled to said interrupt processing mechanism for executing said first interrupt handler thread without saving said context of said interrupted thread if said first interrupt handier thread is not itself preempted before completing said interrupt service, said first interrupt handler thread using thread synchronization primitives in lieu of locking-out other interrupts whereby processing time is saved by not having to execute a context switch for every interrupt service and whereby other interrupts are not locked out for an unbounded period of time.
Claim 21
Dependent Claim 135 words
In a computer system having a CPU, with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction executable by a computer, corresponding to said first external interrupt; c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt; and d) upon completion of said interrupt service related to said first external interrupt, transferring execution control to a highest priority thread that is waiting to run, instead of transferring execution control back to said interrupted thread.
Claim 22
Dependent Claim 135 words
In a computer system having a CPU, with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction executable by a computer, corresponding to said first external interrupt; c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt; and d) upon completion of said interrupt service related to said first external interrupt, transferring execution control to a highest priority thread that is waiting to run, instead of transferring execution control back to said interrupted thread.
Claim 23
Dependent Claim 124 words
In a computer system having a CPU, with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt; and d) allowing said interrupt handler thread to use thread synchronization primitives in lieu of locking-out other interrupts thereby being adapted to be preempted by threads with higher dispatching priorities.
Claim 24
Dependent Claim 124 words
In a computer system having a CPU, with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt; and d) allowing said interrupt handler thread to use thread synchronization primitives in lieu of locking-out other interrupts thereby being adapted to be preempted by threads with higher dispatching priorities.
Claim 25
Dependent Claim 244 words
In a computer system having a central processing unit (CPU), with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt, said first interrupt handler thread having its own program counter and context and adapted to use thread synchronization primitives in lieu of locking-out other interrupts, said first interrupt handler thread executing said interrupt service without saving said context of said interrupted thread thereby saving process or time; d) recognizing that a condition has occurred wherein a second thread blocks the further execution of said first interrupt handler thread; e) performing by said blocked first interrupt handler thread operations necessary to save said context of said interrupted thread and transferring a dispatching priority level of said blocked interrupt handier thread to the second thread that is causing the block; f) putting to sleep said blocked first interrupt handler thread until said blocking condition is cleared; and g) transferring execution control to a highest priority thread which is waiting to run instead of returning control to said interrupted thread.
Claim 26
Dependent Claim 244 words
In a computer system having a central processing unit (CPU), with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer, comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt, said first interrupt handler thread having its own program counter and context and adapted to use thread synchronization primitives in lieu of locking-out other interrupts, said first interrupt handler thread executing said interrupt service without saving said context of said interrupted thread thereby saving process or time; d) recognizing that a condition has occurred wherein a second thread blocks the further execution of said first interrupt handler thread; e) performing by said blocked first interrupt handler thread operations necessary to save said context of said interrupted thread and transferring a dispatching priority level of said blocked interrupt handier thread to the second thread that is causing the block; f) putting to sleep said blocked first interrupt handler thread until said blocking condition is cleared; and g) transferring execution control to a highest priority thread which is waiting to run instead of returning control to said interrupted thread.
Claim 27
Dependent Claim 186 words
In a computer system having a central processing unit(CPU), with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; and c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt, wherein said first interrupt handler thread is a pre-prepared interrupt handler thread thereby saving processor time, said pre-prepared interrupt handler thread having a data structure and storage associated with a thread already set up but said pre-prepared interrupt handler thread being not runnable as a separate thread until said first external interrupt occurs which causes said activation of said first interrupt handler thread, whereby said use of said pre-prepared interrupt handler thread saves processing time needed to set up a data structure and storage for an interrupt handler thread.
Claim 28
Dependent Claim 186 words
In a computer system having a central processing unit(CPU), with at least one executing thread which has a context, a method of processing interrupts to said CPU, performed by a computer comprising the steps of: a) recognizing a first external interrupt of said CPU, said first external interrupt causing said at least one executing thread to become an interrupted thread; b) transferring execution control from said interrupted thread to a machine instruction corresponding to said first external interrupt; and c) activating a first interrupt handler thread to execute an interrupt service related to said first external interrupt, wherein said first interrupt handler thread is a pre-prepared interrupt handler thread thereby saving processor time, said pre-prepared interrupt handler thread having a data structure and storage associated with a thread already set up but said pre-prepared interrupt handler thread being not runnable as a separate thread until said first external interrupt occurs which causes said activation of said first interrupt handler thread, whereby said use of said pre-prepared interrupt handler thread saves processing time needed to set up a data structure and storage for an interrupt handler thread.

References Cited (Backward Citations)

US4584644A Cited
US5182811A Cited
US5179702A Cited
US5283904A Cited
US5247675A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1999-05-07 1999-11-06 2000-05-07 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2003-05-07 2003-11-06 2004-05-07 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2007-05-07 2007-11-06 2008-05-07 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag