# US 2019/0317795 A1 · Memory access method for use in multi-operating systems and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0317795 A1
- Document ID: US20190317795A1
- Status: Published application
- Kind: A1
- Application number: 16/453,055
- Filed: 2019-06-26
- Published: 2019-10-17
- Earliest claimed: 2016-12-27
- Assignees: Cloudminds (Shenzhen) Robotics Systems Co., Ltd.
- Applicants: Cloudminds (Shenzhen) Robotics Systems Co., Ltd.
- Inventors: Xiangxiao KONG
- Web page: https://patentgrep.com/patent/US20190317795A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/45545: {Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox}
- G06F 9/5016: {the resource being the memory}
- G06F 9/54: Interprogram communication
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory access method for use in multi-operating systems includes: in a guest operating system, requesting to share a memory from a host operating system when it is monitored that software needs to share the memory; in the host operating system, allocating a memory share sub-region to the guest operating system by a memory share management module Gralloc; in the host operating system, returning an index value of the memory share sub-region to the guest operating system; and in the guest operating system, returning an address of a mapping sub-region to the software upon mapping the memory share sub-region corresponding to the index value to the guest operating system by an emulation processor QEMU.

## Claims

### Claim 1

A memory access method for use in multi-operating systems, comprising:
in a guest operating system, requesting to share a memory from a host operating system when it is monitored that software needs to share the memory;
in the host operating system, allocating a memory share sub-region to the guest operating system by a memory share management module Gralloc;
in the host operating system, returning an index value of the memory share sub-region to the guest operating system; and
in the guest operating system, returning an address of a mapping sub-region to the software upon mapping the memory share sub-region corresponding to the index value to the guest operating system by an emulation processor QEMU.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the in the guest operating system, requesting to share the memory from the host operating system when it is monitored that software needs to share the memory comprises:
in the guest operating system, sending a memory share request to the host operating system when it is monitored that the software needs to share the memory.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the software is software which needs to call a central processing unit to directly access the memory.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the in the guest operating system, requesting to share the memory from the host operating system when it is monitored that software needs to share the memory comprises:
in the guest operating system, when it is monitored that the software needs to share the memory, requesting to share the same memory from a Gralloc server in the host operating system via communication between a front-end drive in the guest operating system and a rear-end drive in the host operating system.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the in the host operating system, allocating the memory share sub-region to the guest operating system by the memory share management module Gralloc comprises:
in the host operating system, upon receiving the memory share request via the rear-end drive, requesting the Gralloc server to call the Gralloc to allocate the memory share sub-region to the guest operating system.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the in the host operating system, returning the index value of the memory share sub-region to the guest operating system comprises:
in the host operating system, returning the index value corresponding to the memory share sub-region to the guest operating system via communication between the front-end drive and the rear-end drive.

### Claim 7 (depends on 4)

The method according to claim 4, wherein the mapping the memory share sub-region corresponding to the index value to the guest operating system by the emulation processor QEMU comprises:
mapping the memory share sub-region to the guest operating system via the QEMU; and
mapping the memory share sub-region which is mapped via the QEMU to a user space of the guest operating system via a kernel of the guest operating system.

### Claim 8

An electronic device, comprising:
a memory, and at least one processor; wherein the memory is communicably connected to the at least one processor via a communication bus; the at least one processor is configured to perform instructions stored in the memory; and the memory stores instructions for performing the steps of:
in a guest operating system, requesting to share a memory from a host operating system when it is monitored that software needs to share the memory;
in the host operating system, allocating a memory share sub-region to the guest operating system by a memory share management module Gralloc;
in the host operating system, returning an index value of the memory share sub-region to the guest operating system; and
in the guest operating system, returning an address of a mapping sub-region to the software upon mapping the memory share sub-region corresponding to the index value to the guest operating system by an emulation processor QEMU.

### Claim 9 (depends on 8)

The electronic device according to claim 8, wherein the in the guest operating system, requesting to share the memory from the host operating system when it is monitored that software needs to share the memory comprises:
in the guest operating system, sending a memory share request to the host operating system when it is monitored that the software needs to share the memory.

### Claim 10 (depends on 8)

The electronic device according to claim 8, wherein the software is software which needs to call a central processing unit to directly access the memory.

### Claim 11 (depends on 8)

The electronic device according to claim 8, wherein the in the guest operating system, requesting to share the memory from the host operating system when it is monitored that software needs to share the memory comprises:
in the guest operating system, when it is monitored that the software needs to share the memory, requesting to share the same memory from a Gralloc server in the host operating system via communication between a front-end drive in the guest operating system and a rear-end drive in the host operating system.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein the in the host operating system, allocating the memory share sub-region to the guest operating system by the memory share management module Gralloc comprises:
in the host operating system, upon receiving the memory share request via the rear-end drive, requesting the Gralloc server to call the Gralloc to allocate the memory share sub-region to the guest operating system.

### Claim 13 (depends on 11)

The electronic device according to claim 11, wherein the in the host operating system, returning the index value of the memory share sub-region to the guest operating system comprises:
in the host operating system, returning the index value corresponding to the memory share sub-region to the guest operating system via communication between the front-end drive and the rear-end drive.

### Claim 14 (depends on 11)

The electronic device according to claim 11, wherein the mapping the memory share sub-region corresponding to the index value to the guest operating system by the emulation processor QEMU comprises:
mapping the memory share sub-region to the guest operating system via the QEMU; and
mapping the memory share sub-region which is mapped via the QEMU to a user space of the guest operating system via a kernel of the guest operating system.

### Claim 15

A computer program product for use in combination with an electronic device, comprising a computer program embedded into a computer-readable storage medium; wherein the computer program comprises instructions for causing the electronic device to perform the steps of:
in a guest operating system, requesting to share a memory from a host operating system when it is monitored that software needs to share the memory;
in the host operating system, allocating a memory share sub-region to the guest operating system by a memory share management module Gralloc;
in the host operating system, returning an index value of the memory share sub-region to the guest operating system; and
in the guest operating system, returning an address of a mapping sub-region to the software upon mapping the memory share sub-region corresponding to the index value to the guest operating system by an emulation processor QEMU.

### Claim 16 (depends on 15)

The computer program product device according to claim 15, wherein the in the guest operating system, requesting to share the memory from the host operating system when it is monitored that software needs to share the memory comprises:
in the guest operating system, sending a memory share request to the host operating system when it is monitored that the software needs to share the memory.

### Claim 17 (depends on 15)

The computer program product according to claim 15, wherein the software is software which needs to call a central processing unit to directly access the memory.

### Claim 18 (depends on 15)

The computer program product according to claim 15, wherein the in the guest operating system, requesting to share the memory from the host operating system when it is monitored that software needs to share the memory comprises:
in the guest operating system, when it is monitored that the software needs to share the memory, requesting to share the same memory from a Gralloc server in the host operating system via communication between a front-end drive in the guest operating system and a rear-end drive in the host operating system.

### Claim 19 (depends on 18)

The computer program product according to claim 18, wherein the in the host operating system, allocating the memory share sub-region to the guest operating system by the memory share management module Gralloc comprises:
in the host operating system, upon receiving the memory share request via the rear-end drive, requesting the Gralloc server to call the Gralloc to allocate the memory share sub-region to the guest operating system.

### Claim 20 (depends on 18)

The computer program product according to claim 18, wherein the in the host operating system, returning the index value of the memory share sub-region to the guest operating system comprises:
in the host operating system, returning the index value corresponding to the memory share sub-region to the guest operating system via communication between the front-end drive and the rear-end drive.
