CN115408127B - Device and method for task sharing in type1 operating system - Google Patents

Device and method for task sharing in type1 operating system Download PDF

Info

Publication number
CN115408127B
CN115408127B CN202211024667.6A CN202211024667A CN115408127B CN 115408127 B CN115408127 B CN 115408127B CN 202211024667 A CN202211024667 A CN 202211024667A CN 115408127 B CN115408127 B CN 115408127B
Authority
CN
China
Prior art keywords
real
time service
service system
task
message
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
CN202211024667.6A
Other languages
Chinese (zh)
Other versions
CN115408127A (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.)
Kedong Guangzhou Software Technology Co Ltd
Original Assignee
Kedong Guangzhou Software Technology 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 Kedong Guangzhou Software Technology Co Ltd filed Critical Kedong Guangzhou Software Technology Co Ltd
Priority to CN202211024667.6A priority Critical patent/CN115408127B/en
Publication of CN115408127A publication Critical patent/CN115408127A/en
Application granted granted Critical
Publication of CN115408127B publication Critical patent/CN115408127B/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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a device and a method for task sharing in a type1 operating system, wherein the device comprises the following components: the system comprises a real-time service system and a plurality of real-time service systems, wherein the real-time service system and the plurality of real-time service systems run on the microkernel of the operating system, the real-time service system is used for managing each real-time service system, and the real-time service system is used for processing real-time services in the exclusive field; the real-time service system comprises a task scheduling module, and the task scheduling module is used for scheduling part of tasks in a first task to the real-time service system when the load of the real-time service system is higher than a first set value, wherein the first task is a task to be processed by the real-time service system and can be shared to the real-time service system.

Description

