TASK CONTROL DEVICE

Information

  • Patent Application
  • 20150234680
  • Publication Number
    20150234680
  • Date Filed
    October 31, 2013
    10 years ago
  • Date Published
    August 20, 2015
    8 years ago
Abstract
A task control unit executes a task according to execution request information for the task, which task is registered using a function provided by task control unit. The task control unit separately controls a task (P-Task) whose execution time is set by a programmer and a task (S-Task) whose execution time is set by a system so that the tasks do not interfere with each other. The task control unit executes plural S-Tasks while complying with their execution periods. By controlling tasks by the foregoing methods, energy is saved and a network load is reduced.
Description
TECHNICAL FIELD

The present invention relates to control of tasks.


BACKGROUND ART

In recent years, the number of information-processing devices installed with a multitasking OS (Operating System) capable of executing plural tasks simultaneously has increased. A smartphone is one such device. In a smartphone, tasks of application programs, even while a backlight of a liquid crystal screen of a device is turned off, require data synchronization with a server device or a processing relevant to a GPS (Global Positioning System) or a wireless LAN (Local Area Network), which results in a CPU frequently entering into an operating status, in contrast to a conventional portable device. Accordingly, a smartphone consumes much more power. Also, in a smartphone, the number of occurrences of wireless communication increases as a result of which the number of signals to be processed by a base station increases. Namely, a larger load is imposed on a base station and a mobile communication network by use of a smartphone. Further, due to simultaneous communication by plural smartphones (hereinafter referred to as “burst traffic”), a problem of a temporary overload on a base station or a mobile communication network occurs.


JP 8-255088A1 discloses, as a technique for controlling plural tasks, a system where task execution requests are controlled by dividing tasks into tasks with a time interval specified and tasks with a particular time specified. However, the system only reduces the number of occurrences of a timer interruption by dividing tasks into two categories, which system is not effective in terms of power-saving and reduction of a network load.


SUMMARY

In view of the above problem in the prior art, the present invention intends to reduce a processing load by controlling appropriately the tasks to be performed by a device.


The present invention provides a task control device comprising a task control unit that executes a task of a first type, an execution time of which is not allowed to be changed, at a specified first time, and that executes a task of a second type, an execution time of which is allowed to be changed, at a second time different from the first time.


The task control unit may acquire execution request information including task identification information that identifies a subject task, an execution time of the subject task, and type information indicating whether the subject task is the first type or the second type. The task control unit may further determine whether the subject task is the first type or the second type based on the type information.


The task control unit may acquire execution request information including task identification information that identifies a subject task, an execution time of the subject task, and a type of the execution time of the subject task. The task control unit may further determine whether the subject task is the first type or the second type based on the type of the execution time.


The task control unit may comprise: a storage unit; and a storage processing unit that stores, for the task of the first type, data on the specified first time in the storage unit, and that sets, for the task of the second type, the second time different from the first time such that the task of the second type is executed simultaneously with another task of the second type, and stores data on the second time in the storage unit. The task control unit may further execute the task of the first type when the first time stored in the storage unit comes, and execute the task of the second type and the other task of the second type when the second time stored in the storage unit comes.


The storage processing unit, when the task of the second type is a periodic task, may set the second time such that the task of the second type is executed simultaneously with another task of the second type, which is a periodic task, wherein a common divisor exists between an execution period of the task of the second type and an execution period of the other task of the second type, and may store data on the second time in the storage unit.


The storage processing unit, when the task of the second type is a non-periodic task that does not cause a communication processing, may set the second time such that the task of the second type is executed simultaneously with another task of the first type.


The storage processing unit, when the task of the second type is a task that causes a communication processing, may set the second time based on a communication start time of the task of the second type such that communication caused by the task of the second type starts at the same time when communication caused by another task of the second type starts.


The task control unit may comprise: a storage unit; a storage processing unit that stores, in the storage unit, data on the first time specified for the task of the first type and data on an execution time specified for the task of the second type; and an execution unit that executes the task of the first type at the first time stored in the storage unit, and that, for the task of the second type, changes the execution time stored in the storage unit to the second time different from the first time such that the task of the second type is executed simultaneously with another task of the second type, and executes the task of the second type at the second time.


When the task control unit has transited from a dormant status to an operating status in response to a notification of an event to the task of the second type, and a time when the task control unit has transited from a dormant status to an operating status has passed an execution time specified for the task of the second type, the task control unit may set the execution time specified for the task of the second type to the second time, which is an execution time of another task of the second type, which is executed most recently subsequent to the time when the task control unit has transited from a dormant status to an operating status.


