Low-overhead threads in a high-concurrency system
First Claim
1. A method includingsimulating a plurality of dynamically-allocated threads using a single statically-allocated thread;
- and maintaining state information used by each dynamically-allocated thread in variables maintained by said statically-allocated thread;
wherein said statically-allocated thread simulates said plurality of dynamically-allocated threads by using a scheduler to call thread blocks for said plurality of dynamically-allocated threads; and
wherein said thread blocks are stored in a linked list maintained by said statically-allocated thread.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for providing the functionality of dynamically-allocated threads in a multithreaded system, in which the operating system provides only statically-allocated threads. With this functionality, a relatively large number of threads can be maintained without a relatively large amount of overhead (either in memory or processor time), and it remains possible to produce program code without undue complexity. A plurality of dynamically-allocated threads are simulated using a single statically-allocated thread, but with state information regarding each dynamically-allocated thread maintained within the single statically-allocated thread. The single statically-allocated thread includes, for each procedure call that would otherwise introduce a new simulated thread, a memory block including (1) a relatively small procedure call stack for the new simulated thread, and (2) a relatively small collection of local variables and other state information for the new simulated thread.
24 Citations
23 Claims
-
1. A method including
simulating a plurality of dynamically-allocated threads using a single statically-allocated thread; - and
maintaining state information used by each dynamically-allocated thread in variables maintained by said statically-allocated thread;
wherein said statically-allocated thread simulates said plurality of dynamically-allocated threads by using a scheduler to call thread blocks for said plurality of dynamically-allocated threads; and
wherein said thread blocks are stored in a linked list maintained by said statically-allocated thread. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
- and
-
11. Apparatus including a file server system having a single statically-allocated thread including a plurality of simulated dynamically-allocated threads, said statically-allocated thread maintaining variables that maintain state information used by each of said simulated dynamically-allocated threads;
-
wherein said statically-allocated thread simulates said plurality of dynamically-allocated threads by using a scheduler to call thread blocks for said plurality of dynamically-allocated threads; and
wherein said thread blocks are stored in a linked list maintained by said statically-allocated thread. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A method of implementing a plurality of simulated dynamically-allocated threads using a single statically-allocated thread, comprising:
-
using a scheduler implemented by said single statically-allocated thread to call thread blocks for said plurality of simulated dynamically-allocated threads; and
maintaining state information used by each of said plurality of simulated dynamically-allocated threads in variables maintained by said statically-allocated thread;
wherein said thread blocks are stored in a linked list maintained by said statically-allocated thread. - View Dependent Claims (21)
-
-
22. Apparatus including a server that implements a plurality of simulated dynamically-allocated threads using a single statically-allocated thread, comprising:
-
a processor that executes a scheduler implemented by said single statically-allocated thread to call thread blocks for said plurality of simulated dynamically-allocated threads; and
memory that stores state information used by each of said plurality of simulated dynamically-allocated threads in variables maintained by said statically-allocated thread;
wherein said thread blocks are stored in a linked list maintained in said memory by said statically-allocated thread. - View Dependent Claims (23)
-
Specification