CN108932213A - The means of communication, device, electronic equipment and storage medium between multiple operating system - Google Patents

The means of communication, device, electronic equipment and storage medium between multiple operating system Download PDF

Info

Publication number
CN108932213A
CN108932213A CN201710937009.9A CN201710937009A CN108932213A CN 108932213 A CN108932213 A CN 108932213A CN 201710937009 A CN201710937009 A CN 201710937009A CN 108932213 A CN108932213 A CN 108932213A
Authority
CN
China
Prior art keywords
operating system
core cell
processor
core
communication
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.)
Pending
Application number
CN201710937009.9A
Other languages
Chinese (zh)
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.)
Beijing Orion Star Technology Co Ltd
Original Assignee
Beijing Orion Star 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 Beijing Orion Star Technology Co Ltd filed Critical Beijing Orion Star Technology Co Ltd
Priority to CN201710937009.9A priority Critical patent/CN108932213A/en
Publication of CN108932213A publication Critical patent/CN108932213A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox

Abstract

The embodiment of the invention provides the means of communication, device, electronic equipment and the readable storage medium storing program for executing between a kind of multiple operating system.Wherein, the means of communication are applied to multi-core processor, first part's core cell of multi-core processor is for running the first operating system, for running the second operating system, first part's core cell and second part core cell are connected with a shared memory second part core cell of multi-core processor;The means of communication include:First part's core cell will be in the task data write-in shared memory of the first operating system;Second part core cell reads task data from shared memory.The embodiment of the present invention is by taking the technical solution, solves the technical issues of communication efficiency between how improving multiple operating system, can computational processing is big simultaneously and the needing to complete before the deadline of the task, improve the efficiency communicated between multiple operating system, also save cost.

Description