When the task control unit has transited from a dormant status to an operating status in response to a factor other than a request for executing the task of the second type and a notification of an event to the task of the second type, and a time when the task control unit has transited from a dormant status to an operating status has passed an execution time specified for the task of the second type, the task control unit may set the execution time specified for the task of the second type to the second time, which is an execution time of another task of the second type, which is executed most recently subsequent to the time when the task control unit has transited from a dormant status to an operating status.


The task control device may comprise a status management unit that manages a status of the task control device. The task control unit may determine, based on the status managed by the status management unit, whether to change the first time of the task of the first type or an execution time of the task of the second type, and thereafter executes the task of the first type or the task of the second type.


The task control device may comprise a control policy change unit that changes a control policy for the task control unit based on information input to the task control device. The task control unit may control execution of a task in accordance with the control policy changed by the control policy change unit.


The task control device may comprise a broadcast reception detection unit that detects a reception of broadcast information distributed to plural information-processing devices, one of which includes the task control device. When the broadcast reception detection unit has detected a reception of the broadcast information, and a time when the broadcast reception detection unit has detected the reception of the broadcast information has passed an execution time specified for the task of the second type, the storage processing unit may write, over the execution time specified for the task of the second type, the second time subsequent to the time when the broadcast reception detection unit has detected the reception of the broadcast information, and may store data on the second time in the storage unit.


The task control device may comprise a broadcast reception detection unit that detects a reception of broadcast information distributed to plural information-processing devices, one of which includes the task control device. When the broadcast reception detection unit has detected a reception of the broadcast information, and a time when the broadcast reception detection unit has detected the reception of the broadcast information has passed an execution time specified for the task of the second type, the storage processing unit may delete the execution time specified for the task of the second type


According to the present invention, a processing load is reduced by controlling tasks.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a block diagram showing a configuration of an information-processing device according to an embodiment of the present invention.



FIG. 2 is a block diagram showing a functional configuration of an information-processing device.



FIG. 3 is a sequence diagram showing a basic operation of an information-processing device.



FIG. 4A is a diagram showing a format example of execution request information.



FIG. 4B is a diagram showing a format example of execution request information.



FIG. 5 is a flowchart showing an operation of an information-processing device.



FIG. 6 is a flowchart showing an operation of an information-processing device.



FIG. 7 is a diagram explaining an operation example.



FIG. 8 is a diagram explaining an operation example.



FIG. 9 is a block diagram showing a functional configuration of an information-processing device according to a modification.



FIG. 10 is a diagram showing a format example of execution request information according to a modification.



FIG. 11 is a flowchart showing an operation of an information-processing device according to a modification.



FIG. 12 is a block diagram showing a functional configuration of an information-processing device according to a modification.



FIG. 13 is a block diagram showing a functional configuration of an information-processing device according to a modification.



FIG. 14 is a flowchart showing an operation of an information-processing device according to a modification.



FIG. 15 is a diagram explaining an operation example according to a modification.



FIG. 16 is a flowchart showing an operation of an information-processing device according to a modification.



FIG. 17 is a block diagram showing a functional configuration of an information-processing device according to a modification.



FIG. 18 is a block diagram showing a functional configuration of an information-processing device according to a modification.



FIG. 19 is a flowchart showing an operation of an information-processing device according to a modification.





DETAILED DESCRIPTION

A preferred embodiment of an information-processing device according to the present invention will be described in detail below with reference to the drawings.


<Configuration>


FIG. 1 shows a configuration example of information-processing device 100 according to an embodiment. Information-processing device 100 is a computer such as a mobile phone capable of telephone calling and data communication. Information-processing device 100 performs a telephone call or data communication with another mobile communication device or a server device via a mobile communication network. Information-processing device 100 corresponds to a task control device according to the present invention. Information-processing device 100 includes application 200, framework 300, library 400, kernel 500, and hardware 600. Application 200 includes, for example, application 210 including task 211 and task 212, and application 220 including task 221 and task 222. Framework 300 includes, for example, task control unit 310, resource management unit 320, and position information management unit 330. Task control unit 310 executes task 211 or 212 according to a request for executing task 211 or 212. Resource management unit 320 manages resources such as a CPU and a main memory. Position information management unit 330 manages positions of information-processing device 100. Library 400 includes, for example, database library 410, power control library 420, and Java (Registered Trademark) VM (Virtual Machine) 430. Kernel 500 includes power source management unit 510, screen management unit 520, and process management unit 530. Power source management unit 510 manages the power source of information-processing device 100. Screen management unit 520 manages display unit 640. Process management unit 530 manages processes of information-processing device 100. Hardware 600 includes, for example, baseband chip 610, CPU (Central Processing Unit) 620, memory (main storage and auxiliary storage) 630, display unit 640, input operation unit 650, and wireless LAN communication unit 660.


