Patent ID: 7346753

Claim:
A method of executing threads comprising: obtaining a first circular array local to a first process, wherein the first circular array is associated with a first minimum bottom value and stores a plurality of thread references; invoking a first push operation to add a first thread reference to the first circular array, wherein the first push operation triggers an overflow condition associated with the first circular array; allocating a second circular array exceeding a size of the first circular array, wherein the second circular array is associated with a shrink operation and a second minimum bottom value; copying the plurality of thread references from the first circular array to the second circular array; adding the first thread reference to the second circular array; invoking a first pop operation to remove a second thread reference from the second circular array; invoking the shrink operation after invoking the first pop operation to activate the first circular array, wherein invoking the shrink operation comprises copying a third thread reference with an index value exceeding the second minimum bottom value from the second circular array to the first circular array; and executing a thread referenced by the second thread reference.