CN117389754A - Method and device for sharing memory information among operating systems and vehicle - Google Patents

Method and device for sharing memory information among operating systems and vehicle Download PDF

Info

Publication number
CN117389754A
CN117389754A CN202210785810.7A CN202210785810A CN117389754A CN 117389754 A CN117389754 A CN 117389754A CN 202210785810 A CN202210785810 A CN 202210785810A CN 117389754 A CN117389754 A CN 117389754A
Authority
CN
China
Prior art keywords
memory
cross
sharing service
information
operating system
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
CN202210785810.7A
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 Rockwell Technology Co Ltd
Original Assignee
Beijing Rockwell 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 Rockwell Technology Co Ltd filed Critical Beijing Rockwell Technology Co Ltd
Priority to CN202210785810.7A priority Critical patent/CN117389754A/en
Publication of CN117389754A publication Critical patent/CN117389754A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the disclosure provides a memory information sharing method and device between operating systems and a vehicle. The method comprises the following steps: in response to acquiring a write operation of a write process for a first anonymous shared memory, triggering the first cross-system memory sharing service to acquire memory information written by the write operation; and controlling the first cross-system memory sharing service and sending the memory information to the second cross-system memory sharing service. In this way, multiple operating systems can communicate through the anonymous shared memory in a cross-system manner, so that the limitation on the use mode of the anonymous shared memory is removed, and the shared memory communication modes can be used for flexible communication and information exchange between different operating systems.

Description

