Patent US5802368A successfully refreshed from Google Patents.
← Back to Patent Explorer
US5802368A Expired / Lapsed US ⏱️ 0.0 years remaining

Dynamic Library Task Switching

Assignee: International Business Machines Corp
•
Filing: 1995-09-29
•
Granted: 1998-09-01
•
Expires: 2015-09-29
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A method and apparatus for providing per-instance data memory in a dynamic link library (DLL) linked to multiple tasks or to multiple instances of one task in the context of an operating system that does not provide such a feature. The invention includes providing a task switch enhancer DLL that allocates and manages a memory segment to store per-instance data of a DLL for a task as a substitute for an original per-instance data segment for that task.

Inventors

  • 👤 Kenneth B. Grigsby
  • 👤 Aleksander L. Smundak

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-04 11:22
CPC Classifications
G; G06; G06F; G06F9/00; G06F9/06; G06F9/46; G06F9/48; G06F9/4806; G06F9/4843; G06F9/44; G06F9/445; G06F9/44557; G06F9/44563; G06F9/461; G06F9/44521

Claims Analysis

Total Claims: 9
Claim 1
Independent Claim 446 words
A method for providing per-instance data memory in a dynamic link library (DLL) having multiple segments including a segment containing global variables, the DLL being loaded in a random access memory (RAM) address space both as part of a first task and as part of a second task loaded in the RAM address space simultaneously, in a computer having memory management hardware including a local descriptor table (LDT) to map selectors to RAM base addresses, the computer running an operating system that uses a single LDT that is shared among the operating environment and all applications and that loads the DLL so that the segment containing global variables is initially shared by each task accessing the DLL, the method comprising: providing a task switch enhancer DLL (the TSE); providing in the TSE a DLL registration routine to register a DLL with the TSE when the DLL is loaded; providing in the particular DLL a call to the DLL registration routine; providing in the TSE a task registration routine to register a task with the TSE when the task is started; providing in the first task and in the second task a call to the task registration routine; providing in the TSE a routine requesting the operating system to provide the TSE a switching notification whenever execution of any task is about to begin or end and whenever any task is about to cease to exist; providing in the TSE a segment allocation routine for allocating a memory segment for storing per-instance data of a DLL for a task, which allocated segment is a substitute for an original per-instance data segment for that task, the original segment being referenced through a selector in the particular DLL referencing an LDT entry, the segment allocation routine maintaining a substitute base address being a base address for the allocated segment in the LDT entry and maintaining an original base address being the original base address of the original segment in the LDT entry; calling the TSE segment allocation routine for a per-instance data segment of the particular DLL for the first task during initialization of the first task and calling the TSE segment allocation routine for a per-instance data segment of the particular DLL for the second task during initialization of the second task; providing in the TSE a base address setup routine to store in the LDT entry the substitute base address of a per-instance segment of a task before that task begins execution; and invoking the base address setup routine for the substitute base address for the first task in response to a switching notification received by the TSE that the first task is about to begin execution.
Claim 2
Independent Claim 446 words
A method for providing per-instance data memory in a dynamic link library (DLL) having multiple segments including a segment containing global variables, the DLL being loaded in a random access memory (RAM) address space both as part of a first task and as part of a second task loaded in the RAM address space simultaneously, in a computer having memory management hardware including a local descriptor table (LDT) to map selectors to RAM base addresses, the computer running an operating system that uses a single LDT that is shared among the operating environment and all applications and that loads the DLL so that the segment containing global variables is initially shared by each task accessing the DLL, the method comprising: providing a task switch enhancer DLL (the TSE); providing in the TSE a DLL registration routine to register a DLL with the TSE when the DLL is loaded; providing in the particular DLL a call to the DLL registration routine; providing in the TSE a task registration routine to register a task with the TSE when the task is started; providing in the first task and in the second task a call to the task registration routine; providing in the TSE a routine requesting the operating system to provide the TSE a switching notification whenever execution of any task is about to begin or end and whenever any task is about to cease to exist; providing in the TSE a segment allocation routine for allocating a memory segment for storing per-instance data of a DLL for a task, which allocated segment is a substitute for an original per-instance data segment for that task, the original segment being referenced through a selector in the particular DLL referencing an LDT entry, the segment allocation routine maintaining a substitute base address being a base address for the allocated segment in the LDT entry and maintaining an original base address being the original base address of the original segment in the LDT entry; calling the TSE segment allocation routine for a per-instance data segment of the particular DLL for the first task during initialization of the first task and calling the TSE segment allocation routine for a per-instance data segment of the particular DLL for the second task during initialization of the second task; providing in the TSE a base address setup routine to store in the LDT entry the substitute base address of a per-instance segment of a task before that task begins execution; and invoking the base address setup routine for the substitute base address for the first task in response to a switching notification received by the TSE that the first task is about to begin execution.
Claim 3
Dependent Claim 47 words
The method of claim 1, further comprising: in response to a switching notification received by the TSE, storing the original base address in the LDT entry for the per-instance segment of the particular DLL when no task is using that particular DLL is about to begin execution.
Claim 4
Dependent Claim 40 words
The method of claim 1, further comprising: in response to a switching notification received by the TSE, linking the TSE to another TSE registered task if the TSE is linked to a task that is about to cease to exist.
Claim 5
Dependent Claim 37 words
The method of claim 1, where: the operating system is selected from the group consisting of Microsoft® Windows 3.1 and Microsoft® Windows 3.11; and the computer is based on a microprocessor compatible with the Intel® 80386 microprocessor.
Claim 6
Dependent Claim 321 words
In the context of a multitasking operating system providing for the loading of a dynamic link library (DLL) having a segment containing global variables in a random access memory (RAM) address space and the linking of the DLL to multiple tasks loaded in the RAM address space simultaneously, the operating system using a single local descriptor table (LDT) to map selectors to RAM base addresses the LDT being shared among the operating environment and all applications, the operating system operating to load the DLL so that the segment containing global variables is initially shared by each task accessing the DLL, a kit for providing per-instance data memory for a particular DLL loaded both as part of a first task and as part of a second task, the kit comprising: a task switch enhancer DLL (the TSE) including a DLL registration routine to register a DLL with the TSE when the DLL is loaded; a task registration routine to register a task with the TSE when the task is started; a routine requesting the operating system to provide the TSE a switching notification whenever execution of any task is about to begin or end and whenever any task is about to cease to exist; a segment allocation routine for allocating a memory segment for storing per-instance data of a DLL for a task, which allocated segment is a substitute for an original per-instance data segment for that task, the original segment being referenced through a selector in the particular DLL referencing an LDT entry, the segment allocation routine maintaining a substitute base address being a base address for the allocated segment in the LDT entry and maintaining an original base address being the original base address of the original segment in the LDT entry; and a base address setup routine to store in the LDT entry the substitute base address of a per-instance segment of a task before that task begins execution.
Claim 7
Dependent Claim 321 words
In the context of a multitasking operating system providing for the loading of a dynamic link library (DLL) having a segment containing global variables in a random access memory (RAM) address space and the linking of the DLL to multiple tasks loaded in the RAM address space simultaneously, the operating system using a single local descriptor table (LDT) to map selectors to RAM base addresses the LDT being shared among the operating environment and all applications, the operating system operating to load the DLL so that the segment containing global variables is initially shared by each task accessing the DLL, a kit for providing per-instance data memory for a particular DLL loaded both as part of a first task and as part of a second task, the kit comprising: a task switch enhancer DLL (the TSE) including a DLL registration routine to register a DLL with the TSE when the DLL is loaded; a task registration routine to register a task with the TSE when the task is started; a routine requesting the operating system to provide the TSE a switching notification whenever execution of any task is about to begin or end and whenever any task is about to cease to exist; a segment allocation routine for allocating a memory segment for storing per-instance data of a DLL for a task, which allocated segment is a substitute for an original per-instance data segment for that task, the original segment being referenced through a selector in the particular DLL referencing an LDT entry, the segment allocation routine maintaining a substitute base address being a base address for the allocated segment in the LDT entry and maintaining an original base address being the original base address of the original segment in the LDT entry; and a base address setup routine to store in the LDT entry the substitute base address of a per-instance segment of a task before that task begins execution.
Claim 8
Dependent Claim 75 words
The method of claim 1, wherein the step of providing in the TSE a segment allocation routine further comprises: allocating a block of memory of the same size as the original data segment referenced by the selector; copying the contents of the original data segment into the allocated block of memory; and maintaining the original selector and a selector of the allocated block of memory in a list of selector pairs used by the task.
Claim 9
Dependent Claim 69 words
The kit of claim 5, wherein the TSE allocates a block of memory of the same size as the original data segment referenced by the selector, the contents of the original data segment being copied into the allocated block of memory, and the original selector and a selector of the allocated block of memory in a list of selector pairs used by the task are maintained by the TSE.

References Cited (Backward Citations)

EP0315493A2 Cited
US5608898A Cited
US5247681A Cited
US5255379A Cited
US5365606A Cited
US5596755A Cited
US5530858A Cited
US5541853A Cited
US5410698A Cited
US5517651A Cited
US5581768A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2001-08-31 2002-03-02 2002-09-01 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2005-08-31 2006-03-02 2006-09-01 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2009-08-31 2010-03-02 2010-09-01 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag