Simulating shared code thread modules with shared code fibers
AssigneeTandem Computers Incorporated
InventorsLarry W. Emlich, Srini Brahmaroutu
Life of this patent
Estimating the term…
Abstract
A computer program product simulates shared code threads with Windows NT fibers. Computer code is included for reusing shared code threads which complete.
Claims5
A computer program product to be executed on a computer including a central processing unit (CPU) and memory, with operating system code, user program code, and a shared code module stored in memory, with the computer for executing the user program stored in memory, and with the operating system for preemptively scheduling operating system threads of execution and implementing subsets of fibers for each thread, where the fibers are not scheduled by operating system, and with the user program originally running as an initial thread scheduled by the operating system, and with the computer product including:
- a computer usable storage structure having executable program code embodied therein, with said program coding including:
- computer program code for implementing an initialize routine for converting the initial operating system thread to a fiber designated an initial shared code thread;
- computer program code for implementing a create routine for creating additional fibers as shared code threads, where all shared code threads are fibers which are a subset of a single parent operating system thread and for creating a structure in memory representing each shared code thread, with the structure including indications of a thread address specifying an address of the shared code thread utilized by the operating system and of the user-specified procedure;
- computer program code implementing a start program utilized with threads, with the start program called by the operating system when a thread is scheduled for CPU time, with the start program calling a main function defining the functionality of the shared code thread and calling a thread afterlife function when the main program returns to the calling start program so that the start program never returns to cause the parent thread to exit prematurely, and with the start program including program code for:
- executing said thread afterlife program, subsequent to the main program returning, which determines whether the specified thread is to be reused or deleted when the user-specified program returns.
Dependencies are inferred from the claim text.