Method and device for sharing memory information among operating systems and vehicle
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of multiple operating systems.
Background
At present, in order to facilitate the transmission of larger data, an anonymous shared memory mode is adopted for transmission communication. However, the current anonymous memory sharing communication method can only be performed in the operating system, so that memory sharing across the operating system cannot be realized, and flexibility of information exchange among different operating systems is affected.
Disclosure of Invention
The disclosure provides a memory information sharing method, device, vehicle and storage medium between operating systems.
According to a first aspect of the present disclosure, a method for sharing memory information between operating systems is provided. The method is applied to a first operating system, the first operating system is configured with a first cross-system memory sharing service, the first cross-system memory sharing service is connected with a second cross-system memory sharing service in a second operating system through Ethernet communication, and the method comprises the following steps:
in response to acquiring a write operation of a write process for a first anonymous shared memory, triggering the first cross-system memory sharing service to acquire memory information written by the write operation;
and controlling the first cross-system memory sharing service and sending the memory information to the second cross-system memory sharing service.
Aspects and any one of the possible implementations as described above, further providing an implementation, the method further including:
acquiring an identification of a reading process for reading the memory information;
and controlling the first cross-system memory sharing service, and sending the identification of the reading process to the second cross-system memory sharing service.
In the aspect and any possible implementation manner described above, there is further provided an implementation manner, where the acquiring writing process is directed to a writing operation of the first anonymous shared memory, the method further includes:
and acquiring the writing offset and the writing size of the memory information in the first anonymous shared memory.
In one embodiment, the method further includes notifying the first cross-system memory sharing service to send the write offset and the write size to the second cross-system memory sharing service.
Aspects and any one of the possible implementations as set forth above, further providing an implementation of creating the first anonymous shared memory that matches a write size of the memory information by invoking a shared memory interface of the first operating system, wherein,
after the first anonymous shared memory is created, notifying the first cross-system memory sharing service of the attribute of the first anonymous shared memory; the attribute of the first anonymous shared memory includes: and the memory size and the offset of the first anonymous shared memory.
In the aspect and any possible implementation manner described above, there is further provided an implementation manner, where the acquiring writing process is directed to a writing operation of the first anonymous shared memory, the method further includes:
and acquiring the writing offset and the writing size in the first anonymous shared memory, and notifying the first cross-system memory shared service.
According to a second aspect of the present disclosure, there is provided a memory sharing method between operating systems, applied to a second operating system, where the second operating system is configured with a second cross-system memory sharing service, and the second cross-system memory sharing service is connected to a first cross-system memory sharing service in a first operating system through ethernet communication, the method includes:
responding to the acquired communication information sent by the Ethernet, and judging whether the communication information is the information sent by the first cross-system memory sharing service;
acquiring memory information in the communication information under the condition that the communication information is information sent by the first cross-system memory sharing service;
and writing the memory information into a second anonymous shared memory, wherein the second anonymous shared memory is the anonymous shared memory in the second operating system.
In the aspect and any possible implementation manner described above, there is further provided an implementation manner, where the communication information is information sent by the first cross-system memory sharing service, the communication information further includes an identifier of a reading process;
the method further comprises the steps of: acquiring an identification of a reading process in the communication information;
and triggering the reading process to read the memory information under the condition that the second operating system creates the reading process.
In the aspect and any possible implementation manner described above, there is further provided an implementation manner, where the communication information is information sent by the first cross-system memory sharing service, the communication information further includes a write offset and a write size;
the method further comprises the steps of: and under the condition that the second operating system creates the reading process, the writing offset and the writing size are sent to the reading process, so that the reading process reads the memory information according to the writing offset and the writing size.
According to a third aspect of the present disclosure, there is provided an inter-operating-system memory information sharing apparatus applied to a first operating system, the first operating system being configured with a first cross-system memory sharing service, the first cross-system memory sharing service being communicatively connected to a second cross-system memory sharing service in a second operating system via an ethernet network, the apparatus comprising:
the triggering module is used for responding to the write operation of the acquired write process aiming at the first anonymous shared memory, and triggering the first cross-system memory sharing service to acquire the memory information written by the write operation;
and the control module is used for controlling the first cross-system memory sharing service and sending the memory information to the second cross-system memory sharing service.
According to a fourth aspect of the present disclosure, there is provided an inter-operating-system memory sharing device applied to a second operating system, where the second operating system is configured with a second cross-system memory sharing service, and the second cross-system memory sharing service is connected to a first cross-system memory sharing service in a first operating system through ethernet communication, the device includes:
the judging module is used for responding to the acquired communication information sent by the Ethernet and judging whether the communication information is the information sent by the first cross-system memory sharing service;
the acquisition module is used for acquiring memory information in the communication information under the condition that the communication information is information sent by the first cross-system memory sharing service;
and the writing module is used for writing the memory information into a second anonymous shared memory, wherein the second anonymous shared memory is the anonymous shared memory in the second operating system.
According to a fifth aspect of the present disclosure, a vehicle is provided. The vehicle includes: the memory sharing device between operating systems according to the third and/or fourth aspects.
According to a sixth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method according to the first and/or second aspects of the present disclosure.
In the method, after a proper first anonymous shared memory is created in a first operating system, memory information written in the first anonymous shared memory can be sent to a second cross-system memory sharing service through a first cross-system memory sharing service of the first operating system, so that a plurality of operating systems can communicate through the anonymous shared memory in a cross-system manner, the limitation on the use mode of the anonymous shared memory is relieved, different operating systems can flexibly communicate by using the shared memory communication mode, information exchange is flexibly carried out, and applications among different operating systems can access each other freely on the basis of unchanged use mode without concern about whether the applications are applications on the same operating system.
It should be understood that what is described in this summary is not intended to limit the critical or essential features of the embodiments of the disclosure nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. For a better understanding of the present disclosure, and without limiting the disclosure thereto, the same or similar reference numerals denote the same or similar elements, wherein:
FIG. 1 is a flow chart illustrating a method of sharing memory information between operating systems according to an embodiment of the present disclosure;
FIG. 2 illustrates a flowchart of another inter-operating system memory information sharing method according to an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of yet another inter-operating system memory information sharing method according to an embodiment of the present disclosure;
FIG. 4 illustrates a block diagram of an inter-operating system memory information sharing apparatus according to an embodiment of the present disclosure;
FIG. 5 illustrates a block diagram of another inter-operating system memory information sharing device, according to an embodiment of the present disclosure;
fig. 6 illustrates a block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments in this disclosure without inventive faculty, are intended to be within the scope of this disclosure.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Fig. 1 is a flowchart illustrating a method 100 for sharing memory information between operating systems according to an embodiment of the present disclosure. The inter-operating system memory information sharing method 100 is applied to a first operating system configured with a first cross-system memory sharing service, the first cross-system memory sharing service being connected to a second cross-system memory sharing service in a second operating system via ethernet communications,
the operating system may be an android operating system, and the first operating system and the second operating system may be different operating systems on the same vehicle or operating systems on different vehicles, and if they are different operating systems on the same vehicle, they may communicate through a local ethernet communication, and of course, if they are operating systems on different vehicles, they may also communicate through a metropolitan ethernet communication or a wide area ethernet communication, where the method includes:
step 110, in response to obtaining a write operation of a write process to a first anonymous shared memory, triggering the first cross-system memory sharing service to obtain memory information written by the write operation;
the write process may be any instantiated software program on the first operating system that writes data into memory.
Step 120, controlling the first cross-system memory sharing service, and sending the memory information to the second cross-system memory sharing service.
After creating a suitable first anonymous shared memory in the first operating system, the memory information written in the first anonymous shared memory can be sent to the second cross-system memory sharing service through the first cross-system memory sharing service of the first operating system. Therefore, the plurality of operating systems can communicate through the anonymous shared memory, so that information exchange can be flexibly performed, and the limitation on the use mode of the anonymous shared memory is eliminated. Thus, the application among different operating systems can realize the sharing of information on the basis of unchanged use modes, for example: the application on the a operating system is free to access the memory information generated by the application on the B operating system as in the native operating system.
The first and second cross-system memory sharing services may be Remote Anonymous Shared Memory Service services, abbreviated as RASMS, which may be automatically loaded on start-up of the operating system.
In an embodiment of the present disclosure, the foregoing operating system may be an android system. Anonymous shared memory of the android system is based on shared memory of Linux, and virtual files are created on a temporary file system (tmpfs) and mapped to different processes. The android system can enable multiple processes to operate the same memory area, and has no other size limitation except physical memory limitation. Compared with the shared memory of Linux, the anonymous shared memory of Android is more refined in memory management, and a mutual exclusion lock is added.
Aspects and any one of the possible implementations as described above, further providing an implementation, the method further including:
acquiring an identification of a reading process for reading the memory information;
and controlling the first cross-system memory sharing service, and sending the identification of the reading process to the second cross-system memory sharing service.
The core of the memory sharing service is shared memory. When a specific writing process writes memory information, the writing memory information may be used by other reading processes, so after the writing memory information is written in the first operating system, the writing memory information is sent to the second operating system, and the second operating system is informed of which reading processes can read the memory, so that memory sharing is realized.
In the aspect and any possible implementation manner described above, there is further provided an implementation manner, where the acquiring writing process is directed to a writing operation of the first anonymous shared memory, the method further includes: and acquiring the writing offset and the writing size of the memory information in the first anonymous shared memory. The write offset may be denoted by offset.
In one embodiment, the method further includes notifying the first cross-system memory sharing service to send the write offset and the write size to the second cross-system memory sharing service. When writing into the first anonymous shared memory, the writing offset and the writing size of the memory information in the first anonymous shared memory can be acquired so as to determine the specific position of the memory information in the first anonymous shared memory, then because the first operating system and the second operating system are shared memories, the memory information can be in the same position in the anonymous shared memories of the two operating systems, and therefore, the first cross-system memory sharing service can be utilized to send the writing offset and the writing size to the second cross-system memory sharing service so that the second cross-system memory sharing service can determine the specific storage position of the memory information, namely the specific storage position of the second anonymous shared memory, and can inform a reading process, and thus, remote anonymous shared memory communication can be realized between different operating systems based on Ethernet, and memory information exchange can be flexibly performed.
In one embodiment, the first anonymous shared memory is created by calling a shared memory interface of the first operating system, i.e., an API (Application Programming Interface ) interface, which matches the write size of the memory information, wherein,
after the first anonymous shared memory is created, notifying the first cross-system memory sharing service of the attribute of the first anonymous shared memory; the attribute of the first anonymous shared memory includes: the memory size and offset of the first anonymous shared memory may further include an identifier, where the identifier may be an ID (Identity document, identification number) handle of the first anonymous shared memory. After receiving the attribute of the first anonymous shared memory, the first cross-system memory sharing service replies to the first operating system by calling the shared memory interface, so that anonymous shared memory mapping created for the writing process can be automatically completed, and the first cross-system memory sharing service and the writing process are associated.
By automatically calling the API of the first operating system, the matched first anonymous shared memory can be automatically created according to the writing size of the memory information, so that the writing process can use the anonymous shared memory to store data.
FIG. 2 illustrates a flow chart of another inter-operating system memory information sharing method 200 according to an embodiment of the disclosure. The inter-operating system memory information sharing method 200 is applied to a second operating system, where the second operating system is configured with a second cross-system memory sharing service, and the second cross-system memory sharing service is connected with a first cross-system memory sharing service in the first operating system through ethernet communication, and the method includes:
step 210, in response to obtaining the communication information sent by the ethernet, determining whether the communication information is the information sent by the first cross-system memory sharing service;
step 220, obtaining the memory information in the communication information when the communication information is the information sent by the first cross-system memory sharing service;
step 230, writing the memory information into a second anonymous shared memory, where the second anonymous shared memory is an anonymous shared memory in the second operating system.
After receiving the memory information sent by the first operating system, the second operating system can write the memory information into a second anonymous shared memory corresponding to the first anonymous shared memory, so that cross-system communication through the anonymous shared memory is realized, the limitation on the use mode of the anonymous shared memory is removed, flexible communication can be carried out between different operating systems by using the shared memory communication mode, and information exchange can be flexibly carried out.
In the aspect and any possible implementation manner described above, there is further provided an implementation manner, where the communication information is information sent by the first cross-system memory sharing service, the communication information further includes an identifier of a reading process;
the method further comprises the steps of: acquiring an identification of a reading process in the communication information;
and triggering the reading process to read the memory information under the condition that the second operating system creates the reading process.
By acquiring the identifiers of the reading processes in the communication information, the second operating system can determine which reading processes can read the memory, and when the reading processes exist, the reading processes are triggered in time to read the memory information written into the second anonymous shared memory.
In the aspect and any possible implementation manner described above, there is further provided an implementation manner, where the communication information is information sent by the first cross-system memory sharing service, the communication information further includes a write offset and a write size;
the method further comprises the steps of: and under the condition that the second operating system creates the reading process, the writing offset and the writing size are sent to the reading process, so that the reading process reads the memory information according to the writing offset and the writing size.
In the embodiment of the disclosure, the second operating system may monitor various processes that are instantiated correspondingly, and after monitoring that a reading process exists, may send a write offset and a write size of the memory information to the reading process, so that the reading process automatically reads the memory information written in the second anonymous shared memory according to the write offset and the write size, so that the reading process calls the memory information in the second anonymous shared memory according to requirements. The reading process is an instantiation program in the second operating system, which is required to read the data in the anonymous shared memory. If the memory information is an image or video written by a camera of the first operating system, the reading process can be an application capable of reading the image or video, such as a gallery and social software, in the second operating system.
Of course, the write offset and write size may also be sent to the read process by the registration event callback listener.
In one embodiment, in a case where the communication information is information sent by the first cross-system memory sharing service, the communication information further includes: the attribute of the first anonymous shared memory;
and creating the second anonymous shared memory according to the attribute of the first anonymous shared memory.
According to the attribute of the first anonymous shared memory, a matched second anonymous shared memory can be automatically created in the second operating system, so that the memory information can be synchronously stored in the second anonymous shared memory.
In one embodiment, after monitoring the read process, the method further comprises:
calling a service interface registration event callback monitor of the second cross-system memory sharing service through the reading process;
after the second anonymous shared memory is created, notifying, by the event callback listener, an attribute of the second anonymous shared memory to the read process, wherein the attribute of the second anonymous shared memory includes: and the memory size, the offset and the identification of the second anonymous shared memory. The second anonymous shared memory is the same as the first anonymous shared memory in memory size, and the identification may be an ID (Identity document, identification number) handle of the second anonymous shared memory.
When a reading process exists in the second operating system, when the reading process is started, a service interface of the second operating system is automatically called to automatically register an event callback monitor in a second cross-system memory sharing service, then after the shared memory system service of the second operating system creates a second anonymous shared memory, the event callback monitor is used for notifying the reading process of the attribute of the second anonymous shared memory, so that after the reading process receives the notification, the second operating system can be replied through the shared memory interface of the second operating system, anonymous shared memory mapping in the second operating system is completed, and after the operation is successful, the first operating system and the second operating system complete the creation flow of the remote anonymous shared memory.
The technical scheme of the present disclosure will be described in further detail below with reference to fig. 3:
1. there are now two Android Automotive systems, named a system, B system, respectively. An ethernet connection is established between the two systems using static IP.
2. And creating a RemoteAnonymus ShareMermoryService service, which is abbreviated as RASMS, in the A system and the B system respectively.
The ethernet connection between the a system and the B system is established by RASMS in both systems.
RASMS of the a-system is identical to RASMS of the B-system.
Data synchronization between RASMS of the a-system and RASMS of the B-system is bi-directional.
Both the RASMS of the a system and the RASMS of the B system can read and write the shared memory with other modules in the system.
7. Assuming that a data writing module, namely a writer for short exists at present, the system A is provided with a data writing module; there is a data reading module, reader for short, in the B system.
And 8, firstly, creating an anonymous shared memory required by a writer in the A system by calling an API of the Android system, and simultaneously calling an SDK notification of the RASMS to the RASMS.
And after receiving the notification, the RASMS in the 9.A system calls the API of the Android system to complete anonymous shared memory mapping created for the writer.
The RASMS in the a-system transmits information, such as size, of the created anonymous shared memory to the RASMS in the B-system via an ethernet connection with the RASMS in the B-system.
And in the B system, the RASMS calls an API of the Android system according to the received information to create an anonymous shared memory in the B system.
A reader in the b system registers an event callback listener in RASMS through its SDK at startup.
After the RASMS in the B system is established, the reader is notified through the event callback monitor, and the data of the anonymous shared memory is transferred.
14. And the reader calls an API in the Android system according to the information to complete anonymous shared memory mapping created for the RASMS in the B system.
15. After the operation is successful, the A system and the B system complete the creation process of the remote anonymous shared memory.
16. At this time, this write data is written, and the RASMS in the a system is notified of the size by the SDK of the RASMS.
And reading the anonymous shared memory according to the received information by the RASMS of the A system, and reading out the data.
RASMS in system a sends the read data to system B.
And the system B RASMS receives the data and writes the data into the anonymous shared memory.
The b-system RASMS notifies the reader through the event callback listener and passes the anonymously shared memory data, such as offset, size, etc.
20. And after receiving the notification, the reader reads the anonymous shared memory according to the notification information and reads the data.
21. At this point the flow of communication through the remote anonymous shared memory is complete.
22. The writer and the reader can exchange roles, the process is supported in two directions, and if two-way reading and writing are needed, two remote anonymous shared memories are needed to be created.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present disclosure is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present disclosure. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
The foregoing is a description of embodiments of the method, and the following further describes embodiments of the present disclosure through examples of apparatus.
Fig. 4 shows a block diagram of an inter-operating system memory information sharing apparatus according to an embodiment of the present disclosure. The apparatus is applied to a first operating system configured with a first cross-system memory sharing service, the first cross-system memory sharing service being communicatively connected to a second cross-system memory sharing service in a second operating system via an ethernet, the apparatus comprising:
a triggering module 410, configured to trigger, in response to acquiring a write operation of a write process for a first anonymous shared memory, the first cross-system memory sharing service to acquire memory information written by the write operation;
and a control module 420, configured to control the first cross-system memory sharing service and send the memory information to the second cross-system memory sharing service.
FIG. 5 illustrates another inter-operating system memory sharing device according to an embodiment of the present disclosure. The device is applied to a second operating system, the second operating system is configured with a second cross-system memory sharing service, the second cross-system memory sharing service is connected with a first cross-system memory sharing service in a first operating system through Ethernet communication, and the device comprises:
a judging module 510, configured to, in response to obtaining communication information sent by the ethernet, judge whether the communication information is information sent by the first cross-system memory sharing service;
an obtaining module 520, configured to obtain, when the communication information is information sent by the first cross-system memory sharing service, memory information in the communication information;
the writing module 530 is configured to write the memory information into a second anonymous shared memory, where the second anonymous shared memory is an anonymous shared memory in the second operating system.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the described modules may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In accordance with embodiments of the present disclosure, the present disclosure also provides a vehicle and a non-transitory computer-readable storage medium storing computer instructions.
Fig. 6 shows a schematic block diagram of an electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
The device 600 includes a computing unit 601 that can perform various suitable actions and processes according to computer programs stored in a Read Only Memory (ROM) 602 or loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as method 100 or 200. For example, in some embodiments, the method 100 or 200 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of method 100 or 200 described above may be performed. Alternatively, in other embodiments, computing unit 601 may be configured to perform method 100 or 200 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (12)

