CN1317640C - Multi-task application software module management method in real-time operating system environment - Google Patents
Multi-task application software module management method in real-time operating system environment Download PDFInfo
- Publication number
- CN1317640C CN1317640C CNB2004100741221A CN200410074122A CN1317640C CN 1317640 C CN1317640 C CN 1317640C CN B2004100741221 A CNB2004100741221 A CN B2004100741221A CN 200410074122 A CN200410074122 A CN 200410074122A CN 1317640 C CN1317640 C CN 1317640C
- Authority
- CN
- China
- Prior art keywords
- software module
- message
- application software
- pid
- task
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The present invention discloses a method for managing a multitask application software module in the environment of a real-time operating system. An application software module managing layer is added between a multitask application program and the real time operating system. The method comprises that the application program is divided into one or a plurality of FID; each FID is divided into one or a plurality of PID; the application software module managing layer registers the priority of the FID, creates message handling tasks and message queues, and registers PID function processing functions. Besides, the method also comprises that: a. the source PID is applied, and a message packet is filled and sent; b. the application software module managing layer causes the message packet to be added to the message queues of the FID of the purpose PID; c. the real-time operating system handles the tasks according to the priority scheduling message of the FID; d. the message handling tasks read the message packet from the message queues, and a functional function of the purpose PID is invoked. The method of the present invention is adopted to avoid the problem of the synchronization / the mutual exclusion, etc. among software modules for the multitask application program, and the development process is simplified.
Description
Technical field
The present invention relates to the software module management technology, be meant the management method of multi-task application software module under a kind of real time operating system environment especially.
Background technology
Along with development of science and technology, the application of embedded system is extensive day by day.Embedded system refers generally to non-PC system, comprises hardware and software two parts, and wherein, software section comprises real time operating system software and application software.Application software is being controlled the running and the behavior of system, and operating system is being controlled the reciprocation of application program and hardware.
Wherein, task is the unit that participates in the CPU scheduling in the real time operating system, and different tasks has task context of oneself (Context) and stack space, shared drive between each task, each task all has corresponding task entrance function, and different tasks can have identical task entrance function.Each task all has priority, and real time operating system generally adopts the scheduling strategy of preemptive priority, under the ready situation of a plurality of tasks, has only the highest ready task of priority can obtain the CPU operation.
Under the real time operating system environment, whole real-time application is divided into several independently software modules by task, the part of functions of each resume module application program, each software module function is relatively independent, coupling is as best one can little and by the multitask communication mechanism, as: shared drive, message queue, pipeline, semaphore etc., finish the synchronous and co-ordination between the module.
But; this method of dividing software module according to task needs upper layer application fully to understand the principle and the mechanism of multiple task operating system software; in actual the realization; need the Application developer take all factors into consideration the protection of communication between task, critical resource, synchronously, the factors such as generation of deadlock between mutual exclusion, task, otherwise will cause a series of application software defectives because of the mechanism of being unfamiliar with real time operating system.
Summary of the invention
In view of this; the object of the present invention is to provide the management method of multi-task application software module under a kind of real time operating system environment; can mask critical resource protection between task, synchronous, mutual exclusion in the real-time multi-task applied software development process; prevent problems such as deadlock, simplify process of application development.
In order to achieve the above object, technical scheme of the present invention is achieved in that
The invention provides the management method of multi-task application software module under a kind of real time operating system environment, the application software module administration and supervision authorities are set between multitask application program and real time operating system, and this method also comprises: the method for setting up communication between the methods and applications software module that concerns between application software module and the task;
The described method that concerns between application software module and the task of setting up comprises:
Whole application program is divided into one or more Function Identifications (FID), is each FID configuration preference level; Each FID is divided into one or more handles sign (PID); The application software module administration and supervision authorities are that each PID registration function is handled function for each FID registration priority, establishment message handling task and message queue;
The method of communication between the described application software module comprises:
A. source PID is by application software module administration and supervision authorities solicitation message, and source PID fills in and send this message bag;
B. the application software module administration and supervision authorities are added into this message bag the message queue of the affiliated FID of purpose PID;
C. real time operating system is according to the message handling task of FID under this purpose of priority scheduling PID of FID;
D. the described message bag of this message handling task read step b from the message queue of self calls the power function of purpose PID by the application software module administration and supervision authorities.
Set up in the method that concerns between application software module and the task, the method for described division FID is: divide according to the basic function of application program realization and the priority of each basic function.
Set up in the method that concerns between application software module and the task, the method for described division PID is: divide according to the inner concrete function of realizing of each FID.
Set up in the method that concerns between application software module and the task, described application software module administration and supervision authorities are also further registered one or more self-processing tasks and priority thereof for FID.
Set up in the method that concerns between application software module and the task, the message queue of described FID according to priority is divided into more than one message queue.
Set up in the method that concerns between application software module and the task, the configuration file that described application software module administration and supervision authorities provide by running application is finished the registration of FID and PID.
Among the step b, the application software module administration and supervision authorities are added into this message bag according to the purpose PID ID in the message bag message queue of FID under the purpose PID.
Among the step c, the method for real time operating system scheduling message Processing tasks is:
Real time operating system is dispatched by the message handling task priority of application software module administration and supervision authorities registration by the task interface that the application software module administration and supervision authorities provide.
In the steps d, when described message handling task read the message bag, the application software module administration and supervision authorities added the semaphore protection for this message handling task.
After described steps d, this method further comprises:
The application software module administration and supervision authorities judge whether purpose PID transmits this message bag, if transmit this message bag; Otherwise discharge this message bag.
Wherein, the described method of transmitting the message bag that judges whether is: judge by the state of discerning this message bag.
Wherein, when described purpose PID transmitted the message bag, this purpose PID made amendment to the purpose PID ID of this message bag according to the ID of current receiver PID, and sends this message bag once more; Described forwarding message bag is: execution in step b.
Wherein, when the CPU that the CPU of source PID correspondence is corresponding with purpose PID is inequality, with the CPU of source PID correspondence as source CPU, the CPU of purpose PID correspondence is as purpose CPU, before carrying out described step b, this method further comprises: the application software module administration and supervision authorities of source CPU correspondence are received the application software module administration and supervision authorities application of message bag and are filled in the message bag by the application software module administration and supervision authorities of network transmission packet to purpose CPU correspondence;
Then step b to the described application software module administration and supervision authorities of steps d be the application software module administration and supervision authorities of purpose CPU correspondence.
Wherein, whether identical according to the current corresponding CPU of CPU that source CPU ID and purpose CPU ID in the transmission packet determine source PID correspondence and purpose PID that wants.
Wherein, the described method that sends this message bag by network is: the application software module administration and supervision authorities send by the network communication interface from the purpose CPU correspondence that provides as application program.
Wherein, described by the network transmission packet time, the application software module administration and supervision authorities of source CPU correspondence discharge this message bag.
Wherein, after the described application software module administration and supervision authorities solicitation message, further preservation is used for indicating this message to wrap in the pointer of real time operating system internal memory first address;
Among the step b, described application software module administration and supervision authorities are added into the message bag in the processing of message queue, and what added is the pointer of message bag;
In the steps d, in the described processing of reading the message bag, message handling task reads this message bag by the pointer of this message bag in the identification message formation.
In sum, key of the present invention is: increased the application software module administration and supervision authorities between multitask application program and real time operating system, the method that concerns between application software module and the task is set up in use, whole application program is divided into one or more FID, each FID is divided into one or more PID, be FID registration priority, create message handling task and message queue by the application software module administration and supervision authorities, for the PID registration function is handled function.After the application software module administration and supervision authorities are set up relation between FID, PID and the message handling task, use the method for communication between the described application software module to finish communication between the application software module; Wherein, source PID comes to carry out communication with purpose PID by transmission packet; The application software module administration and supervision authorities are responsible for solicitation message, and the message bag that source PID is filled in are added into the message queue of FID under the purpose PID; Real time operating system is according to the message handling task of the priority scheduling FID of FID, and this message handling task reads the message bag from the message queue of self, calls the power function of purpose PID by the application software module administration and supervision authorities, finishes communication process.
As seen; this method is passed through according to concerning the organizations software module between FID, PID and the message handling task; and use the inventive method to carry out communication between the application software module based on this kind relation; shielded communication between task division, task in the real-time multi-task software, synchronously, complicated technology problems such as mutual exclusion, critical section protection and function reentry; improved the development efficiency of multi-task application software, avoided because of being unfamiliar with the multi-task application software system defect that the multitask characteristics cause.
Description of drawings
Fig. 1 is for concerning synoptic diagram between FID, PID in the inventive method and the task;
Fig. 2 sends a preferred embodiment treatment scheme synoptic diagram for the message bag of the inventive method;
Fig. 3 handles a preferred embodiment treatment scheme synoptic diagram for the message bag of the inventive method.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing.
Multi-task application software module management method under the real time operating system environment provided by the present invention, increased the application software module administration and supervision authorities between multitask application program and real time operating system, this method also comprises: the method for setting up communication between the method that concerns between application software module and the task and the application software module.
The described method that concerns between application software module and the task of setting up comprises: whole application program is divided into one or more FID, is each FID configuration preference level; Each FID is divided into one or more PID; The application software module administration and supervision authorities are that each PID registration function is handled function for each FID registration priority, establishment message handling task and message queue.
Wherein, can divide FID, and divide PID according to the inner concrete function of realizing of each FID according to the basic function of application program realization and the priority of each basic function.Such as: the system that relates to the multi-protocol layer function treatment, some protocol layers can be divided into a FID, and lower-level protocols layer function module priority is higher usually, therefore, the protocol layer that will be positioned at low layer is divided into the high FID of priority, will be positioned at high-level protocol layer and be divided into the low FID of priority; Then, the function treatment at each FID corresponding protocols layer is divided into one or more PID with each FID, FID can be divided PID by the protocol layer that it comprised, and also each protocol layer that can as required it be comprised is divided into a plurality of PID.
In order to realize the expansion of function of application, application software module administration and supervision authorities of the present invention also are provided as the function of FID registration self-processing task and this self-processing task priority, and application program needs the priority and the task entrance function of own definition task.This self-processing task is used to finish some specific functions to be handled, such as: some software modules need periodically be finished some functions, as, periodically detect the connection status of bottom link or check resource situation or the like.
During application development, divide FID and PID by mentioned above principle, the function treatment function of definition PID correspondence, self-processing task and the task entrance function of configuration FID, and with the subordinate relation of FID and PID, the function treatment function of PID correspondence, and self-processing task is organized into configuration file, when application program is moved, application software module administration and supervision authorities of the present invention are by the initialize routine of FID in the running configuration file and PID, finish FID priority, subordinate relation between FID and the PID, and the registration of the self-processing task of FID, priority by FID is created message handling task for each FID in real time operating system, and the message queue of each message handling task correspondence, and prepare necessary resource as the timer resource for each message handling task, static memory resource etc.Wherein, application software module administration and supervision authorities of the present invention provide the task entrance function of FID message handling task, and according to the configuration file of application program, create message handling task and/or self-processing task and message queue in real time operating system.
Wherein, thus described message handling task be responsible for circulating and read message bag in the message queue and call function treatment function among the PID.The message queue of a described FID also can according to priority be divided into the message queue of a plurality of different priorities, message bag in the high-priority message formation will be by priority processing, puts it into the message queue of different priorities according to the priority of the message bag of current reception.Wherein, can be message bag prioritization according to type, such as: will be the highest owing to the message packet priority that timer expiry sends, should be placed into the highest message queue of priority, thereby when the message handling task processing messages, this message bag will be by priority processing.Here, concrete message queue is divided into several priority, and which kind of priority which kind of kind of message bag is divided into, the message queue of putting into which kind of priority determines that according to application requirement the present invention does not limit.
Figure 1 shows that the logical relation of PID, message handling task and the message queue of a FID inside.In Fig. 1, corresponding four PID of described FID are respectively: PID1, PID2, PID3, PID4; The also corresponding message handling task of this FID and a self-processing task; The message queue of this message handling task correspondence is divided into three priority, comprising: three message queues of high, medium and low priority.Wherein, PID1, PID2, PID3 and PID4 difference corresponding function function MsgFunc1, MsgFunc2, MsgFunc3 and MsgFunc4; When application program was moved, PID represented each application software module, and the transmission by the message bag between the PID realizes the communication between the application software module, thereby can call the power function of PID, realized systemic-function.
Based on the above-mentioned method that concerns between application software module and the task of setting up, the method for communication between the application software module of the present invention comprises:
A. source PID is by application software module administration and supervision authorities solicitation message, and source PID fills in and send this message bag;
B. the application software module administration and supervision authorities are added into this message bag the message queue of the affiliated FID of purpose PID;
C. real time operating system is according to the message handling task of this FID of priority scheduling of this FID;
D. the described message bag of this message handling task read step b from the message queue of self calls the power function of purpose PID by the application software module administration and supervision authorities.
Below in conjunction with Fig. 2 and Fig. 3, the method for communication between the application software module of the present invention is described in detail.Figure 2 shows that the message bag sends the treatment scheme synoptic diagram, concrete treatment step is as follows:
Here, described application and the method for filling in the message bag are: the application software module of source PID correspondence utilizes message bag application interface that application software module administration and supervision authorities of the present invention provide to real time operating system application internal memory, and application software module administration and supervision authorities return pointer indicates this message to wrap in first address in the internal memory; Source PID fills in the message bag by this pointer memory address pointed is carried out assignment, the content of filling in comprises: information such as the message content of this message bag, source PID ID, purpose PID ID, thereby, these application software module administration and supervision authorities have just been opened up a memory headroom and have been used to preserve message bag content, source/information such as purpose PID ID for this message wraps in real time operating system, and can indicate this message to wrap in first address in the internal memory by pointer.
Step 203: the message bag transmission interface of application software module administration and supervision authorities is sent to FID under the purpose PID according to the ID of described purpose PID with the message bag, and this message bag is put into the message queue of this FID, finishes to work as pre-treatment.Here, FID under the PID of source and the FID under the purpose PID can be the same or different.
Wherein, in the process that described message bag sends, transmission be that the first address that message wraps in the internal memory is the pointer of message bag, in message queue, also only deposit the pointer of message bag, but not real message bag.So just avoid assignment or the memory copying operation of message handling task when writing message queue, realized the rapid development on the system performance.
The above is the message bag transmission processing between the CPU internal application software module, when application program is striden CPU when handling, application software module between the CPU also will carry out communication by the interaction message bag, therefore, when filling in the message bag, also to further fill in source CPU ID and purpose CPU ID, and before above-mentioned steps 203, further comprise step 203 ': the application software module administration and supervision authorities judge according to the source CPU ID in the message bag and purpose CPU ID be whether consistent whether source CPU is identical with purpose CPU, if then execution in step 203; Otherwise execution in step 204.Described source CPU is the CPU at PID place, source; Described purpose CPU is the CPU at purpose PID place.
Step 204: the application software module administration and supervision authorities send this message bag by network, and discharge message bag in the internal memory that source CPU is managed in the real time operating system by self message bag realizing interface, promptly discharge the shared memory headroom of this message bag.
Here, the network of described message bag sends, transmission be complete message bag, comprising: message content, source/purpose PID ID and source/purpose CPU ID.
Wherein, application software module administration and supervision authorities of the present invention provide network communication interface for application program, and application program is registered each CPU ID and corresponding network communication interface thereof by configuration file when bringing into operation in the application software module administration and supervision authorities.Therefore, in this step, CPU place, source application software module administration and supervision authorities can be called the network interface that self and purpose CPU carry out communication by identifying purpose CPU ID, the message bag are sent to the application software module administration and supervision authorities at purpose CPU place.Like this, when using the inventive method and carrying out between application software module communication, the application software module administration and supervision authorities provide unified message bag transmission interface for application program, mask the complicacy of communication between the CPU, a plurality of network communication interfaces needn't be created and safeguard to application program, makes the exploitation of application program be easy to more realize.
Here, described network communication module can be the Socket interface based on transmission control protocol/Internet protocol (TCP/IP).But not belonging to emphasis of the present invention by described network communication interface about specifically how realizing, not being described in further detail here.
Step 205: the message bag is sent to the application software module administration and supervision authorities at purpose CPU place, these application software module administration and supervision authorities by message bag application interface to real time operating system application internal memory, indicate this message to wrap in first address in the current internal memory by pointer, and according to the message bag that receives pointer memory address pointed is carried out assignment and fill in the message bag, in internal memory, write message content, source/purpose PID ID, the source/information such as purpose CPU ID of this message bag.Then, the message bag is sent to FID under the purpose PID, the pointer of this message bag is put into the message queue of this FID according to described purpose PID ID.
As seen according to Fig. 2, using the inventive method can be that the message bag that source PID sends is sent in the message queue that take over party's application software module is FID under the purpose PID with the transmit leg application software module, problem synchronous between the software module, mutual exclusion that application program need not be concerned about, only be concerned about the function that software module realizes, the unified message bag transmission interface that is sent to the application software module administration and supervision authorities in the message bag and provides is provided purpose PID ID gets final product, simplify the performance history of application program greatly.
After the Message Processing formation of FID, the message handling task of this FID will be handled this message bag under the message bag is sent to purpose PID.Figure 3 shows that the preferred embodiment treatment scheme synoptic diagram that the inventive method message bag is handled, concrete treatment step comprises:
Step 301: real time operating system is according to the message handling task of this FID of priority scheduling of FID under the purpose PID.Here, described real time operating system is the real time operating system at purpose CPU place, can be the same or different according to description purpose CPU among Fig. 2 and source CPU.
Wherein, because when application program move, the application software module administration and supervision authorities have been finished the registration of each FID priority by configuration file, and the priority of pressing FID is each FID establishment message handling task.Here, these application software module administration and supervision authorities provide task interface, can create message handling task for it by the priority of each FID by the real time operating system of this task interface bottom, and the task scheduling formation of setting up message handling task.If application program has also disposed self-processing task and priority thereof, then the application software module administration and supervision authorities also will be added into it in described task scheduling formation by the priority of described task interface by self-processing task.The CPU of real time operating system will carry out task scheduling according to the priority of message handling task and/or self-processing task.
Because real time operating system generally adopts the scheduling strategy of preemptive priority, under the ready situation of a plurality of tasks, have only the highest task of priority to obtain the CPU operation.Therefore, in scheduling queue, when a plurality of message handling tasks and/or self-processing task are ready, message handling task that CPU is the highest with dispatching priority or self-processing task.Here, so-called task is ready, be exactly this task except cpu resource, obtained all and moved necessary resource; For message handling task, often, there is message bag etc. pending in its message queue that reads that circulates; For self-processing task be exactly, according to the trigger mechanism that application program defines voluntarily, its trigger condition has satisfied, and as timer then, the task suspension time arrives etc.
Step 302: the message handling task of the described FID of step 301 obtains after the CPU operation, this message handling task reads the message bag from the message queue of self, call the power function of purpose PID according to the purpose PID ID in the message bag, finish the communication between the current application software module.
Because application program need realize two usually with the communication between the upper module, therefore after step 302, according to the execution result of concrete function function, described purpose PID also might transmit this message bag, or sends new message bag to other PID.Therefore, as shown in Figure 3, after step 302, further comprise:
Step 303: the application software module administration and supervision authorities judge whether this purpose PID needs to transmit this message bag, if, execution in step 304; Otherwise execution in step 305.
Here, in message bag processing procedure, the application software module administration and supervision authorities are also wanted the state of each message bag of real-time update, and described state can be for: application attitude, prepare to discharge or transmission etc.After after the message application, its state is the application attitude; When the message bag was placed into message queue, its state was for sending; When the message bag is read when handling by message handling task, its state discharges for preparing, if the result of message bag is transmitted this message bag for needing, then the state of message bag will become transmission.
Wherein, application program sends this message bag by the message bag transmission interface that the application software module administration and supervision authorities provide, when if this message bag transmission interface of application call is transmitted this message bag, the state that the application software administration and supervision authorities will be revised this message bag is " transmission ".Therefore, the application software module administration and supervision authorities can judge that discharging needs transmits this message bag according to the state of this message bag in this step, if that is: message bag state is for sending, then this message bag needs to transmit.
Step 304: the application software module administration and supervision authorities are transmitted this message bag, finish to work as pre-treatment.
Here, during described forwarding message bag, PID carries out assignment to the pointer memory address pointed of indicating this message bag internal memory first address once more, thereby, call the message bag transmission interface of application software module administration and supervision authorities again and transmit this message bag according to the information source of rewriting/purpose PID ID, the source/parameters such as purpose CPU ID of current this message bag take over party PID.Then, carry out described step 203 or 203 ', subsequent treatment no longer is described in further detail as shown in Figures 2 and 3.
Step 305: the application software administration and supervision authorities discharge this message bag by message bag realizing interface.
Wherein, the result of message bag is divided three classes: one, current PID is ready for sending new message bag and gives other PID; Two, current PID prepares to transmit this message bag and gives other PID; Three, current PID no longer transmission packet give other PID.Under second kind of situation therein, this message bag needn't discharge, and under other two kinds of situations, because application program does not temporarily re-use this message bag, then needs its release.But after the release message bag, for first kind of situation, PID need apply for and fill in the message bag again, promptly re-executes Fig. 2 and processing shown in Figure 3, thereby finishes the communication with the Another Application software module; For the third request, PID stops transmission packet, so this PID no longer does the operation of communication between any relevant application software module.
Among the present invention, message handling task adds semaphore when the processing messages bag protects, and makes the processing procedure of a message can not seized by the another one message handling task, thereby can solve between the application layer different software module synchronously, problem such as mutual exclusion.Wherein, described semaphore is realized synchronous/mutual exclusion between the different software module, concrete principle is: with the state/incident of semaphore as the task wait, the initialize signal amount is disabled, task or interrupt handling routine are notified the generation of this state/incident by discharging this semaphore, other task is owing to waiting for that this semaphore blocks, up to the release of this semaphore.That is to say: message handling task is when handling a message bag; the resource that this message bag takies is owing to exist the protection of semaphore; can do not taken by other task; the processing of finishing this message bag up to message handling task just can discharge semaphore, thereby other task can be handled the shared resource of this message bag.Here, about how realizing that specifically Semaphore Mechanism belongs to known technology, this paper is not described in further detail.
In sum, use the present invention and set up the method that concerns between application software module and the task, whole application program is divided into FID and PID by function, and with the subordinate relation of FID and PID and FID and/priority of self-processing task is registered in the application software module administration and supervision authorities when the system initialization, the application software module administration and supervision authorities are that each FID creates message handling task and message queue in the bottom real time operating system by the task interface of self, and the task scheduling formation of setting up message handling task and/or self-processing task.On this basis, adopt the method for communication between the application software module of the present invention, can realize between the application software module by the message bag be sent completely calling of power function, thereby finish the communication between the application software module.When transmission packet, application program needn't be concerned about the problem of mutual exclusion synchronously between each software module, and the transmit leg application software module only needs the CPU ID and the PID ID that fill in take over party's application software module correspondence to get final product; When carrying out the processing of message bag; message handling task according to priority obtains the operation of CPU; call the power function of take over party's application software module by the message bag that reads in the message queue, and, guarantee the synchronous and mutual exclusion of Message Processing for message bag processing each time provides the semaphore protection.
As seen, the inventive method provides the application software module administration and supervision authorities for the multi-task application software system, these application software module administration and supervision authorities are that application program has shielded task, message queue, semaphore, the key concept of operating systems such as shared drive, application program does not need to create and manage these operating system objects that is mutually related, only need to be concerned about the function of professional processing and system's realization, feasibility analysis procedure such as software module division is simplified greatly when not only making application development, and the exploitation that makes each application software module is based on function treatment, thereby is easy to realize and guarantee the stability of multi-task application software system.
In a word, the above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.
Claims (17)
1, the management method of multi-task application software module under a kind of real time operating system environment, it is characterized in that, the application software module administration and supervision authorities are set between multitask application program and real time operating system, and this method also comprises: the method for setting up communication between the methods and applications software module that concerns between application software module and the task;
The described method that concerns between application software module and the task of setting up comprises:
Whole application program is divided into one or more Function Identifications FID, is each FID configuration preference level; Each FID is divided into one or more handles sign PID; The application software module administration and supervision authorities are that each PID registration function is handled function for each FID registration priority, establishment message handling task and message queue;
The method of communication between the described application software module comprises:
A. source PID is by application software module administration and supervision authorities solicitation message, and source PID fills in and send this message bag;
B. the application software module administration and supervision authorities are added into this message bag the message queue of the affiliated FID of purpose PID;
C. real time operating system is according to the message handling task of FID under this purpose of priority scheduling PID of FID;
D. the described message bag of this message handling task read step b from the message queue of self calls the power function of purpose PID by the application software module administration and supervision authorities.
2, method according to claim 1 is characterized in that, sets up in the method that concerns between application software module and the task, and the method for described division FID is: divide according to the basic function of application program realization and the priority of each basic function.
3, method according to claim 1 is characterized in that, sets up in the method that concerns between application software module and the task, and the method for described division PID is: divide according to the inner concrete function of realizing of each FID.
4, method according to claim 1 is characterized in that, sets up in the method that concerns between application software module and the task, and described application software module administration and supervision authorities are also further registered one or more self-processing tasks and priority thereof for FID.
5, method according to claim 1 is characterized in that, sets up in the method that concerns between application software module and the task, and the message queue of described FID according to priority is divided into more than one message queue.
According to claim 1 or 4 described methods, it is characterized in that 6, set up in the method that concerns between application software module and the task, the configuration file that described application software module administration and supervision authorities provide by running application is finished the registration of FID and PID.
7, method according to claim 1 is characterized in that, among the step b, the application software module administration and supervision authorities are added into this message bag according to the purpose PID ID in the message bag message queue of FID under the purpose PID.
8, method according to claim 1 is characterized in that, among the step c, the method for real time operating system scheduling message Processing tasks is:
Real time operating system is dispatched by the message handling task priority of application software module administration and supervision authorities registration by the task interface that the application software module administration and supervision authorities provide.
9, method according to claim 1 is characterized in that, in the steps d, when described message handling task read the message bag, the application software module administration and supervision authorities added the semaphore protection for this message handling task.
10, method according to claim 1 is characterized in that, after described steps d, this method further comprises:
The application software module administration and supervision authorities judge whether purpose PID transmits this message bag, if transmit this message bag; Otherwise discharge this message bag.
11, method according to claim 10 is characterized in that, the described method of transmitting the message bag that judges whether is: judge by the state of discerning this message bag.
12, method according to claim 10 is characterized in that, when described purpose PID transmitted the message bag, this purpose PID made amendment to the purpose PID ID of this message bag according to the ID of current receiver PID, and sends this message bag once more; Described forwarding message bag is: execution in step b.
13, according to claim 1 or 12 described methods, it is characterized in that, when the CPU that the CPU of source PID correspondence is corresponding with purpose PID is inequality, with the CPU of source PID correspondence as source CPU, the CPU of purpose PID correspondence is as purpose CPU, before carrying out described step b, this method further comprises: the application software module administration and supervision authorities of source CPU correspondence are received the application software module administration and supervision authorities application of message bag and are filled in the message bag by the application software module administration and supervision authorities of network transmission packet to purpose CPU correspondence;
Then step b to the described application software module administration and supervision authorities of steps d be the application software module administration and supervision authorities of purpose CPU correspondence.
Whether 14, method according to claim 13 is characterized in that, identical according to the current corresponding CPU of CPU that source CPU ID and purpose CPU ID in the transmission packet determine source PID correspondence and purpose PID that wants.
15, method according to claim 13 is characterized in that, the described method that sends this message bag by network is: the application software module administration and supervision authorities send by the network communication interface from the purpose CPU correspondence that provides as application program.
16, method according to claim 13 is characterized in that, described by the network transmission packet time, the application software module administration and supervision authorities of source CPU correspondence discharge this message bag.
17, method according to claim 13 is characterized in that,
After the described application software module administration and supervision authorities solicitation message, further preservation is used for indicating this message to wrap in the pointer of real time operating system internal memory first address;
Among the step b, described application software module administration and supervision authorities are added into the message bag in the processing of message queue, and what added is the pointer of message bag;
In the steps d, in the described processing of reading the message bag, message handling task reads this message bag by the pointer of this message bag in the identification message formation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100741221A CN1317640C (en) | 2004-08-31 | 2004-08-31 | Multi-task application software module management method in real-time operating system environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100741221A CN1317640C (en) | 2004-08-31 | 2004-08-31 | Multi-task application software module management method in real-time operating system environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1744046A CN1744046A (en) | 2006-03-08 |
CN1317640C true CN1317640C (en) | 2007-05-23 |
Family
ID=36139433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2004100741221A Expired - Fee Related CN1317640C (en) | 2004-08-31 | 2004-08-31 | Multi-task application software module management method in real-time operating system environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1317640C (en) |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100362477C (en) * | 2006-03-10 | 2008-01-16 | 华为技术有限公司 | Method and device for co-ordinating executing sequence facing user function |
CN100383742C (en) * | 2006-04-07 | 2008-04-23 | 浙江大学 | Implementation method for real-time task establishment in Java operating system |
CN100383743C (en) * | 2006-04-07 | 2008-04-23 | 浙江大学 | Real-time task scheduling method in Java operating system |
CN101192192B (en) * | 2006-11-21 | 2010-08-18 | 华为技术有限公司 | Task abnormity diagnosis method and system for real-time operating system |
JP5184268B2 (en) * | 2008-09-08 | 2013-04-17 | 株式会社エヌ・ティ・ティ・ドコモ | Information processing apparatus and program |
CN101655789B (en) * | 2009-09-22 | 2012-10-24 | 用友软件股份有限公司 | Method and device for realizing hot plugging of application components |
CN101694631B (en) * | 2009-09-30 | 2016-10-05 | 曙光信息产业(北京)有限公司 | Real time job dispatching patcher and method |
CN101872317B (en) * | 2010-07-16 | 2012-12-26 | 山东中创软件工程股份有限公司 | VxWorks multitask synchronization and communication method |
CN101950260B (en) * | 2010-09-10 | 2014-04-30 | 中兴通讯股份有限公司 | Processor program dispatching method and device |
CN106095115B (en) * | 2016-06-30 | 2019-05-17 | 北京智能管家科技有限公司 | A kind of application program scheduling processing method and processing device |
CN107222530A (en) * | 2017-05-23 | 2017-09-29 | 努比亚技术有限公司 | Service asynchronous exchange method, equipment, system and computer-readable recording medium |
CN109067699B (en) * | 2018-06-22 | 2021-09-28 | 中国建设银行股份有限公司 | Login task distribution execution system and method, and storage medium |
CN109582445A (en) * | 2018-09-29 | 2019-04-05 | 阿里巴巴集团控股有限公司 | Message treatment method, device, electronic equipment and computer readable storage medium |
CN110209434B (en) * | 2019-04-23 | 2022-04-22 | 努比亚技术有限公司 | Memory management method and device and computer readable storage medium |
CN111045801A (en) * | 2019-11-19 | 2020-04-21 | 蓝箭航天空间科技股份有限公司 | Unified inter-task communication method supporting multiple processors and rocket communication method |
CN110955507B (en) * | 2019-11-28 | 2022-10-21 | 苏州长风航空电子有限公司 | Method for multitask access to same IIC bus based on vxWorks system |
CN113010179B (en) * | 2021-02-23 | 2024-03-15 | 深圳市广和通无线股份有限公司 | Independent application running method based on real-time operating system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1038712A (en) * | 1988-03-10 | 1990-01-10 | 霍尼韦尔有限公司 | The operating system that is used for the multi-job operation environment |
US5469571A (en) * | 1991-07-15 | 1995-11-21 | Lynx Real-Time Systems, Inc. | Operating system architecture using multiple priority light weight kernel task based interrupt handling |
JP2001184221A (en) * | 1999-12-22 | 2001-07-06 | Nec Corp | Real time os and task execution control method |
CN1361478A (en) * | 2000-12-28 | 2002-07-31 | 广东科龙电器股份有限公司 | Real-time domestic operation system and its realizing method |
CN1409209A (en) * | 2001-09-24 | 2003-04-09 | 深圳市中兴通讯股份有限公司上海第二研究所 | Realizing method for multiple task real-time operation system |
-
2004
- 2004-08-31 CN CNB2004100741221A patent/CN1317640C/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1038712A (en) * | 1988-03-10 | 1990-01-10 | 霍尼韦尔有限公司 | The operating system that is used for the multi-job operation environment |
US5469571A (en) * | 1991-07-15 | 1995-11-21 | Lynx Real-Time Systems, Inc. | Operating system architecture using multiple priority light weight kernel task based interrupt handling |
JP2001184221A (en) * | 1999-12-22 | 2001-07-06 | Nec Corp | Real time os and task execution control method |
CN1361478A (en) * | 2000-12-28 | 2002-07-31 | 广东科龙电器股份有限公司 | Real-time domestic operation system and its realizing method |
CN1409209A (en) * | 2001-09-24 | 2003-04-09 | 深圳市中兴通讯股份有限公司上海第二研究所 | Realizing method for multiple task real-time operation system |
Also Published As
Publication number | Publication date |
---|---|
CN1744046A (en) | 2006-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1317640C (en) | Multi-task application software module management method in real-time operating system environment | |
CN100351798C (en) | Thread signaling in multi-threaded network processor | |
CN100342342C (en) | Java virtual machine implementation method supporting multi-process | |
CN1306430C (en) | User self-defining event mechanism based on structure | |
CN1615472A (en) | Executing processes in a multiprocessing environment | |
CN1494690A (en) | Computer architecture and software cells for broadband networks | |
JP2004206712A (en) | Architecture of topology aware grid service scheduler | |
CN1904873A (en) | Inter core communication method and apparatus for multi-core processor in embedded real-time operating system | |
CN1613059A (en) | A method and a system for executing operating system functions, as well as an electronic device | |
CN1659539A (en) | A network system having a virtual-service-module | |
CN1645330A (en) | Method and system for grid-enabled virtual machines with distributed management of applications | |
CN1791037A (en) | Method for realizing Web service automatic test | |
CN1496516A (en) | Resource dedication system and method for computer architecture for broadband networks | |
CN1496511A (en) | Memory protection system and method for computer architecture for boardband networks | |
WO2010039167A1 (en) | Multi-core system with central transaction control | |
CN1702622A (en) | System for correct distribution of hypervisor work | |
CN100346307C (en) | Method of real time task regulation in Java operation system | |
CN1270229C (en) | Method of realizing cross address space establishing construction member target based on dynamic core | |
CN1702623A (en) | Task level resource administration method for micro-kernel embedded real-time operation systems | |
CN1889048A (en) | Package realizing method and system | |
WO2004042571A2 (en) | A communication method with reduced response time in a distributed data processing system | |
EP0695993A2 (en) | System and method for interprocess communication | |
CN1881936A (en) | Dynamic loading and control method for router virtual drive module | |
CN1427361A (en) | Method of driving bottom equipment based on customer/service apparatus structure | |
CN1630853A (en) | Method for constructing distributed software components |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20070523 Termination date: 20200831 |
|
CF01 | Termination of patent right due to non-payment of annual fee |