WO2019127191A1 - File system sharing method and apparatus for multi-operating system, and electronic device - Google Patents

File system sharing method and apparatus for multi-operating system, and electronic device Download PDF

Info

Publication number
WO2019127191A1
WO2019127191A1 PCT/CN2017/119288 CN2017119288W WO2019127191A1 WO 2019127191 A1 WO2019127191 A1 WO 2019127191A1 CN 2017119288 W CN2017119288 W CN 2017119288W WO 2019127191 A1 WO2019127191 A1 WO 2019127191A1
Authority
WO
WIPO (PCT)
Prior art keywords
operating system
client
server
memory space
shared memory
Prior art date
Application number
PCT/CN2017/119288
Other languages
French (fr)
Chinese (zh)
Inventor
边瑞锋
温燕飞
Original Assignee
深圳前海达闼云端智能科技有限公司
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 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Priority to CN201780003297.9A priority Critical patent/CN108369604B/en
Priority to PCT/CN2017/119288 priority patent/WO2019127191A1/en
Publication of WO2019127191A1 publication Critical patent/WO2019127191A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Definitions

  • the embodiments of the present application relate to the field of virtualization technologies, for example, to a method, an apparatus, and an electronic device for sharing a file system by multiple operating systems.
  • Virtualization technology allows multiple operating systems to share the hardware resources of the machine. Each operating system is independent of each other and does not affect each other. It not only plays a good role in isolation, but also greatly improves the resource utilization of the system.
  • a file system needs to be shared between virtual machines or between virtual machines and hosts.
  • the file system of the host is shared to the virtual machine system mainly through virtio, and the virtual machine mounts the file system of the host to the virtual machine through the 9pfs of the kernel.
  • An object of the embodiments of the present application is to provide a method, an apparatus, and an electronic device for sharing a file system by multiple operating systems, which can implement file system sharing between virtual machines or between virtual machines and hosts.
  • the embodiment of the present application provides a method for sharing a file system by using multiple operating systems, which is used in an electronic device, and the method includes:
  • the client operating system writes the request data to a preset shared memory space, and the preset shared memory space supports access by at least two operating systems;
  • the server operating system queries the request data in the preset shared memory space, and writes reply data to the preset shared memory space according to the request data;
  • the client operating system acquires the reply data from the preset shared memory space, and mounts a target folder in the server operating system to the client operating system according to the reply data.
  • the embodiment of the present application further provides a device for sharing a file system by using multiple operating systems, and the device includes:
  • Requesting a data writing module configured to: the client operating system writes the request data to the preset shared memory space, where the preset shared memory space supports access by at least two operating systems;
  • a first notification module configured to notify the server operating system of the access request of the client operating system
  • a reply data writing module configured to query the request data in the preset shared memory space by the server operating system, and write reply data to the preset shared memory space according to the request data;
  • a second notification module configured to notify the client operating system of the reply of the server operating system
  • a file mounting module configured to: obtain, by the client operating system, the reply data from the preset shared memory space, and mount the target folder in the server operating system according to the reply data Said under the client operating system.
  • the embodiment of the present application further provides an electronic device, including:
  • At least one processor and,
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
  • the method, device, and electronic device for sharing a file system in a multi-operating system are configured to provide a space that can be accessed by multiple operating systems by using a preset shared memory space, and use the preset shared memory space to store the client.
  • Under the operating system. This enables the sharing of file systems between virtual machines and between virtual machines and hosts.
  • FIG. 1 is a schematic diagram of an application scenario of the method and apparatus of the present application.
  • FIG. 2 is a flow chart of one embodiment of a method for sharing a file system by multiple operating systems of the present application
  • FIG. 3 is a flow chart of one embodiment of a method for sharing a file system by multiple operating systems of the present application
  • FIG. 4 is a schematic flowchart of a step of writing a reset message in a method for sharing a file system by multiple operating systems according to an embodiment of the present application;
  • FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for sharing a file system by multiple operating systems according to the present application
  • FIG. 6 is a schematic structural diagram of an embodiment of an apparatus for sharing a file system by multiple operating systems according to the present application
  • FIG. 7 is a schematic structural diagram of hardware of an electronic device according to an embodiment of the present application.
  • the method and apparatus for the multi-operating system shared file system provided by the present application can be used in the application scenario shown in FIG. 1 , where the application scenario includes an electronic device 10 , and multiple virtual machines are installed on the electronic device 10 ( FIG. 1 shows A case where three virtual machines are installed on one electronic device 10.
  • the electronic device 10 itself is installed with an operating system OS as a host, an operating system OS1 is installed on the virtual machine 1 , an operating system OS 2 is installed on the virtual machine 2 , and an operating system OS 3 is installed on the virtual machine 3 .
  • the operating system is, for example, a Linux operating system.
  • one of the above host machines and a plurality of virtual machines may be selected as a server, and other virtual machines or hosts are used as clients, and the server is used to respond to data access requests of the client.
  • a memory space may be opened on the electronic device 10 as a shared memory space, and part or all of the plurality of operating systems may be accessed by the shared memory technology.
  • the shared memory space is used to store an access request of the client operating system for the server operating system, and a reply data of the server operating system to the client operating system, so that the client operating system can be used in the server operating system according to the reply data.
  • the target folder is mounted under the client operating system. This enables the sharing of file systems between virtual machines and between virtual machines and hosts.
  • the method for sharing a file system by multiple operating systems may be performed by the electronic device 10 shown in FIG. 1, as shown in FIG. 2, the method includes:
  • the client operating system writes the request data to a preset shared memory space, where the preset shared memory space supports access by at least two operating systems.
  • the method further includes: setting the preset shared memory space, so that at least two operating systems can access the memory space.
  • a memory space can be opened in the memory of the host machine by using the shared memory technology as a preset shared memory space, and the virtual machine or the host that needs to share the file system can access the preset shared memory space.
  • the notification can be implemented by sending an interrupt request from the client operating system to the server operating system.
  • the notification can be implemented by sending a trap instruction to the server operating system from the client operating system.
  • VMM can be used. Machine Monitor, virtual machine monitor) caught up with instructions to notify.
  • the client operating system is required to send a trap instruction to the host, and then the host sends an interrupt request to the server operating system. That is, the host to the virtual machine can pass the interrupt request, and the virtual machine to the host machine can be trapped by the instruction, and the virtual machine needs to first insert the instruction into the host machine, and then the host sends an interrupt request to the virtual machine.
  • the server operating system queries the request data in the preset shared memory space, and writes reply data to the preset shared memory space according to the request data.
  • the server operating system queries the request data in the preset shared memory space, and responds to the request, and writes the reply data into the preset shared memory space.
  • the server operating system may further clear the request data in the preset shared memory space to reduce the occupation of the memory space.
  • the notification can be implemented by sending an interrupt request from the server operating system to the client operating system.
  • the notification can be implemented by sending a trapped instruction to the client operating system from the server operating system.
  • the VMM can be used. Machine Monitor, virtual machine monitor) caught up with instructions to notify. If both the client and the server are virtual machines, the server operating system first needs to send a trap instruction to the host, and then the host sends an interrupt request to the client operating system.
  • Step 105 The client operating system acquires the reply data from the preset shared memory space, and mounts a target folder in the server operating system to the client operating system according to the reply data. under.
  • the reply data may be the content of the target folder requested by the client operating system, or may be an attribute of the target folder, by which the client operating system can obtain the content of the target folder, and
  • the target folder is mounted to the client operating system.
  • the embodiment of the present application provides a space that can be accessed by multiple operating systems by using a preset shared memory space, and uses the preset shared memory space to store an access request of the client operating system for the server operating system, and a server operating system.
  • the reply data to the client operating system, so that the client operating system can mount the target folder in the server operating system under the client operating system according to the reply data.
  • This enables the sharing of file systems between virtual machines and between virtual machines and hosts.
  • the embodiment of the present application does not require network communication between virtual machines or hosts, and the file system can be conveniently shared.
  • the preset shared memory space may be divided into multiple shared areas, for example, divided into multiple buffers, and each shared area is used to store corresponding clients.
  • the number and size of the shared area in which the shared memory space is divided may be allocated according to actual conditions. Take the four operating systems shown in Figure 1 as an example. If the OS is used as the server operating system, OS1, OS2, and OS3 are used as the client operating system.
  • the preset shared memory space can be divided into three shared areas, that is, a first shared area, a second shared area, and a third shared area.
  • the first shared area may be used to store OS1's request data for the OS and the OS's reply data to OS1.
  • the second shared area may be used to store OS2's request data for the OS and the OS's reply data to OS2.
  • the third shared area may be used to store OS3's request data for the OS and the OS's reply data to the OS3.
  • the server operating system can clear the request data in the shared area before writing the reply data in the shared area.
  • the preset shared memory space may also be divided into six shared areas, that is, a first shared area, a second shared area, a third shared area, a fourth shared area, a fifth shared area, and a sixth share. region.
  • the first shared area may be used to store the request data of the OS1 to the OS
  • the second shared area may be used to store the request data of the OS2 to the OS
  • the third shared area may be used to store the request data of the OS3 to the OS.
  • the fourth shared area is used to store the reply data of the OS to the OS1
  • the fifth shared area is used to store the reply data of the OS to the OS2
  • the sixth shared area is used to store the reply data of the OS to the OS3.
  • the correspondence between the request data of the client operating system and the shared area and the correspondence between the reply data of the server operating system and the shared operating system of the client operating system may be recorded in a message structure for storing the shared area information (for example, a linked list) In the data structure).
  • each client operating system can know which shared area its request data to the server operating system should be written to.
  • the server operating system replies to each client operating system, the message structure can also know that the reply should be replied. Which shared area the data is written to.
  • 3 is a schematic flow chart of another embodiment of the method. As shown in FIG. 3, the method includes:
  • multiple client operating systems can write request data in a preset shared memory space in the same time period to initiate an access request to the server operating system.
  • the operating system can respond to requests from the client operating system according to its own operating conditions. It is more efficient than a solution that can only process one client operating system data request at a time.
  • the request message may be in a blocked state until the server operating system starts processing the request message. If the server operating system crashes and the service is abnormal, after the server operating system restarts, a reset message may be sent to the corresponding client operating system, so that the client operating system can initialize its corresponding shared area and rewrite.
  • Request data to establish a connection with the server operating system.
  • the server operating system may also send a reset message to the corresponding client operating system to interrupt the processing request.
  • the server operating system sends a reset message in a similar manner to the write reply data. As shown in FIG. 4, the method further includes:
  • the server operating system writes a reset message for the client operating system to the preset shared memory space.
  • the server operating system may write a reset message to one of the shared areas. Specifically, the client operating system is determined according to the message structure. The shared area is written to the shared area.
  • step 104 For the specific method of the notification, refer to step 104, and details are not described herein again.
  • the client operating system acquires the reset message from the preset shared memory space, and re-initializes the preset shared memory space according to the reset message.
  • the client operating system When the preset shared space is divided into multiple shared areas, the client operating system first determines a shared area corresponding to the client operating system according to the message structure, and then reads a reset message from the shared area. .
  • the embodiment of the present application further provides a device for sharing a file system by using multiple operating systems, which can be used in the electronic device 10 of FIG. 1.
  • the device 400 includes:
  • the request data writing module 401 is configured to: the client operating system writes the request data to the preset shared memory space, where the preset shared memory space supports access by at least two operating systems;
  • the first notification module 402 is configured to notify the server operating system of the access request of the client operating system
  • a reply data writing module 403 configured to query the request data in the preset shared memory space by the server operating system, and write reply data to the preset shared memory space according to the request data;
  • a second notification module 404 configured to notify the client operating system of the reply of the server operating system
  • a file mounting module 405, configured to: acquire, by the client operating system, the reply data from the preset shared memory space, and mount the target folder in the server operating system according to the reply data to Under the client operating system.
  • the embodiment of the present application provides a space that can be accessed by multiple operating systems by using a preset shared memory space, and uses the preset shared memory space to store an access request of the client operating system for the server operating system, and a server operating system.
  • the reply data to the client operating system, so that the client operating system can mount the target folder in the server operating system under the client operating system according to the reply data. This enables the sharing of file systems between virtual machines and between virtual machines and hosts.
  • the device 400 further includes:
  • the partitioning module 406 is configured to divide the preset shared memory space into at least two shared areas, and establish an information structure for storing the at least two shared area information.
  • the request data writing module 401 is specifically configured to:
  • the reply data writing module 403 is specifically configured to:
  • the file mount module 405 is specifically configured to:
  • the device 400 further includes:
  • the reset message writing module 407 is configured to write, by the server operating system, a reset message for the client operating system to the preset shared memory space.
  • the initialization module 408 is configured to obtain, by the client operating system, the reset message from the preset shared memory space, and reinitialize the preset shared memory space according to the reset message.
  • the second notification module 404 is further configured to notify the client operating system of a reset message of the server operating system.
  • the first notification module 402 is specifically configured to:
  • the interrupt request is sent from the client operating system to the server operating system;
  • the sink command is sent from the client operating system to the server operating system;
  • the client operating system sends a trap instruction to the host, and then the host sends an interrupt request to the server operating system.
  • the second notification module 404 is specifically configured to:
  • the interrupt request is sent from the server operating system to the client operating system;
  • the server is a virtual machine and the client is a host, the server is sent from the server operating system to the client operating system;
  • the slave operating system sends a trap instruction to the host, and then the host sends an interrupt request to the client operating system.
  • the device 400 further includes:
  • the shared memory space setting module 409 is configured to set the preset shared memory space, so that at least two operating systems can access the preset shared memory space.
  • FIG. 7 is a schematic structural diagram of hardware of an electronic device 10 according to an embodiment of the present disclosure. As shown in FIG. 7, the electronic device 10 includes:
  • processors 11 and a memory 12 are exemplified by a processor 11 in FIG.
  • the processor 11 and the memory 12 can be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the memory 12 is a non-volatile computer readable storage medium, and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the methods in the embodiments of the present application.
  • the processor 11 executes various functional applications of the server and data processing by executing non-volatile software programs, instructions, and modules stored in the memory 12, that is, implementing the methods of the above method embodiments.
  • the memory 12 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store an operation created according to the use of the device sharing the file system by the multiple operating system. Data, etc. Further, the memory 12 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some embodiments, memory 12 can optionally include memory remotely located relative to processor 11 that can be connected to electronic device 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the one or more modules are stored in the memory 12, and when executed by the one or more processors 11, performing a method of sharing a file system by multiple operating systems in any of the above method embodiments, for example, performing the above
  • the method steps 101 to 105 in FIG. 2, the method steps 201 to 208 in FIG. 3, and the method steps 301 to 303 in FIG. 4 implement the modules 401-405 and FIG. 6 in FIG.
  • the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
  • Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
  • Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
  • Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
  • the server consists of a processor, a hard disk, a memory, a system bus, etc.
  • the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
  • the embodiment of the present application provides a non-transitory computer readable storage medium storing computer-executable instructions that are executed by one or more processors, such as in FIG.
  • the processor 11 may be configured to cause the one or more processors to perform the method in any of the foregoing method embodiments, for example, to perform the method steps 101 to 105 in FIG. 2 described above, the method step 201 in FIG. Go to step 208, method steps 301 to 303 in FIG. 4, and implement the functions of modules 401-405 and modules 401-409 in FIG.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the various embodiments can be implemented by means of software plus a general hardware platform, and of course, by hardware.
  • a person skilled in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random storage memory (Random). Access Memory, RAM), etc.

