# US 2024/0202036 A1 · Unloading interdependent shared libraries

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0202036 A1
- Document ID: US20240202036A1
- Status: Published application
- Kind: A1
- Application number: 18/066,837
- Filed: 2022-12-15
- Published: 2024-06-20
- Earliest claimed: 2022-12-15
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Heng WANG; Xiao Ling CHEN; Yan HUANG; Xin Peng LIU; Zi Yun KANG
- Web page: https://patentgrep.com/patent/US20240202036A1

## CPC

- G06F 9/5033: {considering data affinity}
- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- G06F 9/44521: {Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/5022: {Mechanisms to release resources}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 2009/45562: {Creating, deleting, cloning virtual machine instances}
- G06F 2209/542: Intercept
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Unloading shared resources is described. A shared library correlation table (SLCT) is generated in a mock resource. During a close function, selecting an entry in the SLCT is selected for reducing a reference count of the selected entry in the SLCT, a status of the selected entry based on the reference count is verified, and an associated container of the selected entry is removed from memory when the status of the selected entry indicates the associated container is not a shared resource, thereby avoiding segmentation faults.

## Claims

### Claim 1

A method comprising:
generating, in a mock resource at an interceptor module, a shared library correlation table (SLCT) comprising a reference count for a plurality of resources that comprises at least one of an executable resource and a shared resource;
initiating, for each of the plurality of resources, a status in the SLCT;
during a close function, selecting an entry in the SLCT;
reducing a reference count of the selected entry in the SLCT;
verifying a status of the selected entry based on the reference count; and
causing an associated container of the selected entry to be removed from memory when the status of the selected entry indicates the associated container is not a shared resource.

### Claim 2 (depends on 1)

The method of claim 1, wherein the SLCT further comprises an index number and dependent index numbers for each resource of the plurality of resources, wherein generating the SLCT comprises:
determining a number of associated dependent needed resources for the plurality of resources; and
increasing an associated reference count for each resource of the plurality of resources for each respective associated dependent needed resource.

### Claim 3 (depends on 2)

The method of claim 2, wherein the SLCT further comprises a containerized value, a dependent value, and a container identification for each resource in the SLCT, wherein initiating the status for each of the plurality of resources in the SLCT further comprises:
determining the status from the associated reference count, wherein a respective resource of the plurality of resources is in a loaded state when an associated reference count is above 0, and wherein a respective resource of the plurality of resources is in an unloaded state when an associated reference count is 0; and
determining a containerized value and containerized identification for each resource of the plurality of the plurality of resources.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
receiving a call package to the executable resource in the interceptor module, wherein the call package is provided to the interceptor module by a stack processing module;
determining, from dependent value, a number of dependent resources for a target resource;
comparing a containerized value with the target resource to select a container identification from the SLCT for the target resource; and
providing the call package, the container identification to a session management module for invocation of the call package.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
receiving an open function call for a target resource in the interceptor module, wherein the open function call is provided to the interceptor module by a stack processing module.

### Claim 6 (depends on 5)

The method of claim 5, wherein the interceptor module is in communication with a mapping stub module communicatively coupled to the stack processing module.

### Claim 7 (depends on 6)

The method of claim 6, wherein: the mock resource is stored on the interceptor module.

### Claim 8

A system comprising a memory communicatively coupled to a processor, wherein the processor is configured to perform an operation comprising:
generating, in a mock resource at an interceptor module, a shared library correlation table (SLCT) comprising a reference count for a plurality of resources that comprises at least an executable resource and at least one shared resource;
initiating, for each of the plurality of resources, a status in the SLCT;
during a close function, selecting an entry in the SLCT;
reducing a reference count of the selected entry in the SLCT;
verifying a status of the selected entry based on the reference count; and
causing an associated container of the selected entry to be removed from memory when the status of the selected entry indicates the associated container is not a shared resource.

### Claim 9 (depends on 8)

The system of claim 8, wherein the SLCT further comprises an index number and dependent index numbers for each resource of the plurality of resources, wherein generating the SLCT comprises:
determining a number of associated dependent needed resources for the plurality of resources; and
increasing an associated reference count for each resource of the plurality of resources for each respective associated dependent needed resource.

### Claim 10 (depends on 9)

The system of claim 9, wherein the SLCT further comprises a containerized value, a dependent value, and a container identification for each resource in the SLCT, wherein initiating the status for each of the plurality of resources in the SLCT further comprises:
determining the status from the associated reference count, wherein a respective resource of the plurality of resources is in a loaded state when an associated reference count is above 0, and wherein a respective resource of the plurality of resources is in a unloaded state when an associated reference count is 0; and
determining a containerized value and containerized identification for each resource of the plurality of the plurality of resources.

### Claim 11 (depends on 10)

The system of claim 10, wherein the operation further comprises:
receiving a call package to the executable resource in the interceptor module, wherein the call package is provided to the interceptor module by a stack processing module;
determining, from dependent value, a number of dependent resources for a target resource;
comparing a containerized value with a target resource to select a container identification from the SLCT for the target resource; and
providing the call package, the container identification to a session management module for invocation of the call package.

### Claim 12 (depends on 8)

The system of claim 8, wherein the operation further comprises:
receiving an open function call for a target resource in the interceptor module, wherein the open function call is provided to the interceptor module by a stack processing module.

### Claim 13 (depends on 12)

The system of claim 12, wherein the interceptor module is in communication with a mapping stub module communicatively coupled to the stack processing module.

### Claim 14 (depends on 13)

The system of claim 13, wherein
the mock resource is stored on the interceptor module.

### Claim 15

A computer program product comprising a computer readable program stored on a computer readable storage medium, wherein the computer readable program, when executed on a processor, causes the processor to perform an operation comprising:
generating, in a mock resource at an interceptor module, a shared library correlation table (SLCT) comprising a reference count for a plurality of resources that comprises at least an executable resource and at least one shared resource;
initiating, for each of the plurality of resources, a status in the SLCT;
during a close function, selecting an entry in the SLCT;
reducing a reference count of the selected entry in the SLCT;
verifying a status of the selected entry based on the reference count; and
causing an associated container of the selected entry to be removed from memory when the status of the selected entry indicates the associated container is not a shared resource.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the SLCT further comprises an index number and dependent index numbers for each resource of the plurality of resources, wherein generating the SLCT comprises:
determining a number of associated dependent needed resources for the plurality of resources; and
increasing an associated reference count for each resource of the plurality of resources for each respective associated dependent needed resource.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein the SLCT further comprises a containerized value, a dependent value, and a container identification for each resource in the SLCT, wherein initiating the status for each of the plurality of resources in the SLCT further comprises:
determining the status from the associated reference count, wherein a respective resource of the plurality of resources is in a loaded state when an associated reference count is above 0, and wherein a respective resource of the plurality of resources is in a unloaded state when an associated reference count is 0; and
determining a containerized value and containerized identification for each resource of the plurality of the plurality of resources.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the operation further comprises:
receiving a call package to the executable resource in the interceptor module, wherein the call package is provided to the interceptor module by a stack processing module;
determining, from dependent value, a number of dependent resources for a target resource;
comparing a containerized value with the target resource to select a container identification from the SLCT for the target resource; and
providing the call package, the container identification to a session management module for invocation of the call package.

### Claim 19 (depends on 15)

The computer program product of claim 15, wherein the operation further comprises:
receiving an open function call for a target resource in the interceptor module, wherein the open function call is provided to the interceptor module by a stack processing module.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the interceptor module is in communication with a mapping stub module communicatively coupled to the stack processing module, and
the mock resource is stored on the interceptor module.