1. The memory information sharing method between the operating systems is characterized by being applied to a first operating system, wherein the first operating system is configured with a first cross-system memory sharing service, and the first cross-system memory sharing service is connected with a second cross-system memory sharing service in a second operating system through Ethernet communication, and the method comprises the following steps:
in response to acquiring a write operation of a write process for a first anonymous shared memory, triggering the first cross-system memory sharing service to acquire memory information written by the write operation;
and controlling the first cross-system memory sharing service and sending the memory information to the second cross-system memory sharing service.
2. The method according to claim 1, wherein the method further comprises:
acquiring an identification of a reading process for reading the memory information;
and controlling the first cross-system memory sharing service, and sending the identification of the reading process to the second cross-system memory sharing service.
3. The method of claim 2, wherein in the event of a write operation of the get write process to the first anonymous shared memory, the method further comprises:
and acquiring the writing offset and the writing size of the memory information in the first anonymous shared memory.
4.A method according to claim 3, characterized in that the method further comprises:
and notifying the first cross-system memory sharing service, and sending the write offset and the write size to the second cross-system memory sharing service.
5. The method according to any one of claims 1 to 4, further comprising:
creating the first anonymous shared memory that matches a write size of the memory information by invoking a shared memory interface of the first operating system, wherein,
after the first anonymous shared memory is created, notifying the first cross-system memory sharing service of the attribute of the first anonymous shared memory; the attribute of the first anonymous shared memory includes: and the memory size and the offset of the first anonymous shared memory.
6.A memory sharing method between operating systems, applied to a second operating system, where the second operating system is configured with a second cross-system memory sharing service, where the second cross-system memory sharing service is connected with a first cross-system memory sharing service in a first operating system through ethernet communication, the method comprising:
responding to the acquired communication information sent by the Ethernet, and judging whether the communication information is the information sent by the first cross-system memory sharing service;
acquiring memory information in the communication information under the condition that the communication information is information sent by the first cross-system memory sharing service;
and writing the memory information into a second anonymous shared memory, wherein the second anonymous shared memory is the anonymous shared memory in the second operating system.
7. The method of claim 6, wherein in the case where the communication is sent by the first cross-system memory sharing service, the communication further includes an identification of a read process;
the method further comprises the steps of: acquiring an identification of a reading process in the communication information;
and triggering the reading process to read the memory information under the condition that the second operating system creates the reading process.
8. The method according to claim 6 or 7, wherein in case the communication information is information sent by the first cross-system memory sharing service, the communication information further comprises a write offset and a write size;
the method further comprises the steps of:
and under the condition that the second operating system creates the reading process, the writing offset and the writing size are sent to the reading process, so that the reading process reads the memory information according to the writing offset and the writing size.
9. An inter-operating system memory information sharing device, applied to a first operating system, where the first operating system is configured with a first cross-system memory sharing service, and the first cross-system memory sharing service is connected with a second cross-system memory sharing service in a second operating system through ethernet communication, where the device includes:
the triggering module is used for responding to the write operation of the acquired write process aiming at the first anonymous shared memory, and triggering the first cross-system memory sharing service to acquire the memory information written by the write operation;
and the control module is used for controlling the first cross-system memory sharing service and sending the memory information to the second cross-system memory sharing service.
10. An inter-operating system memory sharing device, applied to a second operating system, where the second operating system is configured with a second cross-system memory sharing service, and the second cross-system memory sharing service is connected with a first cross-system memory sharing service in a first operating system through ethernet communication, the device includes:
the judging module is used for responding to the acquired communication information sent by the Ethernet and judging whether the communication information is the information sent by the first cross-system memory sharing service;
the acquisition module is used for acquiring memory information in the communication information under the condition that the communication information is information sent by the first cross-system memory sharing service;
and the writing module is used for writing the memory information into a second anonymous shared memory, wherein the second anonymous shared memory is the anonymous shared memory in the second operating system.
11. A vehicle comprising an inter-operating system memory sharing device as claimed in claim 9 and/or claim 10.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202210785810.7A 2022-07-04 2022-07-04 Method and device for sharing memory information among operating systems and vehicle Pending CN117389754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210785810.7A CN117389754A (en) 2022-07-04 2022-07-04 Method and device for sharing memory information among operating systems and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210785810.7A CN117389754A (en) 2022-07-04 2022-07-04 Method and device for sharing memory information among operating systems and vehicle