The means of communication, device, electronic equipment and storage medium between multiple operating system
Technical field
The present invention relates to processor technical fields, more particularly to the means of communication between a kind of multiple operating system, device, electricity Sub- equipment and storage medium.
Background technique
Currently, being divided more and more using multiple operating system in the equipment in the fields such as industry control, smart home, logistics Different tasks is not completed, to improve task execution efficiency.
By taking robot as an example, which includes central processing unit (CPU) and microcontroller (MCU).Wherein, CPU is run Time sharing operating system, for handling the needing largely to calculate of the task;MCU runs real time operating system, needs advising for handling It fixes time the task (i.e. real-time task) of interior completion.Assuming that the robot is in the process of movement, occur toppling over suddenly or The case where people being damaged, at this time, it may be necessary to control robot stop motion at once, that is to say, that the timesharing of robot is grasped Make system and real time operating system needs the task that computational processing is big and needs to complete at the appointed time.
In this case, if time sharing operating system generates the task of a stop motion, the time sharing operating system It needs to be communicated by input/output interface (I/O interface) with real time operating system, and controlling real time operating system execution should The task of stop motion.Wherein, the communication speed of I/O interface is slow and communication frequency is low.If needed between two operating systems into Row data interaction, before real time operating system executes the task of the stop motion, it is more likely that dangerous situation just has occurred and that , so that the time sharing operating system and real time operating system of the robot do not avoid the generation of dangerous situation.
It can be seen that in the above prior art, due to being connect between time sharing operating system and real time operating system by I/O It mouthful is communicated, so, communication frequency between time sharing operating system and real time operating system is low, communication speed is slow, Ye Jifen When operating system and real time operating system between communication efficiency it is low.
Summary of the invention
A kind of means of communication being designed to provide between multiple operating system of the embodiment of the present invention, device, electronic equipment and Storage medium, to solve the technical issues of how improving communication efficiency between multiple operating system.
To achieve the goals above, in a first aspect, providing following technical scheme:
A kind of means of communication between multiple operating system are applied to multi-core processor, the first part of the multi-core processor Core cell is for running the first operating system, and the second part core cell of the multi-core processor is for running the second operation System, first part's core cell and the second part core cell are connected with a shared memory;
The method includes:
The task data of first operating system is written in the shared memory first part's core cell;
The second part core cell reads the task data from the shared memory.
Optionally, the shared memory is written in the task data of the first operating system by first part's core cell In, later, the method includes:
First part's core cell sends notification signal to the second part core cell;
The second part core cell reads the task data, before, the method from the shared memory Including:
The second part core cell receives the notification signal.
Optionally, realize that first part's core cell of the processor runs the first operating system using following steps:
First part's core cell of the processor is initialized when starting the first operating system.
Optionally, realize that the second part core cell of the processor runs the second operating system using following steps:
Run the firmware loader in first operating system;
Start the second operating system in the firmware loader, initializes the second part core list of the processor Member.
Optionally, first operating system is a kind of in time sharing operating system and real time operating system, second behaviour It is another in time sharing operating system and real time operating system for making system.
To achieve the goals above, second aspect additionally provides following technical scheme:
A kind of communication device between multiple operating system is applied to multi-core processor, the first part of the multi-core processor Core cell is for running the first operating system, and the second part core cell of the multi-core processor is for running the second operation System, first part's core cell and the second part core cell are connected with a shared memory;
Described device includes:
The task data of the first operating system is written for controlling first part's core cell for first writing module In the shared memory;
First read module reads described appoint for controlling the second part core cell from the shared memory Business data.
Optionally, described device further includes:
Sending module sends notification signal to the second part core list for controlling first part's core cell Member;
Receiving module receives the notification signal for controlling the second part core cell.
Optionally, described device includes:
First initialization module initializes first part's core list of the processor when for starting the first operating system Member.
Optionally, described device includes:
Module is run, for running the firmware loader in first operating system;
Second initialization module initializes the processing for starting the second operating system in the firmware loader The second part core cell of device.
Optionally, first operating system is a kind of in time sharing operating system and real time operating system, second behaviour It is another in time sharing operating system and real time operating system for making system.
To achieve the goals above, the third aspect additionally provides following technical scheme:
A kind of electronic equipment, including processor, communication interface, memory and communication bus, wherein the processor, institute It states communication interface and the memory completes mutual communication by the communication bus;
The memory, for storing computer program;
The processor when for executing the program stored on memory, realizes method and step described in first aspect.
To achieve the goals above, fourth aspect additionally provides following technical scheme:
A kind of computer readable storage medium, which is characterized in that calculating is stored in the computer readable storage medium Machine program realizes method and step described in first aspect when the computer program is executed by processor.
The embodiment of the present invention provides the means of communication, device, electronic equipment and the readable storage medium between a kind of multiple operating system Matter.Wherein, which is applied to multi-core processor, and first part's core cell of multi-core processor is for running the first behaviour Make system, the second part core cell of multi-core processor is for running the second operating system, first part's core cell and the Two part core cells are connected with a shared memory;The means of communication include:First part's core cell is operated first In the task data write-in shared memory of system;Second part core cell reads task data from shared memory.
Compared with prior art, the embodiment of the present invention first passes through first part's core cell for the task of the first operating system Shared memory is written in data, and then, second part core cell reads the task data from the shared memory again, thus real The communication between the first operating system and the second operating system is showed.With in such a way that communication among processors mechanism is communicated It compares, simple signal can only be transmitted when being communicated by way of communication among processors mechanism, and cannot send a large amount of Data;But the embodiment of the present invention is communicated by the way of shared memory, since the shared memory can store greatly Data are measured, therefore, the embodiment of the present invention can realize the communication of mass data between multiple operating systems, and can locate simultaneously Task that is computationally intensive and needing to complete before the deadline is managed, the efficiency communicated between multiple operating system is which thereby enhanced.Separately Outside, the embodiment of the present invention is compared in such a way that the low I/O interface of communication efficiency is communicated, and is improved between multiple operating system Communication efficiency.In addition, compared with being separately operable multiple operating systems in the prior art on different processor, due to Method provided in an embodiment of the present invention can realize the communication between multiple operating systems on one processor, thus save Cost.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that being emerged from by implementing the present invention.The objectives and other advantages of the invention can by specification, Specifically noted structure is achieved and obtained in claims and attached drawing.
Certainly, implement any of the products of the present invention or method it is not absolutely required at the same reach all the above excellent Point.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the schematic diagram of internal structure of the multi-core processor of the prior art;
Fig. 2 is the flow diagram according to the means of communication between the multiple operating system of the embodiment of the present invention;
Fig. 3 is according to the schematic diagram communicated between core cell in the multi-core processor of the embodiment of the present invention;
Fig. 4 is the flow diagram according to the means of communication between the multiple operating system of another embodiment of the present invention;
Fig. 5 is the structural schematic diagram according to the communication device between the multiple operating system of the embodiment of the present invention;
Fig. 6 is the structural schematic diagram according to the communication device between the multiple operating system of another embodiment of the present invention;
Fig. 7 is the structural schematic diagram according to the electronic equipment of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Currently, usually using multi-core processor in the equipment such as mobile phone, tablet computer, laptop.Fig. 1 example Show to property the internal structure of the multi-core processor of the prior art.As shown in Figure 1, multi-core processor includes:First core list Member is to Nth core unit, first interface to N interface and multiple selector.Wherein, the first core cell, the second core list Nth core unit is the calculating core cell in multi-core processor to member ....N takes natural number.First core cell, the second core Unit ... Nth core unit respectively independently possesses corresponding first interface, second interface ... N interface, deposits for accessing Data in reservoir may also receive from the interrupt request singal of interrupt handler, and make a response to interrupt request singal. Multiple selector is used to interrupt request singal be sent to the first core cell, in the second core cell ... Nth core unit One or more.First interface to N interface be used for receives by external equipment request interrupt request singal, and export by The one or more control instructions that external equipment send of first core cell into Nth core unit.
Above-mentioned multi-core processor includes but is not limited to CPU (central processing unit), SOC (system on chip), ARM (Advanced RISC Machines).The multi-core processor can be applied in the equipment such as mobile phone, tablet computer, robot, but be not limited to This.
In the application of existing multiple operating system, the operation time sharing operating system of processor shown in Fig. 1 or reality are generallyd use When operating system.For example, being separately operable time sharing operating system, in real time behaviour using two above-mentioned processors in intelligent robot Make system.It is communicated between time sharing operating system and real time operating system by the interface of processor.But due to interface Communication speed is low and communication frequency is low, so, the communication efficiency between time sharing operating system and real time operating system is low, leads to this Intelligent robot, which cannot be handled, such as needs to meet simultaneously computational complexity and effective task dispatching.
In consideration of it, the technical issues of in order to solve how to improve communication efficiency between multiple operating system, the embodiment of the present invention is mentioned For the means of communication between a kind of multiple operating system.The means of communication be applied to multi-core processor, first of the multi-core processor Core cell is divided to operate for running the first operating system, the second part core cell of the multi-core processor for running second System, first part's core cell and second part core cell are connected with a shared memory core cell core cell core Heart unit.As shown in Fig. 2, the means of communication include the following steps S200 and step S210.Wherein:
S200:Core cell in shared memory is written in the task data of first operating system by first part's core cell Core cell.
Wherein, first part's core cell (namely first part calculates core cell) has complete structure, including Independent memory, logic controller, computing unit and independent memory access interface.By memory access interface, Data in the accessible memory of core cell can also receive the request from interrupt handler, and make to interrupt requests Response.Therefore each of first part's core cell core cell can independently realize complete computing function, such as Independent operating application thread, that is to say, that each core cell is had and can be grasped with independent operating time sharing operating system and in real time Make the ability of system.
Wherein, the first operating system can be time sharing operating system (for example, Unix operating system, (SuSE) Linux OS), May be real time operating system (for example, VxWorks).Wherein, real time operating system is for handling real-time task.Real-time task It is the referring to respond within the expected time of the task.Time sharing operating system for distributing to multiple timeslices in turn Core cell handles timesharing task.Wherein, timeslice refers to the resource of processor is split in time obtained from Each period.Each timeslice is used in turn.Timesharing task refer to need to transfer a large amount of computing resources and calculate as a result, But the task of timeliness is not required.
In an alternative embodiment, first part's core cell operation first of processor is realized using following steps Operating system:First part's core cell of initialization processor when starting the first operating system.
As an example, the first operating system can be when processor starts, for example after powering on or resetting, pass through BootRom Cured address start BootLoader (boot loader) is realized in (guidance read-only memory).Start the first operating system When, Bootloader executes initialization program, and the processor information that will test is supplied to the first operating system, to initialize the A part of core cell.
By taking the first operating system is time sharing operating system as an example, after multi-core processor powers on or resets, it is located at BootRom In BootLoader the image of time sharing operating system is copied to RAM (random access memory), and measurement processor and I/O Interface, to realize the initialization of first part's core cell of processor.
Here, by taking robot as an example, in practical applications, can by the waiting task for needing largely to calculate (for example, around Cross barrier, lift mechanical arm) it is completed by time sharing operating system;And the needs such as move, stop, turn for corresponding to robot are being advised The waiting task (for example, stop motion) for the movement completed immediately in fixing time, is completed by real time operating system.
It uses the example above, the task data of the first operating system for example can be control robot etc. and execute some or certain The instruction of a little movement (for example, stop motion, the movement such as lift mechanical arm, get around barrier, stretch out pallet).
Above-mentioned shared memory, which can be, to be marked off in main memory used in the system applied from multi-core processor One piece of storage region.Here, which is referred to as mailbox (mailbox).
Fig. 3 schematically illustrates the schematic diagram communicated between core cell in multi-core processor.Including operation first First part's core cell 31 of operating system, shared memory 32, the second part core cell for running the second operating system 33 and communication link 34.As shown in figure 3, first part's core cell 31 passes through shared memory 32 and second part core cell 33 carry out data communication, and first part's core cell 31 and second part core cell 33 can also pass through communication link 34 It is communicated.When task to be handled needs to handle, the first operating system needs are communicated with the second operating system.This When, the corresponding data of waiting task (for example, instruction etc. that control robot stops) being written first part's core cell 31 Shared memory 32.
S210:Second part core cell reads task data core cell from shared memory.
Wherein, the second operating system can be time sharing operating system, or real time operating system.
In an alternative embodiment, if the first operating system is in time sharing operating system and real time operating system One kind, then the second operating system is the another kind in time sharing operating system and real time operating system.
Fig. 3 example is continued to use, second part core cell 33 reads task data from shared memory 32.The task data Such as it can be control robot etc. and execute some or certain movements (for example, stop motion, lifting mechanical arm, getting around barrier Hinder object, stretch out the movement such as pallet) instruction.
This step from shared memory by reading out the first operating system that first part's core cell is written Task data, to realize the communication between the first operating system and the second operating system.
In an alternative embodiment, the second part core cell operation second of processor is realized using following steps Operating system:
Step 1:Run the firmware loader in the first operating system;
In this step, firmware loader will be for that will enter second part core list as the second operating system loading of firmware Member.
Step 2:Start the second operating system, the second part core cell of initialization processor in firmware loader.
The step of second part core cell of above-mentioned initialization processor, can be with reference to the of aforementioned initialization processor The step of a part of core cell, details are not described herein.
Below by taking the first operating system is time sharing operating system, the second operating system is real time operating system as an example, to this The start-up course of multiple operating system is described in detail in inventive embodiments:
Processor starting before, all core cells of processor be all it is idle, Bootloader can determine handle The enabled instruction of time sharing operating system is loaded into which core cell in processor and is handled.When processor start, than After such as powering on or reset, initialization program is executed by address start BootLoader cured in BootRom, Bootloader When, the processor information that will test is supplied to time sharing operating system, so that initialization process when time sharing operating system starts First part's core cell of device.In general, the enabled instruction of time sharing operating system is loaded since No. 0 core cell, therefore, After Bootloader load time sharing operating system is mirrored in RAM (random access memory), it can be opened from No. 0 core cell Other permission time-sharing operations of the enabled instruction for the execution time sharing operating system that begins, time sharing operating system starting and then deinitialization The core cell that system uses, so that first part's core cell of processor can load and execute corresponding time-sharing operation The program code of system.For example, after No. 0 core cell starts first, time-sharing operation can be run by taking four core processors as an example Then the code of system itself initializes No. 1 core cell, No. 2 core cell, retain No. 3 core cell without making Any operation does not carry out any initialization to the memory, logic control element or computing unit of No. 3 core cell and grasps Make.For time sharing operating system, No. 3 core cell of processor is not present, and time sharing operating system only manages No. 0 Core, No. 1 core and No. 2 core.After time sharing operating system start completion, running configuration is in time sharing operating system Firmware loader, the loader load real time operating system image file when to the 3rd core cell of processor carry out just The data and instruction of the real time operating system is loaded onto No. 3 core cell by beginningization.The embodiment of the present invention can be with as a result, Realize that time sharing operating system and real time operating system run simultaneously and do not interfere with each other between the two.
Those skilled in the art will be understood that it is above-mentioned be only assumed as illustrating, be not construed as to the scope of the present invention not Work as restriction.
The task data of the first operating system is write in conclusion the embodiment of the present invention first passes through first part's core cell Enter shared memory, then, second part core cell reads the task data from the shared memory again, it is thus achieved that the Communication between one operating system and the second operating system.Compared in such a way that communication among processors mechanism is communicated, Simple signal can only be transmitted when being communicated by way of communication among processors mechanism, and cannot send a large amount of data; But the embodiment of the present invention is communicated by the way of shared memory, since the shared memory can store a large amount of numbers According to therefore, the embodiment of the present invention can realize the communication of mass data between multiple operating systems, and can handle meter simultaneously Calculation amount is big and the needing to complete before the deadline of the task, which thereby enhances the efficiency communicated between multiple operating system.In addition, this Inventive embodiments improve logical between multiple operating system compared in such a way that the low I/O interface of communication efficiency is communicated Interrogate efficiency.In addition, compared with being separately operable multiple operating systems in the prior art on different processor, due to this hair The method that bright embodiment provides can realize the communication between multiple operating systems on one processor, thus save into This.
In an alternative embodiment, the task data of the first operating system is written altogether in first part's core cell After enjoying the step in memory block, which can also include:First part's core cell sends notification signal to second Part core cell;In second part core cell before the step of reading task data in shared memory, the communication side Method can also include:Second part core cell receives notification signal.
Fig. 3 example is continued to use, the present embodiment can be notified second by first part's core cell by communication link 34 Divide core cell.Illustratively, which can be signal, an address signal etc. and enables to second part core cell 33 Know the signal that task data is written in shared memory 32, the present invention is not especially limited this.
In the present embodiment, when in task data write-in shared memory of first part's core cell by the first operating system Later, notification signal is sent to second part core cell, to notify task data to have been written into shared memory;Second part core Heart unit receives the notice, then, then the task data is read from shared memory.The embodiment of the present invention passes through as a result, Shared memory realizes the communication between the first operating system and the second operating system, since the shared memory can store Mass data, therefore, the embodiment of the present invention can realize the communication of mass data between multiple operating systems, and can be simultaneously Computational processing is big and the needing to complete before the deadline of the task, which thereby enhances the efficiency communicated between multiple operating system.
Below with reference to Fig. 3, with a preferred embodiment, the present invention is described in detail.
The means of communication between the multiple operating system may include:
Step 1:First part's core cell 31 will be in the task data write-in shared memory 32 of the first operating system;
By taking robot as an example, first part's core cell can be by control robot stopping, instruction of cut-through object etc. Shared memory is written.
Step 2:First part's core cell 31 sends notification signal by communication link 34 with communication among processors mechanism To second part core cell 33;
Communication among processors mechanism (Inter-Processor Interrupts, abbreviation IPI) is also referred to as internuclear interruption, is Refer to:It makes an appointment between first part's core cell and second part core cell shared storage area, first part's core list The shared storage area is written in task data by member, and the thread volume of second part core cell is written into interrupt register Number, interrupt vector, interrupt type etc.;Then, interrupt control unit notifies second part core cell, by its currently performed task It hangs up, and according to interrupt vector, the entry address that the second core cell of control jumps to Interrupt Service Routine starts to read shared Storage region, to obtain the message of first part's core cell notice second part core cell.
This step is appointed by sending notification signal to two part core cells to indicate to write into shared memory Business data.
Step 3:Second part core cell 33 receives the notification signal;
Step 4:Second part core cell 33 reads task data from the shared memory 32;
Step 5:When second part core cell 33 is according to read task data, after having handled task, at task It manages result and shared memory 32 is written;
Wherein, the write-in of task processing result can be considered as second part core cell from altogether by second part core cell 33 It enjoys after having read task data in memory block 32, to the feedback of first part's core cell.
Task processing result for example can for reading data success, reading data failure, waiting task execution state etc., But it is not limited to this.
The step of shared memory 32 are written in task processing result by second part core cell and first part's core list The step of shared memory 32 are written in task data by member is similar, and related explanation can be used for reference mutually, and details are not described herein.
Step 6:Second part core cell 33 sends task processing result to first part's core cell 31 by IPI The notice of write-in;
In this step, second part core cell notifies the mode and first part's core cell of first part's core cell Notify the mode of second part core cell identical, so, the present embodiment can refer to the related explanation of previous embodiment, herein It repeats no more.
Step 7:First part's core cell 31 receives the notice of task processing result write-in;
Step 8:First part's core cell 31 reads task processing result from shared memory.
In this step, first part's core cell can make next step logic judgment according to task processing result and calculating is determined Plan.By taking robot as an example, which is kept in motion;If the first operating system is time sharing operating system, task processing As a result it has been lifted for robotic arm, then the time sharing operating system can further judge the machine according to these task processing results Can device people cut-through object after robotic arm lifts.
Mutually speaking on somebody's behalf in the step of explanation in relation to this step can read task data with reference to second part core cell Bright, details are not described herein.
In this preferred embodiment, shared memory 32 is written into when second part core cell 33 receives task data When notice, so that it may go in shared memory 32 to read task data, in second part core cell 33 from shared memory 32 It is middle read task data after, then task processing result is written into the shared memory 32, and notifies first part's core list Member;Then, first part's core cell 31 reads task processing result from shared memory 32 again, to realize the first operation Communication between system and the second operating system.Since this communication modes are not over I/O interface, so, the first operation system Communication efficiency between system and the second operating system is high.This efficient communication modes can make provided in an embodiment of the present invention Computational processing is big simultaneously and the needing to complete before the deadline of the task for method.The present embodiment and pass through communication among processors The mode that mechanism is communicated is compared, and since communication among processors mechanism form can only transmit simple signal, and cannot be sent A large amount of data;And the present embodiment can be in the first operating system and the by can store the shared memory of mass data The communication of mass data is realized between two operating systems.In addition, with being communicated by the way of communication among processors mechanism Method is compared, due to being carried out data transmission between each section core cell in the embodiment of the present invention by shared memory, with It realizes communication, which thereby enhances data communication amount (for example, multiple tasks instruction can be sent).In addition, being with by multiple operations System is separately operable to be compared in the prior art on different processor, since method provided in an embodiment of the present invention can be one The communication between multiple operating systems is realized on a processor, thus also saves cost.
Below with reference to Fig. 4, with another preferred embodiment, the present invention is described in detail again.
For this preferred embodiment still by taking robot as an example, which includes multi-core processor and motor and chassis, the multicore First part's core cell in processor runs time sharing operating system, and second part core cell runs real time operating system. Waiting task is to stop bobbin movement.The runing time of multi-core processor is divided into multiple timeslices by time sharing operating system; Time sharing operating system determines some timeslice which core cell distributed to according to preset task priority.Wherein, when Between piece time span be 100 milliseconds.
When robot during the motion, robot occurs suddenly will topple over or will be to the danger such as people damages When situation, the core cell for running time sharing operating system obtains 100 milliseconds of timeslice, then, to stop bobbin movement this Data corresponding to waiting task are calculated.
This preferred embodiment provides the means of communication between a kind of multiple operating system, including:
S400:First part's core cell will stop in the corresponding instruction write-in mailbox of bobbin movement task;
Wherein, for example, first part's core cell can will stop the address in bobbin movement task write-in mailbox, as The content of notice is sent to second part core cell.
S 410:First part's core cell notifies second part core cell by IPI;
S420:Second part core cell reads from the mailbox and stops when receiving data and being written into the notice of mailbox The only instruction of bobbin movement task;
Continue to use the example of step 1, in this step, second part core cell is notified according to first part's core cell Address, from mailbox read stop bobbin movement task instruction.
S430:When second part core cell according to it is read stop bobbin movement task instruction, handled stopping When bobbin movement task, mailbox is written into task processing result;
Wherein, task processing result for example can be to run succeeded.
In this step, when second part core cell according to it is read stop bobbin movement task instruction, handled Stop bobbin movement task when, second part core cell will run succeeded this task processing result write-in mailbox.
S440:Second part core cell notifies first part's core cell by IPI;
S450:First part's core cell is when the task processing result of receiving is written into the notice of mailbox, from mailbox Read the task processing result.
Wherein, the example of step 3 is continued to use, in this step, first part's core cell is receiving running succeeded for task When processing result is written into the notice of mailbox, this task processing result to run succeeded is read from mailbox.
First part's core cell can further control machine after receiving and carrying out the feedback of self-operating real time operating system Which movement device people executes, for example, controlling robot toward opposite direction movement etc..
With compared with interface is realized by the way of multiple communication among processors, the preferred embodiment of the present invention is directly in memory In realize data communication between core cell, improve communication efficiency.
Compared with sending the prior art of instruction using IPI mode, the preferred embodiment of the present invention is sent by memory The data volume (for example, can send multiple tasks instruction) sent has can be improved in instruction.
Compared with the mode of processor operation time sharing operating system, if waiting timeslice to be allocated is 100 milliseconds, In this 100 milliseconds, robot probably has occurred that dangerous situation;So using the prior art of time sharing operating system The real-time task for needing to complete at the appointed time can not be handled.But the technical side that preferred embodiment is taken through the invention Case can handle real-time task, such as in above-mentioned 10 milliseconds, so that it may waiting task be handled, so as to avoid machine Human hair gives birth to dangerous situation.
The technical issues of in order to solve how to improve communication efficiency between multiple operating system, is based on and the above-mentioned means of communication is implemented The identical technical concept of example, the embodiment of the present invention also provide the communication device between a kind of multiple operating system.The device is applied to more Core processor, first part's core cell of the multi-core processor is for running the first operating system, and the second of multi-core processor For part core cell for running the second operating system, first part's core cell and second part core cell are shared with one Memory block is connected;As shown in figure 5, the communication device between the multiple operating system includes:
The task data of the first operating system is written altogether for controlling first part's core cell for first writing module 51 It enjoys in memory block;
First read module 52 reads task data for controlling second part core cell from shared memory.
The embodiment of the present invention first passes through the first writing module 51 control first part's core cell for the first operating system Shared memory is written in task data, then, shared from this again using the first read module 52 control second part core cell The task data is read in memory block, it is thus achieved that the communication between the first operating system and the second operating system.At using The mode that reason communication among unit mechanism is communicated is compared, and can only be transmitted when being communicated by way of communication among processors mechanism Simple signal, and a large amount of data cannot be sent;But the embodiment of the present invention is led to by the way of shared memory News, since the shared memory can store mass data, the embodiment of the present invention can be real between multiple operating systems The communication of existing mass data, and can computational processing is big simultaneously and the needing to complete before the deadline of the task, thus mention The efficiency communicated between high multiple operating system.In addition, the embodiment of the present invention is communicated with using the low I/O interface of communication efficiency Mode compare, improve the communication efficiency between multiple operating system.In addition, being separately operable with by multiple operating systems in not existing together Prior art on reason device is compared, since method provided in an embodiment of the present invention can be realized on a multi-core processor Communication between multiple operating systems, thus save cost.
In an alternative embodiment, as shown in fig. 6, above-mentioned communication device can also include:
Sending module 61 sends notification signal to second part core cell for controlling first part's core cell;
Receiving module 62 receives notification signal for controlling second part core cell.
In the present embodiment, when in task data write-in shared memory of first part's core cell by the first operating system Later, sending module 61 controls first part's core cell and sends notification signal to second part core cell, to notify task Data have been written into shared memory;Receiving module 62 controls second part core cell and receives notification signal.Second part core After unit receives the notice, the task data is read from shared memory.The embodiment of the present invention passes through shared storage as a result, Area realizes the communication between the first operating system and the second operating system, since the shared memory can store a large amount of numbers According to therefore, the embodiment of the present invention can realize the communication of mass data between multiple operating systems, and can handle meter simultaneously Calculation amount is big and the needing to complete before the deadline of the task, which thereby enhances the efficiency communicated between multiple operating system.
In an alternative embodiment, which includes:
First initialization module, first part's core cell of initialization processor when for starting the first operating system.
Explanation in relation to the present embodiment can refer to the explanation of preceding method embodiment, and details are not described herein.
In an alternative embodiment, which includes:
Module is run, for running the firmware loader in the first operating system;
Second initialization module, for starting the second operating system in firmware loader, the second of initialization processor Part core cell.
Explanation in relation to the present embodiment can refer to the explanation of preceding method embodiment, and details are not described herein.
In an alternative embodiment, the first operating system is a kind of in time sharing operating system and real time operating system, Second operating system is another in time sharing operating system and real time operating system.
The technical issues of in order to solve how to improve communication efficiency between multiple operating system, based on identical with embodiment of the method Technical concept, the embodiment of the invention also provides a kind of electronic equipment, as shown in fig. 7, comprises processor 71, communication interface 72, Memory 73 and communication bus 74, wherein processor 71, communication interface 72, memory 73 are completed mutually by communication bus 74 Between communication;
Memory 73, for storing computer program;
Processor 71 when for executing the program stored on memory 73, is realized in above-mentioned means of communication embodiment Method and step.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, Fig. 7, it is not intended that an only bus or a type of bus.
Above-mentioned communication interface 72 is for the communication between above-mentioned electronic equipment and other equipment.
Above-mentioned memory 73 may include random access memory (Random Access Memory, RAM), also can wrap Include nonvolatile memory (non-volatile memory, NVM), for example, at least a magnetic disk storage.Optionally, it stores Device can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor 71 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Ne twork Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), specific integrated circuit (Applica tion Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other can Programmed logic device, discrete gate or transistor logic, discrete hardware components.
Above-mentioned electronic equipment includes but is not limited to smart phone, computer, personal digital assistant etc..
In the present embodiment, when executing the program stored on memory 73 by processor 71, improve between operating system Communication efficiency, can computational processing be big simultaneously and the needing to complete before the deadline of the task;In addition, with using processing The method that the mode of communication among unit mechanism is communicated is compared, since the embodiment of the present invention carries out data biography by shared memory It is defeated, to realize communication, which thereby enhance data communication amount.With the phase in such a way that interface realizes multiple communication among processors Than the preferred embodiment of the present invention directly realizes the data communication between core cell in memory, improves communication efficiency. In addition, compared with being separately operable multiple operating systems in the prior art on different processor, since the present invention is implemented Example can realize the communication between multiple operating systems on a multi-core processor, thus save cost.
The technical issues of in order to solve how to improve communication efficiency between multiple operating system, based on identical with embodiment of the method Technical concept, the embodiment of the invention also provides a kind of computer readable storage mediums.The computer readable storage medium memory Computer program is contained, the method and step in above-mentioned means of communication embodiment is realized when computer program is executed by processor.
Above-mentioned computer readable storage medium can include but is not limited to random access memory (RAM), dynamic random is deposited Access to memory (DRAM), static random access memory (SRAM), read-only memory (ROM), programmable read only memory (PROM), Erarable Programmable Read only Memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory (example Such as, NOR type flash memory or NAND-type flash memory), Content Addressable Memory (CAM), polymer memory is (for example, ferroelectric polymers Memory), phase transition storage, ovonic memory, silicon-oxide-nitride silicon-silica-silicon (Silicon- Oxide-Nitride-Oxide-Silicon, SONOS) memory, magnetic card or light-card, also or any other appropriate type Computer readable storage medium.
In the present embodiment, when computer program is executed by processor, the communication efficiency between operating system, Ke Yitong are improved When computational processing is big and the needing to complete before the deadline of the task;In addition, with the side using communication among processors mechanism The method that formula is communicated is compared, since the embodiment of the present invention is carried out data transmission by shared memory, thus realize communication, Which thereby enhance data communication amount.With compared with interface is realized by the way of multiple communication among processors, the present invention is preferably implemented Example directly realizes the data communication between core cell in memory, improves communication efficiency.In addition, with by multiple operations System is separately operable to be compared in the prior art on different processor, since the embodiment of the present invention can be at a multicore The communication between multiple operating systems is realized on reason device, thus saves cost.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.Especially for device reality For applying example, electronic equipment embodiment and computer storage medium embodiment, since it is substantially similar to the method embodiment, so It is described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. the means of communication between a kind of multiple operating system, which is characterized in that it is applied to multi-core processor, the multi-core processor First part's core cell is for running the first operating system, and the second part core cell of the multi-core processor is for running Second operating system, first part's core cell and the second part core cell are connected with a shared memory;
The method includes:
The task data of first operating system is written in the shared memory first part's core cell;
The second part core cell reads the task data from the shared memory.
2. the method according to claim 1, wherein first part's core cell is by the first operating system Task data is written in the shared memory, later, the method includes:
First part's core cell sends notification signal to the second part core cell;
The second part core cell reads the task data from the shared memory, before, the method includes:
The second part core cell receives the notification signal.
3. the method according to claim 1, wherein realizing the first part of the processor using following steps Core cell runs the first operating system:
First part's core cell of the processor is initialized when starting the first operating system.
4. the method according to claim 1, wherein realizing the second part of the processor using following steps Core cell runs the second operating system:
Run the firmware loader in first operating system;
Start the second operating system in the firmware loader, initializes the second part core cell of the processor.
5. the method according to claim 1, wherein first operating system is for time sharing operating system and in real time A kind of in operating system, second operating system is another in time sharing operating system and real time operating system.
6. the communication device between a kind of multiple operating system, which is characterized in that it is applied to multi-core processor, the multi-core processor First part's core cell is for running the first operating system, and the second part core cell of the multi-core processor is for running Second operating system, first part's core cell and the second part core cell are connected with a shared memory;
Described device includes:
First writing module, for controlling described in task data write-in of the first part's core cell by the first operating system In shared memory;
First read module reads the number of tasks for controlling the second part core cell from the shared memory According to.
7. device according to claim 6, which is characterized in that described device further includes:
Sending module sends notification signal to the second part core cell for controlling first part's core cell;
Receiving module receives the notification signal for controlling the second part core cell.
8. device according to claim 6, which is characterized in that described device includes:
First initialization module initializes first part's core cell of the processor when for starting the first operating system.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein described Processor, the communication interface and the memory complete mutual communication by the communication bus;
The memory, for storing computer program;
The processor when for executing the program stored on memory, realizes any method step of claim 1-5 Suddenly.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-5 any method and step when the computer program is executed by processor.
CN201710937009.9A 2017-10-10 2017-10-10 The means of communication, device, electronic equipment and storage medium between multiple operating system Pending CN108932213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710937009.9A CN108932213A (en) 2017-10-10 2017-10-10 The means of communication, device, electronic equipment and storage medium between multiple operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710937009.9A CN108932213A (en) 2017-10-10 2017-10-10 The means of communication, device, electronic equipment and storage medium between multiple operating system

Publications (1)

Publication Number Publication Date
CN108932213A true CN108932213A (en) 2018-12-04

Family

ID=64448371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710937009.9A Pending CN108932213A (en) 2017-10-10 2017-10-10 The means of communication, device, electronic equipment and storage medium between multiple operating system

Country Status (1)

Country Link
CN (1) CN108932213A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471705A (en) * 2019-07-15 2019-11-19 江苏泛腾电子科技有限公司 A kind of customization dual system
CN110928592A (en) * 2019-12-09 2020-03-27 新石器慧通(北京)科技有限公司 Embedded system, starting method and device thereof, and electronic equipment
CN111726186A (en) * 2019-03-20 2020-09-29 北京米文动力科技有限公司 Synchronous configuration method of embedded chip and external equipment and embedded chip
WO2021204147A1 (en) * 2020-04-10 2021-10-14 华为技术有限公司 Data transmission method and apparatus
CN114579072A (en) * 2022-03-02 2022-06-03 南京芯驰半导体科技有限公司 Display screen projection method and device across multiple operating systems

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929719A (en) * 2012-09-18 2013-02-13 中标软件有限公司 Control method for multiple operating systems of multi-core computer and multi-core computer
CN105278940A (en) * 2014-07-08 2016-01-27 北京航空航天大学 Robotic hybrid system application frame based on multi-core processor architecture
US20160350159A1 (en) * 2015-05-29 2016-12-01 International Business Machines Corporation Efficient critical thread scheduling for non-privileged thread requests
US20170060624A1 (en) * 2015-08-26 2017-03-02 Netapp, Inc. Migration Between CPU Cores
CN106776379A (en) * 2011-07-26 2017-05-31 英特尔公司 For the method and apparatus that the TLB in the heterogeneous computing system for supporting shared virtual memory is closed
CN106796536A (en) * 2016-12-27 2017-05-31 深圳前海达闼云端智能科技有限公司 Memory pool access method, device and electronic equipment for multiple operating system
CN107077377A (en) * 2016-12-29 2017-08-18 深圳前海达闼云端智能科技有限公司 A kind of device virtualization method, device, system and electronic equipment, computer program product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776379A (en) * 2011-07-26 2017-05-31 英特尔公司 For the method and apparatus that the TLB in the heterogeneous computing system for supporting shared virtual memory is closed
CN102929719A (en) * 2012-09-18 2013-02-13 中标软件有限公司 Control method for multiple operating systems of multi-core computer and multi-core computer
CN105278940A (en) * 2014-07-08 2016-01-27 北京航空航天大学 Robotic hybrid system application frame based on multi-core processor architecture
US20160350159A1 (en) * 2015-05-29 2016-12-01 International Business Machines Corporation Efficient critical thread scheduling for non-privileged thread requests
US20170060624A1 (en) * 2015-08-26 2017-03-02 Netapp, Inc. Migration Between CPU Cores
CN106796536A (en) * 2016-12-27 2017-05-31 深圳前海达闼云端智能科技有限公司 Memory pool access method, device and electronic equipment for multiple operating system
CN107077377A (en) * 2016-12-29 2017-08-18 深圳前海达闼云端智能科技有限公司 A kind of device virtualization method, device, system and electronic equipment, computer program product

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726186A (en) * 2019-03-20 2020-09-29 北京米文动力科技有限公司 Synchronous configuration method of embedded chip and external equipment and embedded chip
CN111726186B (en) * 2019-03-20 2022-09-09 北京米文动力科技有限公司 Synchronous configuration method of embedded chip and external equipment and embedded chip
CN110471705A (en) * 2019-07-15 2019-11-19 江苏泛腾电子科技有限公司 A kind of customization dual system
CN110928592A (en) * 2019-12-09 2020-03-27 新石器慧通(北京)科技有限公司 Embedded system, starting method and device thereof, and electronic equipment
WO2021204147A1 (en) * 2020-04-10 2021-10-14 华为技术有限公司 Data transmission method and apparatus
CN114579072A (en) * 2022-03-02 2022-06-03 南京芯驰半导体科技有限公司 Display screen projection method and device across multiple operating systems

Similar Documents

Publication Publication Date Title
CN108932213A (en) The means of communication, device, electronic equipment and storage medium between multiple operating system
CN108932160A (en) Multiple operating system control method, device, electronic equipment and computer storage medium
US8276145B2 (en) Protected mode scheduling of operations
CN105765541B (en) Controller for motor vehicle
CN102567090B (en) The method and system of execution thread is created in computer processor
CN111095205A (en) Multi-core framework for pre-boot environment of system-on-chip
JPH05216835A (en) Interruption-retrial decreasing apparatus
CN112104017A (en) Robot charging method and device
US20060015876A1 (en) Light weight context switching technique
US11645081B2 (en) Handling exceptions in a multi-tile processing arrangement
CN111767995B (en) Operation method, device and related product
CN117075983A (en) Real-time multitasking method, chip system and device based on multi-core heterogeneous
US9946665B2 (en) Fetch less instruction processing (FLIP) computer architecture for central processing units (CPU)
JP5678347B2 (en) IT system configuration method, computer program thereof, and IT system
CN114064128B (en) Kernel restarting method
GB2580135A (en) Handling exceptions in a multi-tile processing arrangement
CN109165086A (en) Task executing method and single-chip microcontroller
US11635966B2 (en) Pausing execution of a first machine code instruction with injection of a second machine code instruction in a processor
CN113238842A (en) Task execution method and device and storage medium
US11237860B2 (en) Command-based processing of real-time virtualized jobs
KR950014163B1 (en) Apparatus and method for implementing a distributed program stack
Lakhdhar et al. A New Approach for Optimal Implementation of Multi-core Reconfigurable Real-time Systems.
Hsiao et al. Cloud Computing, Internet of Things (IoT), Edge Computing, and Big Data Infrastructure
US20230161600A1 (en) Kernel reboot method
US20240160474A1 (en) Multi-core processor task scheduling method, and device and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181204

RJ01 Rejection of invention patent application after publication