Abstract

The embodiments of the present application relate to a file system sharing method and an apparatus for a multi-operating system, and an electronic device. Said method comprises: a client operating system writing request data to a predetermined shared memory space, the predetermined shared memory space supporting access of at least two operating systems; notifying a server operating system of an access request of the client operating system; the server operating system querying the request data in the predetermined shared memory space, and writing reply data to the predetermined shared memory space according to the request data; notifying the client operating system of a response from the server operating system; the client operating system obtaining the reply data from the predetermined shared memory space, and mounting, according to the reply data, a target folder in the server operating system to the client operating system. The embodiments of the present application can realize file system sharing between virtual machines and between virtual machines and host machines.

Description

一种多操作系统共享文件系统的方法、装置和电子设备Method, device and electronic device for sharing file system by multiple operating systems 技术领域Technical field
本申请实施例涉及虚拟化技术领域,例如涉及一种多操作系统共享文件系统的方法、装置和电子设备。The embodiments of the present application relate to the field of virtualization technologies, for example, to a method, an apparatus, and an electronic device for sharing a file system by multiple operating systems.
背景技术Background technique
虚拟化技术可以使多个操作系统共享机器的硬件资源,各个操作系统相互独立,互不影响。既起到了很好的隔离作用,也大大提高了系统的资源利用率。在一些应用场景下,虚拟机之间或者虚拟机和宿主机之间需要共享文件系统。目前主要通过virtio把宿主机的文件系统共享到虚拟机系统,虚拟机通过内核的9pfs将宿主机的文件系统挂载到虚拟机。Virtualization technology allows multiple operating systems to share the hardware resources of the machine. Each operating system is independent of each other and does not affect each other. It not only plays a good role in isolation, but also greatly improves the resource utilization of the system. In some application scenarios, a file system needs to be shared between virtual machines or between virtual machines and hosts. At present, the file system of the host is shared to the virtual machine system mainly through virtio, and the virtual machine mounts the file system of the host to the virtual machine through the 9pfs of the kernel.
在研究现有技术的过程中,发明人发现相关技术中至少存在如下问题:目前的方案中仅能实现共享宿主机的文件系统到虚拟机,不能共享虚拟机的文件系统到宿主机,也不能在虚拟机之间共享文件系统。In the process of studying the prior art, the inventor found that at least the following problems exist in the related art: in the current solution, only the file system of the shared host can be realized to the virtual machine, and the file system of the virtual machine cannot be shared to the host machine, nor can it Share file systems between virtual machines.
发明内容Summary of the invention
本申请实施例的一个目的是提供一种多操作系统共享文件系统的方法、装置和电子设备,能在虚拟机之间或者虚拟机和宿主机之间实现文件系统的共享。An object of the embodiments of the present application is to provide a method, an apparatus, and an electronic device for sharing a file system by multiple operating systems, which can implement file system sharing between virtual machines or between virtual machines and hosts.
第一方面,本申请实施例提供了一种多操作系统共享文件系统的方法,用于电子设备,所述方法包括:In a first aspect, the embodiment of the present application provides a method for sharing a file system by using multiple operating systems, which is used in an electronic device, and the method includes:
客户端操作系统写入请求数据至预设共享内存空间,所述预设共享内存空间支持至少两个操作系统访问;The client operating system writes the request data to a preset shared memory space, and the preset shared memory space supports access by at least two operating systems;
将所述客户端操作系统的访问请求通知服务端操作系统;Notifying the server operating system of the access request of the client operating system;
所述服务端操作系统在所述预设共享内存空间中查询所述请求数据,并根据所述请求数据向所述预设共享内存空间写入回复数据;The server operating system queries the request data in the preset shared memory space, and writes reply data to the preset shared memory space according to the request data;
将所述服务端操作系统的回复通知所述客户端操作系统;Notifying the client operating system of the reply of the server operating system;
所述客户端操作系统从所述预设共享内存空间中获取所述回复数据,并根据所述回复数据将所述服务端操作系统中的目标文件夹挂载到所述客户端操作系统下。 The client operating system acquires the reply data from the preset shared memory space, and mounts a target folder in the server operating system to the client operating system according to the reply data.
第二方面,本申请实施例还提供了一种多操作系统共享文件系统的装置,用于电子设备,所述装置包括:In a second aspect, the embodiment of the present application further provides a device for sharing a file system by using multiple operating systems, and the device includes:
请求数据写入模块,用于客户端操作系统写入请求数据至预设共享内存空间,所述预设共享内存空间支持至少两个操作系统访问;Requesting a data writing module, configured to: the client operating system writes the request data to the preset shared memory space, where the preset shared memory space supports access by at least two operating systems;
第一通知模块,用于将所述客户端操作系统的访问请求通知服务端操作系统;a first notification module, configured to notify the server operating system of the access request of the client operating system;
回复数据写入模块,用于所述服务端操作系统在所述预设共享内存空间中查询所述请求数据,并根据所述请求数据向所述预设共享内存空间写入回复数据;a reply data writing module, configured to query the request data in the preset shared memory space by the server operating system, and write reply data to the preset shared memory space according to the request data;
第二通知模块,用于将所述服务端操作系统的回复通知所述客户端操作系统;a second notification module, configured to notify the client operating system of the reply of the server operating system;
文件挂载模块,用于所述客户端操作系统从所述预设共享内存空间中获取所述回复数据,并根据所述回复数据将所述服务端操作系统中的目标文件夹挂载到所述客户端操作系统下。 a file mounting module, configured to: obtain, by the client operating system, the reply data from the preset shared memory space, and mount the target folder in the server operating system according to the reply data Said under the client operating system.
第三方面,本申请实施例还提供了一种电子设备,包括:In a third aspect, the embodiment of the present application further provides an electronic device, including:
至少一个处理器;以及,At least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
本申请实施例提供的多操作系统共享文件系统的方法、装置和电子设备,通过预设共享内存空间用于提供多个操作系统均能访问的空间,并利用该预设共享内存空间存储客户端操作系统针对服务端操作系统的访问请求,以及服务端操作系统对客户端操作系统的回复数据,以使客户端操作系统能根据该回复数据将服务端操作系统中的目标文件夹挂载在客户端操作系统下。以此实现在虚拟机之间以及虚拟机和宿主机之间文件系统的共享。The method, device, and electronic device for sharing a file system in a multi-operating system provided by the embodiment of the present application are configured to provide a space that can be accessed by multiple operating systems by using a preset shared memory space, and use the preset shared memory space to store the client. An operating system access request for the server operating system and a reply data of the server operating system to the client operating system, so that the client operating system can mount the target folder in the server operating system to the client according to the reply data. Under the operating system. This enables the sharing of file systems between virtual machines and between virtual machines and hosts.
附图说明DRAWINGS
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1是本申请方法和装置的应用场景示意图;1 is a schematic diagram of an application scenario of the method and apparatus of the present application;
图2是本申请多操作系统共享文件系统的方法的一个实施例的流程图;2 is a flow chart of one embodiment of a method for sharing a file system by multiple operating systems of the present application;
图3是本申请多操作系统共享文件系统的方法的一个实施例的流程图;3 is a flow chart of one embodiment of a method for sharing a file system by multiple operating systems of the present application;
图4是本申请实施例多操作系统共享文件系统的方法中写入重置消息步骤的流程示意图;4 is a schematic flowchart of a step of writing a reset message in a method for sharing a file system by multiple operating systems according to an embodiment of the present application;
图5是本申请多操作系统共享文件系统的装置的一个实施例的结构示意图;5 is a schematic structural diagram of an embodiment of an apparatus for sharing a file system by multiple operating systems according to the present application;
图6是本申请多操作系统共享文件系统的装置的一个实施例的结构示意图;6 is a schematic structural diagram of an embodiment of an apparatus for sharing a file system by multiple operating systems according to the present application;
图7是本申请实施例提供的电子设备的硬件结构示意图。FIG. 7 is a schematic structural diagram of hardware of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
本申请提供的多操作系统共享文件系统的方法和装置可以用于图1所示的应用场景,所述应用场景包括电子设备10,电子设备10上安装有多个虚拟机(图1示出了一个电子设备10上安装有三个虚拟机的情形)。如图1所示,电子设备10本身作为宿主机安装有操作系统OS,虚拟机1上安装有操作系统OS1,虚拟机2上安装有操作系统OS2,虚拟机3上安装有操作系统OS3,所述操作系统例如是Linux操作系统。其中,上述宿主机和多个虚拟机之中可以选择一个作为服务端,其他虚拟机或者宿主机作为客户端,服务端用于响应客户端的数据访问请求。可以在电子设备10上开辟一块内存空间作为共享内存空间,通过共享内存技术使上述多个操作系统中的部分或者全部可以访问该共享内存空间。利用该共享内存空间存储客户端操作系统针对服务端操作系统的访问请求,以及服务端操作系统对客户端操作系统的回复数据,以使客户端操作系统能根据该回复数据将服务端操作系统中的目标文件夹挂载在客户端操作系统下。以此实现在虚拟机之间以及虚拟机和宿主机之间文件系统的共享。The method and apparatus for the multi-operating system shared file system provided by the present application can be used in the application scenario shown in FIG. 1 , where the application scenario includes an electronic device 10 , and multiple virtual machines are installed on the electronic device 10 ( FIG. 1 shows A case where three virtual machines are installed on one electronic device 10. As shown in FIG. 1 , the electronic device 10 itself is installed with an operating system OS as a host, an operating system OS1 is installed on the virtual machine 1 , an operating system OS 2 is installed on the virtual machine 2 , and an operating system OS 3 is installed on the virtual machine 3 . The operating system is, for example, a Linux operating system. Among them, one of the above host machines and a plurality of virtual machines may be selected as a server, and other virtual machines or hosts are used as clients, and the server is used to respond to data access requests of the client. A memory space may be opened on the electronic device 10 as a shared memory space, and part or all of the plurality of operating systems may be accessed by the shared memory technology. The shared memory space is used to store an access request of the client operating system for the server operating system, and a reply data of the server operating system to the client operating system, so that the client operating system can be used in the server operating system according to the reply data. The target folder is mounted under the client operating system. This enables the sharing of file systems between virtual machines and between virtual machines and hosts.
本申请实施例提供的多操作系统共享文件系统的方法,可由图1中所示的电子设备10执行,如图2所示,所述方法包括:The method for sharing a file system by multiple operating systems provided by the embodiments of the present application may be performed by the electronic device 10 shown in FIG. 1, as shown in FIG. 2, the method includes:
101:客户端操作系统写入请求数据至预设共享内存空间,所述预设共享内存空间支持至少两个操作系统访问。101: The client operating system writes the request data to a preset shared memory space, where the preset shared memory space supports access by at least two operating systems.
可选的,所述方法在步骤101之前还包括:设置所述预设共享内存空间,以使至少两个操作系统能访问该内存空间。在实际应用中,可以通过共享内存技术在宿主机的内存中开辟一块内存空间作为预设共享内存空间,并使需要共享文件系统的虚拟机或者宿主机可以访问该预设共享内存空间。Optionally, before the step 101, the method further includes: setting the preset shared memory space, so that at least two operating systems can access the memory space. In practical applications, a memory space can be opened in the memory of the host machine by using the shared memory technology as a preset shared memory space, and the virtual machine or the host that needs to share the file system can access the preset shared memory space.
102:将所述客户端操作系统的访问请求通知服务端操作系统。102: Notify the server operating system of the access request of the client operating system.
具体的,如果客户端为宿主机,服务端为虚拟机,则该通知可以通过自客户端操作系统发送中断请求至服务端操作系统来实现。如果客户端为虚拟机,服务端为宿主机,则该通知可以通过自客户端操作系统发送陷入指令至服务端操作系统来实现,例如在Linux操作系统中,可以通过VMM(Virtual Machine Monitor,虚拟机监控器)陷入指令来通知。如果客户端和服务端均为虚拟机,则需要客户端操作系统先发送陷入指令给宿主机,再由宿主机发送中断请求至服务端操作系统。即宿主机到虚拟机可以通过中断请求,虚拟机到宿主机可以通过陷入指令,虚拟机之间需要虚拟机先发陷入指令给宿主机,再由宿主机发送中断请求给虚拟机。Specifically, if the client is a host and the server is a virtual machine, the notification can be implemented by sending an interrupt request from the client operating system to the server operating system. If the client is a virtual machine and the server is the host, the notification can be implemented by sending a trap instruction to the server operating system from the client operating system. For example, in the Linux operating system, VMM can be used. Machine Monitor, virtual machine monitor) caught up with instructions to notify. If both the client and the server are virtual machines, the client operating system is required to send a trap instruction to the host, and then the host sends an interrupt request to the server operating system. That is, the host to the virtual machine can pass the interrupt request, and the virtual machine to the host machine can be trapped by the instruction, and the virtual machine needs to first insert the instruction into the host machine, and then the host sends an interrupt request to the virtual machine.
103:所述服务端操作系统在所述预设共享内存空间中查询所述请求数据,并根据所述请求数据向所述预设共享内存空间写入回复数据。103: The server operating system queries the request data in the preset shared memory space, and writes reply data to the preset shared memory space according to the request data.
服务端操作系统查询预设共享内存空间中的请求数据,并响应该请求,将回复数据写入预设共享内存空间中。其中,服务端操作系统还可以进一步清除所述预设共享内存空间中的请求数据,以减小内存空间的占用。The server operating system queries the request data in the preset shared memory space, and responds to the request, and writes the reply data into the preset shared memory space. The server operating system may further clear the request data in the preset shared memory space to reduce the occupation of the memory space.
104:将所述服务端操作系统的回复通知所述客户端操作系统。104: Notify the client operating system of the reply of the server operating system.
具体的,如果服务端为宿主机,客户端为虚拟机,则该通知可以通过自服务端操作系统发送中断请求至客户端操作系统来实现。如果服务端为虚拟机,客户端为宿主机,则该通知可以通过自服务端操作系统发送陷入指令至客户端操作系统来实现,例如在Linux操作系统中,可以通过VMM(Virtual Machine Monitor,虚拟机监控器)陷入指令来通知。如果客户端和服务端均为虚拟机,则需要服务端操作系统先发送陷入指令给宿主机,再由宿主机发送中断请求至客户端操作系统。Specifically, if the server is a host and the client is a virtual machine, the notification can be implemented by sending an interrupt request from the server operating system to the client operating system. If the server is a virtual machine and the client is a host, the notification can be implemented by sending a trapped instruction to the client operating system from the server operating system. For example, in the Linux operating system, the VMM can be used. Machine Monitor, virtual machine monitor) caught up with instructions to notify. If both the client and the server are virtual machines, the server operating system first needs to send a trap instruction to the host, and then the host sends an interrupt request to the client operating system.
105:所述客户端操作系统从所述预设共享内存空间中获取所述回复数据,并根据所述回复数据将所述服务端操作系统中的目标文件夹挂载到所述客户端操作系统下。Step 105: The client operating system acquires the reply data from the preset shared memory space, and mounts a target folder in the server operating system to the client operating system according to the reply data. under.
其中,所述回复数据可以是客户端操作系统请求访问的目标文件夹内容本身,也可以是该目标文件夹的属性,通过该属性,客户端操作系统可以获得该目标文件夹的内容,并将该目标文件夹挂载到客户端操作系统。以Linux操作系统为例,可以通过Linux内核中9P模块的挂载(Mount)命令将目标文件夹挂载到当前操作系统下。The reply data may be the content of the target folder requested by the client operating system, or may be an attribute of the target folder, by which the client operating system can obtain the content of the target folder, and The target folder is mounted to the client operating system. Take the Linux operating system as an example. You can mount the target folder to the current operating system through the mount command of the 9P module in the Linux kernel.
本申请实施例通过预设共享内存空间用于提供多个操作系统均能访问的空间,并利用该预设共享内存空间存储客户端操作系统针对服务端操作系统的访问请求,以及服务端操作系统对客户端操作系统的回复数据,以使客户端操作系统能根据该回复数据将服务端操作系统中的目标文件夹挂载在客户端操作系统下。以此实现在虚拟机之间以及虚拟机和宿主机之间文件系统的共享。本申请实施例不需要各虚拟机或宿主机之间的网络联通,能方便的实现文件系统的共享。The embodiment of the present application provides a space that can be accessed by multiple operating systems by using a preset shared memory space, and uses the preset shared memory space to store an access request of the client operating system for the server operating system, and a server operating system. The reply data to the client operating system, so that the client operating system can mount the target folder in the server operating system under the client operating system according to the reply data. This enables the sharing of file systems between virtual machines and between virtual machines and hosts. The embodiment of the present application does not require network communication between virtual machines or hosts, and the file system can be conveniently shared.
可选的,为了使多个客户端操作系统能同时访问服务端操作系统,可以将预设共享内存空间分成多个共享区域,例如分成多个缓冲区,每个共享区域用于存储对应的客户端请求数据,和服务端对对应的客户端的回复数据。其中,预设共享内存空间分成的共享区域的个数和大小可以根据实际情况进行分配。以图1所示的四个操作系统为例,假如以OS作为服务端操作系统,以OS1、OS2 和OS3作为客户端操作系统。可以将预设共享内存空间分为三个共享区域,即第一共享区域、第二共享区域和第三共享区域。第一共享区域可以用于存储OS1对OS的请求数据,以及OS对OS1的回复数据。第二共享区域可以用于存储OS2对OS的请求数据,以及OS对OS2的回复数据。第三共享区域可以用于存储OS3对OS的请求数据,以及OS对OS3的回复数据。服务端操作系统在共享区域中写入回复数据前,可以清除该共享区域中的请求数据。Optionally, in order to enable multiple client operating systems to access the server operating system at the same time, the preset shared memory space may be divided into multiple shared areas, for example, divided into multiple buffers, and each shared area is used to store corresponding clients. The end request data, and the server's reply data to the corresponding client. The number and size of the shared area in which the shared memory space is divided may be allocated according to actual conditions. Take the four operating systems shown in Figure 1 as an example. If the OS is used as the server operating system, OS1, OS2, and OS3 are used as the client operating system. The preset shared memory space can be divided into three shared areas, that is, a first shared area, a second shared area, and a third shared area. The first shared area may be used to store OS1's request data for the OS and the OS's reply data to OS1. The second shared area may be used to store OS2's request data for the OS and the OS's reply data to OS2. The third shared area may be used to store OS3's request data for the OS and the OS's reply data to the OS3. The server operating system can clear the request data in the shared area before writing the reply data in the shared area.
在其他实施例中,也可以将预设共享内存空间分为六个共享区域,即第一共享区域、第二共享区域、第三共享区域、第四共享区域、第五共享区域和第六共享区域。第一共享区域可以用于存储OS1对OS的请求数据,第二共享区域可以用于存储OS2对OS的请求数据,第三共享区域可以用于存储OS3对OS的请求数据。第四共享区域用于存储OS对OS1的回复数据,第五共享区域用于存储OS对OS2的回复数据,第六共享区域用于存储OS对OS3的回复数据。各客户端操作系统的请求数据与共享区域的对应关系以及服务端操作系统对各客户端操作系统的回复数据与共享区域的对应关系可以记载在一个用于存储共享区域信息的消息结构(例如链表数据结构)中。In other embodiments, the preset shared memory space may also be divided into six shared areas, that is, a first shared area, a second shared area, a third shared area, a fourth shared area, a fifth shared area, and a sixth share. region. The first shared area may be used to store the request data of the OS1 to the OS, the second shared area may be used to store the request data of the OS2 to the OS, and the third shared area may be used to store the request data of the OS3 to the OS. The fourth shared area is used to store the reply data of the OS to the OS1, the fifth shared area is used to store the reply data of the OS to the OS2, and the sixth shared area is used to store the reply data of the OS to the OS3. The correspondence between the request data of the client operating system and the shared area and the correspondence between the reply data of the server operating system and the shared operating system of the client operating system may be recorded in a message structure for storing the shared area information (for example, a linked list) In the data structure).
通过该消息结构,各客户端操作系统可以知晓其对服务端操作系统的请求数据应该写入哪个共享区域,服务端操作系统回复各个客户端操作系统时,也可以通过该消息结构知道应该把回复数据写入哪个共享区域。图3为所述方法的另一实施例的流程示意图,如图3所示,所述方法包括:Through the message structure, each client operating system can know which shared area its request data to the server operating system should be written to. When the server operating system replies to each client operating system, the message structure can also know that the reply should be replied. Which shared area the data is written to. 3 is a schematic flow chart of another embodiment of the method. As shown in FIG. 3, the method includes:
201:设置预设共享内存空间,以使至少两个操作系统能访问所述预设共享内存空间。201: Set a preset shared memory space, so that at least two operating systems can access the preset shared memory space.
202:将所述预设共享内存空间分成至少两个共享区域,并建立用于存储所述至少两个共享区域信息的信息结构。202: Divide the preset shared memory space into at least two shared areas, and establish an information structure for storing the at least two shared area information.
203:根据所述信息结构确定所述客户端在所述预设共享内存空间中的可用共享区域,并写入所述请求数据至所述可用共享区域。203: Determine, according to the information structure, an available sharing area of the client in the preset shared memory space, and write the request data to the available shared area.
204:将所述客户端操作系统的访问请求通知服务端操作系统。204: Notify the server operating system of the access request of the client operating system.
205:根据所述信息结构确定所述预设共享内存空间中存储所述请求数据的共享区域,并在该共享区域中查询所述请求数据。205. Determine, according to the information structure, a shared area in which the request data is stored in the preset shared memory space, and query the request data in the shared area.
206:根据所述信息结构确定所述回复数据的可用共享区域,并根据所述请求数据向该共享区域内写入所述回复数据。206: Determine an available sharing area of the reply data according to the information structure, and write the reply data into the shared area according to the request data.
207:将所述服务端操作系统的回复通知所述客户端操作系统。207: Notify the client operating system of the reply of the server operating system.
208:根据所述信息结构确定所述预设共享内存空间中存储所述回复数据的共享区域,并在该共享区域中获取所述回复数据。根据所述回复数据将所述服务端操作系统中的目标文件夹挂载到所述客户端操作系统下。208. Determine, according to the information structure, a shared area in which the reply data is stored in the preset shared memory space, and obtain the reply data in the shared area. And mounting a target folder in the server operating system to the client operating system according to the reply data.
本发明实施例通过将预设共享内存空间分成多个共享区域,多个客户端操作系统可以在同一时段内在预设共享内存空间内写入请求数据从而发起对服务端操作系统的访问请求,服务端操作系统可以根据自身的运行情况分别响应客户端操作系统的请求。相对于一次只能处理一个客户端操作系统数据请求的方案,其效率更高。In the embodiment of the present invention, by dividing the preset shared memory space into multiple shared areas, multiple client operating systems can write request data in a preset shared memory space in the same time period to initiate an access request to the server operating system. The operating system can respond to requests from the client operating system according to its own operating conditions. It is more efficient than a solution that can only process one client operating system data request at a time.
在实际应用中,当服务端操作系统运行繁忙,无法响应客户端操作系统写入的请求消息时,该请求消息可以处于阻塞状态,至到服务端操作系统开始处理该请求消息。如果服务端操作系统系统崩溃导致服务异常时,服务端操作系统重启后,可以发送重置消息给对应的客户端操作系统,以使该客户端操作系统能初始化其对应的共享区域,重新写入请求数据与服务端操作系统建立连接。当客户端操作系统发送非法请求给服务端操作系统时,服务端操作系统也可以发送重置消息给对应的客户端操作系统以中断该处理请求。服务端操作系统发送重置消息的方法与写入回复数据类似,如图4所示,所述方法还包括:In an actual application, when the server operating system runs busy and cannot respond to the request message written by the client operating system, the request message may be in a blocked state until the server operating system starts processing the request message. If the server operating system crashes and the service is abnormal, after the server operating system restarts, a reset message may be sent to the corresponding client operating system, so that the client operating system can initialize its corresponding shared area and rewrite. Request data to establish a connection with the server operating system. When the client operating system sends an illegal request to the server operating system, the server operating system may also send a reset message to the corresponding client operating system to interrupt the processing request. The server operating system sends a reset message in a similar manner to the write reply data. As shown in FIG. 4, the method further includes:
301:所述服务端操作系统写入针对客户端操作系统的重置消息至所述预设共享内存空间。301: The server operating system writes a reset message for the client operating system to the preset shared memory space.
在所述预设共享空间分成多个共享区域的场合,所述服务端操作系统可以将重置消息写入其中一个共享区域,具体的,先根据所述消息结构确定所述客户端操作系统对应的共享区域,再将该重置消息写入该共享区域内。When the preset shared space is divided into multiple shared areas, the server operating system may write a reset message to one of the shared areas. Specifically, the client operating system is determined according to the message structure. The shared area is written to the shared area.
302:将服务端操作系统的重置消息通知所述客户端操作系统。302: Notify the client operating system of a reset message of the server operating system.
其中,该通知的具体方法请参照步骤104,在此不再赘述。For the specific method of the notification, refer to step 104, and details are not described herein again.
303:所述客户端操作系统从所述预设共享内存空间中获取所述重置消息,并根据所述重置消息重新初始化所述预设共享内存空间。 303: The client operating system acquires the reset message from the preset shared memory space, and re-initializes the preset shared memory space according to the reset message.
在所述预设共享空间分成多个共享区域的场合,所述客户端操作系统先根据所述消息结构确定所述客户端操作系统对应的共享区域,再从该共享区域内读出重置消息。When the preset shared space is divided into multiple shared areas, the client operating system first determines a shared area corresponding to the client operating system according to the message structure, and then reads a reset message from the shared area. .
需要说明的是,本申请实施例中的序号只是为了便于理解,并不限定各步骤的先后顺序。It should be noted that the serial numbers in the embodiments of the present application are only for ease of understanding, and do not limit the order of the steps.
相应的,本申请实施例还提供了一种多操作系统共享文件系统的装置,可以用于图1中的电子设备10,如图5所示,所述装置400包括:Correspondingly, the embodiment of the present application further provides a device for sharing a file system by using multiple operating systems, which can be used in the electronic device 10 of FIG. 1. As shown in FIG. 5, the device 400 includes:
请求数据写入模块401,用于客户端操作系统写入请求数据至预设共享内存空间,所述预设共享内存空间支持至少两个操作系统访问;The request data writing module 401 is configured to: the client operating system writes the request data to the preset shared memory space, where the preset shared memory space supports access by at least two operating systems;
第一通知模块402,用于将所述客户端操作系统的访问请求通知服务端操作系统;The first notification module 402 is configured to notify the server operating system of the access request of the client operating system;
回复数据写入模块403,用于所述服务端操作系统在所述预设共享内存空间中查询所述请求数据,并根据所述请求数据向所述预设共享内存空间写入回复数据;a reply data writing module 403, configured to query the request data in the preset shared memory space by the server operating system, and write reply data to the preset shared memory space according to the request data;
第二通知模块404,用于将所述服务端操作系统的回复通知所述客户端操作系统;a second notification module 404, configured to notify the client operating system of the reply of the server operating system;
文件挂载模块405,用于所述客户端操作系统从所述预设共享内存空间中获取所述回复数据,并根据所述回复数据将所述服务端操作系统中的目标文件夹挂载到所述客户端操作系统下。 a file mounting module 405, configured to: acquire, by the client operating system, the reply data from the preset shared memory space, and mount the target folder in the server operating system according to the reply data to Under the client operating system.
本申请实施例通过预设共享内存空间用于提供多个操作系统均能访问的空间,并利用该预设共享内存空间存储客户端操作系统针对服务端操作系统的访问请求,以及服务端操作系统对客户端操作系统的回复数据,以使客户端操作系统能根据该回复数据将服务端操作系统中的目标文件夹挂载在客户端操作系统下。以此实现在虚拟机之间以及虚拟机和宿主机之间文件系统的共享。The embodiment of the present application provides a space that can be accessed by multiple operating systems by using a preset shared memory space, and uses the preset shared memory space to store an access request of the client operating system for the server operating system, and a server operating system. The reply data to the client operating system, so that the client operating system can mount the target folder in the server operating system under the client operating system according to the reply data. This enables the sharing of file systems between virtual machines and between virtual machines and hosts.
可选的,在所述装置的其他实施例中,请参照图6,装置400还包括:Optionally, in other embodiments of the device, referring to FIG. 6, the device 400 further includes:
分区模块406,用于将所述预设共享内存空间分成至少两个共享区域,并建立用于存储所述至少两个共享区域信息的信息结构。The partitioning module 406 is configured to divide the preset shared memory space into at least two shared areas, and establish an information structure for storing the at least two shared area information.
请求数据写入模块401具体用于:The request data writing module 401 is specifically configured to:
根据所述信息结构确定所述客户端在所述预设共享内存空间中的可用共享区域,并写入所述请求数据至所述可用共享区域。Determining, according to the information structure, an available sharing area of the client in the preset shared memory space, and writing the request data to the available shared area.
回复数据写入模块403具体用于:The reply data writing module 403 is specifically configured to:
根据所述信息结构确定所述预设共享内存空间中存储所述请求数据的共享区域,并在该共享区域中查询所述请求数据。Determining, according to the information structure, a shared area in the preset shared memory space that stores the request data, and querying the request data in the shared area.
根据所述信息结构确定所述回复数据的可用共享区域,并根据所述请求数据向该共享区域内写入所述回复数据。Determining an available sharing area of the reply data according to the information structure, and writing the reply data into the shared area according to the request data.
文件挂载模块405具体用于:The file mount module 405 is specifically configured to:
根据所述信息结构确定所述预设共享内存空间中存储所述回复数据的共享区域,并在该共享区域中获取所述回复数据。Determining, according to the information structure, a shared area in the preset shared memory space that stores the reply data, and acquiring the reply data in the shared area.
可选的,在装置400的其他实施例中,请参照图6,装置400还包括:Optionally, in other embodiments of the device 400, referring to FIG. 6, the device 400 further includes:
重置消息写入模块407,用于所述服务端操作系统写入针对客户端操作系统的重置消息至所述预设共享内存空间。The reset message writing module 407 is configured to write, by the server operating system, a reset message for the client operating system to the preset shared memory space.
初始化模块408,用于所述客户端操作系统从所述预设共享内存空间中获取所述重置消息,并根据所述重置消息重新初始化所述预设共享内存空间。The initialization module 408 is configured to obtain, by the client operating system, the reset message from the preset shared memory space, and reinitialize the preset shared memory space according to the reset message.
第二通知模块404还用于将服务端操作系统的重置消息通知所述客户端操作系统。The second notification module 404 is further configured to notify the client operating system of a reset message of the server operating system.
可选的,在装置400的某些实施例中,第一通知模块402具体用于:Optionally, in some embodiments of the device 400, the first notification module 402 is specifically configured to:
如果客户端为宿主机,服务端为虚拟机,则自客户端操作系统发送中断请求至服务端操作系统;If the client is the host and the server is a virtual machine, the interrupt request is sent from the client operating system to the server operating system;
如果客户端为虚拟机,服务端为宿主机,则自客户端操作系统发送陷入指令至服务端操作系统;If the client is a virtual machine and the server is the host, the sink command is sent from the client operating system to the server operating system;
如果客户端和服务端均为虚拟机,则自客户端操作系统发送陷入指令至宿主机,再由宿主机发送中断请求至服务端操作系统。If both the client and the server are virtual machines, the client operating system sends a trap instruction to the host, and then the host sends an interrupt request to the server operating system.
第二通知模块404具体用于:The second notification module 404 is specifically configured to:
如果服务端为宿主机,客户端为虚拟机,则自服务端操作系统发送中断请求至客户端操作系统;If the server is the host and the client is a virtual machine, the interrupt request is sent from the server operating system to the client operating system;
如果服务端为虚拟机,客户端为宿主机,则自服务端操作系统发送陷入指令至客户端操作系统;If the server is a virtual machine and the client is a host, the server is sent from the server operating system to the client operating system;
如果客户端和服务端均为虚拟机,则自服务端操作系统发送陷入指令至宿主机,再由宿主机发送中断请求至客户端操作系统。If both the client and the server are virtual machines, the slave operating system sends a trap instruction to the host, and then the host sends an interrupt request to the client operating system.
可选的,在装置400的其他实施例中,请参照图6,装置400还包括:Optionally, in other embodiments of the device 400, referring to FIG. 6, the device 400 further includes:
共享内存空间设置模块409,用于设置所述预设共享内存空间,以使至少两个操作系统能访问所述预设共享内存空间。The shared memory space setting module 409 is configured to set the preset shared memory space, so that at least two operating systems can access the preset shared memory space.
需要说明的是,上述装置可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在装置实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。It should be noted that the foregoing apparatus can perform the method provided by the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the device embodiments, reference may be made to the methods provided in the embodiments of the present application.
图7是本申请实施例提供的电子设备10的硬件结构示意图,如图7所示,该电子设备10包括:FIG. 7 is a schematic structural diagram of hardware of an electronic device 10 according to an embodiment of the present disclosure. As shown in FIG. 7, the electronic device 10 includes:
一个或多个处理器11以及存储器12,图7中以一个处理器11为例。One or more processors 11 and a memory 12 are exemplified by a processor 11 in FIG.
处理器11和存储器12可以通过总线或者其他方式连接,图7中以通过总线连接为例。The processor 11 and the memory 12 can be connected by a bus or other means, as exemplified by a bus connection in FIG.
存储器12作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的方法对应的程序指令/模块(例如,附图5所示的请求数据写入模块401、第一通知模块402、回复数据写入模块403、第二通知模块404和文件挂载模块405)。处理器11通过运行存储在存储器12中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的方法。The memory 12 is a non-volatile computer readable storage medium, and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the methods in the embodiments of the present application. (For example, the request data writing module 401, the first notification module 402, the reply data writing module 403, the second notification module 404, and the file mounting module 405 shown in FIG. 5). The processor 11 executes various functional applications of the server and data processing by executing non-volatile software programs, instructions, and modules stored in the memory 12, that is, implementing the methods of the above method embodiments.
存储器12可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据多操作系统共享文件系统的装置的使用所创建的数据等。此外,存储器12可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器12可选包括相对于处理器11远程设置的存储器,这些远程存储器可以通过网络连接至电子设备10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 12 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store an operation created according to the use of the device sharing the file system by the multiple operating system. Data, etc. Further, the memory 12 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some embodiments, memory 12 can optionally include memory remotely located relative to processor 11 that can be connected to electronic device 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
所述一个或者多个模块存储在所述存储器12中,当被所述一个或者多个处理器11执行时,执行上述任意方法实施例中的多操作系统共享文件系统的方法,例如,执行以上描述的图2中的方法步骤101至步骤105,图3中的方法步骤201至步骤208,图4中的方法步骤301至步骤303,实现图5中的模块401-405、图6中的模块401-409的功能。The one or more modules are stored in the memory 12, and when executed by the one or more processors 11, performing a method of sharing a file system by multiple operating systems in any of the above method embodiments, for example, performing the above The method steps 101 to 105 in FIG. 2, the method steps 201 to 208 in FIG. 3, and the method steps 301 to 303 in FIG. 4 implement the modules 401-405 and FIG. 6 in FIG. The function of 401-409.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。The above products can perform the methods provided by the embodiments of the present application, and have the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiments of the present application.
本申请实施例的电子设备以多种形式存在,包括但不限于:The electronic device of the embodiment of the present application exists in various forms, including but not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication devices: These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication. Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。(3) Portable entertainment devices: These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。(4) Server: A device that provides computing services. The server consists of a processor, a hard disk, a memory, a system bus, etc. The server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
(5)智能机器人。(5) Intelligent robots.
(6)其他具有数据交互功能的电子装置。(6) Other electronic devices with data interaction functions.
本申请实施例提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如图7中的一个处理器11,可使得上述一个或多个处理器可执行上述任意方法实施例中的方法,例如,执行以上描述的图2中的方法步骤101至步骤105,图3中的方法步骤201至步骤208,图4中的方法步骤301至步骤303,实现图5中的模块401-405、图6中的模块401-409的功能。The embodiment of the present application provides a non-transitory computer readable storage medium storing computer-executable instructions that are executed by one or more processors, such as in FIG. The processor 11 may be configured to cause the one or more processors to perform the method in any of the foregoing method embodiments, for example, to perform the method steps 101 to 105 in FIG. 2 described above, the method step 201 in FIG. Go to step 208, method steps 301 to 303 in FIG. 4, and implement the functions of modules 401-405 and modules 401-409 in FIG.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
通过以上的实施方式的描述,本领域普通技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM)或随机存储记忆体(Random Access Memory, RAM)等。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a general hardware platform, and of course, by hardware. A person skilled in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random storage memory (Random). Access Memory, RAM), etc.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本申请的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not limited thereto; in the idea of the present application, the technical features in the above embodiments or different embodiments may also be combined. The steps may be carried out in any order, and there are many other variations of the various aspects of the present application as described above, which are not provided in the details for the sake of brevity; although the present application has been described in detail with reference to the foregoing embodiments, The skilled person should understand that the technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the embodiments of the present application. The scope of the technical solution.

Claims (12)

  1. 一种多操作系统共享文件系统的方法,用于电子设备,其特征在于,所述方法包括:A method for sharing a file system by a plurality of operating systems for an electronic device, the method comprising:
    客户端操作系统写入请求数据至预设共享内存空间,所述预设共享内存空间支持至少两个操作系统访问;The client operating system writes the request data to a preset shared memory space, and the preset shared memory space supports access by at least two operating systems;
    将所述客户端操作系统的访问请求通知服务端操作系统;Notifying the server operating system of the access request of the client operating system;
    所述服务端操作系统在所述预设共享内存空间中查询所述请求数据,并根据所述请求数据向所述预设共享内存空间写入回复数据;The server operating system queries the request data in the preset shared memory space, and writes reply data to the preset shared memory space according to the request data;
    将所述服务端操作系统的回复通知所述客户端操作系统;Notifying the client operating system of the reply of the server operating system;
    所述客户端操作系统从所述预设共享内存空间中获取所述回复数据,并根据所述回复数据将所述服务端操作系统中的目标文件夹挂载到所述客户端操作系统下。 The client operating system acquires the reply data from the preset shared memory space, and mounts a target folder in the server operating system to the client operating system according to the reply data.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    将所述预设共享内存空间分成至少两个共享区域,并建立用于存储所述至少两个共享区域信息的信息结构;Dividing the preset shared memory space into at least two shared areas, and establishing an information structure for storing the at least two shared area information;
    所述客户端操作系统写入请求数据至预设共享内存空间,包括:The client operating system writes the request data to the preset shared memory space, including:
    根据所述信息结构确定所述客户端在所述预设共享内存空间中的可用共享区域,并写入所述请求数据至所述可用共享区域;Determining, according to the information structure, an available sharing area of the client in the preset shared memory space, and writing the request data to the available shared area;
    所述服务端操作系统在所述预设共享内存空间中查询所述请求数据,并根据所述请求数据向所述预设共享内存空间写入回复数据,包括:The server operating system queries the request data in the preset shared memory space, and writes reply data to the preset shared memory space according to the request data, including:
    根据所述信息结构确定所述预设共享内存空间中存储所述请求数据的共享区域,并在该共享区域中查询所述请求数据;Determining, according to the information structure, a shared area in the preset shared memory space that stores the request data, and querying the request data in the shared area;
    根据所述信息结构确定所述回复数据的可用共享区域,并根据所述请求数据向该共享区域内写入所述回复数据;Determining an available sharing area of the reply data according to the information structure, and writing the reply data to the shared area according to the request data;
    所述客户端操作系统从所述预设共享内存空间中获取所述回复数据,包括:The client operating system acquires the reply data from the preset shared memory space, including:
    根据所述信息结构确定所述预设共享内存空间中存储所述回复数据的共享区域,并在该共享区域中获取所述回复数据。Determining, according to the information structure, a shared area in the preset shared memory space that stores the reply data, and acquiring the reply data in the shared area.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    所述服务端操作系统写入针对客户端操作系统的重置消息至所述预设共享内存空间;The server operating system writes a reset message for the client operating system to the preset shared memory space;
    将服务端操作系统的重置消息通知所述客户端操作系统;Notifying the client operating system of a reset message of the server operating system;
    所述客户端操作系统从所述预设共享内存空间中获取所述重置消息,并根据所述重置消息重新初始化所述预设共享内存空间。 The client operating system acquires the reset message from the preset shared memory space, and re-initializes the preset shared memory space according to the reset message.
  4. 根据权利要求1-3任意一项所述的方法,其特征在于,客户端操作系统通知服务端操作系统,包括:The method according to any one of claims 1-3, wherein the client operating system notifies the server operating system, including:
    如果客户端为宿主机,服务端为虚拟机,则自客户端操作系统发送中断请求至服务端操作系统;If the client is the host and the server is a virtual machine, the interrupt request is sent from the client operating system to the server operating system;
    如果客户端为虚拟机,服务端为宿主机,则自客户端操作系统发送陷入指令至服务端操作系统;If the client is a virtual machine and the server is the host, the sink command is sent from the client operating system to the server operating system;
    如果客户端和服务端均为虚拟机,则自客户端操作系统发送陷入指令至宿主机,再由宿主机发送中断请求至服务端操作系统;If both the client and the server are virtual machines, the client operating system sends a trap instruction to the host, and then the host sends an interrupt request to the server operating system;
    服务端操作系统通知客户端操作系统,包括:The server operating system notifies the client operating system, including:
    如果服务端为宿主机,客户端为虚拟机,则自服务端操作系统发送中断请求至客户端操作系统;If the server is the host and the client is a virtual machine, the interrupt request is sent from the server operating system to the client operating system;
    如果服务端为虚拟机,客户端为宿主机,则自服务端操作系统发送陷入指令至客户端操作系统;If the server is a virtual machine and the client is a host, the server is sent from the server operating system to the client operating system;
    如果客户端和服务端均为虚拟机,则自服务端操作系统发送陷入指令至宿主机,再由宿主机发送中断请求至客户端操作系统。If both the client and the server are virtual machines, the slave operating system sends a trap instruction to the host, and then the host sends an interrupt request to the client operating system.
  5. 根据权利要求1所述的方法,其特征在于, 所述方法还包括:设置所述预设共享内存空间,以使至少两个操作系统能访问所述预设共享内存空间。The method according to claim 1, wherein the method further comprises: setting the preset shared memory space so that at least two operating systems can access the preset shared memory space.
  6. 一种多操作系统共享文件系统的装置,用于电子设备,其特征在于,所述装置包括:An apparatus for sharing a file system by a plurality of operating systems, for an electronic device, wherein the device comprises:
    请求数据写入模块,用于客户端操作系统写入请求数据至预设共享内存空间,所述预设共享内存空间支持至少两个操作系统访问;Requesting a data writing module, configured to: the client operating system writes the request data to the preset shared memory space, where the preset shared memory space supports access by at least two operating systems;
    第一通知模块,用于将所述客户端操作系统的访问请求通知服务端操作系统;a first notification module, configured to notify the server operating system of the access request of the client operating system;
    回复数据写入模块,用于所述服务端操作系统在所述预设共享内存空间中查询所述请求数据,并根据所述请求数据向所述预设共享内存空间写入回复数据;a reply data writing module, configured to query the request data in the preset shared memory space by the server operating system, and write reply data to the preset shared memory space according to the request data;
    第二通知模块,用于将所述服务端操作系统的回复通知所述客户端操作系统;a second notification module, configured to notify the client operating system of the reply of the server operating system;
    文件挂载模块,用于所述客户端操作系统从所述预设共享内存空间中获取所述回复数据,并根据所述回复数据将所述服务端操作系统中的目标文件夹挂载到所述客户端操作系统下。 a file mounting module, configured to: obtain, by the client operating system, the reply data from the preset shared memory space, and mount the target folder in the server operating system according to the reply data Said under the client operating system.
  7. 根据权利要求6所述的装置,其特征在于,所述装置还包括:The device according to claim 6, wherein the device further comprises:
    分区模块,用于将所述预设共享内存空间分成至少两个共享区域,并建立用于存储所述至少两个共享区域信息的信息结构;a partitioning module, configured to divide the preset shared memory space into at least two shared areas, and establish an information structure for storing the at least two shared area information;
    所述请求数据写入模块具体用于:The request data writing module is specifically configured to:
    根据所述信息结构确定所述客户端在所述预设共享内存空间中的可用共享区域,并写入所述请求数据至所述可用共享区域;Determining, according to the information structure, an available sharing area of the client in the preset shared memory space, and writing the request data to the available shared area;
    所述回复数据写入模块具体用于:The reply data writing module is specifically configured to:
    根据所述信息结构确定所述预设共享内存空间中存储所述请求数据的共享区域,并在该共享区域中查询所述请求数据;Determining, according to the information structure, a shared area in the preset shared memory space that stores the request data, and querying the request data in the shared area;
    根据所述信息结构确定所述回复数据的可用共享区域,并根据所述请求数据向该共享区域内写入所述回复数据;Determining an available sharing area of the reply data according to the information structure, and writing the reply data to the shared area according to the request data;
    所述文件挂载模块具体用于:The file mounting module is specifically configured to:
    根据所述信息结构确定所述预设共享内存空间中存储所述回复数据的共享区域,并在该共享区域中获取所述回复数据。Determining, according to the information structure, a shared area in the preset shared memory space that stores the reply data, and acquiring the reply data in the shared area.
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:The device according to claim 6, wherein the device further comprises:
    重置消息写入模块,用于所述服务端操作系统写入针对客户端操作系统的重置消息至所述预设共享内存空间;And a reset message writing module, configured to write, by the server operating system, a reset message for the client operating system to the preset shared memory space;
    初始化模块,用于所述客户端操作系统从所述预设共享内存空间中获取所述重置消息,并根据所述重置消息重新初始化所述预设共享内存空间;An initialization module, configured to obtain, by the client operating system, the reset message from the preset shared memory space, and reinitialize the preset shared memory space according to the reset message;
    所述第二通知模块还用于将服务端操作系统的重置消息通知所述客户端操作系统。The second notification module is further configured to notify the client operating system of a reset message of the server operating system.
  9. 根据权利要求6-8任意一项所述的装置,其特征在于,所述第一通知模块具体用于:The device according to any one of claims 6-8, wherein the first notification module is specifically configured to:
    如果客户端为宿主机,服务端为虚拟机,则自客户端操作系统发送中断请求至服务端操作系统;If the client is the host and the server is a virtual machine, the interrupt request is sent from the client operating system to the server operating system;
    如果客户端为虚拟机,服务端为宿主机,则自客户端操作系统发送陷入指令至服务端操作系统;If the client is a virtual machine and the server is the host, the sink command is sent from the client operating system to the server operating system;
    如果客户端和服务端均为虚拟机,则自客户端操作系统发送陷入指令至宿主机,再由宿主机发送中断请求至服务端操作系统;If both the client and the server are virtual machines, the client operating system sends a trap instruction to the host, and then the host sends an interrupt request to the server operating system;
    所述第二通知模块,具体用于:The second notification module is specifically configured to:
    如果服务端为宿主机,客户端为虚拟机,则自服务端操作系统发送中断请求至客户端操作系统;If the server is the host and the client is a virtual machine, the interrupt request is sent from the server operating system to the client operating system;
    如果服务端为虚拟机,客户端为宿主机,则自服务端操作系统发送陷入指令至客户端操作系统;If the server is a virtual machine and the client is a host, the server is sent from the server operating system to the client operating system;
    如果客户端和服务端均为虚拟机,则自服务端操作系统发送陷入指令至宿主机,再由宿主机发送中断请求至客户端操作系统。If both the client and the server are virtual machines, the slave operating system sends a trap instruction to the host, and then the host sends an interrupt request to the client operating system.
  10. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-5任一项所述的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any of claims 1-5 method.
  11. 一种非易失性计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,当所述计算机可执行指令被电子设备执行时,使所述电子设备执行权利要求1-5任一项所述的方法。A non-transitory computer readable storage medium, wherein the computer readable storage medium stores computer executable instructions that, when executed by an electronic device, cause the electronic device to enforce rights The method of any of 1-5 is claimed.
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被电子设备执行时,使所述电子设备执行权利要求1-5任一项所述的方法。A computer program product, comprising: a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by an electronic device The electronic device is caused to perform the method of any of claims 1-5.
PCT/CN2017/119288 2017-12-28 2017-12-28 File system sharing method and apparatus for multi-operating system, and electronic device WO2019127191A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780003297.9A CN108369604B (en) 2017-12-28 2017-12-28 Method and device for sharing file system by multiple operating systems and electronic equipment
PCT/CN2017/119288 WO2019127191A1 (en) 2017-12-28 2017-12-28 File system sharing method and apparatus for multi-operating system, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/119288 WO2019127191A1 (en) 2017-12-28 2017-12-28 File system sharing method and apparatus for multi-operating system, and electronic device