Publications (1)

Publication Number Publication Date
CN117389754A true CN117389754A (en) 2024-01-12

Family

ID=89436065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210785810.7A Pending CN117389754A (en) 2022-07-04 2022-07-04 Method and device for sharing memory information among operating systems and vehicle

Country Status (1)

Country Link
CN (1) CN117389754A (en)

Similar Documents

Publication Publication Date Title
CN110007936B (en) Data processing method and device
CN113703946B (en) Application recovery method and device, electronic equipment and computer readable storage medium
CN112688991B (en) Method for performing point cloud scanning operation, related apparatus and storage medium
CN115934076B (en) Cross-platform client micro-service providing device and method and electronic equipment
CN117389754A (en) Method and device for sharing memory information among operating systems and vehicle
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN113377360B (en) Task execution method, device, electronic equipment, storage medium and program product
CN113641688B (en) Node updating method, related device and computer program product
WO2020259286A1 (en) Method and apparatus for obtaining device information, storage medium and electronic device
CN115858125B (en) Rendering engine calling method and device, electronic equipment and storage medium
CN113760487A (en) Service processing method and device
CN112073505A (en) Method for unloading on cloud server, control device and storage medium
CN113556370A (en) Service calling method and device
CN114095758B (en) Cloud image intercepting method and related device
CN113032040B (en) Method, apparatus, device, medium, and article for processing tasks
CN114860350B (en) Data processing method and device based on cloud diskless tree-like mirror image
CN112596922B (en) Communication management method, device, equipment and medium
CN112379912B (en) Algorithm management method and device, electronic equipment and storage medium
CN113612848A (en) Internet of things data receiving method, Internet of things platform and Internet of things system
CN117675897A (en) Application interaction method, device, equipment and storage medium
CN116455702A (en) Configuration method and device of virtual local area network
CN114416194A (en) Picture loading method and device based on ImageView aggregation function component
CN117632545A (en) Data sharing method and device of business system and electronic equipment
CN116346933A (en) Data processing method and device of edge network node and edge network node

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