# US 2012/0254884 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/0254884 A1
- Document ID: US20120254884A1
- Status: Published application
- Kind: A1
- Application number: 13/412,021
- Filed: 2012-03-05
- Published: 2012-10-04
- Earliest claimed: 2011-03-28
- Assignees: International Business Machines Corporation
- Inventors: Stephanie Hui-An Lee; Levish L. David
- Web page: https://patentgrep.com/patent/US20120254884A1

## 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 1

A method for dynamically switching a serialization method of a data structure, the method being implemented by a computer, the method comprising:
if use of a serialization mechanism is desired, obtaining the serialization mechanism;
if use of the serialization mechanism is not desired, determining whether the serialization mechanism is in use;
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
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 2 (depends on 1)

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

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
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 4 (depends on 3)

The method of claim 3, further comprising:
decrementing the counter after accessing the data structure.

### Claim 5 (depends on 3)

The method of claim 3, further comprising:
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 6 (depends on 1)

The method of claim 1, further comprising:
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 7 (depends on 1)

The method of claim 1, further comprising:
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 8 (depends on 7)

The method of claim 7, further comprising:
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 9 (depends on 1)

The method of claim 1, further comprising:
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.