Publications (1)

Publication Number Publication Date
WO2019127191A1 true WO2019127191A1 (en) 2019-07-04

Family

ID=63011261

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/119288 WO2019127191A1 (en) 2017-12-28 2017-12-28 File system sharing method and apparatus for multi-operating system, and electronic device

Country Status (2)

Country Link
CN (1) CN108369604B (en)
WO (1) WO2019127191A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113608828A (en) * 2021-06-30 2021-11-05 苏州浪潮智能科技有限公司 Protection method and related equipment thereof
CN113778611A (en) * 2021-07-06 2021-12-10 锐捷网络(苏州)有限公司 Data transmission method, device, system and storage medium
CN115016957A (en) * 2022-05-26 2022-09-06 湖南三一智能控制设备有限公司 Method, device, terminal and vehicle for cross-process memory sharing

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542540A (en) * 2018-11-26 2019-03-29 北京粉笔未来科技有限公司 A kind of method, apparatus and system for realizing interaction
CN109739619B (en) * 2018-12-12 2021-07-06 咪咕文化科技有限公司 Processing method and device based on containerized application and storage medium
CN113010407A (en) * 2019-12-20 2021-06-22 上海汽车集团股份有限公司 System information acquisition method, device and system
CN113282323A (en) * 2021-05-31 2021-08-20 惠州华阳通用电子有限公司 Upgrading method based on dual-system upgrading package sharing
CN113407318B (en) * 2021-06-04 2023-06-23 Oppo广东移动通信有限公司 Operating system switching method and device, computer readable medium and electronic equipment
CN113505011B (en) * 2021-09-08 2021-12-07 北京鲸鲮信息系统技术有限公司 Permission synchronization method and device, electronic equipment and storage medium
CN114048181B (en) * 2021-10-20 2024-04-02 北京字节跳动网络技术有限公司 Method and device for sharing files by system and container
CN114625480A (en) * 2022-03-17 2022-06-14 北京有竹居网络技术有限公司 Data processing method, device, readable medium and computing equipment
CN115150392B (en) * 2022-08-30 2022-12-02 统信软件技术有限公司 Remote file copying method, system, computing equipment and storage medium
CN115580644B (en) * 2022-12-07 2023-04-07 北京小米移动软件有限公司 Method, apparatus, device and storage medium for communication between client systems in host

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101819564A (en) * 2009-02-26 2010-09-01 国际商业机器公司 Method and device for assisting communication between virtual machines
CN101847105A (en) * 2009-03-26 2010-09-29 联想(北京)有限公司 Computer and internal memory sharing method of a plurality of operation systems
CN103475682A (en) * 2012-06-07 2013-12-25 华为技术有限公司 File transfer method and file transfer equipment
WO2015081308A2 (en) * 2013-11-26 2015-06-04 Dynavisor, Inc. Dynamic i/o virtualization
CN106445702A (en) * 2016-09-21 2017-02-22 乐视控股(北京)有限公司 Multi-system communication method and terminal
CN107077377A (en) * 2016-12-29 2017-08-18 深圳前海达闼云端智能科技有限公司 A kind of device virtualization method, device, system and electronic equipment, computer program product

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4012517B2 (en) * 2003-04-29 2007-11-21 インターナショナル・ビジネス・マシーンズ・コーポレーション Managing locks in a virtual machine environment
US7533207B2 (en) * 2006-12-06 2009-05-12 Microsoft Corporation Optimized interrupt delivery in a virtualized environment
US9424211B2 (en) * 2008-12-31 2016-08-23 Intel Corporation Providing multiple virtual device controllers by redirecting an interrupt from a physical device controller
US20110197004A1 (en) * 2010-02-05 2011-08-11 Serebrin Benjamin C Processor Configured to Virtualize Guest Local Interrupt Controller
CN103559079A (en) * 2013-11-15 2014-02-05 深圳市道通科技有限公司 Shared memory based data access method and device
US9772870B2 (en) * 2015-01-29 2017-09-26 Red Hat Israel, Ltd. Delivering interrupts to virtual machines executing privileged virtual machine functions
EP3089035A1 (en) * 2015-04-30 2016-11-02 Virtual Open Systems Virtualization manager for reconfigurable hardware accelerators
CN106778275A (en) * 2016-12-29 2017-05-31 北京瑞星信息技术股份有限公司 Based on safety protecting method and system and physical host under virtualized environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101819564A (en) * 2009-02-26 2010-09-01 国际商业机器公司 Method and device for assisting communication between virtual machines
CN101847105A (en) * 2009-03-26 2010-09-29 联想(北京)有限公司 Computer and internal memory sharing method of a plurality of operation systems
CN103475682A (en) * 2012-06-07 2013-12-25 华为技术有限公司 File transfer method and file transfer equipment
WO2015081308A2 (en) * 2013-11-26 2015-06-04 Dynavisor, Inc. Dynamic i/o virtualization
CN106445702A (en) * 2016-09-21 2017-02-22 乐视控股(北京)有限公司 Multi-system communication method and terminal
CN107077377A (en) * 2016-12-29 2017-08-18 深圳前海达闼云端智能科技有限公司 A kind of device virtualization method, device, system and electronic equipment, computer program product

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113608828A (en) * 2021-06-30 2021-11-05 苏州浪潮智能科技有限公司 Protection method and related equipment thereof
CN113608828B (en) * 2021-06-30 2023-07-14 苏州浪潮智能科技有限公司 Protection method and related equipment thereof
CN113778611A (en) * 2021-07-06 2021-12-10 锐捷网络(苏州)有限公司 Data transmission method, device, system and storage medium
CN115016957A (en) * 2022-05-26 2022-09-06 湖南三一智能控制设备有限公司 Method, device, terminal and vehicle for cross-process memory sharing
CN115016957B (en) * 2022-05-26 2024-03-22 湖南三一智能控制设备有限公司 Method, device, terminal and vehicle for cross-process memory sharing