Task control unit 310 executes a task according to execution request information for the task, which task is registered using a function provided by task control unit 310. Execution request information for a task includes an execution time at which the task should be executed, and a set time type. The set time type indicates whether the execution time is an execution time set by a programmer or a user (hereinafter referred to as “programmer” collectively) or an execution time set by the system of information-processing device 100.


A task whose execution time is set by a programmer, which is a first task according to the present invention, and is hereinafter referred to as a “P-Task,” may include an alarm clock task. The alarm clock task is a task that operates at an execution time (for example, 7 am every day) specified by a user among times prepared by a programmer. A P-Task is not executed at a time different from a set execution time. In other words, a P-Task is a task designed so that changing its specified execution time is not permitted.


On the other hand, a task whose execution time is optimized by the system regardless of an execution time specified by a programmer, which is a second task according to the present invention, and is hereinafter referred to as an “S-Task.” An S-Task can be divided broadly into two types of tasks, tasks whose execution time is periodic and tasks whose execution time is not periodic. A periodic task may include a task, “Keep Alive,” that maintains a session of communication performed between information-processing device 100 and a server device over a mobile communication network. Since a session with a server device is maintained as long as the task is executed periodically, the task is not required to be executed at a particular time such as 7 am every day. Accordingly, the decision as to what the initial execution time for the task should be can be made by the system as required. The task may be executed periodically at the decided execution time. A non-periodic task has no restriction as to its execution time such that the task may be executed any time. Accordingly, the execution time for the task may be decided by the system as required. As described in the foregoing, an S-Task is a task that may operate at a time other than a particular time, and which is designed so that a time specified by a programmer is permitted to be changed.


<Basic Operation>


FIG. 2 is a diagram showing a functional configuration example of the information-processing device. FIG. 3 is a sequence diagram showing a basic operation of the information-processing device. Task control unit 310 includes storage processing unit 311, storage unit 312, and execution unit 313. Storage unit 312 is realized by memory 630. Storage processing unit 311 and execution unit 313 are realized by CPU 620. As shown in FIG. 3, during execution of each application (application A or application B), each task (task A or B) calls a function of task control unit 310, and passes execution request information, which is an argument, to the function, so that storage processing unit 311 acquires the execution request information (step S1). Storage processing unit 311 sequentially stores the execution request information in storage unit 312 (step S2). The foregoing describes a task execution request storing thread.


Now FIG. 4 is referred to, which shows format examples of execution request information. As shown in FIG. 4A, execution request information includes information on a task name, a set time type (P-task or S-task), and an execution time. The task name is an example of identification information of a task. As shown in FIG. 4B, execution request information may include, in addition to data on a task name, a set time type (P-task or S-task), and an execution time, information on presence/absence of communication, a communication start time, a communication end time, and resource consumption.


On the other hand, a task execution thread starts in response to a transition of execution unit 313 from a dormant status (or sleep status) to an operating status. Execution unit 313 accesses execution request information stored in storage unit 312 (step S3), and confirms the execution request information (step S4). Conditions in which execution unit 313 transits from a dormant status to an operating status include (1) a request for execution of a task, (2) a notification of an event relevant to a change in remaining battery level or to a network condition, and (3) a condition other than conditions (1) and (2) (for example, a condition relevant to device management by the kernel, or an input operation to input operation unit 650). Execution unit 313, if as a result of the confirmation of the execution request information, condition (1) is satisfied, issues an execution instruction to application A to execute a task (shown as task A in FIG. 3) that triggered the activation of execution unit 313 (step S5). As a result, task A is executed.


<Operation of Storage Processing Unit>

An operation performed by storage processing unit 311 to store execution request information in storage unit 312 will be described with reference to FIG. 5. When task A of application A calls a function of storage processing unit 311, and execution request information is passed to storage processing unit 311 as an argument, storage processing unit 311 determines whether the type of task A is a P-Task or an S-Task (step S100). If the type of task A is a P-Task (step S100; P-Task), storage processing unit 311 stores the execution request information held by task A in storage unit 312 (step S200). If the type of task A is an S-Task (step S100; S-Task), storage processing unit 311 performs a storage processing for an S-Task (step S300).


<Storage Processing for S-Task>

The storage processing for an S-Task will be described with reference to FIGS. 6 to 8. Storage processing unit 311 initially determines whether task A is a periodic task (step S301). If task A is a periodic task (step S301; YES), storage processing unit 311 acquires data on a period of execution request information stored in storage unit 312 (step S302), and determines whether a common divisor larger than a minimum unit of a period (for example, 1 minute) exists between the period of the execution request information and a period of task A (step S303). If the common divisor exists (step S303; YES), storage processing unit 311 records the period of the execution request information in memory 630 (step S304).


If the common divisor does not exist (step S303; NO), storage processing unit 311 determines whether comparison with all tasks stored in storage unit 312 has been completed (step S305). If a task to be compared exists in storage unit 312 (step S305; NO), storage processing unit 311 returns to step S302 to perform the above-mentioned processing. If comparison with all tasks has been completed (step S305; YES), storage processing unit 311 identifies the maximum period among periods recorded in step S304 (step S306). Subsequently, storage processing unit 311 stores execution request information for task A in storage unit 312, in which a next execution time of a task having the maximum period is specified as a first execution time of task A (step S307).


A processing example of steps S301 to S307 will be described with reference to FIG. 7. It is assumed that in a case where execution request information for task B having a period “10” and execution request information for task C having a period “30” are stored in storage unit 312, execution request information for task A having a period “15” is generated at time T. In the case, the greatest common divisor between the period of task A and the period of task B is “5,” and the greatest common divisor between the period of task A and the period of task C is “15;” accordingly, a next execution time “30” is specified as a first execution time of task A.



FIG. 6 is referred to again. If task A is a non-periodic task (step S301; NO), storage processing unit 311 acquires data on a period of a task included in execution request information stored in storage unit 312 (step S308), and determines whether the task is a periodic task (S309). If the task is a periodic task (step S309; YES), storage processing unit 311 records, in memory 630, an execution time of the task, which is subsequent to the current time and is most recent (step S310). If a task exists in storage unit 312 whose information is not yet acquired (step S311; NO), storage processing unit 311 returns to step S308 to perform the above-mentioned processing. If information on all tasks has been acquired (step S311; YES), storage processing unit 311 stores execution request information for task A in storage unit 312, in which an execution time closest to the current time among execution times recorded in step S310 is specified as a first execution time of task A.


A processing example of steps S308 to S312 will be described with reference to FIG. 8. It is assumed that in a case where execution request information for tasks B, C, and D is stored in storage unit 312, execution request information for task A is generated at time T. It is also assumed that an execution time of tasks C and D is periodic, and an execution time of task B is not periodic. In this case, since task B is not a periodic task, storage processing unit 311 moves from step S309 to step S311. Since data on periods of all tasks is not yet acquired (step S311; NO), storage processing unit 311 returns to step S308 to determine whether task C is a periodic task. Since task C is a period task, storage processing unit 311 stores, in memory 630, data of the most recent next execution time “20” of task C in step S310. Similarly, storage processing unit 311 stores, in the memory, data of the most recent next execution time “50” of task D. Storage processing unit 311 compares the next execution times “20” and “50” stored in the memory in step S312, and stores data of the smaller next execution time “20” in storage unit 312 as a first execution time of task A.


After the execution request information is stored in storage unit 312 as described in the foregoing, when the execution time included in the execution request information comes, execution unit 313 executes task A.


<Modifications>

The above embodiment may be modified as described below. The following modifications may be combined with each other.


<Modification 1>

In the embodiment, in a case where information-processing device 100 transits from a dormant status to an operating status in a condition that execution of a task has been requested, the task that triggered the activation is executed. However, execution unit 313 may acquire information on a status of information-processing device 100 (for example, information on whether a backlight of the display unit of a device is in an on-state or an off-state, a remaining battery level, a resource consumption amount, a network condition, or whether the information-processing device is connected or disconnected to a power cable) from an API (Application Program Interface) provided by the framework, and control executions of tasks based on the status information. In this case, task control unit 310 includes status management unit 314 that manages status information, as shown in FIG. 9. Status management unit 314 is realized by CPU 620 and memory 630. FIG. 10 is a diagram showing a format example of execution request information stored in storage unit 312. Since a task may be executed at an original execution time, without modification, depending on a status of information-processing device 100, data on the original execution time and a changed execution time of the task is stored in storage unit 312. Task control unit 310 selects one of the execution times to execute the task, based on a determination whether simultaneous execution of tasks should be performed.


In a case where information on whether display unit 640 is in an on-state or an off-state is referred to as status information, task control unit 310 does not perform simultaneous execution of tasks when display unit 640 is in an on-state, and performs simultaneous execution of tasks when display unit 640 is in an off-state. When display unit 640 is in an on-state, it is likely that a user is viewing display unit 640 for, for example, web browsing; therefore, high responsiveness of a processing to an input operation is required. If tasks are simultaneously executed in such a situation, responsiveness of execution of a task is lowered; as a result, usability of a device for a user is likely to be lowered. On the other hand, when display unit 640 is in an off-state, it is likely that a user is not viewing display unit 640; therefore, high responsiveness of a processing to an input operation is not required. Accordingly, when display unit 640 is in an off-state, it is preferable that an execution time of a task is changed so that tasks are simultaneously executed to save energy and to reduce network load.


As shown in FIG. 11, status management unit 314 notifies execution unit 313 of whether display unit 640 is in an on-state or an off-state (step S800), and execution unit 313 determines whether display unit 640 is in an on-state or an off-state (step S810). If display unit 640 is in an on-state (step S810; YES), execution unit 313 refers to data of an original execution time stored in storage unit 312 (step S820), and performs an execution processing at the execution time (step S830). On the other hand, if display unit 640 is in an off-state (step S810; NO), execution unit 313 refers to data of a changed execution time stored in storage unit 312 (step S840), and performs an execution processing at the execution time (step S830).


In a case where an amount of resources consumed by information-processing device 100 when a task is executed is referred to as status information, and where a total amount of resources consumed by tasks to be simultaneously executed exceeds a threshold value, task control unit 310 excludes task(s) that consumes a larger amount of resources from tasks subjected to simultaneous execution so that the total amount of resources consumed does not become greater than the threshold value. If a data amount exceeds the capacity of a main memory, tasks are likely to freeze or crash. Therefore, in the case where the total amount of resources consumed exceeds the threshold value, the number of tasks subjected to simultaneous execution should be reduced. Information on a resource consumption amount for each task may be pre-included in execution request information for the task, which is referred to by task control unit 310. Alternatively, a resource consumption amount for each task may be learned by task control unit 310 by monitoring resources consumed when the task is executed.


Information relevant to a network such as a radio wave reception intensity or a communication throughput in communication with a base station of a mobile communication network or in a wireless LAN may be used as status information. In the case, task control unit 310, if determining that an extra communication band is available, may increase the number of tasks to be simultaneously executed.


A remaining battery level may be referred to as status information. In the case, when a remaining battery level is lower than or equal to a threshold value, task control unit 310 performs simultaneous execution of tasks to save power. The threshold value may be set by a user, or may be automatically set by the system of information-processing device 100.


Whether information-processing device 100 is connected to a power cable connected to a commercial power source may be referred to as status information. In the case, when information-processing device 100 is disconnected from the power cable, task control unit 310 performs simultaneous execution of tasks to save power.


<Modification 2>

In modification 1, it is decided whether to change an execution time of a task so that tasks are simultaneously executed, depending on a status of information-processing device 100. In the present modification, a control policy may be changed based on external input information, which cannot be acquired from the inside of information-processing device 100, so that control can be performed reflecting an intention of a user or a developer, a network condition, or a status of another information-processing device. In this case, task control unit 310 includes control policy change unit 331 that changes a control policy based on external input information, as shown in FIG. 12. Control policy change unit 331 is realized by CPU 620 and memory 630. In modification 2, since a task may be executed at an original execution time, without modification, depending on a control policy, data on the original execution time and a changed execution time of the task is stored in storage unit 312, as in the case of modification 1.


Control policy change unit 331 may convert a control policy according to conversion rule 1200 for execution request information, as shown in FIG. 13, which rule is directed to execution request information for applications stored in server device 1000. Data on a history (for example, a task name, an execution time, and presence/absence of communication) of executions of a task by execution unit 313 is stored in execution history storage unit 315, and execution history monitoring unit 316 monitors the execution history. Execution history monitoring unit 316 determines whether a task or application tends not to be executed at a particular time, or whether a task or application tends to be updated frequently. If such a tendency is identified, execution history monitoring unit 316 registers a name of a task or application, and execution request information in application list 1100 of server device 1000. Server device 1000 changes conversion rule 1200 based on the registered information. For example, if an application performs communication intensively at a particular time, a control policy is changed so that communication is avoided at the time. After conversion rule 1200 is updated, server device 1000 changes control policies for all information-processing devices 100. It is to be noted that execution history storage unit 315 is realized by memory 630, and execution history monitoring unit 316 is realized by CPU 620.


In the above example, execution history monitoring unit 316 registers a name of a task or an application, and execution request information in application list 1100 of server device 1000; however, those pieces of information may be registered by a user in application list 1100 of server device 1000. It is to be noted that conversion rule 1200 and application list 1100 may be held by each information-processing device 100, based on which information-processing device 100 may control tasks.


Control policy change unit 331 may communicate with a base station or an exchange of a mobile communication network to change an execution time of a task so that communication is not performed intensively at a particular time. For example, in a case where a base station or an exchange identifies occurrence of burst traffic at 7 am every day, an execution time of a task that performs communication at 7 am may be changed in some information-processing devices 100 to prevent the devices from executing the task at 7 am.


In a case where a developer tests an application at a developmental stage, information-processing device 100 may execute a task at an original execution time, without changing the execution time. In this case, an application may be attached with a flag indicating that the application is under development, so that it can be determined that the application is for testing, and task control unit 310 may be provided with a function by which an execution time of an application attached with such a flag is not changed.


<Modification 3>

In the embodiment, storage processing unit 311 changes an execution time of a task, and thereafter stores data on the changed execution time in storage unit 312. However, storage processing unit 311 may store data on an execution time of a task in storage unit 312, without changing the execution time, and execution unit 313 may change the execution time before executing the task. In the case, in FIG. 14, when execution unit 313 transits from a dormant status to an operating status, execution unit 313 acquires execution request information from storage unit 312 to determine whether a task set to the same time as the current time exists (step S400). If a task set to the same time as the current time exists (namely, execution unit 313 has transited from a dormant status to an operating status in a condition that execution of the task had been requested) (step S400; YES), execution unit 313 issues an execution instruction to execute the task (step S410), and executes the task (step S420). On the other hand, if a task set to the same time as the current time does not exist (namely, execution unit 313 has transited from a dormant status to an operating status in a condition other than the condition that execution of the task had been requested) (step S400; NO), execution unit 313 acquires execution request information for an S-Task stored in storage unit 312 (step S430). If an S-Task whose execution time has passed exists (step S440; YES), execution unit 313 rewrites, over an execution time of the S-Task, an execution time of a periodic task, which is subsequent to the current time and is most recent, and stores data on the rewritten execution time in storage unit 312 (step S450). According to the foregoing processing, in a case where transition to an operating status of information-processing device 100 is triggered by an event notification to a task or a factor other than a request for executing a task or an event notification, distributed execution of tasks can be avoided; in other words, simultaneous execution of tasks tends to be performed.


<Modification 4>

In the embodiment, plural tasks are simultaneously executed by making their execution times the same. However, in some tasks, a communication processing occurs several seconds to several tens of seconds after the task is executed. For example, as shown in FIG. 15, a case can be considered where execution times of task A and task B are the same; however, communication start times are different so that the number of generations of a control signal is not reduced. In view of that, when executing plural tasks simultaneously, task control unit 310 may change execution times of the tasks to make them the same. In this case, a communication start time of a task may be included in request execution information, which can be referred to by task control unit 310. Alternatively, a communication start time may be calculated by task control unit 310 based on execution history information in which communication start times of tasks are described. For example, assuming that an execution time of task A is “Ta,” and a communication start period of time of task A is “Tar,” a communication start time of task A is “Ta+Tar.” Assuming that an execution time of task B is “Tb”, and a communication start period of time of task B is “Tbr,” a communication start time of task B is “Tb+Tbr.” In a case where task A is stored in storage unit 312 in advance, storage processing unit 311 changes the execution time of task B to “Ta+Tar−Tbr,” and stores data on the changed execution time in storage unit 312. Information indicating a communication start time of a task may be pre-included in execution request information of the task, which can be referred to by task control unit 310. Alternatively, a communication start time may be learned by task control unit 310 by monitoring a status of communication performed when a task is in execution.


<Modification 5>

In the embodiment, only S-Tasks are simultaneously executed to avoid occurrence of burst traffic. However, a combination of an S-Task (that does not perform communication) and a P-Task, if simultaneously executed, does not cause burst traffic. In the present modification, as shown in FIG. 16, storage processing unit 311 determines whether task A is a task that performs communication (step S700). If task A is a task that does not perform communication (step S700; NO), storage processing unit 311 sets, as an execution time of task A, an execution time of a task (among all tasks), which is subsequent to the execution time of task A and is most recent, regardless of whether task A is a P-Task or an S-Task (step S720). On the other hand, if task A is a task that performs communication (S700; YES), storage processing unit 311 proceeds to step S301 of FIG. 6 so that S-Tasks are simultaneously executed, as in the case of the embodiment (step S710).


<Modification 6>

In the embodiment, where an execution time of a task is changed by storage processing unit 311 of framework 300, storage processing unit 311 may be realized by an application program. In this case, storage processing application 220 that realizes a function equivalent to that of storage processing unit 311 may be provided, instead of storage processing unit 311, as shown in FIG. 17. Storage processing application 220 receives execution request information from all or some of the tasks, and performs step S100 and subsequent steps of the embodiment.


<Modification 7>

Information-processing device 100 may be a stand-alone information-processing device, instead of a communication device such as a mobile phone. A program executed in information-processing device 100 may be stored for distribution in a recording medium such as a magnetic tape, a magnetic disk, a floppy (Registered Trademark) disk, an optical recording medium, a magneto-optical medium, a CD (Compact Disk), a DVD (Digital Versatile Disk), or a RAM.


<Modification 8>

When plural information-processing devices 100, during a sleep or dormant status, receive information that is simultaneously distributed over a communication network such as a message reporting the occurrence of an emergency situation such as an earthquake (or an emergency earthquake alert) (which reception will be referred to as “broadcast reception”), information-processing devices 100 simultaneously transit from the dormant status to an operating status, and may display a message. After transiting to the operating status, plural information-processing devices 100 execute a task to be executed, if any. In the case, if an S-Task that performs communication is executed simultaneously in plural information-processing devices 100, burst traffic may occur. To prevent the occurrence of burst traffic, task control unit 310 includes broadcast reception detection unit 317 that detects a broadcast reception, as shown in FIG. 18. If a broadcast reception is detected by broadcast reception detection unit 317, storage processing unit 311 may rewrite an execution time included in execution request information for an S-Task stored in storage unit 312. The operation will be described below.


In FIG. 19, when broadcast reception detection unit 314 detects a broadcast reception (step S800; YES), storage processing unit 311 determines whether execution request information for an S-Task not yet acquired exists in storage unit 312 (step S810). If execution request information for an S-Task not yet acquired exists (step S810; YES), storage processing unit 311 acquires the execution request information (step S820), and determines whether the current time has passed an execution time (step S830). Since an S-Task is a task whose execution time is optimized by the system, as described above, an S-Task may not be executed after a lapse of an execution time included in execution request information while execution unit 313 is in a dormant status. A non-periodic task is not executed after a lapse of an execution time while execution unit 313 is in a dormant status. Even a periodic task, whose next execution time is set, may not necessarily be executed exactly at its execution time as long as the task is periodically executed. In the present modification, such a task is deemed to be an S-Task. In step S830, such a task is searched for.


If the current time has passed the execution time (step S830; YES), storage processing unit 311 determines whether the task is a periodic task (step S840). If the task is a periodic task (step S840; YES), storage processing unit 311 rewrites, over the execution time of the execution request information acquired in step S820, a time obtained from following expression 1, and stores the rewritten execution request information in storage unit 312 (step S850).





NewSetTime=setTime+count×interval.  expression 1


Therein, count=1+(now−setTime)/interval [therein, (now−setTime)/interval is a value calculated as an integer value];


newSetTime: a new execution time that is written over an old execution time;


setTime: an execution time included in execution request information to be overwritten acquired in step S820;


interval: a period of a task identified in execution request information to be overwritten acquired in step S820; and


now: a time when a broadcast reception has been detected (namely, a current time).


For example, in a case where now=18:00, setTime=17:55, and interval=15 (minutes), (now−setTime)/interval=5/15; however, since (now−setTime)/interval has to be an integer value as described above, a resulting value is “0.” Count=1+0=1. NewSetTime=setTime+count×interval=17:55+1×15 (minutes)=18:10. NewSetTime is always a value subsequent to a current time i.e., now.


On the other hand, if the task is not a periodic task (step S840; NO), storage processing unit 311 rewrites, over the execution time of the execution request information acquired in step S820, a time obtained from following expression 1, and stores the rewritten execution request information in storage unit 312 (step S860).





NewSetTime=setTime+count×t.  expression 2


Therein, count=1+(now−setTime)/t [therein, (now−setTime)/t is a value calculated as an integer value];


newSetTime: a new execution time that is written over an old execution time;


setTime: an execution time included in execution request information to be overwritten acquired in step S820;


t: a predetermined time (for example, 15 minutes); and


now: a time when a broadcast reception has been detected.


For example, in a case where now=18:00, setTime=17:55, t=10 (minutes), (now−setTime)/t=5/10; however, since (now−setTime)/t has to be an integer value as described above, a resulting value is “0.” Count=1+0=1. NewSetTime=setTime+count×t=17:55+1×10 (minutes)=18:05. NewSetTime is always a value subsequent to a current time i.e., now.


Storage processing unit 311 calculates an execution time using expression 1 or 2 at step S850 or S860 because it is necessary to differentiate, in each information-processing device 100, an execution time of an S-Task subsequent to a time when a broadcast reception has been detected, so that occurrence of burst traffic is prevented. Any other algorithm may be used, instead of expression 1 or 2, whereby an execution time can be adequately differentiated in each information-processing device 100.


Storage processing unit 311 may, instead of overwriting an execution time of an S-Task whose execution time has passed, as described above, delete the execution time. If an execution time of a task is deleted, the task is not executed; however, such a measure may be employed in a case where preventing occurrence of burst traffic is emphasized.

Claims
  • 1-14. (canceled)
  • 15. A task control device comprising a task control unit that executes a task of a first type, an execution time of which is not allowed to be changed, at a specified first time, and that executes a task of a second type, an execution time of which is allowed to be changed, at a second time different from the first time.
  • 16. The task control device according to claim 15, wherein: the task control unit acquires execution request information including task identification information that identifies a subject task, an execution time of the subject task, and type information indicating whether the subject task is the first type or the second type; andthe task control unit determines whether the subject task is the first type or the second type based on the type information.
  • 17. The task control device according to claim 15, wherein: the task control unit acquires execution request information including task identification information that identifies a subject task, an execution time of the subject task, and a type of the execution time of the subject task; andthe task control unit determines whether the subject task is the first type or the second type based on the type of the execution time.
  • 18. The task control device according to claim 15, wherein: the task control unit comprises:a storage unit; anda storage processing unit that stores, for the task of the first type, data on the specified first time in the storage unit, and that sets, for the task of the second type, the second time different from the first time such that the task of the second type is executed simultaneously with another task of the second type, and stores data on the second time in the storage unit, wherein the task control unit executes the task of the first type when the first time stored in the storage unit comes, and executes the task of the second type and the other task of the second type when the second time stored in the storage unit comes.
  • 19. The task control device according to claim 18, wherein the storage processing unit, when the task of the second type is a periodic task, sets the second time such that the task of the second type is executed simultaneously with another task of the second type, which is a periodic task, wherein a common divisor exists between an execution period of the task of the second type and an execution period of the other task of the second type, and stores data on the second time in the storage unit.
  • 20. The task control device according to claim 18, wherein the storage processing unit, when the task of the second type is a non-periodic task that does not cause a communication processing, sets the second time such that the task of the second type is executed simultaneously with another task of the first type.
  • 21. The task control device according to claim 18, wherein the storage processing unit, when the task of the second type is a task that causes a communication processing, sets the second time based on a communication start time of the task of the second type such that communication caused by the task of the second type starts at the same time when communication caused by another task of the second type starts.
  • 22. The task control device according to claim 15, wherein: the task control unit comprises:a storage unit;a storage processing unit that stores, in the storage unit, data on the first time specified for the task of the first type and data on an execution time specified for the task of the second type; andan execution unit that executes the task of the first type at the first time stored in the storage unit, and that, for the task of the second type, changes the execution time stored in the storage unit to the second time different from the first time such that the task of the second type is executed simultaneously with another task of the second type, and executes the task of the second type at the second time.
  • 23. The task control device according to claim 15, wherein when the task control unit has transited from a dormant status to an operating status in response to a notification of an event to the task of the second type, and a time when the task control unit has transited from a dormant status to an operating status has passed an execution time specified for the task of the second type, the task control unit sets the execution time specified for the task of the second type to the second time, which is an execution time of another task of the second type, which is executed most recently subsequent to the time when the task control unit has transited from a dormant status to an operating status.
  • 24. The task control device according to claim 15, wherein when the task control unit has transited from a dormant status to an operating status in response to a factor other than a request for executing the task of the second type and a notification of an event to the task of the second type, and a time when the task control unit has transited from a dormant status to an operating status has passed an execution time specified for the task of the second type, the task control unit sets the execution time specified for the task of the second type to the second time, which is an execution time of another task of the second type, which is executed most recently subsequent to the time when the task control unit has transited from a dormant status to an operating status.
  • 25. The task control device according to claim 15, comprising a status management unit that manages a status of the task control device, wherein the task control unit determines, based on the status managed by the status management unit, whether to change the first time of the task of the first type or an execution time of the task of the second type, and thereafter executes the task of the first type or the task of the second type.
  • 26. The task control device according to claim 15, comprising a control policy change unit that changes a control policy for the task control unit based on information input to the task control device, wherein the task control unit controls execution of a task in accordance with the control policy changed by the control policy change unit.
  • 27. The task control device according to claim 22, comprising a broadcast reception detection unit that detects a reception of broadcast information distributed to plural information-processing devices, one of which includes the task control device, wherein when the broadcast reception detection unit has detected a reception of the broadcast information, and a time when the broadcast reception detection unit has detected the reception of the broadcast information has passed an execution time specified for the task of the second type, the storage processing unit writes, over the execution time specified for the task of the second type, the second time subsequent to the time when the broadcast reception detection unit has detected the reception of the broadcast information, and stores data on the second time in the storage unit.
  • 28. The task control device according to claim 22, comprising a broadcast reception detection unit that detects a reception of broadcast information distributed to plural information-processing devices, one of which includes the task control device, wherein when the broadcast reception detection unit has detected a reception of the broadcast information, and a time when the broadcast reception detection unit has detected the reception of the broadcast information has passed an execution time specified for the task of the second type, the storage processing unit deletes the execution time specified for the task of the second type.
PCT Information
Filing Document Filing Date Country Kind
PCT/US2013/067676 10/31/2013 WO 00
Continuations (1)
Number Date Country
Parent 13673413 Nov 2012 US
Child 14407669 US