Device and method for task sharing in type1 operating system
Technical Field
The present invention relates to the field of operating systems, and in particular, to a device and a method for task sharing in a type1 operating system.
Background
In the technical field of automobile electronic operation systems, along with the gradual improvement of the integration capability of high-computing power chips, multi-core heterogeneous processors, and the whole software of a host factory, which are provided by each large enterprise in EEA architecture whole automobile centralization and chip former factories, under the promotion of the requirement of a central whole automobile intelligent cabin unification platform, the intelligent cabin continuously integrates new functions, and the intelligent cabin is evolving from a single domain to a cross-domain fusion direction, such as the fusion of the cabin domain and an ADAS domain, even part of host factories begin to develop and layout of a handcart cloud integrated multi-domain central computing platform.
Under the trend, manufacturers of the electronic operating systems of the automobiles also adapt to the configuration of the electronic virtualized operating systems of the high-end automobiles, which meets the new business requirements of the host factories, along with the original factories of chips. Such as a Type1 virtualized operating system currently mainstream in the field of intelligent cabins, and the designed configuration meets the operating system solution of the whole cabin requirement.
However, with the rapid development of the internet, the network demand running in the virtualized environment is increasing, and the network I/O virtualized load of the Type1 virtualized operating system used at present seriously affects the network performance, so that the wide application of the Type1 virtualized technology in the automotive electronics field is greatly limited.
Disclosure of Invention
In view of this, the embodiment of the invention provides a device and a method for sharing tasks in a type1 operating system, when the load of a real-time service system on a micro-core of a chip is higher than a first set value, a real-time service system with a load lower than a second set value on the micro-core of the chip is selected to share the tasks processed by the real-time service system for a service processing system, so that the load of the real-time service system is reduced, the influence of high load on virtual network IO implemented by the real-time service system is reduced, the real-time performance of the real-time service system when being used as a gateway of the real-time service system is improved, and the real-time performance of the whole device is improved.
In a first aspect, an embodiment of the present invention provides a device for task sharing in a type1 operating system, including: the system comprises a real-time service system and a plurality of real-time service systems, wherein the real-time service system and the plurality of real-time service systems run on the microkernel of the operating system, the real-time service system is used for managing each real-time service system, and the real-time service system is used for processing real-time services in the exclusive field; the real-time service system comprises a task scheduling module, wherein the task scheduling module is used for scheduling part of tasks in a first task to the real-time service system when the load of the real-time service system is higher than a first set value, and the first task is a task which is to be processed by the real-time service system and can be shared to the real-time service system. the Type1 operating system is an operating system started after Type1 virtualization.
By selecting a real-time service system with load lower than a second set value as shared service when the load of the real-time service system is higher than the first set value, the load of the real-time service system is reduced, the influence of high load on virtual network IO realized by the real-time service system is lightened, and the instantaneity of the real-time service system when being used as a gateway of the real-time service system is improved, so that the instantaneity of the whole device is improved.
In a possible implementation manner of the first aspect, the real-time service system is further configured for a gateway of the operating system; the real-time service system further comprises a message filtering module, which is used for inquiring a routing rule table according to the packet header information of the first message when the real-time service system is used as the gateway of the operating system, determining the destination address of the first message, and transmitting the first message to the corresponding address after corresponding callback processing, wherein the first message is received by the real-time service system from the inside or the outside of the operating system.
By the method, the real-time service system realizes the gateway function of the operating system by routing the received message to different callbacks and performing callback processing.
In a possible implementation manner of the first aspect, the real-time service system further includes a task identification module, configured to identify whether the first task is included in the first message delivered to the real-time service system. In some embodiments, the scheduling rule table is queried according to header information of the first message to identify whether the first task is included in the first message.
By identifying whether the scheduled tasks can be shared or not from the messages processed by the input callback, blind sharing of the messages which cannot be shared is avoided, and the real service system is used as a gateway to receive the messages with the destination address being the proxy system.
In one possible implementation manner of the first aspect, the table entry of the routing rule table is indexed by a combination of a source address and a destination address of the message, and the table entry content at least includes: and the callback type is used for inputting the callback when the source address of the message is an address outside the real-time service system and the target address is a real-time service system processing address, wherein the real-time service system processing address comprises an address inside the real-time service system and an address of the real-time service system serving as the gateway proxy, outputting the callback when the source address of the message is an address inside the real-time service system and the target address is an address inside the real-time service system, and forwarding the callback when the source address and the target address of the message are both addresses outside the real-time service system.
By the method, message transmission and callback processing are carried out based on the routing rule table, so that the received message is precisely routed and processed.
In a possible implementation manner of the first aspect, the real-time service system further includes: the address mapping module is used for converting the address of the message into an external address when the message is sent to the outside of the operating system, and converting the address of the message into an internal address when the message is received from the outside of the operating system, wherein the internal address is an address used in the operating system, and the external address is an address used in the outside of the operating system.
By the method, address isolation is realized through tile address conversion in the operating system, and the safety of the chip and external communication is improved.
In one possible implementation manner of the first aspect, the task scheduling module is specifically configured to select, when a load of the real-time service system is higher than a first set value, a real-time service system with a load lower than a second set value as a service processing system, and send a second task to the service processing system for processing, where the second task is a task selected from the first tasks and does not belong to a dedicated domain of the service processing system.
By the method, the proper real-time service system is selected to realize that the operation of the real-time service system is not influenced when the tasks are shared.
In one possible implementation manner of the first aspect, the real-time service system further includes a task processing module, configured to perform third task processing according to a processing result of the second task, where the third task is a task remaining after the second task is removed from the first task, and send the third task to a sender of the first task.
And the real-time service system processes the third task remained in the first task according to the processing result of the second task, thereby completing the whole processing of the first task.
In a second aspect, an embodiment of the present invention provides a method for task sharing in a type1 operating system, including: when the load of the real-time service system is higher than a first set value, part of tasks in the first task are scheduled to the real-time service system, wherein the first task is a task which is to be processed by the real-time service system and can be shared to the real-time service system, the real-time service system and the real-time service system run on the micro kernel of the operating system, the real-time service system is used for managing each real-time service system, and the real-time service system is used for processing real-time service in the exclusive field. the Type1 operating system is an operating system started after Type1 virtualization.
By selecting a real-time service system with load lower than a second set value as shared service when the load of the real-time service system is higher than the first set value, the load of the real-time service system is reduced, the influence of high load on virtual network IO realized by the real-time service system is lightened, and the instantaneity of the real-time service system when being used as a gateway of the real-time service system is improved, so that the instantaneity of the whole device is improved.
In a possible implementation manner of the second aspect, the method further includes: when the real-time service system is used as a gateway of the operating system, a routing rule table is queried according to the packet header information of a first message to determine a destination address of the first message, and the first message is transmitted to the destination address after corresponding callback processing is carried out, wherein the first message is a message received by the real-time service system from the inside or the outside of the operating system.
By the method, the real-time service system realizes the gateway function of the operating system by routing the received message to different callbacks and performing callback processing.
In a possible implementation manner of the second aspect, the method further includes: the real-time service system identifies whether a first message communicated to the real-time service system includes a first task. In some embodiments, the scheduling rule table is queried according to header information of the first message to identify whether the first task is included in the first message.
By identifying whether the scheduled tasks can be shared or not from the messages processed by the input callback, blind sharing of the messages which cannot be shared is avoided, and the real service system is used as a gateway to receive the messages with the destination address being the proxy system.
In one possible implementation manner of the second aspect, the table entry of the routing rule table is indexed by a combination of a source address and a destination address of the message, and the table entry includes at least: and the callback type is used for inputting the callback when the source address of the message is an address outside the real-time service system and the target address is a real-time service system processing address, wherein the real-time service system processing address comprises an address inside the real-time service system and an address of the real-time service system serving as the gateway proxy, outputting the callback when the source address of the message is an address inside the real-time service system and the target address is an address inside the real-time service system, and forwarding the callback when the source address and the target address of the message are both addresses outside the real-time service system.
By the method, message transmission and callback processing are carried out based on the routing rule table, so that the received message is precisely routed and processed.
In a possible implementation manner of the second aspect, the method further includes: the service processing system sends the processing result of the second task to the real-time service system; and the real-time service system processes a third task according to the processing result of the second task, wherein the third task is the task which is remained after the second task is removed in the first task, and the third task is sent to the sender of the first task.
And processing the third task remained in the first task according to the processing result of the second task through the real-time service system, thereby integrally processing the first task.
In a possible implementation manner of the second aspect, the method further includes: when the real-time service system sends a message to the outside of the operating system, converting the address of the message into an external address, wherein the external address is an address used outside the operating system; when the real-time service system receives a message from outside the operating system, the address of the message is converted into an internal address, and the internal address is an address used inside the operating system.
By the method, address isolation is realized through the internal address conversion of the operating system, and the safety of the chip and external communication is improved.
In a third aspect, the present invention further provides an operating system, including an apparatus according to any one of the embodiments of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computing device comprising: the chip is provided with any implementation mode of the second aspect of the invention, and the communication interface is used for realizing the physical port of the chip to communicate with the outside.
In a fifth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon program instructions which, when executed on a chip, cause the chip to implement any of the embodiments of the second aspect of the present invention.
Drawings
Fig. 1 is a schematic structural diagram of an application scenario in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a task sharing device in a type1 operating system according to an embodiment of the present invention;
FIG. 3A is a schematic diagram illustrating a task sharing apparatus in a type1 operating system according to a second embodiment of the present invention;
FIG. 3B is a schematic diagram of a scheduling and sharing device according to a second embodiment of the present invention for sharing tasks in a type1 operating system;
FIG. 4 is a flowchart of a method for task sharing in a type1 operating system according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a task sharing method in a type1 operating system according to a second embodiment of the present invention;
FIG. 6 is a schematic diagram of a computing device of the present invention.
Detailed Description
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, references to the terms "first/second/third, etc." or module a, module B, module C, etc. are used merely to distinguish between similar objects or between different embodiments, and do not represent a particular ordering of the objects, it being understood that particular orders or precedence may be interchanged as permitted so that embodiments of the invention described herein can be implemented in an order other than that illustrated or described herein.
In the following description, reference numerals indicating steps such as S110, S120, … …, etc. do not necessarily indicate that the steps are performed in this order, and the order of the steps may be interchanged or performed simultaneously as allowed.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The embodiment of the invention provides a device and method for sharing tasks in a type1 operating system, wherein when the load of a real-time service system on a micro-core of a chip is higher than a first set value, a real-time service system with the load lower than a second set value on the micro-core of the chip is selected to share the tasks processed by the real-time service system for a service processing system, so that the load of the real-time service system is reduced, the influence of high load on virtual network IO realized by the real-time service system is reduced, the real-time performance of the real-time service system when serving as a gateway of the real-time service system is improved, and the real-time performance of the whole device is improved.
In the following, an application scenario of an embodiment of the present invention will be described with reference to fig. 1, where a type1 architecture is used to perform virtualization on a chip, and multiple virtualization systems are installed on a microkernel of the chip, where the virtualization systems may be virtual machines or containers. The type1 operating system is an operating system established after type1 virtualization.
Fig. 1 shows an application scenario of an embodiment of the present invention, which includes: chip, microkernel, real-time service system and real-time service system.
Wherein the real-time service system and the real-time service system operate on microkernels. The real-time service system is used for assisting the micro-kernel to manage each real-time service system, at least realizing the gateway function of the real-time service system and realizing the communication between each real-time service system and the outside of the chip. The real-time service system is respectively responsible for service processing of one domain. Because the real-time service system is used to assist the microkernel in managing each real-time service system, the real-time service system is illustrated above the real-time service system.
In some embodiments, the real-time service system and the real-time business system are real-time containers, and in some embodiments, the real-time service system and the real-time business system are real-time operating systems. In some embodiments, the real-time service system and the real-time business system have different privilege levels for virtualized resources in the microkernel, the privilege level of the real-time service system being higher than the real-time business system.
The chip is an SOC architecture and has various hardware resources, when the hardware resources of the SOC cannot meet the requirements, the chip can be externally connected with a memory and a peripheral, and the microkernel not only virtualizes the hardware resources of the SOC, but also virtualizes the external memory and the peripheral.
When the structure is used for an intelligent cockpit of an automobile, the real-time service system is a Domain0 system of the intelligent cockpit of the automobile, and each real-time service system is a Domain U system, including a Domain U system of an instrument Domain, a Domain U system of a central control Domain and a Domain U system of a secondary driving Domain.
The following describes a device for task sharing in a type1 operating system according to the present invention with reference to fig. 2 to 3B.
An embodiment of a device for task sharing in a type1 operating system includes: the system comprises a real-time service system and a plurality of real-time service systems, wherein the real-time service system and the plurality of real-time service systems are operated on a microkernel of the chip, the real-time service system is at least used for realizing a communication gateway of the real-time service system, and the real-time service system is used for processing real-time services in the exclusive field; the real-time service system comprises a task scheduling module, wherein the task scheduling module is used for selecting a real-time service system with the load lower than a second set value as a service processing system when the load of the real-time service system is higher than the first set value, sending a second task to the service processing system for processing, the second task is a task selected from the first task and does not belong to the special field of the service processing system, and the first task is a task which is to be processed by the real-time service system and can be shared to the real-time service system.
Fig. 2 shows a structure of an embodiment of a task sharing apparatus in a type1 operating system, which includes a chip 110, a microkernel 120, a real-time service system 200, a real-time service system 310, a real-time service system 320, a real-time service system 330, and a real-time service system 340.
Wherein microkernel 120 virtualizes and schedules chip 110. In some implementations, the microkernel also virtualizes and schedules computer hardware resources other than chip hardware resources.
The real-time service system 200 is running on the microkernel 120 to assist the microkernel 120 to manage each real-time service system, and at least includes: the gateway function of each real-time service system is realized, and the communication between each real-time service system and the outside of the chip is realized.
The real-time service system 310, the real-time service system 320, the real-time service system 330 and the real-time service system 340 are respectively used for processing the real-time service in the exclusive domain.
Wherein the real-time business system 310, the real-time business system 320 and the real-time business system 330 also run on the microkernel 120, but because the real-time service system 200 is used to assist the microkernel in managing each real-time business system, the real-time business system is schematically drawn above the real-time service system.
By way of example, 3 real-time business systems are shown in fig. 2, and in a practical scenario multiple real-time system systems may be included as desired.
In some embodiments, the real-time service system 200 and each real-time business system are real-time containers, and in some embodiments, the real-time service system 200 and each real-time business system are real-time operating systems. In some embodiments, the real-time service system 200 and each real-time business system have different privilege levels for virtualized resources in the microkernel, the privilege level of the real-time service system 200 being higher than each real-time business system.
The real-time service system 200 includes a task scheduling module 210 and a task processing module 220.
The task scheduling module 210 is configured to select a real-time service system with a load lower than a second set value as a service processing system when the load of the real-time service system 200 is higher than the first set value, and send a second task to the service processing system for processing, where the second task is a task selected from the first tasks and does not belong to a dedicated domain of the service processing system, and the first task is a task to be processed by the real-time service system and can be shared to the real-time service system.
The first setting value and the second setting value are set according to the real-time requirements of the real-time service system 200 and each real-time service system respectively. By performing sharing scheduling of the first task when the load of the real-time service system 200 is higher than the first set value, the load of the real-time service system 200 is reduced, so that the real-time service system 200 has more load resources to realize the gateway of each real-time service system, and the instantaneity of the gateway is improved.
The task processing module 220 is at least used for processing the following tasks: tasks other than the first task cannot be shared to the real-time service system, and the real-time service system is used as a task to be processed by the gateway; the first task, in which the second task is not shared to the real-time traffic system.
Among them, some tasks of the real-time service system 200 must be completed in the real-time service system, and cannot be shared to each real-time service system.
In summary, in the embodiment of the device for sharing tasks in the type1 operating system, by sharing tasks to the real-time service system under the condition that the load of the real-time service system is high, the load of the real-time service system is reduced, the influence of high load on virtual network IO realized by the real-time service system is reduced, and the instantaneity of the real-time service system when serving as a gateway of the real-time service system is improved.
The second embodiment of the device for sharing the task in the type1 operating system inherits the structure of the first embodiment of the device for sharing the task in the type1 operating system, and a message filtering module, a task identification module and an address mapping module are added in the real-time service system to respectively realize the routing of the message, identify the first task from the message from the routing to the callback input, and realize the mapping of the message address between the internal address and the external address of the chip when the message interaction is performed with the outside of the chip.
Fig. 3A shows a structure of a second embodiment of a task sharing device in a type1 operating system, and fig. 2 shows a structure of a first embodiment of a task sharing device in a type1 operating system with the addition of a message filtering module 230, a task identifying module 240 and an address mapping module 250.
The task processing module 220 is further configured to perform third task processing according to a processing result of the second task, where the third task is a task remaining after the second task is removed from the first task, and send the third task to the sender of the first task.
The message filtering module 230 is configured to query a routing rule table according to header information of a first message, and transmit the first message to an input callback, an output callback, and a forwarding callback according to a query result, and perform corresponding callback processing, where the first message is a message received by the message filtering module 230, and includes a message received and generated by a real-time service system.
The message filtering module 230 includes a message passing module and a callback processing module, the routing rule table is a preconfigured table, the table entry uses the combination of the source address and the target address of the message as an index, and the table entry content at least includes: callback type, isolation mark, access mark.
When the source address of the message is an address outside the real-time service system and the target address is a real-time service system processing address, the real-time service system processing address comprises an address inside the real-time service system and an address of the real-time service system serving as the gateway proxy, the message transfer module inquires the routing rule table to judge that the callback type of the first message is an input callback, and when the inquired isolation mark is enabled, the first message is transferred to the input callback. The isolation flag indicates whether the first message is allowed to be entered when the callback type is an input callback.
When the source address of the message is an address in the real-time service system and the target address is an address in the real-time service system, the message transfer module inquires the routing rule table to judge that the callback type of the first message is an output callback, and transfers the first message to the output callback.
When the source address of the message is an address outside the real-time service system and the target address is an address outside the Domain0 processing address, the message transfer module inquires the routing rule table to judge that the callback type of the first message is a forwarding callback, and transfers the first message to the forwarding callback.
And when the inquired access mark is allowed to pass, the callback processing module carries out callback processing on the message according to different callback types. The access flag indicates whether callback processing is allowed for the first message.
The task identification module 240 is configured to query the scheduling rule table by using header information of the input message to determine whether the input message includes the first task, where the input message is the first message that is transmitted to the input callback and is processed by the input callback.
The gateway tasks of the real-time service system 200 must be completed in the real-time service system, and cannot be shared by the real-time service systems, and the tasks of the non-gateway class can be shared by the real-time service systems. The scheduling rule table is a pre-configured table, and judges whether the input message comprises a first task which can be shared according to the target address and the port number of the message.
In some embodiments, the scheduling rule table is also preconfigured according to the task operation amount in the input message and the influence of sharing to the real-time service system, so that the sharing effect is ensured and the influence of the task is reduced.
The address mapping module 250 is configured to convert an address of a message into an external address when the message is transmitted to the outside of the operating system, and is also configured to convert an address of the message into an internal address when the message is received from the outside of the chip (which may be referred to as the outside of the operating system, hereinafter, the same) and the internal address is an address used inside the chip (which may be referred to as the inside of the operating system, hereinafter, the same), and the external address is an address used outside the chip.
The isolation of the internal address of the chip is realized through the address mapping module 250, so that the safety of the chip and external communication is improved.
In some embodiments, the task scheduling module 210, the task processing module 220, the message filtering module 230, the task identification module 240, the task scheduling module 210, and the address mapping module 250 are integrated into a scheduling dispatcher, shown in FIG. 3B, which initiates a monitoring interface through the micro-server and registers the scheduling dispatcher with the monitoring interface.
By way of example, taking the flow after receiving a packet outside the chip as an illustration of the operation of the scheduling and sharing device of fig. 3B, the dashed line of fig. 3B shows the modules through which the above process passes, including:
1) When the monitoring interface monitors that the message interaction with the outside of the chip is performed, the monitoring interface automatically calls the address mapping module 250 to perform address conversion;
2) When a message arrives at a monitoring interface monitoring message inlet, the monitoring interface automatic message filtering module 230 performs message transmission and callback processing;
3) When the monitoring interface monitors that the input callback exists, the monitoring interface automatically starts the task identification module 240 to conduct first task identification;
4) When the load of the real-time service system is monitored to be higher than a first set value, the task scheduling module 210 is automatically started to perform sharing scheduling;
5) When the feedback message of the service processing system is monitored, the task processing module 220 is automatically invoked to perform relevant service processing.
In summary, the second embodiment of the task sharing device in the type1 operating system inherits the structure of the first embodiment of the task sharing device in the type1 operating system, and a message filtering module, a task identification module and an address mapping module are added in the real-time service system, so that the route of the service needing to be shared can be identified accurately from the input message, the address isolation between the inside of the chip and the outside is realized, the influence of high load on the virtual network IO realized by the real-time service system is reduced under the condition that the load of the real-time service system is higher, the real-time performance of the real-time service system when being used as a gateway of the real-time service system is improved, and the communication security between the inside and the outside of the chip is also improved.
An embodiment of a method for task sharing in a type1 operating system operates on an embodiment of a device for task sharing in a type1 operating system, and fig. 4 shows a detailed flow thereof, including S410 to S430.
S410: the real-time service system receives a first task.
The first task is a task which is to be processed by the real-time service system and can be shared to the real-time service system.
S420: when the load of the real-time service system is higher than a first set value, the real-time service system selects a real-time service system with the load lower than a second set value from the real-time service systems of the device as a service processing system, and sends a second task to the service processing system.
The second task is a task selected from the first task and does not belong to the exclusive field of the service processing system.
S430: the business processing system processes the second task.
In summary, in the embodiment of the method for task sharing in the type1 operating system, by sharing the task to the real-time service system under the condition that the load of the real-time service system is higher, the load of the real-time service system is reduced, the influence of high load on virtual network IO realized by the real-time service system is reduced, and the instantaneity of the real-time service system when serving as a gateway of the real-time service system is improved.
A second method embodiment of task sharing in a type1 operating system runs on a second device embodiment of task sharing in a type1 operating system, and fig. 5 shows a detailed flow thereof, including S510 to S570.
For convenience of description, in this embodiment, the real-time service system is referred to as Domin0, and the real-time service system is referred to as DomainU.
S510: the Domain0 message filtering module 230 receives the first message.
When Domain0 receives a message from outside the chip, the address of the message is converted into an internal address, and the internal address is an address used inside the chip.
S520: the message transfer module of Domain0 inquires a routing rule table according to the packet header information of the first message, and transfers the first message to an input callback, an output callback and a forwarding callback according to the inquiry result.
When the message transmission module receives a message, the destination address and the source address in the packet head of the first message are matched with the table entry index in the routing rule table configured in advance, and the message is sent to different callback of the message filtering table according to the routing matching result. Comprising the following steps:
1) When the source address of the message is an address outside Domain0 and the target address is a Domain0 processing address, the Domain0 processing address comprises an internal address of Domain0 and an address of Domain0 serving as a gateway proxy, the message transfer module inquires the routing rule table to judge that the callback type of the first message is an input callback, and when the inquired isolation mark is enabled, the message transfer module transfers the first message to the input callback of the message filtering table. The isolation flag indicates whether the first message is allowed to be entered when the callback type is an input callback.
2) When the source address of the message is an address in Domain0 and the target address is an address in Domain U, the message transfer module inquires the routing rule table to judge that the callback type of the first message is an output callback, and transfers the first message to the output callback of the message filtering table.
3) When the source address of the message is an address outside Domain0 and the target address is an address outside Domain0 processing address, the message transfer module inquires the routing rule table to judge that the callback type of the first message is a forwarding callback, and transfers the first message to the forwarding callback of the message filtering table.
S530: and the callback processing module of Domain0 carries out corresponding callback processing on the message transferred to the message filtering table.
And if the access mark of the matching result is the permission access, allowing the message to pass through, and sending the message to a corresponding callback process for processing.
If the target mark of the matching result is discarding or rejecting, the message is not allowed to pass through, and the message is intercepted and discarded in time.
S540: the task identification module 240 of Domain0 queries the scheduling rule table by using the header information of the input message to determine whether the input message includes the first task.
The input message is a first message which is transmitted to the input callback and is processed by the input callback. The first task is a task which is to be processed by Domain0 and can be shared to Domain U.
In some embodiments, a registered monitoring interface is started in Domain0 through the micro-service process, and when the monitoring interface monitors the input callback, the starting task identification module 240 identifies the first task that can be shared.
S550: when the load of Domain0 is higher than the first set value, the task scheduling module 210 of Domain0 selects a Domain u with a load lower than the second set value as the service processing system, and sends the second task to the service processing system for processing.
In some embodiments, the task scheduling module 210 selects the domiann u with the lowest load from the domiann us with the load lower than the second set threshold, and in other embodiments, the task scheduling module 210 randomly selects one domiann u from the domiann us with the load lower than the second set threshold. For convenience of description, domainU as a service processing system is denoted as DomainU1.
The second task is a task selected from the first task and does not belong to the domain exclusive to the DomainU1.
The task scheduling module 210 modifies the destination IP address of the message including the second task to the IP address of DomainU1, and the message filtering module 230 of DomainU 0 searches for a route with the IP of DomainU1 as the destination IP, determines the next hop and the port information, i.e. the port of DomainU1, and forwards the message to the output callback to be sent to DomainU1.
S560: domainU1 processes the second task and sends the result of the processing to DomainU 0.
S570: the task processing module 220 of Domain0 performs a third task processing according to the processing result of the second task, and sends the third task to the sender of the first task.
The third task is a task which is remained after the second task is removed from the first task, the processing result of the third task is the processing result of the first task, a message containing the processing result of the first task is returned to the sender of the first message, and the source address of the message is the address of the DomainU1.
The message filtering module 230 of Domain0 transfers the message to a forwarding callback, and returns the sender of the first message through the forwarding callback.
When the sender of the first message is located outside the chip, the task processing module 220 of Domain0 converts the address of the message into an external address.
The invention also provides an operating system, and an embodiment I of a method for sharing tasks in the type1 operating system or an embodiment II of a method for sharing tasks in the type1 operating system are realized.
Embodiments of the present invention also provide a computing device, described in detail below in conjunction with FIG. 6.
The computing device 600 includes a chip 610 and several communication interfaces 620.
It should be understood that, in the chip 610, the first method embodiment of task sharing in a type1 operating system or the second method embodiment of task sharing in a type1 operating system of the present invention is implemented by software.
It should be appreciated that the communication interface 620 in the computing device 600 shown in this figure may enable communication between the various physical ports of the chip 610 and other devices.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, by which the method embodiment one of the invention for task sharing in a type1 operating system or the method embodiment two of task sharing in a type1 operating system is implemented on a chip.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the invention, which fall within the scope of the invention.

