Patent ID: 7363438

Claim:
A method for executing threads, comprising: obtaining a first data structure local to a first process, wherein the first data structure stores a plurality of thread references and each of the plurality of thread references is assigned an index value in the first data structure; invoking a first push operation to add a first thread reference to the first data structure, wherein the first push operation triggers an overflow condition associated with the first data structure; activating a second data structure exceeding a size of the first data structure, wherein the second data structure is associated with an index value threshold; copying the plurality of thread references from the first data structure to the second data structure, wherein each of plurality of thread references in the second data structure has the same index value as the corresponding thread reference in the first data structure; inactivating the first data structure after activating the second data structure; adding the first thread reference to the second data structure; invoking a first pop operation to remove the first thread reference from the second data structure, wherein the first pop operation satisfies the index value threshold and triggers initiating the re-activation of the first data structure; re-activating the first data structure after invoking the first pop operation, wherein re-activating the first data structure inactivates the second data structure; and executing a thread referenced by the first thread reference.