Information processing apparatus and method for carrying out multi-thread processing
First Claim
Patent Images
1. An information processing apparatus comprising:
- a memory configured to store a data queue comprised of individual data, wherein the data queue comprises a head position and a tail position; and
at least one processor configured to process a data generation thread and a plurality of data consumption threads, the data generation thread placing generated data into the data queue by performing the steps of;
determining what type of data is located at an element identified by the head position of the data queue;
if the head position data contains thread identification relating to one of the plurality of data consumption threads, remove the head position element from the data queue and directly assign the generated data to the data consumption thread associated with the thread identification information for processing the generated data;
if the head position data does not contain thread identification of any of the plurality of data consumption threads, pushing the generated data at the tail position of the data queue by the data generation thread;
a data consumption thread of the plurality of data consumption threads, processing data of the data queue, by performing the steps of;
checking the data located at the head position of the data queue to determine whether the data queue is empty, wherein the data queue is empty if the data at the element in the head position stores thread identification data;
based on the checking, if the data queue is not empty, remove and process the data from the data queue by the data consumption thread;
based on the checking, if the data queue is empty;
insert into the data queue an element containing the thread identification of the data consumption thread at the tail position of the data queue; and
suspend the data consumption thread to allow for further processing of the processor.
4 Assignments
0 Petitions
Accused Products
Abstract
For a thread where data is to be popped off of queue storage, whether or not there is data that can be popped out of the queue storage accessed is first checked and then the data, if any, is popped. When there is no such data, the thread pushes thread information, including the identification information of its own thread, on the same queue and then releases a processor and shifts to a standby state. For a thread that is to push the data, when there is the thread information in the queue, it is determined that there is a thread waiting for the data, and then the data is sent after the thread information has been popped, which in turn resumes the processing.
-
Citations
17 Claims
-
1. An information processing apparatus comprising:
-
a memory configured to store a data queue comprised of individual data, wherein the data queue comprises a head position and a tail position; and at least one processor configured to process a data generation thread and a plurality of data consumption threads, the data generation thread placing generated data into the data queue by performing the steps of; determining what type of data is located at an element identified by the head position of the data queue; if the head position data contains thread identification relating to one of the plurality of data consumption threads, remove the head position element from the data queue and directly assign the generated data to the data consumption thread associated with the thread identification information for processing the generated data; if the head position data does not contain thread identification of any of the plurality of data consumption threads, pushing the generated data at the tail position of the data queue by the data generation thread; a data consumption thread of the plurality of data consumption threads, processing data of the data queue, by performing the steps of; checking the data located at the head position of the data queue to determine whether the data queue is empty, wherein the data queue is empty if the data at the element in the head position stores thread identification data; based on the checking, if the data queue is not empty, remove and process the data from the data queue by the data consumption thread; based on the checking, if the data queue is empty;
insert into the data queue an element containing the thread identification of the data consumption thread at the tail position of the data queue; andsuspend the data consumption thread to allow for further processing of the processor. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. An information processing method comprising:
-
processing a data queue, by a processor, accessed by a data generation thread and a plurality of data consumption threads wherein the data queue comprises a head position and a tail position; placing, by the data generation thread, generated data into the data queue by performing the steps of; determining what type of data is located at an element identified by the head position of the data queue; if the head position data contains thread identification relating to one of the plurality of data consumption threads, remove the head position element from the data queue and directly assign the generated data to the data consumption thread associated with the thread identification information for processing the generated data; if the head position data does not contain thread identification of any of the plurality of data consumption threads, pushing the data at the tail position of the data queue by the data generation thread; processing data of the data queue, by a data consumption thread of the plurality of data consumption threads, by performing the steps of; checking the data located at the head position of the data queue to determine whether the data queue is empty, wherein the data queue is empty if the data at the element in the head position stores thread identification data; based on the checking, if the data queue is not empty, remove and process the data from the data queue by the data consumption thread; based on the checking if the data queue is empty;
insert into the data queue an element containing the thread identification of the data consumption thread at the tail position of the data queue; andsuspend the data consumption thread to allow for further processing of the processor.
-
-
9. A non-transitory computer-readable medium in which a program is embedded, the program is executed by a processor and comprises:
-
a data queue comprised of individual data, wherein the data queue comprises a head position and a tail position; the data generation thread placing generated data into the data queue by performing the steps of; determining what type of data is located at an element identified by the head position of the data queue; if the head position data contains thread identification relating to one of the plurality of data consumption threads, remove the head position element from the data queue and directly assign the generated data to the data consumption thread associated with the thread identification information for processing the generated data; if the head position data does not contain thread identification of any of the plurality of data consumption threads, pushing the data at the tail position of the data queue by the data generation thread; a plurality of data consumption thread of the plurality of data consumption threads, processing data of the data queue, by performing the steps of; checking the data located at the head position of the data queue to determine whether the data queue is empty, wherein the data queue is empty if the data at the element in the head position stores thread identification data; based on the checking, if the data queue is not empty, remove and process the data from the data queue by the data consumption thread; based on the checking if the data queue is empty;
insert into the data queue an element containing the thread identification of the data consumption thread at the tail position of the data queue; andsuspend the data consumption thread to allow for further processing of the processor.
-
-
10. An information processing apparatus comprising:
-
a queue of empty packets indicating information on an unused storage area that stores a predetermined unit of data to be placed into a linked list, the linked list comprising a head position and a tail position; at least one processor processing a data generation thread and a plurality of data consumption threads;
the processor, during processing of the data generation thread for performing the steps of;attempting to retrieve an empty packet from the queue of empty packets; remove an empty packet from the queue of empty packets and place data into the empty packet thereby establishing generated data; determining what type of data is located at an element identified by the head position of the linked list; if the head position data contains thread identification relating to one of the plurality of data consumption threads, remove the head position element from the linked list and directly assign the generated data to the data consumption thread associated with the thread identification information for processing the generated data; if the head position data does not contain thread identification of any of the plurality of data consumption threads, pushing the generated data at the tail position of the linked list by the data generation thread; a data consumption thread, of the plurality of data consumption threads, processing data of the linked list by performing the steps of; checking the data located at the head position of the linked list to determine whether the linked list is empty, wherein the linked list is empty if the data at the element in the head position stores thread identification data; based on the checking, if the linked list is not empty, remove and process the data from the linked list by the data consumption thread; based on the checking if the linked list is empty;
insert into the linked list an element containing the thread identification of the data consumption thread at the tail position of the linked list; andsuspend the data consumption thread to allow for further processing of the processor. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. An information processing method comprising:
-
storing, in memory, a queue of empty packets indicating information on an unused storage area that stores a predetermined unit of data to be placed into a linked list, wherein the linked list comprises a head position and a tail position; processing, by at least one processor, a data generation thread and a plurality of data consumption threads, the processing, during the processing of the data generation thread, performing the steps of; attempting to retrieve an empty packet from the queue of empty packets; removing an empty packet from the queue of empty packets and place data into the empty packet thereby generating data; determining what type of data is located at an element identified by the head position of the linked list; if the head position data contains thread identification relating to one of the plurality of data consumption threads, remove the head position element from the linked list and directly assign the generated data to the data consumption thread associated with the thread identification information for processing the generated data; if the head position data does not contain thread identification of any of the plurality of data consumption threads, pushing the generated data at the tail position of the linked list by the data generation thread; processing data of the linked list by a data consumption thread of the plurality of data consumption threads by performing the steps of; checking the data located at the head position of the linked list to determine whether the linked list is empty, wherein the linked list is empty if the data at the element in the head position stores thread identification data; based on the checking, if the linked list is not empty, remove and process the data from the linked list by the data consumption thread; based on the checking if the linked list is empty;
insert into the linked list an element containing the thread identification of the data consumption thread at the tail position of the linked list; andsuspend the data consumption thread to allow for further processing of the processor.
-
-
17. A non-transitory computer-readable medium in which a program is embedded, the program is executed by a processor and comprises:
-
a queue of empty packets indicating information on an unused storage area that stores a predetermined unit of data to be placed into a linked list, the linked list comprising a head position and a tail position; the processor, during processing of the data generation thread for performing the steps of; attempting to retrieve an empty packet from the queue of empty packets; remove an empty packet from the queue of empty packets and place data into the empty packet thereby generating data; determining what type of data is located at an element identified by the head position of the linked list; if the head position data contains thread identification relating to one of the plurality of data consumption threads, remove the head position element from the linked list and directly assign the generated data to the data consumption thread associated with the thread identification information for processing the generated data; if the head position data does not contain thread identification of any of the plurality of data consumption threads, pushing the generated data at the tail position of the linked list by the data generation thread; a data consumption thread, of the plurality of data consumption threads, processing data of the linked list by performing the steps of; checking the data located at the head position of the linked list to determine whether the linked list is empty, wherein the linked list is empty if the data at the element in the head position stores thread identification data; based on the checking, if the linked list is not empty, remove and process the data from the linked list by the data consumption thread; based on the checking if the linked list is empty, insert into the linked list an element containing the thread identification of the data consumption thread at the tail position of the linked list; and suspend the data consumption thread to allow for further processing of the processor.
-
Specification