Claims (10)

1. A device for task sharing in a type1 operating system, comprising:
the system comprises a real-time service system and a plurality of real-time service systems, wherein the real-time service system and the plurality of real-time service systems are operated on a microkernel of the operating system, the microkernel is operated on an SOC chip, the real-time service system is used for managing each real-time service system and is also used for a gateway of the operating system to realize the communication between each real-time service system and the outside of the chip, and the real-time service system is used for processing real-time services in the exclusive field;
the real-time service system comprises a task scheduling module, wherein the task scheduling module is used for scheduling part of tasks in a first task to the real-time service system when the load of the real-time service system is higher than a first set value, and the first task is a task which is to be processed by the real-time service system and can be shared to the real-time service system, and does not comprise the task which is processed by the real-time service system as the gateway.
2. The apparatus of claim 1, wherein the real-time service system further comprises a message filtering module, configured to query a routing rule table according to header information of a first message when the real-time service system is used as a gateway of the operating system, determine a destination address of the first message, and transmit the first message to the destination address after performing corresponding callback processing, where the first message is a message received by the real-time service system from inside or outside the operating system.
3. The apparatus of claim 2, wherein the real-time service system further comprises a task identification module for identifying whether the first task is included in the first message delivered to the real-time service system.
4. The apparatus of claim 2, wherein entries of the routing rule table are indexed by a combination of a source address and a destination address of the message, and the contents of the entries at least include: callback type;
when the source address of the message is an address outside the real-time service system and the target address is a real-time service system processing address, the callback type is an input callback, and the real-time service system processing address comprises an address inside the real-time service system and an address of the real-time service system serving as the gateway proxy;
when the source address of the message is an address in the real-time service system and the target address is an address in the real-time service system, the callback type is an output callback;
when the source address and the target address of the message are both addresses outside the real-time service system, the callback type is a forwarding callback.
5. The apparatus of claim 1, wherein the real-time service system further comprises: the address mapping module is used for converting the address of the message into an external address when the message is sent to the outside of the operating system, and converting the address of the message into an internal address when the message is received from the outside of the operating system, wherein the internal address is an address used in the operating system, and the external address is an address used in the outside of the operating system.
6. The apparatus of claim 1, wherein the task scheduling module is specifically configured to select a real-time service system with a load lower than a second set value as the service processing system when the load of the real-time service system is higher than the first set value, and send a second task to the service processing system for processing, where the second task is a task selected from the first tasks and not belonging to a domain exclusive to the service processing system.
7. A method for task sharing in a type1 operating system, comprising:
when the load of the real-time service system is higher than a first set value, part of tasks in the first task are scheduled to the real-time service system, wherein the real-time service system and the real-time service system operate on the microkernel of the operating system, the microkernel operates on an SOC chip, the real-time service system is used for managing each real-time service system and is also used for a gateway of the operating system, communication between each real-time service system and the outside of the chip is realized, the real-time service system is used for processing real-time services in the exclusive field, the first task is a task which is to be processed by the real-time service system and can be shared to the real-time service system, and the real-time service system is not used as the task processed by the gateway.
8. The method as recited in claim 7, further comprising:
when the real-time service system is used as a gateway of the operating system, a routing rule table is queried according to the packet header information of a first message to determine a destination address of the first message, and the first message is transmitted to the destination address after corresponding callback processing is carried out, wherein the first message is a message received by the real-time service system from the inside or the outside of the operating system.
9. The method as recited in claim 8, further comprising:
the real-time service system identifies whether a first message communicated to the real-time service system includes a first task.
10. An operating system, comprising: having a device according to any one of claims 1 to 7.
CN202211024667.6A 2022-08-25 2022-08-25 Device and method for task sharing in type1 operating system Active CN115408127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211024667.6A CN115408127B (en) 2022-08-25 2022-08-25 Device and method for task sharing in type1 operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211024667.6A CN115408127B (en) 2022-08-25 2022-08-25 Device and method for task sharing in type1 operating system

