IP Library › Granted Patent US 10,203,985
Granted Patent B2
US 10,203,985 · App. 15/334,744 · Granted Feb 12, 2019

Information processing apparatus, method and non-transitory computer-readable medium for managing a number of concurrently executing subtasks based on a threshold and priorities of subtask queues

Inventor: Toshiyuki Nakazawa (Tokyo, JP)
Assignee: Canon Kabushiki Kaisha
G06F9/4881G06F9/5027G06F9/5038G06F9/5066G06F2209/5017G06F2209/5018G06F2209/548
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,203,985
App. No.
15/334,744
Granted
Feb 12, 2019
Kind
B2
Abstract

In an information processing apparatus, a second controller, if a number of subtasks currently executing in the information processing apparatus does not exceed a threshold, obtains a subtask from one of a plurality of queues and causes the obtained subtask to execute by newly creating a thread, and if the number of subtasks currently executing in the information processing apparatus exceeds the threshold, does not newly create a thread, and the second controller, if a number of subtasks currently executing among subtasks registered in a first queue is less than the upper limit value defined for the first queue, obtains a subtask registered in the first queue and causes the obtained subtask to execute by newly creating a thread regardless of whether or not the number of subtasks currently executing in the information processing apparatus exceeds the threshold.

Claims (39)

1. An information processing apparatus comprising a memory storing instructions related to a first controller and instructions related to a second controller, and a processor that executes the instructions related to the first controller and the instructions related to the second controller,

wherein the instructions related to the first controller cause the information processing apparatus to:

control execution of a task, and

wherein, in any of a plurality of queues, one or more subtasks generated from the task controlled by the first controller are registered,

wherein the plurality of queues include a first queue and a second queue that has a lower degree of priority than the first queue;

wherein for each of the plurality of queues, an upper limit value of a number of subtasks executed simultaneously among subtasks registered in the respective queue is defined, and

wherein the instructions related to the second controller cause the information processing apparatus to:

manage a threshold corresponding to a number of subtasks executed simultaneously in the information processing apparatus; and

if a number of subtasks currently executing in the information processing apparatus does not exceed the threshold, obtain a subtask from one of the plurality of queues and cause the obtained subtask to execute by creating a new thread, wherein,

if a number of subtasks currently executing among subtasks registered in the first queue is less than the upper limit value defined for the first queue, obtain a subtask registered in the first queue and cause the obtained subtask to execute by creating a new thread regardless of whether or not the number of subtasks currently executing in the information processing apparatus exceeds the threshold,

wherein if the number of subtasks currently executing in the information processing apparatus exceeds the threshold, a new thread is not created for the subtask registered in the second queue.

2. The information processing apparatus according to claim 1 , wherein in accordance with defined processing content, a subtask is registered in one of the plurality of queues, wherein degrees of priority of the plurality of queues differ from each other.

3. The information processing apparatus according to claim 1 , wherein

for each of the plurality of queues, a number of subtasks that are currently executing is managed, and

the number of subtasks currently executing is increased when the thread corresponding to the subtask is newly created, and is reduced when execution of a subtask according to the thread completes.

4. The information processing apparatus according to claim 1 , wherein the instructions related to the second controller further cause the information processing apparatus to notify an execution result to the first controller when execution of the subtask according to the thread completes.

5. The information processing apparatus according to claim 1 , wherein the instructions related to the second controller further cause the information processing apparatus, if a task is canceled by the first controller, to complete execution of a subtask generated from the canceled task with cancellation as an execution result without executing processing content defined in the subtask.

6. The information processing apparatus according to claim 1 , wherein the instructions related to the second controller further cause the information processing apparatus, in accordance with a status and a function of the information processing apparatus at a time of activation of the second controller, to decide the threshold and the upper limit values corresponding to each of the plurality of queues.

7. The information processing apparatus according to claim 1 , wherein the instructions related to the second controller further cause the information processing apparatus, after processing a subtask registered in the first queue is performed, to perform processing subtasks registered in other queues in order from the highest degree of priority of the queues.

8. A method of controlling an information processing apparatus that comprises a first controller and a second controller, the method comprising:

controlling, by the first controller, execution of a task,

wherein, in any of a plurality of queues, one or more subtasks generated from the task controlled by the first controller are registered,

wherein the plurality of queues include a first queue and a second queue that has a lower degree of priority than the first queue;

defining, by the first controller, for each of the plurality of queues, an upper limit value of a number of subtasks executed simultaneously among subtasks registered in the respective queue,

managing, by the second controller, a threshold corresponding to a number of subtasks executed simultaneously in the information processing apparatus;

if a number of subtasks currently executing in the information processing apparatus does not exceed the threshold, obtaining, by the second controller, a subtask from one of the plurality of queues and causing the obtained subtask to execute by creating a new thread, and

if the number of subtasks currently executing in the information processing apparatus exceeds the threshold, a new thread is not created for the subtask registered in the second queue, and

if a number of subtasks currently executing among subtasks registered in the first queue is less than the upper limit value defined for the first queue, obtaining, by the second controller, a subtask registered in the first queue and causing the obtained subtask to execute by creating a new thread regardless of whether or not the number of subtasks currently executing in the information processing apparatus exceeds the threshold,

wherein if the number of subtasks currently executing in the information processing apparatus exceeds the threshold, a new thread is not created for the subtasks registered in the second queue.

9. A non-transitory computer-readable medium storing a computer program for causing a computer to control an information processing apparatus having a first controller and a second controller, the method comprising:

controlling, by the first controller, execution of a task,

wherein in any of a plurality of queues, one or more subtasks generated from the task controlled by the first controller are registered,

wherein the plurality of queues include a first queue and a second queue that has a lower degree of priority than the first queue;

defining by the first controller, for each of the plurality of queues, an upper limit value of a number of subtasks executed simultaneously among subtasks registered in the respective queue,

managing, by the second controller, a threshold corresponding to a number of subtasks executed simultaneously in the information processing apparatus;

if a number of subtasks currently executing in the information processing apparatus does not exceed the threshold, obtaining, by the second controller, a subtask from one of the plurality of queues and causing the obtained subtask to execute by creating a new thread, and

if the number of subtasks currently executing in the information processing apparatus exceeds the threshold, a new thread is not created for the subtask registered in the second queue, and

if a number of subtasks currently executing among subtasks registered in the first queue is less than the upper limit value defined for the first queue, obtaining, by the second controller, a subtask registered in the first queue and causing the obtained subtask to execute by creating a new thread regardless of whether or not the number of subtasks currently executing in the information processing apparatus exceeds the threshold,

wherein if the number of subtasks currently executing in the information processing apparatus exceeds the threshold, a new thread is not created for the subtasks registered in the second queue.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 2, 2017
From: NAKAZAWA, TOSHIYUKI
To: CANON KABUSHIKI KAISHA
Reel/Frame 041590/0518 →
Priority Claims (1)
JP 2015-215694 · Nov 2, 2015 · national
Continuity (1)
Related Publication 20170123850A1 · May 4, 2017