CN101634956B - Dispatching method and dispatcher of information of polynuclear processor - Google Patents

Dispatching method and dispatcher of information of polynuclear processor Download PDF

Info

Publication number
CN101634956B
CN101634956B CN2009101712337A CN200910171233A CN101634956B CN 101634956 B CN101634956 B CN 101634956B CN 2009101712337 A CN2009101712337 A CN 2009101712337A CN 200910171233 A CN200910171233 A CN 200910171233A CN 101634956 B CN101634956 B CN 101634956B
Authority
CN
China
Prior art keywords
message
information image
task
information
controll block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009101712337A
Other languages
Chinese (zh)
Other versions
CN101634956A (en
Inventor
杨炼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2009101712337A priority Critical patent/CN101634956B/en
Publication of CN101634956A publication Critical patent/CN101634956A/en
Priority to PCT/CN2010/076335 priority patent/WO2011023106A1/en
Application granted granted Critical
Publication of CN101634956B publication Critical patent/CN101634956B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The invention discloses a dispatching method of the information of a polynuclear processor. The method comprises the following steps: an information control block generates information and records the description information and the dispatching control information of the information; an information image generates the information and points to the information control block; and the information image is added to a host task information image queue. The invention also discloses a dispatcher of the information of the polynuclear processor. By adopting the invention, the high-speed transmission of the information can be realized, the extra internal memory does not need to be used, the internal memory expense is greatly saved, and the transmission efficiency of the information is enhanced.

Description

Information of polynuclear processor dispatching method and scheduler
Technical field
The present invention relates to computing machine and communication technical field, relate in particular to polycaryon processor dispatching method and scheduler.
Background technology
In the polycaryon processor system, each kernel has shared memory headroom.Core buffer is the entity of pass-along message between the task and between the kernel.In order to guarantee that the message of sending earlier is received latter linked queue structure before the buffer zone of bearer messages is designed to usually earlier.The formation that the sort buffer district constitutes is called message queue.
As the frequent systemic-function of using of a kind of quilt, the efficient of message transmission influences the operational efficiency of multitask embedded system to a great extent, and this influence is embodied in the expense of message scheduling process life period and internal memory two aspects.Time overhead comprises the execution time of message scheduling feature operation message queue, and because send message with the obstruction mode, the task entering, withdraws from the caused task of blocked state switching time.Message is after sending and before receiving, and corresponding data temporarily leave in the buffer zone of message queue, and memory cost just is meant the memory headroom that message queue takies.The size of each buffer zone has determined the memory cost of message scheduling function in the length of message queue and the formation.
This shows that the way to manage of message queue influences the efficient that message is transmitted to a great extent, is the major issue that the message scheduling technology is faced.
In the prior art, mailbox and message pool are to realize the universal method of message scheduling.The mailbox method organizes message queue to realize message scheduling with static buffer; The message pool method then adopts the dynamic buffer distribution mechanism to realize message scheduling.
The inventor finds that there is following deficiency at least in prior art in realizing process of the present invention:
Because prior art is when realizing message scheduling; The data copy operation that need repeat in a large number in the information receiving and transmitting process; Cause time overhead big; And also make information broadcast and forwards process need extra memory deposit new information, cause the memory source waste, thereby can't message scheduling function efficiently be provided for polycaryon processor.
Summary of the invention
The embodiment of the invention provides a kind of information of polynuclear processor dispatching method, and in order to improve the efficient that message is transmitted, this method comprises:
Produce the message controll block of message, said message controll block writes down the descriptor and the scheduling control information of said message;
Produce the information image of said message, said information image is pointed to said message controll block;
Add said information image to the place task information image queue;
If said message is synchronization message, then after adding said information image to the place task information image queue, also comprise: originating task is placed blocked state, due-in to syn ack message continued operation originating task from the place task; Perhaps
If said message is syn ack message, then said information image is added to the head of the queue of place task information image queue, and remove the blocked state of place task.
The embodiment of the invention also provides a kind of information of polynuclear processor scheduler, and in order to improve the efficient that message is transmitted, this information of polynuclear processor scheduler comprises:
First generation module is used to produce the message controll block of message, and said message controll block writes down the descriptor and the scheduling control information of said message;
Second generation module is used to produce the information image of said message, and said information image is pointed to said message controll block;
Add module, be used for adding said information image to the place task information image queue;
If said message is synchronization message, then said information of polynuclear processor scheduler also comprises:
Block module, be used for after said interpolation module is added said information image to the place task information image queue, originating task being placed blocked state, due-in to syn ack message continued operation originating task from the place task; Perhaps,
If said message is syn ack message, then said interpolation module is further used for said information image is added to the head of the queue of place task information image queue; Said information of polynuclear processor scheduler also comprises:
Block and remove module, be used for after said interpolation module is added said information image the head of the queue of place task information image queue to, remove the blocked state of place task.
In the embodiment of the invention; The information image that constitutes message queue is separated with the message controll block of message being described with controlling; When sending message; Need not copy message controll block and data buffer, and only need produce information image, information image added to the information image queue of corresponding place task; When receiving message, only need from the task information image queue of place, to win the information image of message, according to the message controll block of information image sensing, to the descriptor and the scheduling control information of place task feedback message; Thereby, can realize the high-speed transfer of message at the data copy operation that the information receiving and transmitting process need not to carry out repetition, and need not to use extra memory, saved memory cost greatly, improved the efficient that message is transmitted.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.In the accompanying drawings:
Fig. 1, Fig. 2 are the processing flow chart of information of polynuclear processor dispatching method in the embodiment of the invention;
Fig. 3 is the enforcement scene synoptic diagram of information of polynuclear processor dispatching method in the embodiment of the invention;
Fig. 4 is a dynamic memory management example schematic in the embodiment of the invention;
Fig. 5 is the detail operations process flow diagram of message establishing process in the embodiment of the invention;
Fig. 6 is the detail operations process flow diagram of the operating part of scheduler kernel under originating task in the message transmitting process in the embodiment of the invention;
Fig. 7 is the detail operations process flow diagram that message is sent the operating part of scheduler kernel under the task of place in the journey in the embodiment of the invention;
Fig. 8 is the detail operations process flow diagram of the operating part of scheduler kernel under originating task in the synchronization message process of transmitting in the embodiment of the invention;
Fig. 9 is the detail operations process flow diagram of the operating part of scheduler kernel under the task of place in the synchronization message process of transmitting in the embodiment of the invention;
Figure 10 is the detail operations process flow diagram of the operating part of scheduler kernel under originating task in the syn ack message transmitting process in the embodiment of the invention;
Figure 11 is the detail operations process flow diagram of the operating part of scheduler kernel under the task of place in the syn ack message transmitting process in the embodiment of the invention;
Figure 12 is the detail operations process flow diagram of message sink process in the embodiment of the invention;
Figure 13 is the detail operations process flow diagram of message dispose procedure in the embodiment of the invention;
Figure 14, Figure 15 are the structural representation of information of polynuclear processor scheduler in the embodiment of the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer, the embodiment of the invention is explained further details below in conjunction with accompanying drawing.At this, illustrative examples of the present invention and explanation thereof are used to explain the present invention, but not as to qualification of the present invention.
As shown in Figure 1, the treatment scheme of information of polynuclear processor dispatching method can comprise in the embodiment of the invention:
The message controll block of step 101, generation message, said message controll block writes down the descriptor and the scheduling control information of said message;
The information image of step 102, the said message of generation, said information image is pointed to said message controll block;
Step 103, add said information image to the place task information image queue.
In the flow process shown in Figure 1; The information image that constitutes message queue is separated with the message controll block of message being described with controlling, and when sending message, need not copy message controll block and data buffer; And only need produce information image, information image added to the information image queue of corresponding place task; Thereby, can realize that the high speed of message is sent, and need not to use extra memory at the data copy operation that message transmitting process need not to carry out repetition; Save memory cost greatly, improved the efficient that message is sent.
As shown in Figure 2, the treatment scheme of information of polynuclear processor dispatching method can comprise in the embodiment of the invention:
Step 201, from the task information image queue of place, win the information image of message;
Step 202, according to the message controll block that said information image is pointed to, feed back the descriptor and the scheduling control information of said message to the place task.
In the flow process shown in Figure 2, the information image that constitutes message queue is separated with the message controll block of message being described with controlling, when receiving message; Need not copy message controll block and data buffer, and only need from the task information image queue of place, to win the information image of message, according to the message controll block of information image sensing; Descriptor and scheduling control information to place task feedback message; Thereby, can realize that the high speed of message receives, and need not to use extra memory at the data copy operation that the message sink process need not to carry out repetition; Save memory cost greatly, improved the efficient of message sink.
Following mask body illustrates the enforcement of the information of polynuclear processor dispatching method of the embodiment of the invention.Fig. 3 is the enforcement scene synoptic diagram of information of polynuclear processor dispatching method, and among Fig. 3, the enforcement entities/modules that the information of polynuclear processor dispatching method relates to comprises following several sections: message scheduling interface, three grades of scheduling mechanism, schedulers.
The message scheduling interface provides a series of function primitive, comprising: message establishing primitive, message are sent primitive, message sink primitive, message release primitive, synchronization message transmission primitive, syn ack message transmission primitive.
Three grades of scheduling mechanisms are for the ease of describing, will be referred to be used for three parts of scheduler management, scheduling message, comprising: information image queue bunch, the set of message controll block, data buffer set are referred to as " three grades of scheduling mechanisms " together.
Wherein, information image queue bunch is divided into two types: information image queue bunch in the nuclear, inter-core message image queue bunch.
Information image is the reflection of reception message in the corresponding message formation of task and kernel, and it points to the message controll block that receives message.
Each task on each kernel all has an information image queue, and it is organized with the chain sheet form by the information image that this task receives.Generally speaking, all information image pass in and out this formation with FIFO (First In First Out, first in first out) mode, promptly add from tail of the queue, win from head of the queue.The information image queue of all tasks of kernel is formed in the nuclear of this kernel information image queue bunch.
Except the information image queue in examining bunch, each kernel also has an inter-core message image queue.The information image that the task of all tasks of kernel from other kernel receives at first is arranged in the inter-core message image queue of this kernel, by scheduler they is transferred in the information image queue of corresponding reception task one by one and goes.The inter-core message image queue is to exist with the chain sheet form equally, and information image passes in and out this formation with the FIFO mode equally.The inter-core message image queue of all kernels is formed the inter-core message image queue bunch of polycaryon processor.
Message controll block set comprise between all same kernel tasks with different kernel tasks between the controll block of message transmitted.The descriptor and the scheduling control information of a message of a message controll block record.If the data volume that message is carried is less, message controll block can comprise the full detail of this message; If message need be carried more data, these data can be stored in the data buffer zone, point to this data buffer by the buffer pointer in the message controll block.
The data buffer set comprises the data buffer that all are indicated by message controll block because message carries more data.The difference that the size of data buffer is carried data volume because of corresponding message is different.
Below in conjunction with dynamic memory management instance description messages classification in the embodiment of the invention shown in Figure 4, and further explain three grades of relations of dispatching each ingredient in the mechanisms shown in Figure 3.
The usage data buffer district according to whether, message is divided into signal message and buffer zone message.Among Fig. 4, the controll block of message B is not carried the data buffer, is signal message; The controll block of message A, C, D is carried the data buffer that varies in size respectively, and they all are buffer zone message.
Whether unique according to the reception task, message is divided into unicast messages and broadcast.The reception task is called the place task again, and corresponding, the transmission task is called originating task again.A message has only an originating task, is recorded in the message controll block; And that the place task can have is a plurality of, is recorded in respectively in its information image.Among Fig. 4, the controll block of message A, B, C is indicated by a plurality of information image, and promptly they all have a plurality of places task, so be broadcast; Message D by an information image indication, is a unicast messages only.
Whether belong to same kernel according to originating task and place task, message is divided into message and inter-core message in the nuclear.Special, if in a plurality of places task of broadcast, some belongs to same kernel with its originating task, and some belongs to different kernels, and it is the interior message of nuclear so, is again inter-core message.For message in the nuclear, scheduler directly adds its information image in the information image queue of place task to; For inter-core message, scheduler at first adds its information image to the inter-core message image queue of kernel under the task of place, then it is transferred in the information image queue of place task.Among Fig. 4, two place tasks of message C belong to nuclear 1 and nuclear 2 respectively, and it is an inter-core message; Two information image of message A, one of them is positioned at the inter-core message image queue of nuclear 2, and it is about to be transferred in the information image queue of nuclear 2 certain task, also is inter-core message therefore.
Whether be accompanied by the change of task run state according to process of transmitting, message also is divided into common message, synchronization message and syn ack message.Common message is sent according to the unblock mode, and scheduler does not change the running status of originating task and place task.Synchronization message is sent according to the obstruction mode, and scheduler places blocked state with originating task when adding its information image to the place task information image queue.Relative, when syn ack message was sent, scheduler was removed the blocked state of place task, made it be able to continue operation.Be different from generalized case, the information image of syn ack message is not the information image queue of adding the place task by the FIFO mode to, and scheduler inserts the position of head of the queue with it, makes the place task continue to receive this message at first after the operation.
Three grades of message scheduling mechanisms, and management and scheduling that the establishment of various message, transmission, reception, dispose procedure can the scheduled devices.When originating task was created message, scheduler produced message controll block, set up getting in touch between the data buffer that message controll block and originating task import.When originating task sent message, scheduler produced information image, makes its refer message controll block; For message in the nuclear; Directly add it to the place task information image queue, for inter-core message, the transfer of the inter-core message image queue of kernel under the task of passing the night earlier before this.When the place task receives message; Scheduler is won an information image from the information image queue of current task; According to its indicated message controll block, to task feedback message source, place, type of message and the entrained data buffer of message, release message is videoed simultaneously.During place task release message, scheduler after confirming that this message does not have other place task, the data buffer that release message controll block and message are carried.
As previously mentioned, for the transmission of synchronization message and syn ack message, scheduler also needs the running status of corresponding change originating task and place task.
Among the embodiment, the various function primitive of message scheduling interface shown in Figure 3 are described below:
Type of message, message name and the message body of originating task input accepted in message establishing primitive.For signal message, message body is exactly the message data itself that needs transmission; For buffer zone message, message body comprises pointer, the position of message data in buffer zone, the length of message data of the entrained data buffer of message.Message establishing primitive triggers the message establishing process of scheduler, carries out and finishes to originating task feedback message handle.
Message is sent place message identifier and the message handle to be sent that the originating task input accepted in primitive, triggers the message transmitting process of scheduler.
Message sink primitive triggers the message sink process of scheduler, and carry out and finish to message handle that receives message of place task feedback, and the type of message of this message, originating task sign, message name and message body.For signal message, message body is exactly a message data itself, and for buffer zone message, message body comprises data buffer pointer, the message data position in buffer zone, the length of message data.
Message discharges the message handle that place task input accepted in primitive, triggers the message dispose procedure of scheduler.
Synchronization message is sent primitive and is sent primitive acceptance and the identical input of message transmission primitive with syn ack message, triggers the synchronization message process of transmitting and the syn ack message transmitting process of scheduler.
Fig. 3, three grades of scheduling mechanisms shown in Figure 4 constitute based on the message controll block data structure and the information image data structure of table one and table two demonstration.
Table one message controll block data structure
Figure GDA0000133061500000091
Table two information image data structure
Figure GDA0000133061500000092
During practical implementation, the information of polynuclear processor dispatching method of the embodiment of the invention is made up of following scheduling process: message establishing process, message transmitting process, synchronization message process of transmitting, syn ack message transmitting process when sending message; When receiving message, form by following scheduling process: message sink process, message dispose procedure.
Step 101 is the message establishing process among Fig. 1, can comprise during practical implementation: fill type of message, originating task sign, message name in said message controll block; If said message is filled message data for not carrying the signal message of data buffer in the message body of said message controll block; Perhaps, if said message is the buffer zone message of carrying the data buffer, the position of padding data buffer pointer, message data and length in the message body of said message controll block.
As shown in Figure 5, among the embodiment, the detail operations flow process of message establishing process can comprise:
Step 501, obtain message controll block from memory pool;
Step 502, fill type of message, originating task sign, message name in message controll block;
Step 503, judgement type of message, if signal message, then execution in step 504, if buffer zone message, then execution in step 505;
Step 504, directly fill message data in message controll block, execution in step 506;
Step 505, insert the position and the length of data buffer pointer, message data, execution in step 506 in message controll block;
Step 506, feedback message handle, end process.
For carrying the less signal message of quantity of information, message data is duplicated into message controll block transmit; For carrying the more buffer zone message of quantity of information, pointer through the direct transfer data buffer of message controll block and message data are in the position and the length of buffer zone.Therefore, no matter between same kernel task or between different kernel tasks, follow-up message is sent and there is not the lot of data copy in receiving course, can realize high-speed transfer.
Step 102,103 is a message transmitting process among Fig. 1, and step 102 can comprise during practical implementation: with the said message controll block of message controll block pointed of said information image; Fill place task identification, syn ack sign, chain list index in said information image.Step 103 can comprise: said message is directly added said information image to the place task information image queue in the nuclear during message; Perhaps, when said message is inter-core message, go to the place task information image queue in the inter-core message image queue with said information image kernel under the task of place.
Among the embodiment, message transmitting process is divided into scheduler at the operating part of kernel under the originating task and the operating part of scheduler kernel under the task of place.
Be illustrated in figure 6 as the operating part of scheduler kernel under originating task in this example, wherein, the originating task sign that writes down in the scheduler comparison message controll block and the place task identification of input judge that message to be sent is message or inter-core message in the nuclear.For message in the nuclear, directly add information image to the information image queue of place task; For inter-core message, after the inter-core message image queue of adding information image to kernel under the task of place, kernel triggers internuclear interruption under the task of place.The detail operations flow process of the operating part of scheduler kernel under originating task can comprise in the message transmitting process of Fig. 6:
Step 601, obtain information image from memory pool;
Step 602, fill the place task identification, and make its refer message controll block in information image;
Step 603, judgement are message or inter-core messages in the nuclear, if message in the nuclear, then execution in step 604, if inter-core message, then execution in step 605;
Step 604, the information image queue of place task of adding to, end process;
Step 605, the inter-core message image queue of adding the affiliated kernel of place task to;
Step 606, trigger internuclear interruption, end process.
Shown in Figure 7 is the operating part of scheduler kernel under the task of place in this example; Wherein, The internuclear interruption of kernel under the task of scheduler response place; Take out information image one by one from the inter-core message image queue of this kernel,, they are transferred to the information image queue of corresponding place task according to the place task identification that wherein writes down.The detail operations flow process that the message of Fig. 7 is sent the operating part of scheduler kernel under the task of place in the journey can comprise:
Step 701, internuclear interruption generating;
Step 702, from the inter-core message image queue of this kernel, win an information image;
Step 703, this information image transferred to the information image queue of place task;
Step 704, judge that whether the inter-core message image queue is empty, if then end process continues to carry out otherwise change step 702 over to.
Among the embodiment; If said message is synchronization message; Then after adding said information image to the place task information image queue, can also comprise: originating task is placed blocked state, due-in to syn ack message continued operation originating task from the place task.
The synchronization message process of transmitting also is divided into scheduler at the operating part of kernel under the originating task and the operating part of scheduler kernel under the task of place.
As shown in Figure 8, among the embodiment, the detail operations flow process of the operating part of scheduler kernel under originating task can comprise in the synchronization message process of transmitting:
Step 801, obtain information image from memory pool;
Step 802, fill the place task identification, and make its refer message controll block in information image;
Step 803, judgement are message or inter-core messages in the nuclear, if message in the nuclear, then execution in step 804, if inter-core message, then execution in step 805;
Step 804, the information image queue of place task of adding to, execution in step 807;
Step 805, the inter-core message image queue of adding the affiliated kernel of place task to;
Step 806, trigger internuclear interruption, execution in step 807;
Step 807, originating task is placed blocked state, end process.
As shown in Figure 9, among the embodiment, the detail operations flow process of the operating part of scheduler kernel under the task of place can comprise in the synchronization message process of transmitting:
Step 901, internuclear interruption generating;
Step 902, from the inter-core message image queue of this kernel, win an information image;
Step 903, this information image transferred to the information image queue of place task;
Step 904, judge that whether the inter-core message image queue is empty, if then end process continues to carry out otherwise change step 902 over to.
Can learn by Fig. 8 and Fig. 9; The difference of synchronization message process of transmitting and common message process of transmitting is: scheduler not only adds the information image of synchronization message to the information image queue of place task; Also originating task is placed blocked state, make it after the syn ack message of receiving from the place task, can continue operation.
Among the embodiment,, then said information image is added to the head of the queue of place task information image queue, and remove the blocked state of place task if said message is syn ack message.
The syn ack message transmitting process also is divided into scheduler at the operating part of kernel under the originating task and the operating part of scheduler kernel under the task of place.
Shown in figure 10, among the embodiment, the detail operations flow process of the operating part of scheduler kernel under originating task can comprise in the syn ack message transmitting process:
Step 1001, obtain information image from memory pool;
Step 1002, fill the place task identification, and make its refer message controll block in information image;
Step 1003, the syn ack sign is set;
Step 1004, judgement are message or inter-core messages in the nuclear, if message in the nuclear, then execution in step 1005, if inter-core message, then execution in step 1007;
The head of the queue of step 1005, insertion place task information image queue;
The blocked state of step 1006, releasing place task, end process;
Step 1007, the inter-core message image queue of adding the affiliated kernel of place task to;
Step 1008, trigger internuclear interruption, end process.
Shown in figure 11, among the embodiment, the detail operations flow process of the operating part of scheduler kernel under the task of place can comprise in the syn ack message transmitting process:
Step 1101, internuclear interruption generating;
Step 1102, from the inter-core message image queue of this kernel, win an information image;
Step 1103, this information image is transferred to the information image queue of place task, insert from the head of the queue position;
The blocked state of step 1104, releasing place task;
Step 1105, judge that whether the inter-core message image queue is empty, if then end process continues to carry out otherwise change step 1102 over to.
Can learn by Figure 10 and Figure 11; The difference of syn ack message transmitting process and common message process of transmitting is: the operating part of kernel under originating task; Scheduler is provided with the syn ack sign in the information image of this message; In judgement is nuclear, after the message, insert the information image queue of place task from the head of the queue position, remove the blocked state of place task at last; The operating part of kernel under the task of place, scheduler the head of the queue of this message insertion place task information image queue, are removed the blocked state of place task according to the syn ack sign in the information image equally.
Step 201,202 is the message sink process among Fig. 2, and step 202 can comprise during practical implementation: feedback sources task identification, type of message, message name; If said message is not for carrying the signal message of data buffer, feedback message data; Perhaps, if said message is the buffer zone message of carrying the data buffer, the position of feedback data buffer pointer, message data and length.Among the embodiment, after step 202, can also comprise: the memory source that discharges said information image.
Shown in figure 12, among the embodiment, the detail operations flow process of message sink process can comprise:
Step 1201, from the information image queue of this task, win an information image;
Step 1202, obtain message controll block;
Step 1203, feedback message handle, originating task sign, type of message, message name;
Step 1204, judgement type of message, if signal message, then execution in step 1205, if buffer zone message, then execution in step 1206;
Step 1205, feedback message data, execution in step 1207;
The position and the length of step 1206, feedback data buffer pointer, message data, execution in step 1207;
The memory source of step 1207, release message reflection, end process.
Among the embodiment; After above-mentioned message sink process, can also comprise the message dispose procedure, can comprise during practical implementation: if said message is not for carrying the signal message of data buffer; Said message does not have other place task, then discharges the memory source of said message controll block; Perhaps, if said message is the buffer zone message of carrying the data buffer, said message does not have other place task, then discharges the memory source of said message controll block and data buffer.
Shown in figure 13, among the embodiment, the detail operations flow process of message dispose procedure can comprise:
Step 1301, judge that whether message also have other place task, if, end process then, otherwise execution in step 1302;
Step 1302, judgement type of message, if signal message, then execution in step 1303, if buffer zone message, then execution in step 1304;
The memory source of step 1303, release message controll block, end process;
The memory source of the memory source of step 1304, release message controll block and the entrained data buffer of message, end process.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium; This program is when carrying out; Can comprise all or part of step in the foregoing description method, described storage medium can comprise: ROM, RAM, disk, CD etc.
A kind of information of polynuclear processor scheduler also is provided in the embodiment of the invention, of following embodiment.Because the principle that the information of polynuclear processor scheduler is dealt with problems is similar with the information of polynuclear processor dispatching method, so the enforcement of information of polynuclear processor scheduler can repeat part and repeat no more referring to the enforcement of information of polynuclear processor dispatching method.
Shown in figure 14, the information of polynuclear processor scheduler can comprise in the embodiment of the invention:
First generation module 1401 is used to produce the message controll block of message, and said message controll block writes down the descriptor and the scheduling control information of said message;
Second generation module 1402 is used to produce the information image of said message, and said information image is pointed to said message controll block;
Add module 1403, be used for adding said information image to the place task information image queue.
Among the embodiment, first generation module 1401 can comprise:
First filler cells is used for filling type of message, originating task sign, message name in said message controll block;
Second filler cells, being used in said message is when not carrying the signal message of data buffer, in the message body of said message controll block, to fill message data; Perhaps, be when carrying the buffer zone message of data buffer in said message, the position of padding data buffer pointer, message data and length in the message body of said message controll block.
Among the embodiment, second generation module 1402 can comprise:
The 3rd filler cells is used for the said message controll block of message controll block pointed with said information image;
The 4th filler cells is used for filling place task identification, syn ack sign, chain list index in said information image.
Among the embodiment, adding module 1403 can also be used for:
Said message for nuclear in during message, directly add said information image to the place task information image queue; Perhaps
When said message is inter-core message, go to the place task information image queue in the inter-core message image queue with said information image kernel under the task of place.
Among the embodiment, if said message is synchronization message, information of polynuclear processor scheduler then shown in Figure 14 can also comprise:
Block module, be used for after said interpolation module is added said information image to the place task information image queue, originating task being placed blocked state, due-in to syn ack message continued operation originating task from the place task; Perhaps,
If said message is syn ack message, then said interpolation module 1403 can also be used for said information image is added to the head of the queue of place task information image queue; Said information of polynuclear processor scheduler can also comprise:
Block and remove module, be used for after said interpolation module is added said information image the head of the queue of place task information image queue to, remove the blocked state of place task.
Shown in figure 15, the information of polynuclear processor scheduler can comprise in the embodiment of the invention:
Win module 1501, be used for the information image that from place task information image queue is won message;
Feedback module 1502 is used for the message controll block according to said information image sensing, feeds back the descriptor and the scheduling control information of said message to the place task.
Among the embodiment, feedback module 1502 can comprise:
First feedback unit is used for feedback sources task identification, type of message, message name;
Second feedback unit, being used in said message is when not carrying the signal message of data buffer, the feedback message data; Perhaps, be when carrying the buffer zone message of data buffer in said message, the position of feedback data buffer pointer, message data and length.
Among the embodiment, information of polynuclear processor scheduler shown in Figure 15 can also comprise:
First release module is used to discharge the memory source of said information image;
Second release module is used in said message discharging the memory source of said message controll block when not carrying the signal message of data buffer and not having other place task; Perhaps, be when carrying the buffer zone message of data buffer and not having other place task in said message, discharge the memory source of said message controll block and data buffer.
In the embodiment of the invention; The information image that constitutes message queue is separated with the message controll block of message being described with controlling; When sending message; Need not copy message controll block and data buffer, and only need produce information image, information image added to the information image queue of corresponding place task; When receiving message, only need from the task information image queue of place, to win the information image of message, according to the message controll block of information image sensing, to the descriptor and the scheduling control information of place task feedback message; Thereby, can realize the high-speed transfer of message at the data copy operation that the information receiving and transmitting process need not to carry out repetition, and need not to use extra memory, saved memory cost greatly, improved the efficient that message is transmitted.
The information of polynuclear processor dispatching method of the embodiment of the invention, scheduler can be realized the high speed message transmission under the various scenes, reduce the time overhead of message scheduling function greatly.
One,, message data is duplicated into message controll block transmit for carrying the less signal message of quantity of information; For carrying the more buffer zone message of quantity of information, pointer through the direct transfer data buffer of message controll block and message data are in the position and the length of buffer zone.Therefore, no matter between same kernel task or between different kernel tasks, message is sent and there is not the lot of data copy in receiving course, realizes high-speed transfer.
Two, the information image that constitutes message queue is separated with the message controll block of message being described with controlling; Under the situation of information broadcast; Only add a plurality of information image respectively to the information image queue of corresponding place task; And need not copy message controll block and data buffer, thereby realize the high speed information broadcast.
Three, under the situation of forwards, only need to produce the information image that receives message again, also need not copy message controll block and data buffer, thus time high speed forwards.
The information of polynuclear processor dispatching method of the embodiment of the invention, scheduler are under above-mentioned various scenes; Directly transmit the buffer zone of bearer messages data for the more situation of quantity of information; With message controll block pass-along message data, do not use extra memory for the less situation of quantity of information.Therefore also greatly reduce the memory cost of message scheduling function.
The information of polynuclear processor dispatching method of the embodiment of the invention, scheduler need not to be provided with the maximum amount of data that message carries and the length restriction of message queue, support elongated message and elongated message queue.
It is limited and real-time had the multi-core DSP software of high requirement that the embodiment of the invention is particularly useful for memory size in the sheet.
Above-described specific embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely specific embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. an information of polynuclear processor dispatching method is characterized in that, this method comprises:
Produce the message controll block of message, said message controll block writes down the descriptor and the scheduling control information of said message;
Produce the information image of said message, said information image is pointed to said message controll block;
Add said information image to the place task information image queue;
If said message is synchronization message, then after adding said information image to the place task information image queue, also comprise: originating task is placed blocked state, due-in to syn ack message continued operation originating task from the place task; Perhaps
If said message is syn ack message, then said information image is added to the head of the queue of place task information image queue, and remove the blocked state of place task.
2. the method for claim 1 is characterized in that, produces the message controll block of message, and said message controll block writes down the descriptor and the scheduling control information of said message, comprising:
Fill type of message, originating task sign, message name in said message controll block;
If said message is filled message data for not carrying the signal message of data buffer in the message body of said message controll block; Perhaps
If said message is the buffer zone message of carrying the data buffer, the position of padding data buffer pointer, message data and length in the message body of said message controll block.
3. the method for claim 1 is characterized in that, produces the information image of said message, and said information image is pointed to said message controll block, comprising:
The said message controll block of message controll block pointed with said information image;
Fill place task identification, syn ack sign, chain list index in said information image.
4. the method for claim 1 is characterized in that, adds said information image to the place task information image queue, comprising:
Said message is directly added said information image to the place task information image queue in the nuclear during message; Perhaps
When said message is inter-core message, go to the place task information image queue in the inter-core message image queue with said information image kernel under the task of place.
5. an information of polynuclear processor scheduler is characterized in that, comprising:
First generation module is used to produce the message controll block of message, and said message controll block writes down the descriptor and the scheduling control information of said message;
Second generation module is used to produce the information image of said message, and said information image is pointed to said message controll block;
Add module, be used for adding said information image to the place task information image queue;
If said message is synchronization message, then said information of polynuclear processor scheduler also comprises:
Block module, be used for after said interpolation module is added said information image to the place task information image queue, originating task being placed blocked state, due-in to syn ack message continued operation originating task from the place task; Perhaps,
If said message is syn ack message, then said interpolation module is further used for said information image is added to the head of the queue of place task information image queue; Said information of polynuclear processor scheduler also comprises:
Block and remove module, be used for after said interpolation module is added said information image the head of the queue of place task information image queue to, remove the blocked state of place task.
6. information of polynuclear processor scheduler as claimed in claim 5 is characterized in that, said first generation module comprises:
First filler cells is used for filling type of message, originating task sign, message name in said message controll block;
Second filler cells, being used in said message is when not carrying the signal message of data buffer, in the message body of said message controll block, to fill message data; Perhaps, be when carrying the buffer zone message of data buffer in said message, the position of padding data buffer pointer, message data and length in the message body of said message controll block.
7. information of polynuclear processor scheduler as claimed in claim 5 is characterized in that, said second generation module comprises:
The 3rd filler cells is used for the said message controll block of message controll block pointed with said information image;
The 4th filler cells is used for filling place task identification, syn ack sign, chain list index in said information image.
8. information of polynuclear processor scheduler as claimed in claim 5 is characterized in that, said interpolation module is further used for:
Said message for nuclear in during message, directly add said information image to the place task information image queue; Perhaps
When said message is inter-core message, go to the place task information image queue in the inter-core message image queue with said information image kernel under the task of place.
CN2009101712337A 2009-08-25 2009-08-25 Dispatching method and dispatcher of information of polynuclear processor Active CN101634956B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2009101712337A CN101634956B (en) 2009-08-25 2009-08-25 Dispatching method and dispatcher of information of polynuclear processor
PCT/CN2010/076335 WO2011023106A1 (en) 2009-08-25 2010-08-25 Scheduling method and scheduler for multi-core processor messages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101712337A CN101634956B (en) 2009-08-25 2009-08-25 Dispatching method and dispatcher of information of polynuclear processor

Publications (2)

Publication Number Publication Date
CN101634956A CN101634956A (en) 2010-01-27
CN101634956B true CN101634956B (en) 2012-08-08

Family

ID=41594153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101712337A Active CN101634956B (en) 2009-08-25 2009-08-25 Dispatching method and dispatcher of information of polynuclear processor

Country Status (2)

Country Link
CN (1) CN101634956B (en)
WO (1) WO2011023106A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101634956B (en) * 2009-08-25 2012-08-08 华为技术有限公司 Dispatching method and dispatcher of information of polynuclear processor
CN102255794B (en) * 2010-05-17 2014-07-30 塔塔咨询服务有限公司 Remote message transmit-receive handling capacity and waiting time shortening system and method
CN111177636B (en) * 2020-01-07 2023-11-03 北京同有飞骥科技股份有限公司 Recursive scheduling method and system for webpage request
CN112887196B (en) * 2021-01-20 2023-03-24 远景智能国际私人投资有限公司 Message sending method, system, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1504892A (en) * 2002-12-05 2004-06-16 华为技术有限公司 Realization method for communication between tasks
CN1549108A (en) * 2003-05-07 2004-11-24 中兴通讯股份有限公司 Method for realizing communication process zero copy information queue
CN1904873A (en) * 2005-07-28 2007-01-31 大唐移动通信设备有限公司 Inter core communication method and apparatus for multi-core processor in embedded real-time operating system
CN101504617A (en) * 2009-03-23 2009-08-12 华为技术有限公司 Data transmitting and receiving method and device based on processor sharing internal memory

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5931915A (en) * 1997-05-13 1999-08-03 International Business Machines Corporation Method for processing early arrival messages within a multinode asynchronous data communications system
US20030135575A1 (en) * 2002-01-14 2003-07-17 Richard Marejka Self-monitoring and trending service system with cascaded pipeline linking numerous client systems
US7562365B2 (en) * 2004-01-12 2009-07-14 International Business Machines Corporation Random access for processing messages in a message queue
CN101634956B (en) * 2009-08-25 2012-08-08 华为技术有限公司 Dispatching method and dispatcher of information of polynuclear processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1504892A (en) * 2002-12-05 2004-06-16 华为技术有限公司 Realization method for communication between tasks
CN1549108A (en) * 2003-05-07 2004-11-24 中兴通讯股份有限公司 Method for realizing communication process zero copy information queue
CN1904873A (en) * 2005-07-28 2007-01-31 大唐移动通信设备有限公司 Inter core communication method and apparatus for multi-core processor in embedded real-time operating system
CN101504617A (en) * 2009-03-23 2009-08-12 华为技术有限公司 Data transmitting and receiving method and device based on processor sharing internal memory

Also Published As

Publication number Publication date
WO2011023106A1 (en) 2011-03-03
CN101634956A (en) 2010-01-27

Similar Documents

Publication Publication Date Title
CN101504617B (en) Data transmitting method and device based on processor sharing internal memory
CN100458757C (en) Inter core communication method and apparatus for multi-core processor in embedded real-time operating system
CN100440184C (en) DMA controller and transmit method capable of simultaneously carrying out read-write operation
US8155134B2 (en) System-on-chip communication manager
CN105511954A (en) Method and device for message processing
CN102866971A (en) Data transmission device, system and method
CN101634956B (en) Dispatching method and dispatcher of information of polynuclear processor
CN101188544A (en) File transfer method for distributed file server based on buffer
CN107527317A (en) Data transmission system based on image procossing
CN108881485A (en) The method for ensureing the high concurrent system response time under big data packet
CN102193874A (en) Buffer manager and method for managing memory
JPS62284452A (en) Information transfer system
CN102437929A (en) Method and device for de-queuing data in queue manager
CN101729407A (en) Low delay jitter exchanging method and equipment based on unicast and multicast differentiated treatment
CN101470636B (en) Message read-write method and apparatus
CN103986585A (en) Message preprocessing method and device
WO2020156797A1 (en) Handling an input/output store instruction
CN105426260A (en) Distributed system supported transparent interprocess communication system and method
EP2899644A1 (en) Device and method for inter-core communication in multi-core processor
WO2021147877A1 (en) Data exchange system for statically distributed computing architecture, and method therefor
CN109144749A (en) A method of it is communicated between realizing multiprocessor using processor
CN100395737C (en) Method for transmitting data between internal memory and digital signal processor
US20070280224A1 (en) System and method for an output independent crossbar
CN109062857A (en) A kind of new type of messages controller and its communication means that can be communicated between realization of High Speed multiprocessor
CN101305353B (en) Centralized interrupt controller

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant