# US 2010/0169887 A1 · Apparatus and Method for Parallel Processing of A Query

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

- Number: US 2010/0169887 A1
- Document ID: US20100169887A1
- Status: Published application
- Kind: A1
- Application number: 12/347,728
- Filed: 2008-12-31
- Published: 2010-07-01
- Earliest claimed: 2008-12-31
- Assignees: Pivotal Software, Inc.
- Inventors: Florian Michael WAAS
- Web page: https://patentgrep.com/patent/US20100169887A1

## CPC

- G06F 16/24532: {of parallel queries}
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/52: Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F 16/24542: {Plan optimisation}
- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F 2209/5018: Thread allocation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer readable storage medium comprises executable instructions to receive a query. A graph is built to represent jobs associated with the query. The jobs are assigned to parallel threads according to the graph.

## Claims

### Claim 1

A computer readable storage medium, comprising executable instructions to:
receive a query;
build a graph to represent jobs associated with the query; and
assign jobs to parallel threads according to the graph.

### Claim 2 (depends on 2)

The computer readable storage medium of claim 2, wherein the graph comprises a concurrent data structure.

### Claim 3 (depends on 1)

The computer readable storage medium of claim 1, wherein the jobs comprise parent jobs and dependent jobs.

### Claim 4 (depends on 1)

The computer readable storage medium of claim 1, wherein the executable instructions to assign jobs to parallel threads comprise executable instructions to form a state machine for scheduling the jobs.

### Claim 5 (depends on 4)

The computer readable storage medium of claim 4, wherein the state machine comprises a plurality of states associated with each job.

### Claim 6 (depends on 5)

The computer readable storage medium of claim 5, wherein the plurality of states comprises a runnable state, a running state, an inactive state, and a finalized state.

### Claim 7 (depends on 6)

The computer readable storage medium of claim 6, wherein the executable instructions to assign jobs to parallel threads comprise executable instructions to assign jobs to a runnable state when the jobs are ready to be assigned to a thread.

### Claim 8 (depends on 6)

The computer readable storage medium of claim 6, wherein the executable instructions to assign jobs to parallel threads comprise executable instructions to assign a job to a running state when the job is being executed on a thread.

### Claim 9 (depends on 6)

The computer readable storage medium of claim 6, wherein the executable instructions to assign jobs to parallel threads comprise executable instructions to assign a job to an inactive state when the job is waiting for dependent jobs to be completed.

### Claim 10 (depends on 6)

The computer readable storage medium of claim 6, wherein the executable instructions to assign jobs to parallel threads comprise executable instructions to assign a job to a finalized state when the job is complete.

### Claim 11

A computer readable storage medium, comprising executable instructions to:
receive a query;
build a dependency graph to encode dependencies between jobs associated with the query; and
schedule the jobs for execution in parallel threads according to the dependencies encoded in the dependency graph.

### Claim 12 (depends on 11)

The computer readable storage medium of claim 11, wherein the dependency graph comprises a concurrent data structure.

### Claim 13 (depends on 1)

The computer readable storage medium of claim 1, wherein the Jobs comprise leaf nodes in the dependency graph.

### Claim 14 (depends on 13)

The computer readable storage medium of claim 13, wherein the executable instructions to schedule jobs comprise executable instructions to:
select a job from a leaf node in the dependency graph;
assign the Job to a thread for execution; and
execute the job.

### Claim 15 (depends on 14)

The computer readable storage medium of claim 14, wherein the executable instructions to schedule the Jobs further comprise executable instructions to execute dependent jobs in parallel threads.

### Claim 16 (depends on 15)

The computer readable storage medium of claim 15, wherein the executable instructions to schedule the jobs further comprise executable instructions to reschedule the selected job until the dependent jobs are complete.

### Claim 17 (depends on 16)

The computer readable storage medium of claim 16, wherein the executable instructions to schedule the jobs comprise executable instructions to remove the selected job and the dependent jobs from the dependency graph once completed.

### Claim 18 (depends on 11)

The computer readable storage medium of claim 11, wherein the parallel threads are executed in a plurality of cores in a multi-core architecture.

### Claim 19

A method for processing a query, comprising:
building a graph to represent jobs associated with a query;
assigning a job to a thread for execution;
executing dependent jobs of the assigned job in parallel threads; and
rescheduling the assigned job for execution until the dependent jobs are complete.

### Claim 20 (depends on 19)

The method of claim 19, further comprising:
executing the assigned job; and
removing the assigned job and the dependent jobs from the graph upon completion.
