General pointers for data exchange in computer systems with independent processors
By using a universal pointer based on object-based virtual memory addresses in the computer system, efficient data exchange and secure memory operations between different processors are realized, and the problems of low data exchange efficiency and security loopholes in the existing technology are solved.
Patent Information
- Application Number
- CN201980068820.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-10-25
- Filing Date
- 2019-10-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-10-17
AI Technical Summary
Existing computer systems have low data exchange efficiency between different processors and have security vulnerabilities. In particular, multiple software layers are involved when accessing data through Uniform Resource Locators (URLs), resulting in inefficiency and security risks.
Using a universal pointer based on object-based virtual memory addresses, by using virtual memory addresses for data exchange between different processors, it avoids the use of multiple software layers in the process of direct access to files and directly exchanges memory addresses between processors. Translation, enabling efficient data exchange and improved security.
It achieves efficient data exchange between different processors, reduces the probability of security vulnerabilities, improves the efficiency and security of memory operations, and does not need to rely on the services of a specific file system or operating system.
Smart Images

Figure CN112930522B_ABST
Abstract
Description
[0001] Related Applications
[0002] This application claims priority to U.S. Patent Application No. 16 / 170,799, filed on October 25, 2018, and entitled “Universal Pointers for Data Exchange in a Computer System having Independent Processors,” the entire disclosure of which is hereby incorporated by reference.
[0003] This application is related to U.S. Patent Application No. 16 / 028,840, filed on July 6, 2018, and entitled “Static Identifications in Object-based Memory Access,” and U.S. Patent Application No. 16 / 028,750, filed on July 6, 2018, and entitled “Securing Conditional Speculative Instruction Execution,” the entire disclosures of which are hereby incorporated by reference herein. Technical Field
[0004] At least some embodiments disclosed herein relate generally to computer architecture, and more particularly, but not limited to, to techniques for exchanging data between computer programs executing in different computer processors. Background Art
[0005] The processor of a computer loads instructions for execution, loads operands for processing, and stores results according to memory addresses in the processor. A memory address identifies a memory location in a computer. A memory address is a fixed-length sequence of digits that are conventionally displayed and manipulated as unsigned integers. The length of the sequence of digits or bits can be considered the width of the memory address. The memory address can be used directly in a specific structure of the central processing unit (CPU), such as in a program counter and in a memory address register, to load instructions and / or operands of instructions for processing and / or store processing results. The size or width of these structures of the CPU generally determines the memory address width.
[0006] A pointer is a programming language object that stores a memory address in computer memory. Conventionally, the actual format and content of a pointer variable depends on the underlying computer architecture. The applicable scope of a pointer is limited to the processor in which the program is running. Programs running in a given computer can use pointers within the program to improve performance. Pointers in computer memory typically have the same width as memory address registers in a central processing unit (CPU). For example, manipulating a pointer can be more efficient than manipulating data stored in computer memory identified by a pointer.
[0007] Computers often exchange data via computer files. For example, heterogeneous computers on the Internet can exchange data via files identified using network addresses or uniform resource locators (URLs).
[0008] A computer file is a data storage facility organized in a computer's file system. The file system controls how the file's data is stored in and retrieved from the data storage device according to predefined standards. The operation of the file system is usually programmed in an operating system running in the computer's processor. The operating system is a set of instructions that manages the computer's resources to provide general services, including access to computer files in the computer's data storage device.
[0009] A Uniform Resource Locator (URL) is a variable length string having multiple segments that identify the various components of the URL. Examples of components of a URL include a communication protocol for accessing the file at the URL via a computer network, a host name identifying a computer controlling the file on the computer network, a file path to the file in a file system controlled by the computer, a file name for the file, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.
[0011] Figure 1 A computer system configured to implement universal pointers using virtual memory addresses to facilitate data exchange between independent processors is presented.
[0012] Figure 2 Shows the translation of a generic virtual address to a physical address.
[0013] Figure 3 An example of a generic virtual address to physical address translation is shown.
[0014] Figure 4 Demonstrate a method for data exchange between processors using common pointers. DETAILED DESCRIPTION
[0015] The present disclosure includes techniques for implementing universal pointers using object-based virtual memory addresses. Object-based virtual memory addresses can be translated into physical memory addresses by separate processors that may even have different instruction set architectures (ISAs). Thus, pointers based on object-based virtual memory addresses can be exchanged by computer programs running in different processors to exchange data without relying on references to files. For example, a first processor running a first operating system (e.g., Windows) can access data stored on a second processor running a second operating system (e.g., Linux) via the Internet, where the first and second processors may have different instruction sets.
[0016] Computer programs running in different computers can exchange data through computer files identified by uniform resource locators (URLs). However, processing URLs to access data stored in computer files can be inefficient, involving multiple software layers such as operating systems, device drivers, and / or applications. The need for multiple software layers also increases the probability of security vulnerabilities.
[0017] When implementing universal pointers, computer programs running in different computers can exchange data via exchanging pointers. This pointer provides a virtual memory address that can be used in different computers to access the same memory location, wherein the different computers may even have different underlying computer architectures. Therefore, the use of these universal pointers can promote a memory-centric programming paradigm, in which different processors can be connected to a collection of memory devices and / or storage devices to cooperatively process and / or operate data in the memory devices and / or storage devices. The processor hardware can be configured to translate the virtual address provided by the pointer into a physical address for memory access. This arrangement can improve efficiency and / or security by avoiding the need for multiple software layers that are conventionally used in the process of handling file access.
[0018] Figure 1 A computer system configured to implement universal pointers using virtual memory addresses to facilitate data exchange between independent processors is presented.
[0019] Figure 1 The computer system includes a plurality of processors (111, ..., 121). Generally speaking, the processors (111, ..., 121) may have different instruction set architectures (ISA). However, processors (111, ..., 121) having the same instruction set architecture (ISA) may also be used.
[0020] exist Figure 1 In the example, the same virtual address (101) can be used in different processors (111, ..., 121) to access Figure 1 The same memory location in a computer system.
[0021] For example, the memory location may be in memory (117) coupled to processor A (111), or in memory (127) coupled to processor B (121), or in storage device (131).
[0022] Figure 1 The computer system connects processors (111, ..., 121), memories (117, ..., 127), and storage devices (131) via an interconnect (109), which may include wired or wireless links (e.g., a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a wireless wide area network (WWAN), etc.), one or more computer buses, one or more computer networks, network devices, and / or the Internet.
[0023] In some examples, processor A (111) is coupled to the memory (127) of processor B (121) via communication access with processor B (121). Alternatively, the memory (127) is also directly coupled to the interconnect (109) so that processor A (111) can access the memory (127) without going through processor B (121). In other examples, processor B (121) also accesses the memory (127) via the interconnect (109).
[0024] Similarly, processor B (121) may access memory (117) coupled to processor A (111) via communication with processor A (111), or may access memory (117) without going through processor A (111) (e.g., when memory (117) is also directly coupled to interconnect (109)). In other examples, processor A (111) also accesses memory (117) via interconnect (109).
[0025] Each of the processors (111, ..., 121) has a memory management unit (113, ..., or 123). The memory management unit (113, ..., or 123) has an address translation structure (115, ..., 125) that can convert a virtual address (101) into a physical address of a memory location and use the physical address to access the memory location.
[0026] Thus, a program running in processor A (111) can send a pointer identifying virtual address (101) to a program running in processor B (121), thereby allowing the program running in processor B (121) to process data identified using virtual address (101) or to execute a routine at a location identified using virtual address (101). This approach avoids requiring the program running in processor A (111) to use the services of an operating system running in processor A (111) to organize data into files, store the files in storage device (131), and allow the program running in processor B (121) to use the services of an operating system running in processor B (121) to access data in the files.
[0027] The virtual memory address (101) may have a predetermined width (e.g., a predetermined number of bits) for the processor (111, ..., 121). The memory address (101) may include a portion representing an object ID (103) and a portion representing an offset (107) within the object represented by the object ID (103). Optionally, the virtual address (101) and / or the object ID (103) of the virtual address may include a portion identifying an object type (105).
[0028] The virtual address (101) and / or the object represented by the object ID (103) may specify ISA semantics that may be implemented by different manufacturers of processors (111, ..., 121).
[0029] For example, a static object ID of a predetermined value (e.g., 0) may be used to represent a kernel object of an operating system running in a processor (e.g., 111, . . . , or 121). To improve security, a processor that executes an instruction for a static object ID of a predetermined value (e.g., 0) does not perform conditional speculative execution during execution of the instruction.
[0030] Some details and examples of static object IDs in memory addresses used by a computer processor to load instructions for execution can be found in U.S. patent application Ser. No. 16 / 028,840, filed on Jul. 6, 2018, and entitled “Static Identifications in Object-based Memory Access,” the entire disclosure of which is hereby incorporated by reference herein.
[0031] Some details and examples of ensuring conditional speculative instruction execution based on static object IDs can be found in U.S. patent application Ser. No. 16 / 028,750, filed on Jul. 6, 2018, and entitled “Securing Conditional Speculative Instruction Execution,” the entire disclosure of which is incorporated herein by reference.
[0032] Preferably, the object ID (103), object type (105) and offset (107) have a predetermined width. A predetermined number of bits is used to represent the object ID (103), object type (105) and offset (107).
[0033] For example, in one embodiment, each virtual address (101) has 128 bits. The virtual address (101) includes a 64-bit offset (107) and a 64-bit object ID (103). Optionally, the object ID (103) may include a predetermined number of bits representing the type (105) of the object (e.g., 141, ..., 143, or 143).
[0034] For example, an object type (105) value of 0 to 3 may be used to identify a kernel object of an operating system. For example, an object type (105) value of 4 to 5 may be used to specify that an offset is an address of a different width (e.g., a 64-bit address or a 32-bit address contained within a memory address having 128 bits). For example, an object type (105) value of 6 to 7 may be used to specify that a predetermined portion of an object ID is to be interpreted as an identifier of a local object or an object in a partitioned global address space (PGAS). For example, an object type (105) value of 32 may be used to specify that the remainder of the object ID is to be interpreted as an identifier of an object defined in a server (e.g., 197).
[0035] For example, the object represented by object ID (103) may be object A (141) in memory (117) coupled to processor A (111), or object B (142) in memory (127) coupled to processor B (121), or object C (143) in storage device (131).
[0036] In general, the object (141, ..., 142, ..., or 143) represented by the object ID (103) may include instructions configured to be executed in at least one of the processors (111, ..., 121), and / or data to be manipulated by the instructions or by another program. The offset (107) may be used to identify a relevant portion of the object (141, ..., 142, ..., or 143), such as a starting address of an instruction / routine to be executed, or a starting address of a data entry or table to be processed, etc.
[0037] For example, the processor (111, ..., or 121) may use the virtual address (101) in the program counter to load instructions of a routine of an object for execution. The object ID (103) and / or object type (105) of the virtual address may be used to identify specific characteristics of the instruction and / or routine for access control.
[0038] For example, a program running in the processor (111, . . . , or 121) may use the virtual address (101) in the program counter to retrieve data of an object for processing.
[0039] Figure 1 The computer system may include an object name server (133) that provides information about objects (e.g., 141, ..., 142, ..., 143) identified by object IDs (e.g., 103) used in virtual addresses (e.g., 101). For example, the object name server (133) may store data indicating the name of the object (e.g., 141, ..., 142, ..., or 143) represented by the object ID (103), access control parameters of the object (e.g., 141, ..., 142, ..., or 143), the current storage location / physical address of the object (e.g., 141, ..., 142, ..., or 143), the physical address of the object (e.g., 141, ..., 142, ..., or 143), and the physical address of the object (e.g., 141, ..., 142, ..., or 143). 143), a revision history of an object (e.g., 141, ..., 142, ..., or 143), a physical address of a cached copy of an object (e.g., 141, ..., 142, ..., or 143), a controller of a cached copy of an object (e.g., 141, ..., 142, ..., or 143), permissions for accessing the object (e.g., 141, ..., 142, ..., or 143), a security configuration of the object (e.g., 141, ..., 142, ..., or 143), and / or other attributes of the object (135).
[0040] The address translation structure (115, ..., or 125) of the processor (111, ..., or 121) may not have the physical address information of all objects (141, ..., 142, ..., 143) at a particular point in time of operation.
[0041] For example, when the virtual address (101) is first constructed or used in the processor (111), the address translation structure (115) may not have the physical address of the object (e.g., 142, ..., 143) represented by the object ID (103) specified in the virtual address (101). The address translation structure (115) may query the object name server (133) to obtain the physical address of the object (e.g., 142, ..., 143), and accordingly configure the address translation structure (115) to translate the virtual address (101) into a physical address to access the memory location identified by the virtual address (101).
[0042] In some embodiments, a communication protocol may be implemented on the interconnect (109) for discovering the physical address of the object (e.g., 142, ..., 143) represented by the object ID (103). Thus, the object name server (133) may be efficiently implemented via the communication protocol without requiring dedicated hardware; and the database of the object name server (133) may be distributed among the address translation structures (115, ..., 125), the memory (117, ..., 127), and / or the storage device (131).
[0043] The object name server (133) may be local to the computing system having the processor set (111, ..., 121) (eg, connected via a computer bus or local area network), or remote from the computing system (eg, connected via a wide area network and / or the Internet).
[0044] Optionally, Figure 1 A computer system may move or cache an object from one location (e.g., in a storage device (131)) to another location (e.g., in a memory (117, ..., or 127)) to improve access and / or processing efficiency. When an object is moved or cached, the location information of the object may be updated in an object name server (133) and / or an address translation structure (115, ..., 125) of a processor (111, ..., 121).
[0045] Use Figure 1 By implementing pointers using the virtual addresses (eg, 101) shown in FIG. 1 , heterogeneous processors (eg, 111, . . . , 121) in a computer system can freely exchange data without requiring an intermediate software layer to handle files and / or URLs.
[0046] Figure 2 The translation of a generic virtual address (101) to a physical address (153) is shown.
[0047] Figure 2In the embodiment, the virtual address (101) is mapped to the physical address (153) using the address translation table (151). The address translation table (151) can be implemented in the address translation structure (115, ..., or 125) of the memory management unit (113, ..., or 123).
[0048] The address translation table (151) may include address information initially stored in or identified by the object name server (133).
[0049] For example, the attributes (135) of the object name server (133) may include the physical memory address of the object ID (103), or the entry point of a mapping data structure for translating the address of the object. Based on the physical memory address of the object ID (103), entries for mapping different parts of the object (e.g., 141, ..., 142, ..., 143) represented by the object ID (103) may be calculated and populated in the address translation table (151).
[0050] For example, the attributes (135) of the object name server (133) may include a physical memory address for accessing an entry configured to map different portions of the object (e.g., 141, ..., 142, ..., 143) represented by the object ID (103). The physical memory address may be used to load the entry into the address translation table (151).
[0051] Figure 3 An example of the translation of a generic virtual address (101) to a physical address (153) is shown.
[0052] The virtual address (101) may include an object ID (103), an object type (105), and an offset (107). For example, the virtual address (101) may have a width of 128 bits; a number of bits of the virtual address (101) (e.g., 59 or 58) may be used to store the object ID (103), another number of bits of the virtual address (101) (e.g., 5 or 6) may be used to store the object type (105), and the remaining bits of the virtual address (e.g., 64) may be used to store an offset (107) relative to an object (e.g., 141, ..., 142, ..., 143) having the type (105) and the ID (103). For example, the virtual address (101) may be an address stored in the memory (117, ..., 127) as configured, programmed, and / or seen by a programmer or user of the routine. The virtual address (101) may be the contents of a general pointer used by the programmer or user.
[0053] exist Figure 3In the embodiment of the present invention, a hash (161) is applied to the object ID (103) to generate an index (165). The index (165) has a smaller number of bits than the object ID (103) and thus reduces the size of the address translation table (151) used to look up an entry (e.g., 173, ..., 175) from a table (151) in an address translation structure (115, ..., or 125) implemented in the processor (111, ..., or 121). The size of the address translation table (151) corresponds to the number of entries or count (171) in the table (151).
[0054] However, when multiple items hash to the same index, hash collisions may occur. Chaining is one of the techniques for resolving hash collisions. The index resulting from the collision can be used to retrieve a list / chain of key-value pairs. Each item hashed to the index can be configured as a key in a corresponding key-value pair in the list; and the search result for the item can be configured as a value in the corresponding key-value pair. In order to retrieve a search result for one of the items hashed to the same index, the list / chain of key-value pairs identified via the index can be searched to find a key-value pair in which the key matches the item. The value of the matching key-value pair provides the search result.
[0055] When there is no hash collision for index ( 165 ), the entry (eg, 173 , . . . , or 175 ) at index ( 165 ) in the address translation table ( 151 ) may be retrieved as the resulting entry ( 163 ).
[0056] When there is a hash conflict for index (165), the entry (e.g., 173, ..., or 175) at index (165) in the address translation table (151) identifies a conflict chain (163). The conflict chain (163) has a list / chain showing entries (e.g., 182, 184, ...) that hash (161) to object IDs (e.g., 181, 183) in the same index (165). The conflict chain (163) can be searched to locate an entry (e.g., 182 or 184) specified for an object ID (e.g., 181 or 183) that matches the object ID (103) before hashing (161). The located entry (e.g., 182 or 184) is shown as the resulting entry (163).
[0057] In general, a hash (161) may be applied to a combination of an object ID (103) and optionally a portion of an object type (105) and / or an offset (107).
[0058] A typical entry (163) looked up from the address translation table (151) using the index (165) may have fields that are used for subsequent operations in the address translation (235).
[0059] For example, the valid field (191) may have a value indicating whether the entry (163) is valid for address translation; the type field (193) may have a value indicating the type of translation to be performed using the entry; the page size field (195) may have a value indicating the memory page size used to determine the page table entry; the address field (197); and so on.
[0060] For example, the entry (163) may further include a field identifying a page table structure, and / or a field specifying a security configuration for accessing the memory region corresponding to the entry (163).
[0061] Alternatively, the entry (163) may further include a field identifying a table; and a hash of the offset (107) or a portion of the offset (107) may be used as an index into the table to retrieve an entry identifying: a page table structure, or a base (157) of a region (137) of a physical address (153), or a physical address (153) corresponding to a virtual address (101).
[0062] Optionally, the entry (163) may further include a boundary length field for checking the validity of the offset (107) provided in the virtual memory address (101). During translation of the virtual memory address (101) to the physical memory address (153), the offset (107) is compared to the boundary length identified in the entry (163). If the offset (107) is greater than the boundary length, the virtual memory address (101) is invalid; memory accesses made using the virtual memory address (101) are aborted; and a fault occurs.
[0063] The address (197) provided in the entry (163) of the address translation table (151) may be a physical memory address of a page table or page directory. At least a portion of the offset (107) may be used as a virtual page number and index into the page table or page directory to locate the next page table or page directory. The process of locating the next page table or page directory may be repeated until the entry located using the last virtual page number in the offset (107) is used to locate the page table entry. The base (157) of the physical memory page identified in the page table entry may be combined with the remainder of the offset (107) to generate the physical address (153).
[0064] Alternatively, a hash (161) may be applied to the entire virtual address (101) so that the address (197) looked up using the index (165) is a physical address. In this implementation, the entry (163) may be considered a page table entry and may contain a secure configuration for the memory address. However, this implementation may require a large address translation table (151).
[0065] Alternatively, a hash (161) may be applied to a combination of the object ID (103), (optionally) the object type (105), and a portion of the offset (107); and the address (197) found using the index (165) is the basis of the page of physical addresses. The remainder of the offset (107) may be combined with the basis to generate a physical address (e.g., 153). In this embodiment, the address translation table (151) may be considered a page table; the portion of the address (101) used to generate the index (165) by hashing (161) may be considered an entry ID or virtual page number (VPN); and the entry (163) may be considered a page table entry and may optionally include a security configuration for the memory address.
[0066] Alternatively, a hash (161) may be applied to a combination of the object ID (103), (optionally) the object type (105), and a portion of the offset (107); and the address (197) in the entry (163) found using the index (165) is the physical address of the page table. Because the entry (163) identifies the page table, the portion of the address (101) used to generate the index (165) by hashing (161) may be considered a table ID. A portion of the offset (107) may be used as a virtual entry ID (145) or page number (VPN) in the page table to find the page table entry containing the base of the memory page or memory region; and the remainder of the offset (107) may be combined with the base to generate the physical address (153).
[0067] Alternatively, a hash (161) may be applied to a combination of the object ID (103), (optionally) the object type (105), and a portion of the offset (107); and the address (197) in the entry (163) found using the index (165) is the address of the page directory. The offset (107) may have one or more virtual page numbers for one or more page directories or page tables. The virtual page number (VPN) in the offset (107) is used to index into the page directory to find the base of a subsequent page directory or page table. The last virtual page number (VPN) in the offset (107) is used to index into the page table to retrieve the page table entry containing the base of the memory region (137). In this embodiment, the leading portion of the address (101) including the virtual page number (VPN) before the last virtual page number (VPN) may be considered a table ID.
[0068] In some examples, when different object IDs hash to generate the same index (165), the collision chain (180) may be used to identify a unique address associated with each of the object IDs. In this case, the address (197) may be used to identify a table, list, or chain storing the collision chain (180) from which a unique entry (e.g., 182 or 184) for the address translation of the object ID (103) may be located. The unique entry (e.g., 182 or 184) retrieved from the collision chain (180) may have a structure similar to the entry (163) retrieved directly from the address translation table (151) in the absence of a collision.
[0069] Figure 4 Demonstrate the use of common pointers to exchange data between processors. For example, Figure 4 The method can be implemented in Figure 1 A general pointer may be implemented as a pointer containing Figure 1 , 2 The virtual address (101) shown in FIG. 3 can be used by different processors (111, ..., 121). Figure 2 The object name server (133) and / or Figure 2 or Figure 3 The address translation table (151) translates it into the same physical address (153).
[0070] At block 201, a first processor (111) of a computing system executes a first instruction. The first instruction may be programmed to use a pointer.
[0071] At block 203, the first processor (111) constructs a pointer identifying the virtual memory address (101) during execution of a first instruction.
[0072] For example, the virtual memory address (101) may have a predetermined number of bits (e.g., 128 bits). A first predetermined number of bits of the virtual memory address (101) represents an identifier (103) of an object (e.g., 141, ..., 142, or 143); and a second predetermined number of bits (e.g., 64 bits) represents a memory location offset (107) within the object (e.g., 141, ..., 142, ..., or 143). Because the object (e.g., 141, ..., 142, ..., or 143) is globally known within the computing system, the memory location identified by the virtual memory address (101) is independent of any particular processor (111, ..., or 121) in the computing system.
[0073] For example, an object name server (133) in the computing system may be used to provide information about the location of an object (e.g., 141, ..., 142, ..., or 143) represented by an object identifier (103). Thus, any processor (111, ..., or 121) in the computing system may access the same memory location identified via an offset (107) relative to the object (e.g., 141, ..., 142, ..., or 143). Different processors (111, ..., 121) may access the same memory location via a communication path that may involve a communication method.
[0074] At block 205, the first processor (111) transmits a pointer to a second processor (121) of the computing system.
[0075] For example, the first processor (111) and the second processor (121) may have different instruction set architectures (ISAs), or optionally the same ISA.
[0076] For example, the pointer may be transferred from the first processor (111) to the second processor (121) via a computer network, a computer bus, and / or the Internet.
[0077] Because the virtual memory address (101) is generally valid in the computing system and is not specific to the first processor (111) in which the virtual memory address (101) is identified, created, or used, a pointer with the virtual memory address (101) can be used in any of the processors (111, ..., 121) in the computing system to access the same memory location.
[0078] The first processor (111) may provide data to and / or obtain data from the second processor (121) via the pointer, or request the second processor (121) to execute a routine identified by the pointer.
[0079] For example, the first processor (111) may store the calculation result at the physical memory address (153) corresponding to the virtual memory address (101) during the execution of the first instruction. After transferring the pointer to the second processor (121), the second processor (121) may further operate on the result generated by the first processor (111). In addition, the first processor (111) may then access the processing result generated by the second processor (121) at the virtual memory address (101).
[0080] For example, the first processor (111) may identify, configure or generate instructions of an object (141, ..., 142, ..., or 143) for execution by the second processor (121); and the first processor (111) may provide a pointer to an entry point of the identified instructions to the second processor (121) and request the second processor (121) to execute the instructions of the object (141, ..., 142, ..., or 143).
[0081] At block 207, the second processor (121) executes the second instruction. The second instruction may or may not be part of the object (141, ..., 142, ..., or 143) identified by the virtual memory address (101) of the pointer.
[0082] At block 209, the second processor (121) accesses the virtual memory address (101) according to the pointer during execution of the second instruction.
[0083] For example, the memory management unit (123) of the second processor (121) may use the address translation structure (115) having the address translation table (151) to convert the virtual memory address (101) into the physical memory address (153).
[0084] The memory management unit (123) can access the physical memory address (153). For example, when the virtual memory address (101) is located in the program counter of the second processor (121), the memory management unit (123) can load instructions from the physical memory address (153) into the second processor (121) for execution.
[0085] For example, when the virtual memory address (101) is located in a memory address register of the second processor (121) during execution of an instruction that operates on an operand identified by a memory address, the memory management unit (123) may load the operand from the physical memory address (153) into the second processor (121) for processing during execution of the instruction.
[0086] The memory location identified by the virtual memory address (101) may be located in the memory (117) of the first processor (111), the memory (127) of the second processor (121), or a storage device (143) in the computing system.
[0087] In some examples, an object may have different portions stored in different memories (e.g., 117, ..., 127) and / or storage devices (131). A set of address translation entries may be used to locate an address mapping for translating virtual memory addresses (e.g., 101) in the different portions into corresponding physical memory addresses (e.g., 153).
[0088] In some examples, a memory management unit (e.g., 113, ..., or 123) of a processor (e.g., 111, ..., or 121) communicates with an object name server (133) of the computing system to configure its address translation structure (e.g., 115, ..., or 125) so that the address translation structure can translate a virtual address (e.g., 101) having an identifier (103) of an object (141, ..., 142, ..., or 143) into a physical address (e.g., 153).
[0089] For example, when the address information of the object (141, ..., 142, ..., or 143) is not yet in the address translation table (151) of the address translation structure (e.g., 115, ..., or 125), the address translation structure (e.g., 115, ..., or 125) may communicate with the object name server (133) (and / or other address translation structures in the computing system) to retrieve one or more entries (e.g., 173, ..., or 175) for the translation of the virtual address of the object (141, ..., 142, ..., or 143). The retrieved entries may be populated into the address translation table (151) according to the hash (161) and / or conflict chain (180) of the implementation of the corresponding processor. Once the entry (e.g., 173, ..., or 175, or when there is a hash conflict 182 or 184) is configured for the object ID (103), it may be as follows Figure 3 , the processors (111, ..., 121) may set up their address translation tables (151) in different ways. However, the same virtual address (101) is translated into a physical address (153) for accessing the same memory location in the computing system. Therefore, the processors (111, ..., 121) may use pointers with virtual addresses (101) to facilitate data exchange and / or sharing.
[0090] Some objects may use the same static object ID when the object is not configured to be shared between different processors. For example, kernel objects of an operating system running in a processor (111) may not be shared with another processor (121). Therefore, different processors (111) may use the same static object ID (e.g., 0) for kernel objects located in different memory locations in the computing system. This technique also improves data security and / or reduces security vulnerabilities.
[0091] The technology disclosed herein is at least applicable to a computer system in which the processor is separated from the memory and the processor communicates with the memory and storage device via a communication bus and / or a computer network. In addition, the technology disclosed herein can be applied to a computer system in which the processing capability is integrated into the memory / storage device. For example, a processing circuit including an execution unit and / or a register of a typical processor can be implemented in an integrated circuit and / or an integrated circuit package of a memory medium to perform processing in a memory device. Therefore, the processor (e.g., 101) as discussed above and shown in the figure does not have to be a central processing unit in a von Neumann architecture. The processor can be a unit integrated into the memory to overcome the von Neumann bottleneck, which limits computing performance due to the limitation of the amount of processing caused by the delay when data moves between a central processing unit and a memory separately configured according to the von Neumann architecture.
[0092] The description and drawings of the present disclosure are illustrative and should not be construed as limiting. Many specific details are described to provide a thorough understanding. However, in some instances, well-known or conventional details are not described to avoid obscuring the description. References to one or an embodiment in the present disclosure do not necessarily refer to the same embodiment; and such references mean at least one.
[0093] In the foregoing description, the present disclosure has been described with reference to specific exemplary embodiments of the present disclosure. It will be apparent that various modifications may be made thereto without departing from the broader spirit and scope set forth in the appended claims. Therefore, the description and drawings should be viewed in an illustrative rather than a restrictive sense.
Claims
1. A method for data exchange, comprising: executing a first instruction in a first processor of a computing system, the first instruction configured to use a pointer identifying a virtual memory address used in the first processor; communicating the pointer from the first processor to a second processor of the computing system during execution of the first instruction, wherein the second processor is separate and independent from the first processor, and the first and second processors have different instruction set architectures (ISAs); communicating with an object name server of the computing system to configure an address translation structure of a memory management unit of the second processor to translate a virtual address having an identifier of an object into a physical address; as well as executing, in the second processor, a second instruction configured to access the virtual memory address using the pointer received from the first processor; wherein the virtual memory address has a predetermined number of bits including a first predetermined number of bits representing the identifier of the object and a second predetermined number of bits representing an offset of a memory location within the object; wherein the first instruction executed in the first processor constructs the pointer to identify a memory location in the computing system; and the second processor accesses the memory location in the computing system using the virtual memory address; as well as Wherein the memory location is coupled to and accessible by the second processor, and the first processor accesses the memory location via communication with the second processor. 2 . The method of claim 1 , wherein the pointer is communicated from the first processor to the second processor via a computer network. 3 . The method of claim 1 , wherein the memory location is in a memory of the second processor or a storage device in the computing system.
4. The method according to claim 1, further comprising: converting, by the memory management unit of the second processor, the virtual memory address into a physical memory address; as well as The physical memory address is accessed by the memory management unit.
5. The method according to claim 4, further comprising: loading instructions from the physical memory address into the second processor; as well as The instructions are executed in the second processor.
6. The method according to claim 4, further comprising: In response to the virtual memory address being located in a register in the second processor, loading an operand from the physical memory address into the second processor; as well as An instruction is executed on the operand in the second processor.
7. The method according to claim 6, further comprising: A calculation result is stored at the physical memory address by the first processor using the virtual memory address during the execution of the first instruction, wherein the calculation result is the operand during the execution of the instruction in the second processor.
8. The method of claim 4, wherein the virtual memory address has 128 bits; and the memory location offset has 64 bits.
9. The method of claim 1, wherein the first processor runs a first operating system and the second processor runs a second operating system different from the first operating system.
10. The method of claim 9, wherein the first operating system is Linux and the second operating system is Windows.
11. The method of claim 9, wherein the first operating system is Windows and the second operating system is Linux.
12. A non-transitory computer storage medium storing first instructions, the first instructions, when executed in a first processor of a computing system, causing the first processor to perform a method comprising: executing the first instruction in the first processor of the computing system; constructing, by the first processor, a pointer identifying a virtual memory address accessible by the first processor; communicating the pointer from the first processor to a second processor of the computing system during execution of the first instruction; as well as communicating with an object name server of the computing system to configure an address translation structure of a memory management unit of the second processor to translate a virtual address having an identifier of an object into a physical address; wherein the second processor is separate from and independent of the first processor, and the first processor and the second processor have different instruction set architectures (ISAs); wherein during execution of a second instruction in the second processor, the second processor accesses the virtual memory address according to the pointer received from the first processor; wherein the virtual memory address has a predetermined number of bits including a first predetermined number of bits representing the identifier of the object and a second predetermined number of bits representing an offset of a memory location within the object; wherein the first instruction executed in the first processor constructs the pointer to identify a memory location in the computing system; and the second processor uses the virtual memory address to access the memory location in the computing system using the pointer; as well as Wherein the memory location is coupled to and accessible by the second processor, and the first processor accesses the memory location via communication with the second processor.
13. The non-transitory computer storage medium of claim 12, wherein the pointer is communicated from the first processor to the second processor via a computer network.
14. The non-transitory computer storage medium of claim 13, wherein the virtual memory address has 128 bits, comprising the identifier of the object and a 64-bit memory location offset relative to the object.
15. A non-transitory computer storage medium storing instructions that, when executed in a computing system having a first processor and a second processor separate and independent from the first processor, cause the computing system to perform a method, the first processor and the second processor having different instruction set architectures (ISAs), the method comprising: receiving, in the second processor, a pointer from the first processor, wherein the first processor generated the pointer identifying a virtual memory address accessible by the first processor during execution of a first instruction in the first processor; communicating, by a memory management unit of the second processor, with an object name server of the computing system to configure an address translation structure of the memory management unit to translate a virtual address having an identifier of an object into a physical address; executing a second instruction in the second processor; as well as accessing the virtual memory address by the second processor according to the pointer during execution of the second instruction in the second processor, wherein the virtual memory address has a predetermined number of bits, including a first predetermined number of bits representing the identifier of the object and a second predetermined number of bits representing a memory location offset within the object; wherein the first instruction executed in the first processor constructs the pointer to identify a memory location in the computing system; and the second processor uses the virtual memory address to access the memory location in the computing system using the pointer; as well as Wherein the memory location is coupled to and accessible by the second processor, and the first processor accesses the memory location via communication with the second processor.
16. The non-transitory computer storage medium of claim 15, the method further comprising: converting, by the memory management unit of the second processor, the virtual memory address into a physical memory address; as well as The physical memory address is accessed by the memory management unit.
17. The non-transitory computer storage medium of claim 16, wherein the access of the physical memory address comprises an instruction to load an object from the physical memory address or an operand of an instruction that operates on the object.
18. The non-transitory computer storage medium of claim 16, the method further comprising: communicating, by the memory management unit of the second processor, with the object name server of the computing system to retrieve the memory location of the object in the computing system; as well as The address translation structure of the memory management unit is configured using the memory location retrieved from the object name server, wherein translation of the virtual memory address to the physical memory address is performed using the address translation structure configured using the memory location.
