Method and apparatus for handling threads in a data processing system
First Claim
Patent Images
1. A method in a data processing system for managing threads, the method comprising:
- detecting by a processing unit in the data processing system a kernel thread associated with a user thread;
determining by the processing unit that the kernel thread is unneeded by the user thread;
responsive to the kernel thread being unneeded, semi-detaching, by the processing unit, the kernel thread by placing the kernel thread on a semi-detached list and in an unrunnable state concurrent with the user thread, wherein the kernel thread maintains information regarding a same user stack and signal mask of the user thread, and wherein data for the kernel thread remains on the same user stack as data for the user thread in case the user thread later needs the kernel thread, and wherein the threads execute in an operating system of the data processing system; and
responsive to the user thread waking from sleep, removing by the processing unit the kernel thread from the semi-detached list, wherein reattachment to the user thread is unnecessary.
1 Assignment
0 Petitions
Accused Products
Abstract
A system for managing threads. A kernel tread associated with a user thread is detected as being unneeded by the user tread. The kernel thread is semi-detached in which data for the thread does not change stacks in response to the kernel thread being unneeded.
-
Citations
14 Claims
-
1. A method in a data processing system for managing threads, the method comprising:
-
detecting by a processing unit in the data processing system a kernel thread associated with a user thread; determining by the processing unit that the kernel thread is unneeded by the user thread; responsive to the kernel thread being unneeded, semi-detaching, by the processing unit, the kernel thread by placing the kernel thread on a semi-detached list and in an unrunnable state concurrent with the user thread, wherein the kernel thread maintains information regarding a same user stack and signal mask of the user thread, and wherein data for the kernel thread remains on the same user stack as data for the user thread in case the user thread later needs the kernel thread, and wherein the threads execute in an operating system of the data processing system; and responsive to the user thread waking from sleep, removing by the processing unit the kernel thread from the semi-detached list, wherein reattachment to the user thread is unnecessary. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A data processing system for managing threads, the data processing system comprising:
-
a bus system; a communications unit connected to the bus system; a memory connected to the bus system, wherein the memory includes a set of instructions; and a processing unit connected to the bus system, wherein the processing unit executes the set of instructions to perform the following steps; detecting a kernel thread associated with a user thread; determining that the kernel thread is unneeded by the user thread; in response to the kernel thread being unneeded, semi-detaching the kernel thread by placing the kernel thread on a semi-detached list and in an unrunnable state concurrent with the user thread, wherein the kernel thread maintains information regarding a same user stack and signal mask of the user thread, and wherein data for the kernel thread remains on the same user stack as data for the user thread in case the user thread later needs the kernel thread, and wherein the threads execute in an operating system of the data processing system; and in response to the user thread waking from sleep, removing by the processing unit the kernel thread from the semi-detached list, wherein reattachment to the user thread is unnecessary.
-
-
8. A data processing system for managing threads, the data processing system comprising:
-
a bus system; a memory connected to the bus system; detecting means for detecting a kernel thread associated with a user thread; determining means for determining that the kernel thread is unneeded by the user thread; semi-detaching means, responsive to the kernel thread being unneeded, for semi-detaching the kernel thread by placing the kernel thread on a semi-detached list and in an unrunnable state concurrent with the user thread, wherein the kernel thread maintains information regarding a same user stack and signal mask of the user thread, and wherein data for the kernel thread remains on the same user stack as data for the user thread in case the user thread later needs the kernel thread, and wherein the threads execute in an operating system of the data processing system; and removing means, responsive to the user thread waking from sleep, for removing the kernel thread from the semi-detached list, wherein reattachment to the user thread is unnecessary. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A computer program product in a computer readable storage medium for managing threads, the computer program product comprising:
-
first instructions for detecting a kernel thread associated with a user thread; second instructions for determining that the kernel thread is unneeded by the user thread; third instructions, responsive to the kernel thread being unneeded, for semi-detaching the kernel thread by placing the kernel thread on a semi-detached list and in an unrunnable state concurrent with the user thread, wherein the kernel thread maintains information regarding a same user stack and signal mask of the user thread, and wherein data for the kernel thread remains on the same user stack as data for the user thread in case the user thread later needs the kernel thread, and wherein the threads execute in an operating system of a data processing system; and fourth instructions, responsive to the user thread waking from sleep, removing by a processing unit the kernel thread from the semi-detached list, wherein reattachment to the user thread is unnecessary.
-
Specification