Also Published As

Publication number Publication date
CN108369604A (en) 2018-08-03
CN108369604B (en) 2021-12-03

Similar Documents

Publication Publication Date Title
WO2019127191A1 (en) File system sharing method and apparatus for multi-operating system, and electronic device
US10374885B2 (en) Reconfigurable server including a reconfigurable adapter device
KR102055325B1 (en) Efficient live-migration of remotely accessed data
WO2017129106A1 (en) Data request processing method, server and system
US10013189B1 (en) Storage volume backup management for multi-tenant environments
US8533713B2 (en) Efficent migration of virtual functions to enable high availability and resource rebalance
CN107231815B (en) System and method for graphics rendering
US7516336B2 (en) System and method for power reduction by sequestering at least one device or partition in a platform from operating system access
US9882825B2 (en) Method and system for securely transmitting volumes into cloud
US10958633B2 (en) Method and system for securely transmitting volumes into cloud
CN110032413B (en) Desktop virtualization method, related equipment and computer storage medium
US9256463B2 (en) Method and apparatus to replicate stateful virtual machines between clouds
CN107491354B (en) Shared memory-based communication method and device between virtual machines
WO2015043147A1 (en) Virtual machine memory data migration method, related apparatus, and cluster system
US9858110B2 (en) Virtual credential adapter for use with virtual machines
JP2018523192A (en) Executing commands on virtual machine instances in distributed computing environments
CN104205050A (en) Accessing a device on a remote machine
WO2019028682A1 (en) Multi-system shared memory management method and device
CN102968331A (en) Virtual machine management system and file access method
WO2019119315A1 (en) Input processing method and apparatus based on multiple operating systems, and electronic device
US20140082275A1 (en) Server, host and method for reading base image through storage area network
CN113407298A (en) Method, device and equipment for realizing message signal interruption
US9569192B2 (en) Configuring dependent services associated with a software package on a host system
CN113037795B (en) Thin terminal system and processing method thereof
CN114281252A (en) Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.11.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17936101

Country of ref document: EP

Kind code of ref document: A1