Publications (2)

Publication Number Publication Date
CN115408127A CN115408127A (en) 2022-11-29
CN115408127B true CN115408127B (en) 2023-07-11

Family

ID=84161995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211024667.6A Active CN115408127B (en) 2022-08-25 2022-08-25 Device and method for task sharing in type1 operating system

Country Status (1)

Country Link
CN (1) CN115408127B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110365751A (en) * 2019-06-26 2019-10-22 口碑(上海)信息技术有限公司 Method for processing business, device and the equipment of gateway system
CN113783922A (en) * 2021-03-26 2021-12-10 北京沃东天骏信息技术有限公司 Load balancing method, system and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577723B (en) * 2014-10-16 2019-04-05 新华三技术有限公司 Virtualize the method and apparatus that load balancing is realized in network
CN110430135B (en) * 2019-07-08 2021-10-26 新华三信息安全技术有限公司 Message processing method and device
CN113489640B (en) * 2021-08-25 2023-08-01 北京金山云网络技术有限公司 Message forwarding method, device and gateway system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110365751A (en) * 2019-06-26 2019-10-22 口碑(上海)信息技术有限公司 Method for processing business, device and the equipment of gateway system
CN113783922A (en) * 2021-03-26 2021-12-10 北京沃东天骏信息技术有限公司 Load balancing method, system and device

