INFORMATION PROCESSING APPARATUS AND METHOD FOR CARRYING OUT MULTI-THREAD PROCESSING
First Claim
1. An information processing apparatus comprising:
- a memory configured to store a data queue comprised of individual data; and
at least one processor configured to process either of a data generation thread for placing data generated into the data queue or a data consumption thread for retrieving the data from the data queue,wherein, when there is no data to be retrieved in the data queue during processing of the data consumption thread, the processor placed identification information of the data consumption thread into the data queue, andwherein, when the data is to be placed into the data queue during processing of the data generation thread and when the identification information of the data consumption thread has been placed into the data queue, the processor changes a storage location of the data in such a manner that the data consumption thread is acquired.
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
23 Claims
-
1. An information processing apparatus comprising:
-
a memory configured to store a data queue comprised of individual data; and at least one processor configured to process either of a data generation thread for placing data generated into the data queue or a data consumption thread for retrieving the data from the data queue, wherein, when there is no data to be retrieved in the data queue during processing of the data consumption thread, the processor placed identification information of the data consumption thread into the data queue, and wherein, when the data is to be placed into the data queue during processing of the data generation thread and when the identification information of the data consumption thread has been placed into the data queue, the processor changes a storage location of the data in such a manner that the data consumption thread is acquired. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. An information processing method comprising:
-
placing the identification information of a first thread into a queue, when data is attempted to be retrieved from the queue stored in a memory during processing of a first thread performed by a processor but there is no data to be retrieved; and sending data to the first thread, when the data is to be placed into the queue during processing of a second thread performed by the processor and identification information of the first thread has been placed into the queue.
-
-
11. A non-transitory computer-readable medium in which a program embedded, the program comprising:
-
a first thread module operative to place the identification information of a first thread into a queue, when data is attempted to be retrieved from the queue stored in a memory during processing of a first thread performed by a processor but there is no data to be retrieved; and a second thread module operative to send data to the first thread, when the data is to be placed into the queue during processing of a second thread performed by the processor and identification information of the first thread has been placed into the queue.
-
-
12. An information processing apparatus comprising:
-
a processor configured to process a thread that accesses an object requiring synchronization management; and a memory configured to store a queue that represents a pending queue of threads requesting access to the object, the queue being structured by a linked list such that the identification information of each thread is connected by a pointer indicating the identification information of a subsequent thread in the queue, wherein information concerning a current state of the object is appended to a head pointer, which is a pointer indicating the identification information of a first thread in the linked list, and wherein, when the thread requests access to the object, the thread determines whether or not access is granted by referencing the information concerning the current state of the object appended to the head pointer, and wherein, if access is not granted, the identification information of the thread is placed into the queue. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. An information processing method comprising:
-
referencing a queue when access needs to be made to an object requiring synchronization management during processing a thread, the queue being a pending queue requesting access to the object being structured by a linked list such that identification information of each thread is connected by a pointer indicating the identification information of a subsequent thread in the queue; determining whether or not access is granted by acquiring information concerning a current state of the object appended to a head pointer, which is a pointer indicating the identification information of a first thread in the linked list; and placing the identity information of the thread into the queue when access is not granted.
-
-
23. A non-transitory computer-readable medium in which a program embedded, the program comprising:
-
a referencing module operative to reference a queue when access needs to be made to an object requiring synchronization management during processing a thread, the queue being a pending queue requesting access to the object being structured by a linked list such that identification information of each thread is connected by a pointer indicating identification information of a subsequent thread in the queue; a determining module operative to determine whether or not access is granted by acquiring information concerning a current state of the object appended to a head pointer, which is a pointer indicating the identification information of a first thread in the linked list; and a push module operative to place the identity information of the thread into the queue when access is not granted.
-
Specification