Double processing offloading to additional and central processing units
09886330 ยท 2018-02-06
Assignee
Inventors
Cpc classification
G06F9/5027
PHYSICS
G06F9/542
PHYSICS
International classification
G06F9/50
PHYSICS
Abstract
A data-processing system (DTS) includes a central hardware unit (CPU) and an additional hardware unit (HW), the central hardware unit (CPU) being adapted to execute a task by a processing thread (T.sub.M), and to trigger offloading of execution of a first part (P1a, P1b, P2) of the task to the additional hardware unit (HW); and wherein the additional hardware unit is adapted to call on functionalities of the central hardware unit (CPU), triggered by the first part, and the central hardware unit (CPU) executes a second part (P2) of the task forming a sub-part of the first part by a service processing thread (T.sub.S).
Claims
1. A method for executing a task on a data-processing system including a central hardware unit and an additional hardware unit, said task being executed by a processing thread of said central hardware unit, said method comprising: an offloading step of execution of a first part of said task to said additional hardware unit; a step by said additional hardware unit for calling on functionalities of said central hardware unit that are triggered by a triggering sub-part of said first part, by the additional hardware unit; an offloading step, during execution of the first part, of a second part that is a sub-part of the first part, from the additional hardware unit to the central hardware unit, the second part being different from the triggering sub-part of the first part; and an execution step of execution of the second part, by a service processing thread of said central hardware unit, wherein the triggering sub-part of the first part is not offloaded from the additional hardware unit to the central hardware unit.
2. The method according to claim 1, wherein, on completion of execution of said second part of said task, said central hardware unit sends a notification to said additional hardware unit.
3. The method according to claim 2, wherein, on completion of execution of said first part of said task, said additional hardware unit sends a notification to said central hardware unit.
4. The method according to claim 2, wherein data transmissions between said additional hardware unit and said central hardware unit transit via an operating system executed by said central hardware unit.
5. The method according to claim 1, wherein, on completion of execution of said first part of said task, said additional hardware unit sends a notification to said central hardware unit.
6. The method according to claim 5, wherein data transmissions between said additional hardware unit and said central hardware unit transit via an operating system executed by said central hardware unit.
7. The method according to claim 1, wherein data transmissions between said additional hardware unit and said central hardware unit transit via an operating system executed by said central hardware unit.
8. A computer program comprising instructions stored in a non-transitory computer-readable medium, which, once loaded onto an information-processing system, are configured to implement the method according to claim 1.
9. A data-processing system, comprising: a central hardware unit; and an additional hardware unit, wherein the central hardware unit is configured to execute a task by a processing thread and to trigger offloading of execution of a first part of said task to said additional hardware unit, the additional hardware unit is configured to call on functionalities of said central hardware unit, triggered by a triggering sub-part of said first part, during execution of the first part, a second part is offloaded from the additional hardware unit to the central hardware unit, the second part being a sub-part of the first part, the second part being different from the triggering sub-part of the first part, and said central hardware unit executes the second part by a service processing thread, wherein the triggering sub-part of the first part is not offloaded from the additional hardware unit to the central hardware unit.
10. The data-processing system according to claim 9, wherein, on completion of execution of said second part of said task, said central hardware unit sends a notification to said additional hardware unit.
11. The data-processing system according to claim 10, wherein, on completion of execution of said first part of said task, said additional hardware unit sends a notification to said central hardware unit.
12. The data-processing system according to claim 10, wherein data transmissions between said additional hardware unit and said central hardware unit transit via an operating system executed by said central hardware unit.
13. The data-processing system according to claim 10, further comprising a communication bus for data transmissions between said additional hardware unit and said central hardware unit.
14. The data-processing system according to claim 9, wherein, on completion of execution of said first part of said task, said additional hardware unit sends a notification to said central hardware unit.
15. The data-processing system (DTS) according to claim 14, wherein data transmissions between said additional hardware unit (HW) and said central hardware unit (CPU) transit via an operating system (OS) executed by said central hardware unit.
16. The data-processing system (DTS) according to claim 14, further comprising a communication bus for data transmissions between said additional hardware unit and said central hardware unit.
17. The data-processing system according to claim 9, wherein data transmissions between said additional hardware unit and said central hardware unit transit via an operating system executed by said central hardware unit.
18. The data-processing system according to claim 9, further comprising a communication bus for data transmissions between said additional hardware unit and said central hardware unit.
19. A computer program comprising instructions stored in a non-transitory computer-readable medium, which, once loaded onto an information-processing system, are adapted to implement the method according to claim 2.
20. A computer program comprising instructions stored in a non-transitory computer-readable medium, which, once loaded onto an information-processing system, are adapted to implement the method according to claim 5.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
DETAILED DESCRIPTION OF THE INVENTION
(3) As shown in the example of
(4) The central hardware unit CPU executes tasks. These tasks can be also called processes and can be defined as a set of instructions to be executed, loaded into the volatile memory (RAM) of a processing unit, and generally an addressing space in volatile memory for storing the stack, work data, etc. The task is typically stored in non-volatile memory and loaded into volatile memory at the time of execution.
(5) The tasks are executed by the central hardware unit (or processor) CPU by means of an operating system OS. The operating system is a set of instructions responsible for allocating resources (memory, processor time, input/output . . . ) necessary for the different tasks, ensuring that the functioning of one task does not interfere with that of the others, providing simplified and uniform tasks with access means to the different hardware means deployed in the processing system DTS, etc.
(6) In a certain way, the operating system OS also comprises tasks, but these tasks will be called computer programs other than the operating system OS but operating with its support.
(7) The central hardware unit CPU is typically a processor or a set of processors. These processors are generalist hardware units adapted to execute various tasks and are typically microprocessors.
(8) The operating system OS is also adapted to execute these various tasks. Examples of operating systems comprise Microsoft Windows systems, Unix family systems, systems for onboard systems such as Google Android, Apple iOS, etc.
(9) Central hardware units CPU and the operating systems are generally multi-thread or multithread according to current English terminology. They are capable of managing several execution threads associated with a task or part of a different task.
(10) Some operating systems can be dedicated (or adapted) to microprocessors and particular data-processing systems DTS. This is especially the case of supercalculators for which architectures are specific and need the elaboration or the adaptation of a specific operating system. In this situation also, both the central hardware unit CPU and the operating system OS are generalist in the sense where they execute tasks whereof the content is varied and not known in advance.
(11) The additional hardware unit HW is per se specifically dedicated to a type of task or to a reduced range of possible tasks. This adequacy of the task for the hardware unit executing it optimises the architecture of this unit to: reduce costs; increase performances, since the architecture is adapted to the task rather than provide for execution of all possible tasks.
(12) The additional hardware unit HW and the central hardware unit CPU respond therefore to very different, or even contradictory, problems and architectural constraints.
(13) An additional hardware unit HW can be adapted for example to encoding and decoding of audio or video data. Otherwise, it can execute a CODEC or part of a CODEC. This relieves the CPU central unit of this highly calculatory task and allows it to allocate machine time necessary for other tasks. Also, since the additional unit is adapted to this type of task, it is architectured as a function and produces superior yields (for example a higher encoding/decoding speed).
(14) The central hardware unit CPU and the additional hardware unit HW can communicate in different ways known per se. In particular, a communication bus CM can ensure data transmission between the two hardware units. These data transmitted between the two units will be explained below; they comprise commands, notifications and any information flow enabling cooperation between one part of the task executed by the central unit and another part of the task executed by the additional unit.
(15)
(16) The task is initially executed by a processing thread T.sub.M of the central hardware unit CPU. The way in which it is triggered is conventional per se and beyond the scope of the present invention. This processing thread T.sub.M belongs to an applicative area UA of the central unit, by opposition to the system area associated with the operating system OS.
(17) At the instant t.sub.1, the task arrives at a part (P1a, P2, P1b) of the processing which can be the subject of execution offloading. Determination of the part which can be the subject of offloading is done by the task itself, in the program instructions constituting it.
(18) The execution (or processing) thread T.sub.M triggers offloading by sending a request S1 destined for the additional hardware unit HW. This request contains information necessary for processing the part of the task forming the subject of the offloading. This information can especially contain data to be processed, or else the address of data to be processed, or a port where a flow of data to be processed, etc. arrives.
(19) The request S1 can transit via the operating system OS of the central hardware unit CPU. The operating system can present a standardised interface for access to the offloading mechanism such that the task (and therefore the programmers) needs to know only the functionalities and capacities of the additional hardware unit(s) and not all the technical characteristics and especially the access ports, the way to deploy data etc.
(20) In this case, the operating system OS receives the request S1 and, after a shaping function of the technical characteristics of the additional hardware unit, it sends them back (in this modified form) to the latter. Transmission can pass via the communication bus CB as specified earlier.
(21) A bypass of the operating system OS (OS Bypass) can also be provided. In this implementation, the processing thread T.sub.M communicates directly with the additional hardware unit HW to send it the request S1.
(22) Once the information is received from the processing thread T.sub.M (directly or via the operating system OS), the additional hardware unit HW can execute the part of the task which is offloaded to it.
(23) This offloading can interrupt execution of the processing thread T.sub.M if the latter has to wait for the results of execution of this part (P1a, P2, P1b) of the task to continue; or else execution of the processing thread T.sub.M continues in parallel with execution of the offloading of part of the task, as shown in
(24) During its execution, this part of the offloaded task determines that a sub-part needs functionalities of the central hardware unit CPU. These functionalities cannot be available on the more specialised additional hardware unit HW, or else not sufficiently effectively.
(25) This can be the case when in processing specially dedicated to the additional hardware unit HW a particular case occurs which cannot be processed by the latter, or with difficulty only.
(26) Another situation can consist of offloading a first part of the task, knowing that a sub-part needs the functionalities of the central unit CPU.
(27) This method also allows the task (and therefore the programmers) to disregard this problem and have the mechanisms of the invention manage this transparently.
(28) This method also more easily manages updates of the software integrated into the additional unit (<<firmware>>). In providing future updates, part of the processing can be offloaded, but a sub-part can be further executed by the central unit CPU while waiting for these updates.
(29) In the example of
(30) With sub-parts P2 and P1b this sub-part P1a forms the part of the task which has been offloaded onto the additional unit.
(31) The sub-part P2 corresponds to the part of the task which has been offloaded to the additional unit but which the latter can (or not want) to execute and for which calling on the functionalities of the central unit CPU is required.
(32) According to an embodiment of the invention, the additional hardware unit HW then sends an interruption S3 to the operating system OS of the central hardware unit CPU.
(33) The operating system OS is provided to react to this interruption by sending the request to a service processing thread T.sub.S.
(34) The service thread T.sub.S executes the part P2 of the task which is sent to it, this part P2 therefore being a sub-part of the part offloaded.
(35) The service thread can be executed on the same processor as the processing thread T.sub.M or on a different thread of the central hardware unit in the event where the latter is a multiprocessor. It can be interesting that the processing and service threads are executed by the same processor for reasons of performances because of the locality between the processor and the data to be processed.
(36) The service thread T.sub.S can be created by the operating system OS or by the processing thread T.sub.M executing the task. In the latter case, the programme associated with the task can call on a library loaded by the program.
(37) The part of task P2 can be executed by capitalising on the functionalities of the central unit CPU and not be restricted by the specificities of the additional units.
(38) Also, the two threads can share the same software context of the task. It would be otherwise delicate to synchronise context data between the two units. Likewise, the service thread can also act with the same privileges as the task executed on the central unit, which is interesting and important in the event where the other hardware units do not have the same privileges.
(39) On completion of execution of this second part P2 of the task, the central hardware unit CPU can send a notification S5, S6 to the additional hardware unit HW.
(40) This notification can transit via the operating system OS or else be sent directly to the additional hardware unit HW.
(41) The notification can contain a statute, indicating that execution on the service thread has occurred, but also results of this execution. These results can be necessary to trigger the repeating of execution of the task on the additional hardware unit (part P1b).
(42) It should be noted that according to an embodiment of the invention, and according to the types of tasks to be executed it is quite possible that execution of part P1a/P1b of the task continues in parallel with execution of the second part P2 by the service thread T.sub.S. The invention in effect covers different possible embodiments which can depend on applications.
(43) In the same way, on completion of execution of the first part (P1a, P2, P1b) of the task, the additional hardware unit HW can transmit a notification S8, S9 to said central hardware unit CPU. This notification can transit via the operating system OS: it can be encouraged to modify the received notification S8 before sending it to the processing thread T.sub.M (notification S9).
(44) Alternatively, the additional hardware mechanism HW cannot notify the processing thread T.sub.M. In fact, in some situations, it is possible for the task to request offloading of execution of part of this task without being interested in termination of the latter. It is possible to provide for the processing thread T.sub.M to later transmit a stop command of the part offloaded of the task.
(45) Of course, the present invention is not limited to the examples and embodiment as described and illustrated, but it is susceptible de many variants accessible to those skilled in the art.