Also Published As

Publication number Publication date
CN115408127A (en) 2022-11-29

Similar Documents

Publication Publication Date Title
US20200195740A1 (en) Subscribe and publish method and server
CN109964451B (en) Method and system for providing virtual network authentication service
US9413554B2 (en) Virtual network overlays
CN101784989B (en) Method and system for allocating network adapter resources among logical partitions
US20190245791A1 (en) System and method for implementing universal cloud classification (ucc) as a service (uccaas)
US20210273990A1 (en) Secure multi-directional data pipeline for data distribution systems
US8724641B2 (en) Communication system and control method for communication system
US8266630B2 (en) High-performance XML processing in a common event infrastructure
US20100142538A1 (en) M2M data router
CN110708297B (en) Unmanned aerial vehicle protocol conversion method and computer readable storage medium
CN109669787B (en) Data transmission method and device, storage medium and electronic equipment
CN112243045A (en) Service data processing method and device, node structure and electronic equipment
CN113495776A (en) VNF instantiation method and device
CN115408127B (en) Device and method for task sharing in type1 operating system
CN107454132B (en) Method and device for supporting multi-tenant network transmission
CN110262903B (en) Middleware framework and method based on aviation reservation system
CN116828035A (en) Data integration system based on cloud computing
CN108111513B (en) Data management method, device, medium and electronic equipment applied to front-end device
US10333792B2 (en) Modular controller in software-defined networking environment and operating method thereof
CN114528114B (en) Data processing method, device and equipment
CN115208838B (en) Message forwarding device, method and operating system
WO2023035777A1 (en) Network configuration method, proxy component, controller, electronic device and storage medium
CN116094929B (en) Configuration issuing method, device, electronic equipment and computer readable storage medium
CN118368243B (en) Method, device, equipment, storage medium and program product for realizing traffic scheduling
CN112039942B (en) Subscription publishing method and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant