# US 2012/0254883 A1 · Dynamically switching the serialization method of a data structure

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

- Number: US 2012/0254883 A1
- Document ID: US20120254883A1
- Status: Published application
- Kind: A1
- Application number: 13/072,953
- Filed: 2011-03-28
- Published: 2012-10-04
- Earliest claimed: 2011-03-28
- Assignees: International Business Machines Corporation
- Inventors: STEPHANIE HUI-AN LEE; David L. Levish
- Web page: https://patentgrep.com/patent/US20120254883A1

## CPC

- G06F 9/528: {by using speculative mechanisms}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the invention comprise a method for dynamically switching a serialization method of a data structure. If use of the serialization mechanism is desired, an instruction to obtain the serialization mechanism is received. If use of the serialization mechanism is not desired and if the serialization mechanism is in use, an instruction to obtain the serialization mechanism is received. If use of the serialization mechanism is not desired and if the serialization mechanism is not in use, an instruction to access the data structure without obtaining the serialization mechanism is received.

## Claims

### Claim at position 1

1-9. (canceled)

### Claim 10

A system for dynamically switching a serialization method of a data structure, the method being implemented by a computer, the system comprising:
a processor configured for (a) if use of a serialization mechanism is desired, obtaining the serialization mechanism; (b) if use of the serialization mechanism is not desired, determining whether the serialization mechanism is in use; (c) if use of the serialization mechanism is not desired and if the serialization mechanism is in use, obtaining the serialization mechanism before accessing the data structure; and (d) if use of the serialization mechanism is not desired and if the serialization mechanism is not in use, accessing the data structure without obtaining the serialization mechanism.

### Claim 11 (depends on 10)

The system of claim 10, wherein determining whether the serialization mechanism is in use comprises checking a status of a serialization mode indicator.

### Claim 12 (depends on 10)

The system of claim 10, wherein the processor is further configured for, if use of the serialization mechanism is not desired and if the serialization mechanism is not in use, incrementing a counter for tracking a number of tasks being serialized without using the serialization mechanism prior to accessing the data structure without obtaining the serialization mechanism.

### Claim 13 (depends on 12)

The system of claim 12, wherein the processor is further configured for decrementing the counter after accessing the data structure.

### Claim 14 (depends on 12)

The system of claim 12, wherein the processor is further configured for determining again whether the serialization mechanism is in use after incrementing the counter and prior to accessing the data structure without obtaining the serialization mechanism.

### Claim 15 (depends on 10)

The system of claim 10, wherein the processor is further configured for, if use of the serialization mechanism is desired, (i) setting a serialization mode indicator to indicate that the serialization mechanism is in use, (ii) determining that a counter for tracking a number of tasks being serialized without using the serialization mechanism is set to zero, and (iii) releasing the serialization mechanism after the counter has been determined to be set to zero.

### Claim 16 (depends on 10)

The system of claim 10, wherein the processor is further configured for, if use of the serialization mechanism is not desired and if the serialization mechanism is in use, determining that a counter for tracking a number of tasks being serialized without using the serialization mechanism is set to zero prior to accessing the data structure.

### Claim 17 (depends on 16)

The system of claim 16, wherein the processor is further configured for determining again whether the serialization mechanism is in use after determining that the counter is set to zero and prior to accessing the data structure.

### Claim 18 (depends on 10)

The system of claim 10, wherein the processor is further configured for, if use of the serialization mechanism is no longer desired, (i) obtaining the serialization mechanism, (ii) setting a serialization mode indicator to indicate that the serialization mechanism is not in use, and (iii) releasing the serialization mechanism.

### Claim 19

A computer program product for dynamically switching a serialization method of a data structure, the computer program product comprising a computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:
computer readable program code configured for, if use of a serialization mechanism is desired, obtaining the serialization mechanism;
computer readable program code configured for, if use of the serialization mechanism is not desired, determining whether the serialization mechanism is in use;
computer readable program code configured for, if use of the serialization mechanism is not desired and if the serialization mechanism is in use, obtaining the serialization mechanism before accessing the data structure; and
computer readable program code configured for, if use of the serialization mechanism is not desired and if the serialization mechanism is not in use, accessing the data structure without obtaining the serialization mechanism.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein determining whether the serialization mechanism is in use comprises checking a status of a serialization mode indicator.

### Claim 21 (depends on 19)

The computer program product of claim 19, further comprising:
computer readable program code configured for, if use of the serialization mechanism is not desired and if the serialization mechanism is not in use, incrementing a counter for tracking a number of tasks being serialized without using the serialization mechanism prior to accessing the data structure without obtaining the serialization mechanism.

### Claim 22 (depends on 21)

The computer program product of claim 21, further comprising:
computer readable program code configured for decrementing the counter after accessing the data structure.

### Claim 23 (depends on 21)

The computer program product of claim 21, further comprising:
computer readable program code configured for determining again whether the serialization mechanism is in use after incrementing the counter and prior to accessing the data structure without obtaining the serialization mechanism.

### Claim 24 (depends on 19)

The computer program product of claim 19, further comprising:
computer readable program code configured for, if use of the serialization mechanism is desired, (a) setting a serialization mode indicator to indicate that the serialization mechanism is in use, (b) determining that a counter for tracking a number of tasks being serialized without using the serialization mechanism is set to zero, and (c) releasing the serialization mechanism after the counter has been determined to be set to zero.

### Claim 25 (depends on 19)

The computer program product of claim 19, further comprising:
computer readable program code configured for, if use of the serialization mechanism is not desired and if the serialization mechanism is in use, determining that a counter for tracking a number of tasks being serialized without using the serialization mechanism is set to zero prior to accessing the data structure.

### Claim 26 (depends on 25)

The computer program product of claim 25, further comprising:
computer readable program code configured for determining again whether the serialization mechanism is in use after determining that the counter is set to zero and prior to accessing the data structure.

### Claim 27 (depends on 19)

The computer program product of claim 19, further comprising:
computer readable program code configured for, if use of the serialization mechanism is no longer desired, (a) obtaining the serialization mechanism, (b) setting a serialization mode indicator to indicate that the serialization mechanism is not in use, and (c) releasing the serialization mechanism.
