WO2014173364A1 - 共享资源访问方法和装置 - Google Patents

共享资源访问方法和装置 Download PDF

Info

Publication number
WO2014173364A1
WO2014173364A1 PCT/CN2014/079451 CN2014079451W WO2014173364A1 WO 2014173364 A1 WO2014173364 A1 WO 2014173364A1 CN 2014079451 W CN2014079451 W CN 2014079451W WO 2014173364 A1 WO2014173364 A1 WO 2014173364A1
Authority
WO
WIPO (PCT)
Prior art keywords
shared resource
resource
storage location
processor core
lock
Prior art date
Application number
PCT/CN2014/079451
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2014173364A1 publication Critical patent/WO2014173364A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • G06F13/1652Handling requests for interconnection or transfer for access to memory bus based on arbitration in a multiprocessor architecture
    • G06F13/1663Access to shared memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms

Definitions

  • the present invention relates to the field of shared resource access technologies in a multi-core SOC system, and more particularly to a shared resource access method and apparatus in a multi-core SOC system.
  • each processor core can independently control devices in the system. If two or more processor cores need to access the same device, conflicts may occur. For example, the first processor cores the device. The configuration may be modified by another processor core. If there is no effective protection mechanism, it may cause device errors or even crashes.
  • One way to resolve conflicts that may occur when multiple processor cores access these shared devices is to use software to maintain a shared device state table. Each visit must first notify other processor cores not to access the table, and then look at the devices in this table that the kernel wishes to access. If it is occupied, it waits. If it is not occupied, the related information written to the core identifies the device, and finally the other core shared device status table is released.
  • the software protection method cannot guarantee that the abnormal access may cause abnormal unlocking or the lock information is destroyed.
  • Another method is to use a processor core with exclusive access instructions, and add access control units on all shared devices.
  • the system connection diagram is shown in Figure 2.
  • the access control confirms whether the access was successful based on the access status of the unit recording device.
  • the method is a method based on processor core and hardware coordination.
  • the access control unit uses the access control list, the fragment exclusive access control can be implemented.
  • the structure diagram is shown in FIG. 2 .
  • the second method has a great improvement in efficiency, it has a large dependence on the processor core.
  • the shared device needs to increase the related hardware resources.
  • the number of blocks is limited and lacks flexibility. Sex. Therefore, in order to ensure that shared devices in a multi-core SOC system can be flexibly controlled by multiple processor cores, a more efficient method of shared device conflict control is needed.
  • the embodiment of the invention provides a shared resource access method, which solves the problem of lack of suitable sharing device access conflict processing mode.
  • a shared resource access method applied to a multi-core system on a chip (SOC), comprising: a resource lock receiving a request to access a shared resource;
  • the resource lock reads a value of a storage location corresponding to the shared resource in the resource lock; and the resource lock determines whether the shared resource is currently occupied according to a value of the storage location.
  • the step of the resource lock receiving the request for accessing the shared resource includes:
  • the resource lock receives the request for accessing the shared resource sent by the processor core or the master device.
  • the method further includes:
  • the storage space of the storage controller is divided into a plurality of segments, and one or more of the segments are used as the storage space of the resource lock.
  • the method before the step of reading the value of the storage location corresponding to the shared resource in the resource lock, the method further includes:
  • a storage location is allocated for at least one shared resource in the SOC, and a storage location allocated for different shared resources is different, and the value of the storage location indicates that the shared resource to which the storage location is allocated is idle or A processor core or a master device that occupies a shared resource to which the storage location is allocated.
  • the resource lock determines, according to the value of the storage location, that the shared resource is currently After the step of being occupied, it also includes:
  • the resource lock returns the value of the storage location to the processor core or the master device when the shared resource is occupied.
  • the resource lock when the shared resource is occupied, further includes:
  • the processor core or the master device enters a waiting queue of the shared resource.
  • the resource lock when the shared resource is occupied, further includes:
  • the processor core or the master device waits for a preset time interval before accessing the shared resource.
  • the resource lock further includes:
  • the resource lock When the shared resource is idle, the resource lock writes a unique location identifier of the processor core or the master device in the system to the storage location, indicating that the processor core or the master device is occupied.
  • the shared resource
  • the resource lock replies to the processor core or the master device, indicating that the processor core or the master device has completed locking the shared resource.
  • the method further includes:
  • the processor core or the master device After completing the use of the shared resource, the processor core or the master device sends a write command to the resource lock for the storage location of the shared resource, indicating that the shared resource is released.
  • the method further includes: the resource lock Checking whether a unique location identifier of a processor core or a master device that sends the write command matches a value of a storage location of the shared resource;
  • the resource lock clears the value of the storage location of the shared resource when the check result is a match, indicating that the shared resource is idle.
  • the resource lock detects the uniqueness of the processor core or the master device that sends the write command. After the step of matching the location identifier with the value of the storage location of the shared resource, the method further includes: when the check result is a mismatch, the resource lock does not modify the value of the storage location, and sends the write command The processor core or master device returns a write failure response.
  • the embodiment of the invention further provides a shared resource access device, which is applied to a multi-core system on chip
  • SOC comprising: a request receiving module, a storage control module, and a determining module, wherein: the request receiving module is configured to: receive a request for accessing a shared resource; and the storage control module is configured to: read the resource lock The value of the storage location corresponding to the shared resource;
  • the determining module is configured to: determine, according to the value of the storage location, whether the current shared resource is occupied.
  • the device further includes:
  • a storage module configured to: allocate, in the resource lock, a storage location for at least one shared resource in the SOC system, where a storage location allocated for different shared resources is different, and a value of the storage location indicates the storage location The shared resource to which the shared resource is allocated or the processor core or the master device that occupies the shared resource to which the storage location is allocated.
  • the storage control module is further configured to: when the shared resource is occupied, return a value of the storage location to the processor core or a master device, or
  • the resource lock When the shared resource is idle, the resource lock writes a unique location identifier of the processor core or the master device in the system to the storage location, indicating that the processor core or the master device is occupied.
  • the shared resource When the shared resource is idle, the resource lock writes a unique location identifier of the processor core or the master device in the system to the storage location, indicating that the processor core or the master device is occupied. The shared resource.
  • the storage control module is further configured to: receive a write command sent by the processor core or the master device to the storage location of the shared resource after completing using the shared resource; Whether the unique location identifier of the processor core or the master device of the write command matches the value of the storage location of the shared resource, and when the check result is a match, the value of the storage location of the shared resource is cleared, and when the check result is not When matching, the value of the storage location is not modified and a write failure response is returned to the processor core or the master device that issued the write command.
  • Embodiments of the present invention provide a shared resource access method and apparatus.
  • a resource lock is used to manage a shared resource usage, and a resource lock receives a request to access a shared resource, and reads the resource lock. Determining a value of a storage location corresponding to the shared resource, and determining whether the current shared resource is occupied according to the value of the storage location, providing a reliable shared resource management mechanism, where the additional hardware consumption is minimized Achieve high-efficiency and high-reliability shared resource management, and solve the problem of lack of suitable shared device access conflict handling methods.
  • FIG. 1 is a schematic structural view of a general SOC system in the related art
  • FIG. 2 is a schematic structural diagram of implementing a shared resource device access conflict by using a hardware manner in the related art
  • FIG. 3 is a schematic structural diagram of implementing a shared resource device access conflict by using the device and method designed by the present invention in Embodiment 1 of the present invention;
  • FIG. 4 is a schematic diagram showing the internal structure of a resource lock provided in Embodiment 1 of the present invention.
  • FIG. 5 is a flowchart of a resource lock and lock operation in a shared resource access method according to Embodiment 1 of the present invention.
  • FIG. 6 is a flowchart of a resource lock unlocking operation in a shared resource access method according to Embodiment 1 of the present invention.
  • FIG. 7 is a flowchart of a shared resource access method according to Embodiment 1 of the present invention
  • FIG. 8 is a schematic structural diagram of a shared resource access device according to Embodiment 2 of the present invention
  • FIG. 9 is a schematic diagram of the present invention.
  • the management of shared resources based on pure software is not efficient, and the device status table may be incorrectly modified by the master device such as DMA and cannot be known.
  • the efficiency is greatly improved, it has a large dependence on the processor core.
  • the shared device needs to increase the related hardware resources, and the number of blocks for the shared device that wants to have block control. Limited, lacking flexibility. Therefore, in order to ensure that shared devices in a multi-core SOC system can be flexibly controlled by multiple processor cores, A more efficient way to share device conflict control.
  • the embodiment of the invention provides a shared resource access method for controlling a shared resource access conflict in a multi-core SOC system, and a system connection diagram thereof is shown in FIG. Enables multiple processor cores to be highly flexible without conflicts and efficient use of shared devices.
  • the processor core uses only a common processor to read and write instructions, and maintains an extensible shared resource list by using software to record the corresponding relationship between the shared resource and the storage location in the resource lock.
  • a storage location is allocated for at least one shared resource in the SOC system, and a storage location allocated for different shared resources is different, and the value of the storage location indicates that the shared resource to which the storage location is allocated is idle or occupied
  • the processor core or master device of the shared resource to which the storage location is assigned For example: There are 2 UARTs in the system, and the location of the resource lock is 0, 1. Then the CPU or other master device (master) knows where to lock it when it wants to access it. The same is true for general storage space.
  • the resource lock control logic can also support dynamic partitioning of the lock area, and the resource lock space can be increased when there are many resources that need to be locked.
  • the resource lock is based on a common storage controller, and special control logic is added (for example, the storage space of the storage controller is divided into multiple segments, and a plurality of segments are taken as storage space of the resource lock according to actual needs, and the remaining The space can be used by others, and realize the use of ordinary read instructions to realize the shared resource hardware lock.
  • other processor cores can know the status of the device when requesting the shared device, and ensure that the device can only be locked.
  • the processor core is written and unlocked, and its internal structure is shown in FIG. The specific work process is as follows:
  • processor core 0 When a certain processor core in the system, for example, processor core 0 needs to access the shared resource 0, according to the storage location of the shared resource list device in the resource lock, a request for accessing the shared resource is issued, Specifically, the read command is issued to the resource lock in the system, and the value of the storage location corresponding to the shared resource in the resource lock is read. The resource lock reads out the value of the storage location, and determines whether the current shared resource is occupied according to the value of the storage location.
  • the resource lock control logic writes the unique location identifier of the processor core that initiated the access in the system to the storage location, indicating that the processor core or the master device occupies the shared resource.
  • the resource lock replies with a response to the processor core 0, indicating that the processor core 0 has completed locking the shared resource, for example: returning a value of 0 or the specific value to the processor core 0, completing the addition Lock action. That is, at this time, the processor core 0 obtains the control right of the shared resource 0, and can start using the shared resource 0.
  • the flow chart of the resource lock locking process is shown in Figure 5.
  • the resource lock returns to the processor core the system unique location identifier value of the processor core 0 that is occupying the shared resource device, and the other The processor core knows that the shared resource cannot currently be used. At this time, the processor core can access the shared resource waiting queue or timing (such as waiting for a preset time interval) to access the shared resource 0.
  • the processor core 0 After the shared resource 0 is used, the processor core 0 that obtains the control of the shared resource device sends a write command for the storage location of the shared resource to the resource lock, indicating that the shared resource is released, and the resource lock is received. After the write command, it is checked whether the unique location identifier of the processor core or the master device that sends the write command matches the value of the storage location of the shared resource, that is, whether the processor core that sends the write command is currently obtaining the shared resource. 0 control of the processor core.
  • the check result is a match, the value of the storage location of the shared resource 0 is cleared, indicating that the shared resource is free to release the shared resource 0, and the write success is returned to the processor core 0; if the check result is not matched , indicating that the processor core that does not have the control of the shared resource 0 issues a write command to the storage location representing the shared resource 0 lock, at which time the write command is not written to the storage location, and the resource lock is sent to the issuing location.
  • the processor core that wrote the command returns a write failure response, and the unlocking of the shared resource 0 fails. This ensures the uniqueness of the unlock.
  • the flow chart of the resource lock unlocking process is shown in Figure 6.
  • the processor core is used as a shared resource requesting party as an example.
  • the entity that initiates the shared resource request may be any master control device or processor core.
  • the main control device for example, the main control chip
  • the main body to initiate the shared resource request to the resource lock
  • the implementation principle of completing the conflict of the shared resource usage is the same, and will not be repeatedly described herein.
  • the embodiment of the present invention provides a shared resource access device, which includes the following basic units: an interface module 81, an instruction conversion module 82, a storage control module 83, and a storage module 84.
  • the storage module in the embodiment of the present invention can also be used as a general storage of the system to provide system performance.
  • the interface module can use matching protocol support according to the SOC system requirement; the instruction conversion module 82 can generate an access command according to the access type for unlocking or normal storage access; the storage control module 83 is configured to receive the instruction from the instruction conversion module, The data is sent to the storage controller and is responsible for sending the data returned by the storage controller; the storage module 84 is required to store the lock information (eg, the value of the storage location) or the normal data according to the instructions from the interface.
  • the lock information eg, the value of the storage location
  • the specific working process is as follows:
  • processor core 0 needs to access shared resource 0, according to the shared resource list device
  • the location in the resource lock issuing a read command to the resource lock in the system.
  • the instruction conversion module first interprets whether the instruction is a lock, unlock or normal memory access.
  • the instruction conversion module first generates a read command and sends it to the storage control module to read the value of the storage unit at the storage location. If the read value is 0 or a specific value, it proves that the device is not occupied.
  • the instruction conversion module will generate an additional write instruction to the storage control module, and the processor that accesses the resource lock is in the system.
  • the unique location identifier is written to the storage unit, and a value of 0 or a specific value is returned to the processor core 0 to complete the locking operation. That is, at this time, the processor core 0 obtains the control right of the shared resource, and can start using the shared resource 0.
  • the storage module returns the location value of the processor core 0 that is occupying the shared resource device.
  • the instruction conversion module will not generate additional write instructions, but will directly send the value returned from the storage module to the processor core.
  • the other processor cores know that the shared resource is currently unavailable.
  • the software can enter the wait or time to access the device.
  • the processor core 0 that obtains the control of the shared resource device issues a write command to unlock the device on behalf of the shared resource, and after receiving the write command, the instruction conversion module first converts the write command into a read. The command determines if the unlock is legal.
  • the instruction conversion module If the return value from the storage module matches the unique identifier of the processor requesting to be unlocked, the instruction conversion module generates a write command to the storage control module, clears the value at the storage location, that is, releases the shared resource device, and returns the write success to The processor core 0 goes; if the processor core that is not the control of the shared resource device issues a write command to the storage location representing the shared resource 0 lock, the resource lock detects that the location information does not match, and the write command does not It is actually written to the storage location, and the write failure fails to the processor core or the master device that issued the write command, and the unlock fails. This ensures the uniqueness of the unlock.
  • the shared resource access device may be integrated into the resource lock in the first embodiment of the present invention, and the corresponding function is completed by the resource lock.
  • the embodiment of the present invention provides a shared resource access device, and the structure thereof is as shown in FIG. 9, and includes: a request receiving module 91, a storage control module 92, and a determining module 93, where
  • the request receiving module 91 is configured to: receive a request to access a shared resource
  • the storage control module 92 is configured to: read a value of a storage location corresponding to the shared resource in the resource lock;
  • the determining module 93 is configured to: determine, according to the value of the storage location, whether the current shared resource is occupied.
  • the device further includes:
  • a storage module 94 configured to: allocate, in the resource lock, a storage location for at least one shared resource in the SOC system, where a storage location of a different shared resource is different, the value of the storage location indicating the storage location The shared resource to which the shared resource is allocated or the processor core or the master device that occupies the shared resource to which the storage location is allocated.
  • the storage control module 92 is further configured to: return the value of the storage location to the processor core or the master control device when the shared resource is occupied, or
  • the resource lock When the shared resource is idle, the resource lock writes a unique location identifier of the processor core or the master device in the system to the storage location, indicating that the processor core or the master device is occupied.
  • the shared resource When the shared resource is idle, the resource lock writes a unique location identifier of the processor core or the master device in the system to the storage location, indicating that the processor core or the master device is occupied. The shared resource.
  • the storage control module 92 is further configured to: after receiving a write command for the storage location of the shared resource sent by the processor core or the master device after completing using the shared resource, check Whether the unique location identifier of the processor core or the master device that sends the write command matches the value of the storage location of the shared resource, and when the check result is a match, the value of the storage location of the shared resource is cleared, when checking When the result is a mismatch, a write failure response is returned to the processor core or the master device that issued the write command.
  • the shared resource access device shown in FIG. 9 can be integrated into the resource lock provided by the first embodiment of the present invention, and the corresponding function is completed by the resource lock.
  • Embodiments of the present invention provide a shared resource access method and apparatus.
  • a resource lock is used to manage a shared resource usage, and a resource lock receives a request to access a shared resource, and reads the resource lock. Determining a value of a storage location corresponding to the shared resource, and determining whether the current shared resource is occupied according to the value of the storage location, providing a reliable shared resource management mechanism, where the additional hardware consumption is minimized Achieve high-efficiency and high-reliability shared resource management, and solve the problem of lack of suitable shared device access conflict handling methods.
  • the pure hardware solution avoids the dependence on the processor core, and also increases the reusability of the original device, reduces the new development, and has More flexibility, so it has a high value in use.
  • all or part of the steps of the foregoing embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the invention is not limited to any particular combination of hardware and software.
  • the various devices/function modules/functional units in the above embodiments may be implemented using a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • Each device/function module/functional unit in the above embodiments can be stored in a computer readable storage medium when implemented in the form of a software function module and sold or used as a standalone product.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the embodiment of the invention provides a reliable shared resource management mechanism, realizes high-efficiency and high-reliability shared resource management under the premise of minimizing additional hardware consumption, and solves the lack of suitable shared device access conflict processing mode. problem. Therefore, it has strong industrial applicability.

Landscapes

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

Abstract

一种共享资源访问方法和装置。涉及计算机应用领域;解决了缺乏适合的共享设备访问冲突处理方式的问题。该方法包括:资源锁接收访问共享资源的请求;所述资源锁读取该资源锁中所述共享资源对应的存储位置的值;所述资源锁根据所述存储位置的值,判定所述共享资源当前是否被占用。

Description

共享资源访问方法和装置
技术领域
本发明涉及多核 SOC***中的共享资源访问技术领域,尤其涉及一种多 核 SOC***中的共享资源访问方法和装置。
背景技术
在 SOC***中由于***的复杂程度越来越高,单个处理器核已经不能满 足性能和控制的需求, 因此在相关的片上***(SOC ) 中通常会使用多个相 同的处理核或者不同的处理器核进行控制和运算,其结构示意图如图 1所示。 同时 SOC***中还会有很多通用外设和存储设备, 例如, 通用异步收发传输 器 (UART ) 、 内部集成电路(I2C ) 、 通用输入 /输出 (GPIO ) 、 串行外设 接口 (SPI )和双倍速率同步动态随机存储器(DDR )等等。 但是在多核*** 中每一个处理器核都可以独立控制***中的设备, 如果两个或多个处理器核 需要访问同一个设备时会产生冲突现象, 例如, 第一个处理器核对该设备的 配置可能会被另外的处理器核修改, 如果没有有效的保护机制, 可能会导致 设备错误甚至出现死机的可能。
为了解决多个处理器核访问这些共享设备可能产生的冲突现象, 其中一 种方法是使用软件去维护一个共享设备状态表。 每次访问要先通知其他处理 器核不要访问这个表, 然后再去看一下这个表中本核希望访问的设备是否被 占用。 如果被占用, 则等待, 如未被占用, 写入本核的相关信息标识占用本 设备, 最后通知其他核共享设备状态表释放。 但软件保护方式不能保证异常 访问可能导致的异常解锁或锁信息被破坏。
另外一个方法就是使用具有带独占访问指令的处理器核, 并且在所有的 共享设备上加入访问控制单元, 其***连接示意图如图二所示。 当处理器核 发出独占访问时, 访问控制根据单元记录设备的访问状态确认该访问是否成 功。 该方法是一种基于处理器核和硬件协调的方式, 当访问控制单元釆用访 问控制表时可实现分片独占访问控制, 其结构示意图如图 2所示。 这些方法虽然都可以解决多核***中共享设备访问冲突的情况, 但第一 种方法由于是基于纯软件的维护, 效率不高。 而且设备状态表有可能被直接 内存存取(DMA )等主控设备(master )错误修改而无法知道的情况。 第二 种方法虽然效率有很大提高, 但对处理器核有较大的依赖性, 同时共享设备 需要增加相关硬件资源,对于希望有分块控制的共享设备来说分块数量有限, 缺乏灵活性。 因此为了保证多核 SOC***中共享设备能被多个处理器核灵活 控制, 需要一种更高效的共享设备冲突控制的方法。
发明内容
本发明实施例提供了一种共享资源访问方法, 解决了缺乏适合的共享设 备访问冲突处理方式的问题。
一种共享资源访问方法, 应用于多核片上***(SOC ) 中, 包括: 资源锁接收访问共享资源的请求;
所述资源锁读取所述资源锁中所述共享资源对应的存储位置的值; 以及 所述资源锁根据所述存储位置的值,判定所述共享资源当前是否被占用。 可选的, 所述资源锁接收访问共享资源的请求的步骤包括:
所述资源锁接收处理器核或主控设备发送的所述访问共享资源的请求。 可选的, 所述方法还包括:
将存储控制器的存储空间划分为多个分段, 将其中的一个或多个分段作 为所述资源锁的存储空间。
可选的, 所述读取资源锁中所述共享资源对应的存储位置的值的步骤之 前, 还包括:
在所述资源锁中, 为所述 SOC中的至少一个共享资源分配存储位置, 为 不同共享资源分配的存储位置不同, 所述存储位置的值指示所述存储位置被 分配到的共享资源空闲或占用所述存储位置被分配到的的共享资源的处理器 核或主控设备。
可选的, 所述资源锁根据所述存储位置的值, 判定所述共享资源当前是 否被占用的步骤之后, 还包括:
所述资源锁在所述共享资源被占用时, 返回所述存储位置的值至所述处 理器核或主控设备。
可选的, 所述资源锁在所述共享资源被占用时, 返回所述存储位置的值 至所述处理器核或主控设备的步骤之后, 还包括:
所述处理器核或主控设备进入所述共享资源的等待队列。
可选的, 所述资源锁在所述共享资源被占用时, 返回所述存储位置的值 至所述处理器核或主控设备的步骤之后, 还包括:
所述处理器核或主控设备等待预置时间间隔后再访问所述共享资源。 可选的, 所述资源锁根据所述存储位置的值, 判定当前所述共享资源是 否被占用的步骤之后, 还包括:
在所述共享资源空闲时, 所述资源锁将发起访问的处理器核或主控设备 在***中的唯一位置标识写入到所述存储位置中, 表明所述处理器核或主控 设备占用所述共享资源; 以及
所述资源锁向所述处理器核或主控设备回复响应, 指示所述处理器核或 主控设备已完成对所述共享资源的加锁。
可选的, 所述资源锁向所述处理器核或主控设备回复响应, 指示所述处 理器核或主控设备已完成对所述共享资源的加锁的步骤之后, 还包括:
所述处理器核或主控设备在完成使用所述共享资源后, 向所述资源锁发 送针对所述共享资源的存储位置的写命令, 指示释放所述共享资源。
可选的, 所述处理器核或主控设备在完成使用所述共享资源后, 向所述 资源锁发送针对所述共享资源的存储位置的写命令的步骤之后, 还包括: 所述资源锁检查发送所述写命令的处理器核或主控设备的唯一位置标识 与所述共享资源的存储位置的值是否匹配; 以及
所述资源锁在检查结果为匹配时, 清除所述共享资源的存储位置的值, 表明所述共享资源空闲。
可选的, 所述资源锁检测发送所述写命令的处理器核或主控设备的唯一 位置标识与所述共享资源的存储位置的值是否匹配的步骤之后, 还包括: 所述资源锁在检查结果为不匹配时, 不修改所述存储位置的值, 并向发 出所述写命令的处理器核或主控设备返回写失败响应。
本发明实施例还提供了一种共享资源访问装置, 应用于多核片上***
( SOC ) 中, 包括: 请求接收模块、 存储控制模块以及判定模块, 其中: 所述请求接收模块设置成: 接收访问共享资源的请求; 所述存储控制模块设置成: 读取资源锁中所述共享资源对应的存储位置 的值; 以及
所述判定模块设置成: 根据所述存储位置的值, 判定当前所述共享资源 是否被占用。
可选的, 所述装置还包括:
存储模块, 其设置成: 在所述资源锁中, 为所述 SOC***中的至少一个 共享资源分配存储位置, 为不同共享资源分配的存储位置不同, 所述存储位 置的值指示所述存储位置被分配到的共享资源空闲或占用所述存储位置被分 配到的共享资源的处理器核或主控设备。
可选的, 所述存储控制模块还设置成: 在所述共享资源被占用时, 返回 所述存储位置的值至所述处理器核或主控设备, 或,
在所述共享资源空闲时, 所述资源锁将发起访问的处理器核或主控设备 在***中的唯一位置标识写入到所述存储位置中, 表明所述处理器核或主控 设备占用所述共享资源。
可选的, 所述存储控制模块还设置成: 接收到所述处理器核或主控设备 在完成使用所述共享资源后发送的针对所述共享资源的存储位置的写命令; 检查发送所述写命令的处理器核或主控设备的唯一位置标识与所述共享 资源的存储位置的值是否匹配, 当检查结果为匹配时, 清除所述共享资源的 存储位置的值, 当检查结果为不匹配时, 不修改所述存储位置的值并向发出 所述写命令的处理器核或主控设备返回写失败响应。 本发明实施例提供了一种共享资源访问方法和装置, 在多核 SOC *** 中, 通过资源锁对共享资源的使用情况进行管理, 资源锁接收访问共享资源 的请求, 读取所述资源锁中所述共享资源对应的存储位置的值, 并根据所述 存储位置的值, 判定当前所述共享资源是否被占用, 提供了一种可靠的共享 资源管理机制, 在尽可能减少额外硬件消耗的前提下, 实现了高效率高可靠 性的共享资源管理, 解决了缺乏适合的共享设备访问冲突处理方式的问题。 附图概述
图 1是相关技术下普通 SOC***的结构示意图;
图 2是相关技术下使用硬件方式实现共享资源设备访问冲突的结构示意 图;
图 3是本发明的实施例一中使用本发明设计的设备和方法实现共享资源 设备访问冲突的结构示意图;
图 4是本发明的实施例一中提供的资源锁的内部结构示意图;
图 5是本发明的实施例一提供的一种共享资源访问方法中资源锁加锁工 作流程图;
图 6是本发明的实施例一提供的一种共享资源访问方法中资源锁解锁工 作流程图;
图 7是本发明的实施例一提供的一种共享资源访问方法的处理流程图; 图 8是本发明的实施例二提供的一种共享资源访问装置的结构示意图; 图 9是本发明的实施例三提供的一种共享资源访问装置的结构示意图。
本发明的较佳实施方式
基于纯软件的共享资源管理,效率不高, 而且设备状态表有可能被 DMA 等主控设备错误修改而无法知道的情况。 基于纯硬件的共享资源管理, 虽然 效率有很大提高, 但对处理器核有较大的依赖性, 同时共享设备需要增加相 关硬件资源, 对于希望有分块控制的共享设备来说分块数量有限, 缺乏灵活 性。 因此为了保证多核 SOC***中共享设备能被多个处理器核灵活控制, 需 要一种更高效的共享设备冲突控制的方法。
为了解决上述问题, 本发明的实施例提供了一种共享资源访问方法和装 置。 下文中将结合附图对本发明的实施例进行详细说明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。
首先结合附图, 对本发明的实施例一进行说明。
本发明实施例提出了一种在多核 SOC ***中对共享资源访问冲突进行 控制的共享资源访问方法, 其***连接示意图如图 3所示。 使多个处理器核 在不产生冲突并高效使用各个共享设备的前提下, 具有较高的灵活性。
本发明实施例中, 处理器核只使用普通的处理器读写指令, 通过软件实 现维护一个可扩展的共享资源列表, 用于记录资源锁内共享资源与存储位置 的对应关系, 在所述资源锁中, 为所述 SOC***中的至少一个共享资源分配 存储位置, 为不同共享资源分配的存储位置不同, 所述存储位置的值指示所 述存储位置被分配到的共享资源空闲或占用所述存储位置被分配到的共享资 源的处理器核或主控设备。例如: ***中有 2个 UART,在资源锁的位置是 0、 1 , 那么 CPU或者其他主控设备 ( master )要去访问的时候就知道该去上锁那 个地方了。 对于通用的存储空间也是一样道理。
使用一个特殊控制的存储控制器为资源锁提供存储空间 , 软硬件协同 , 高效的防止共享资源访问冲突出现, 并可实现单一共享资源设备灵活分块锁 定功能。 另外, 资源锁控制逻辑还可以支持动态划分锁区域, 当需要锁住的 资源较多的情况下可以增加资源锁的空间。 其中资源锁以普通的存储控制器 为基础, 增加特殊控制逻辑(如将该存储控制器的存储空间划分为多个分段, 根据实际需求从中取若干分段作为资源锁的存储空间, 而剩余的空间贝 'J可做 他用) , 实现使用普通的读指令实现共享资源硬件加锁, 加锁后其他处理器 核请求该共享设备时可知道该设备状态, 并保证设备只能被加锁的处理器核 进行写解锁, 其内部结构如图 4所示。 具体工作过程如下:
当***中某个处理器核, 例如, 处理器核 0需要访问共享资源 0的时候, 根据共享资源列表设备在资源锁中的存储位置, 发出访问共享资源的请求, 具体的, 发出读指令到***中的资源锁, 读取资源锁中该共享资源对应的存 储位置的值。 资源锁将存储位置的值读出, 根据所述存储位置的值, 判定当 前所述共享资源是否被占用。
如果读出值为 0或某一特定值(可以为任意值, 只要资源锁与处理器核 事先约定了该值代表相应的共享资源没被占用即可) , 则证明该共享资源 0 没有被占用, 是空闲的。 此时, 资源锁控制逻辑将发起访问的处理器核在系 统中的唯一位置标识写入到所述存储位置中, 表明所述处理器核或主控设备 占用所述共享资源。 同时, 资源锁向所述处理器核 0回复响应, 指示所述处 理器核 0已完成对所述共享资源的加锁, 例如: 将 0值或者该特定值返回到 处理器核 0, 完成加锁动作。 即此时处理器核 0获得该共享资源 0的控制权, 可以开始使用该共享资源 0。 资源锁加锁过程流程图如图 5所示。
如果此时还有其他处理器核希望访问该共享资源, 由于共享资源已被占 用, 资源锁会向该处理器核返回正在占用该共享资源设备的处理器核 0的系 统唯一位置标识值, 其他处理器核就知道该共享资源目前不能被使用。 此时, 该处理器核可以进入所述共享资源的等待队列或者定时(如等待预置时间间 隔后 )再来访问该共享资源 0。
当共享资源 0被使用完后, 获得该共享资源设备控制权的处理器核 0向 所述资源锁发送针对所述共享资源的存储位置的写命令, 指示释放所述共享 资源, 资源锁接收到该写命令后检查发送所述写命令的处理器核或主控设备 的唯一位置标识与所述共享资源的存储位置的值是否匹配, 即检查发送写命 令的处理器核是否为当前获得共享资源 0的控制权的处理器核。 如果检查结 果为匹配, 则清除所述共享资源 0的存储位置的值, 表明所述共享资源空闲 释放该共享资源 0, 并返回写入成功到处理器核 0 中去; 如果检查结果为不 匹配, 则表明非具有该共享资源 0控制权的处理器核发出写命令到代表该共 享资源 0锁的存储位置, 此时该写命令不会被写到该存储位置, 且资源锁会 向发出所述写命令的处理器核返回写失败响应,对该共享资源 0的解锁失败。 从而保证加解锁的唯一性。 资源锁解锁过程流程图如图 6所示。
另外, 由于使用软硬件共同协作, 因此可以对单一设备进行多段地址独 立加锁操作, 并且可以自由的控制分段的数量, 分段数的唯一限制仅来自于 资源锁使用的存储控制器的容量。软件对资源锁使用控制流程图如图 7所示。 需要说明的是, 本发明实施例中以处理器核为共享资源请求方为例进行 了说明, 在实际应用中, 发起共享资源请求的主体可以是任意的主控设备或 处理器核。 例如芯片作为从片时, 其他主控芯片可能通过本芯片的高速串行 输入输出接口 (SRIO )进行共享资源的访问。 在以主控设备(如, 主控芯片) 作为主体发起共享资源请求至该资源锁时, 其完成对共享资源使用冲突的实 现原理是相同的, 在此不作重复说明。
下面结合附图, 对本发明的实施例二进行说明。
如图 8所示, 本发明实施例提供了一种共享资源访问装置, 包含了以下 基本单元: 接口模块 81、 指令转换模块 82、 存储控制模块 83、 存储模块 84。 为了更高效的利用装置中的存储模块 84, 本发明实施例中存储模块还可以用 做为***普通存储, 提供***性能。
其中接口模块可以根据 SOC***需要使用相匹配的协议支持;指令转换 模块 82可根据访问类型为加解锁或普通存储访问进行访问命令的生成;存储 控制模块 83 设置成接收从指令转换模块过来指令、 数据发送到存储控制器 中, 并负责将存储控制器返回的数据送出; 存储模块 84根据接口过来的指令 要求用于存储锁信息 (如, 存储位置的值)或普通数据。
当作为共享资源访问冲突控制用时, 其具体工作过程如下: 当***中多 处理器核中的某个处理器核, 例如, 处理器核 0需要访问共享资源 0的时候, 根据共享资源列表设备在资源锁中的位置, 发出读指令到***中的资源锁。 指令转换模块首先会判读该指令是加锁、 解锁或是普通存储访问, 当为加锁 访问时, 指令转换模块首先产生一个读指令送到存储控制模块中将存储位置 上存储单元的值读出, 如果当读出值为 0或某一特定值, 则证明该设备没有 被占用, 此时指令转换模块将产生一条额外的写指令到存储控制模块, 将访 问资源锁的处理器在***中的唯一位置标识写入到该存储单元中, 同时将 0 值或者某一特定值返回到处理器核 0, 完成加锁动作。 即此时处理器核 0获 得该共享资源的控制权, 可以开始使用该共享资源 0。 如果此时还有其他处理器核希望访问该共享资源, 指令转换模块发出读 命令后, 存储模块会返回正在占用该共享资源设备的处理器核 0的位置值。 此时指令转换模块将不会再产生额外的写指令, 而直接将从存储模块中返回 的值送会该处理器核。 此时, 其他处理器核就知道该共享资源目前不能被使 用。 此时软件可以进入等待或者定时再来访问该设备。
当共享资源 0被使用完后, 获得该共享资源设备控制权的处理器核 0发 出写命令到代表该共享资源设备解锁, 指令转换模块接收到该写命令后, 首 先将这个写指令转换为读指令确定该解锁是否合法。 如果从存储模块的返回 值和请求解锁的处理器唯一标识匹配, 则指令转换模块产生写命令到存储控 制模块, 清除该存储位置上的值, 即释放该共享资源设备, 并返回写入成功 到处理器核 0中去; 如果非该共享资源设备控制权的处理器核发出写命令到 代表该共享资源 0锁的存储位置, 资源锁会检测到位置信息不匹配, 此时该 写命令不会被真的写到该存储位置, 并返回写失败到发出写命令的处理器核 或主控设备, 解锁失败。 从而保证加解锁的唯一性。
当作为普通存储访问时, 指令转换模块通过锁存储和普通存储的分界寄 存器确定为普通存储区访问时, 则不会进行任何的检查和指令转换工作, 而 直接将读写指令发送到存储控制模块中进行存储器的读写操作。 由于此过程 为纯硬件操作, 锁空间和普通存储空间的访问无需任何的软件配置或转换即 可实现, 具有很高的灵活性。
上述共享资源访问装置可集成于本发明实施例一中的资源锁内, 由资源 锁完成相应功能。
下面结合附图, 对本发明的实施例三进行说明。
本发明实施例提供了一种共享资源访问装置, 其结构如图 9所示, 包括: 请求接收模块 91、 存储控制模块 92, 以及判定模块 93 , 其中,
所述请求接收模块 91设置成: 接收访问共享资源的请求;
所述存储控制模块 92设置成:读取资源锁中所述共享资源对应的存储位 置的值; 所述判定模块 93设置成: 根据所述存储位置的值, 判定当前所述共享资 源是否被占用。
可选的, 该装置还包括:
存储模块 94, 其设置成: 在所述资源锁中, 为所述 SOC***中的至少一 个共享资源分配存储位置, 为不同共享资源的存储位置不同, 所述存储位置 的值指示所述存储位置被分配到的共享资源空闲或占用所述存储位置被分配 到的共享资源的处理器核或主控设备。
可选的, 所述存储控制模块 92还设置成: 在所述共享资源被占用时, 返 回所述存储位置的值至所述处理器核或主控设备, 或,
在所述共享资源空闲时, 所述资源锁将发起访问的处理器核或主控设备 在***中的唯一位置标识写入到所述存储位置中, 表明所述处理器核或主控 设备占用所述共享资源。
可选的, 所述存储控制模块 92还设置成: 在接收到所述处理器核或主控 设备在完成使用所述共享资源后发送的针对所述共享资源的存储位置的写命 令后, 检查发送所述写命令的处理器核或主控设备的唯一位置标识与所述共 享资源的存储位置的值是否匹配, 当检查结果为匹配时, 清除所述共享资源 的存储位置的值, 当检查结果为不匹配时, 向发出所述写命令的处理器核或 主控设备返回写失败响应。
图 9所示的共享资源访问装置, 能够集成于本发明实施例一提供的资源 锁中, 由资源锁完成相应功能。
本发明的实施例提供了一种共享资源访问方法和装置,在多核 SOC*** 中, 通过资源锁对共享资源的使用情况进行管理, 资源锁接收访问共享资源 的请求, 读取该资源锁中所述共享资源对应的存储位置的值, 并根据所述存 储位置的值, 判定当前所述共享资源是否被占用, 提供了一种可靠的共享资 源管理机制, 在尽可能减少额外硬件消耗的前提下, 实现了高效率高可靠性 的共享资源管理, 解决了缺乏适合的共享设备访问冲突处理方式的问题。
利用了软硬件结合的方式高效解决了多核 SOC ***中共享资源设备多 核同时访问产生冲突的问题, 较纯软件的解决方式性能有很大提升, 较纯硬 件的解决方式避免了对处理器核的依赖, 也能增加原设备的可重用性减少新 开发, 并且具有更高灵活性, 因此具有很高的使用价值。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计 算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中, 所述计算机程序在相应的硬件平台上(如***、 设备、 装置、 器件等)执行, 在执行时, 包括方法实施例的步骤之一或其组合。
可选地, 上述实施例的全部或部分步骤也可以使用集成电路来实现, 这 些步骤可以被分别制作成一个个集成电路模块, 或者将它们中的多个模块或 步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任何特定的硬 件和软件结合。
上述实施例中的各装置 /功能模块 /功能单元可以釆用通用的计算装置来 实现, 它们可以集中在单个的计算装置上, 也可以分布在多个计算装置所组 成的网络上。
上述实施例中的各装置 /功能模块 /功能单元以软件功能模块的形式实现 并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。 上述提到的计算机可读取存储介质可以是只读存储器, 磁盘或光盘等。
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想 到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范 围应以权利要求所述的保护范围为准。
工业实用性
本发明实施例提供了一种可靠的共享资源管理机制, 在尽可能减少额外 硬件消耗的前提下, 实现了高效率高可靠性的共享资源管理, 解决了缺乏适 合的共享设备访问冲突处理方式的问题。 因此具有较强的工业实用性。

Claims

权 利 要 求 书
1、 一种共享资源访问方法, 应用于多核片上***( S0C ) 中, 包括: 资源锁接收访问共享资源的请求;
所述资源锁读取所述资源锁中所述共享资源对应的存储位置的值; 以及 所述资源锁根据所述存储位置的值,判定所述共享资源当前是否被占用。
2、 根据权利要求 1所述的共享资源访问方法, 其中, 所述资源锁接收访 问共享资源的请求的步骤包括:
所述资源锁接收处理器核或主控设备发送的所述访问共享资源的请求。
3、 根据权利要求 1所述的共享资源访问方法, 所述方法还包括: 将存储控制器的存储空间划分为多个分段, 将其中的一个或多个分段作 为所述资源锁的存储空间。
4、 根据权利要求 1或 3所述的共享资源访问方法, 其中, 所述读取资源 锁中所述共享资源对应的存储位置的值的步骤之前, 还包括:
在所述资源锁中, 为所述 SOC中的至少一个共享资源分配存储位置, 为 不同共享资源分配的存储位置不同, 所述存储位置的值指示所述存储位置被 分配到的共享资源空闲或占用所述存储位置被分配到的共享资源的处理器核 或主控设备。
5、 根据权利要求 4所述的共享资源访问方法, 其中, 所述资源锁根据所 述存储位置的值, 判定所述共享资源当前是否被占用的步骤之后, 还包括: 所述资源锁在所述共享资源被占用时, 返回所述存储位置的值至所述处 理器核或主控设备。
6、 根据权利要求 5所述的共享资源访问方法, 其中, 所述资源锁在所述 共享资源被占用时, 返回所述存储位置的值至所述处理器核或主控设备的步 骤之后, 还包括:
所述处理器核或主控设备进入所述共享资源的等待队列。
7、 根据权利要求 5所述的共享资源访问方法, 其中, 所述资源锁在所述 共享资源被占用时, 返回所述存储位置的值至所述处理器核或主控设备的步 骤之后, 还包括:
所述处理器核或主控设备等待预置时间间隔后再访问所述共享资源。
8、 根据权利要求 4所述的共享资源访问方法, 其中, 所述资源锁根据所 述存储位置的值, 判定当前所述共享资源是否被占用的步骤之后, 还包括: 在所述共享资源空闲时, 所述资源锁将发起访问的处理器核或主控设备 在***中的唯一位置标识写入到所述存储位置中, 表明所述处理器核或主控 设备占用所述共享资源; 以及
所述资源锁向所述处理器核或主控设备回复响应, 指示所述处理器核或 主控设备已完成对所述共享资源的加锁。
9、 根据权利要求 8所述的共享资源访问方法, 其中, 所述资源锁向所述 处理器核或主控设备回复响应, 指示所述处理器核或主控设备已完成对所述 共享资源的加锁的步骤之后, 还包括:
所述处理器核或主控设备在完成使用所述共享资源后, 向所述资源锁发 送针对所述共享资源的存储位置的写命令, 指示释放所述共享资源。
10、 根据权利要求 9所述的共享资源访问方法, 其中, 所述处理器核或 主控设备在完成使用所述共享资源后, 向所述资源锁发送针对所述共享资源 的存储位置的写命令的步骤之后, 还包括:
所述资源锁检查发送所述写命令的处理器核或主控设备的唯一位置标识 与所述共享资源的存储位置的值是否匹配; 以及
所述资源锁在检查结果为匹配时, 清除所述共享资源的存储位置的值, 表明所述共享资源空闲。
11、 根据权利要求 10所述的共享资源访问方法, 其中, 所述资源锁检测 发送所述写命令的处理器核或主控设备的唯一位置标识与所述共享资源的存 储位置的值是否匹配的步骤之后, 还包括:
所述资源锁在检查结果为不匹配时, 不修改所述存储位置的值, 并向发 出所述写命令的处理器核或主控设备返回写失败响应。
12、 一种共享资源访问装置, 应用于多核片上***(S0C ) 中, 包括: 请求接收模块、 存储控制模块以及判定模块, 其中:
所述请求接收模块设置成: 接收访问共享资源的请求;
所述存储控制模块设置成: 读取资源锁中所述共享资源对应的存储位置 的值; 以及
所述判定模块设置成: 根据所述存储位置的值, 判定所述共享资源当前 是否被占用。
13、 根据权利要求 12所述的共享资源访问装置, 所述装置还包括: 存储模块, 其设置成: 在所述资源锁中, 为所述 SOC中的至少一个共享 资源分配存储位置, 为不同共享资源分配的存储位置不同, 所述存储位置的 值指示所述存储位置被分配到的共享资源空闲或占用所述存储位置被分配到 的共享资源的处理器核或主控设备。
14、 根据权利要求 13所述的共享资源访问装置, 其中,
所述存储控制模块还设置成: 在所述共享资源被占用时, 返回所述存储 位置的值至所述处理器核或主控设备, 或,
在所述共享资源空闲时, 所述资源锁将发起访问的处理器核或主控设备 在***中的唯一位置标识写入到所述存储位置中, 表明所述处理器核或主控 设备占用所述共享资源。
15、 根据权利要求 13或 14所述的共享资源访问装置, 其中,
所述存储控制模块还设置成: 接收所述处理器核或主控设备在完成使用 所述共享资源后发送的针对所述共享资源的存储位置的写命令;
检查发送所述写命令的处理器核或主控设备的唯一位置标识与所述共享 资源的存储位置的值是否匹配, 当检查结果为匹配时, 清除所述共享资源的 存储位置的值, 当检查结果为不匹配时, 不修改所述存储位置的值并向发出 所述写命令的处理器核或主控设备返回写失败响应。
PCT/CN2014/079451 2013-07-23 2014-06-09 共享资源访问方法和装置 WO2014173364A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310311081.2 2013-07-23
CN201310311081.2A CN104346317B (zh) 2013-07-23 2013-07-23 共享资源访问方法和装置

Publications (1)

Publication Number Publication Date
WO2014173364A1 true WO2014173364A1 (zh) 2014-10-30

Family

ID=51791093

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/079451 WO2014173364A1 (zh) 2013-07-23 2014-06-09 共享资源访问方法和装置

Country Status (2)

Country Link
CN (1) CN104346317B (zh)
WO (1) WO2014173364A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649189B (zh) * 2015-10-28 2021-04-09 中兴通讯股份有限公司 一种多核***中硬件资源管理的方法及相应的多核***
CN105404555A (zh) * 2015-12-29 2016-03-16 重庆安碧捷科技股份有限公司 医疗多线程共享资源分配处理方法及***
CN105760216A (zh) * 2016-02-29 2016-07-13 惠州市德赛西威汽车电子股份有限公司 一种多进程同步控制方法
CN106874125B (zh) * 2017-01-13 2021-04-06 北京元心科技有限公司 多容器***间共享***资源的方法及装置
WO2018176397A1 (zh) * 2017-03-31 2018-10-04 华为技术有限公司 一种锁分配的方法、装置和计算设备
JP6912421B2 (ja) * 2018-06-01 2021-08-04 ファナック株式会社 制御装置
CN108984323B (zh) * 2018-07-13 2022-04-01 上海联影医疗科技股份有限公司 一种共享存储空间的调度方法及***
FR3086780B1 (fr) * 2018-09-27 2020-11-06 Thales Sa Systeme et procede d'acces a une ressource partagee
CN111026336A (zh) * 2019-12-26 2020-04-17 中国建设银行股份有限公司 一种san存储***的自动化运维方法及运维***
CN113190496B (zh) * 2021-04-23 2023-12-26 深圳市汇顶科技股份有限公司 内核通讯方法、装置、芯片、电子设备及存储介质
CN113269590B (zh) * 2021-05-31 2023-06-06 五八到家有限公司 一种用于资源补贴的数据处理方法、装置和***
CN113836209A (zh) * 2021-09-02 2021-12-24 深圳市道通智能汽车有限公司 多核处理器的共享资源访问方法、处理器及多核***
CN115033394B (zh) * 2022-05-23 2023-05-26 深圳市航顺芯片技术研发有限公司 一种多核mcu访问共享外设的控制***及相关设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1366248A (zh) * 2001-01-18 2002-08-28 深圳市中兴集成电路设计有限责任公司 异步时钟域设备对共享存储装置访问的控制方法
CN101216781A (zh) * 2007-12-28 2008-07-09 中国科学院计算技术研究所 一种多处理器***、装置及方法
CN101403979A (zh) * 2008-10-27 2009-04-08 成都市华为赛门铁克科技有限公司 一种自旋锁的加锁方法及计算机***
CN101841473A (zh) * 2010-04-09 2010-09-22 北京星网锐捷网络技术有限公司 Mac地址表更新方法及装置
CN102298539A (zh) * 2011-06-07 2011-12-28 华东师范大学 一种用于分布式并行处理的共享资源调度方法及***
CN103377086A (zh) * 2012-04-27 2013-10-30 华为技术有限公司 用于异步多核***操作共享资源的方法、装置及***

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7552341B2 (en) * 2004-09-01 2009-06-23 Microsoft Corporation Licensing the use of software on a particular CPU
CN100375067C (zh) * 2005-10-28 2008-03-12 中国人民解放军国防科学技术大学 异构多核微处理器局部空间共享存储方法
CN101634979B (zh) * 2008-07-22 2011-09-07 中国科学院计算技术研究所 一种满足SystemC语法的多核处理器
CN101566977B (zh) * 2009-06-08 2011-02-02 华为技术有限公司 处理器访问共享数据的方法、装置及***
CN101650646B (zh) * 2009-09-22 2012-02-08 杭州华三通信技术有限公司 一种共享数据一致性的实现方法及装置
CN102567275B (zh) * 2010-12-08 2014-01-08 中国科学院声学研究所 一种多核处理器上多个操作***间内存访问的方法及***
CN103064729A (zh) * 2012-12-19 2013-04-24 上海西本网络科技有限公司 对共享资源的加锁、控制方法和装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1366248A (zh) * 2001-01-18 2002-08-28 深圳市中兴集成电路设计有限责任公司 异步时钟域设备对共享存储装置访问的控制方法
CN101216781A (zh) * 2007-12-28 2008-07-09 中国科学院计算技术研究所 一种多处理器***、装置及方法
CN101403979A (zh) * 2008-10-27 2009-04-08 成都市华为赛门铁克科技有限公司 一种自旋锁的加锁方法及计算机***
CN101841473A (zh) * 2010-04-09 2010-09-22 北京星网锐捷网络技术有限公司 Mac地址表更新方法及装置
CN102298539A (zh) * 2011-06-07 2011-12-28 华东师范大学 一种用于分布式并行处理的共享资源调度方法及***
CN103377086A (zh) * 2012-04-27 2013-10-30 华为技术有限公司 用于异步多核***操作共享资源的方法、装置及***

Also Published As

Publication number Publication date
CN104346317B (zh) 2019-08-27
CN104346317A (zh) 2015-02-11

Similar Documents

Publication Publication Date Title
WO2014173364A1 (zh) 共享资源访问方法和装置
US9639409B2 (en) Device and method for communicating between cores
US7617376B2 (en) Method and apparatus for accessing a memory
EP2851807B1 (en) Method and system for supporting resource isolation under multi-core architecture
US20110167189A1 (en) Storage apparatus and its data transfer method
CN105242872B (zh) 一种面向虚拟集群的共享存储***
WO2014169649A1 (zh) 一种数据处理方法、装置及计算机***
US9654582B2 (en) Enhanced shared memory based communication driver for improved performance and scalability
US10459771B2 (en) Lightweight thread synchronization using shared memory state
CN111897666A (zh) 用于多进程之间通信的方法、设备及***
US7490203B2 (en) Method for dumping data in processing systems to a shared storage
JP2021168123A (ja) ストレージ装置のネットワークキーバリューを使用して分散された読み取り/書き込みをロックするシステム及び方法
CN112148695A (zh) 一种资源锁管理方法及装置
US20130246729A1 (en) Method for Managing a Memory of a Computer System, Memory Management Unit and Computer System
CN116107697B (zh) 一种不同操作***之间互相通信的方法及***
CN105718589B (zh) 访问文件的方法和装置
JP4734348B2 (ja) 共有メモリ型マルチプロセッサにおける非同期遠隔手続き呼び出し方法、非同期遠隔手続き呼び出しプログラムおよび記録媒体
US20130247065A1 (en) Apparatus and method for executing multi-operating systems
CN114090249A (zh) 资源分配方法、装置、电子设备及存储介质
CN105264494B (zh) 鉴权处理装置和方法
KR100978083B1 (ko) 공유 메모리형 멀티 프로세서에 있어서의 절차 호출 방법 및 절차 호출 프로그램을 기록한 컴퓨터로 판독 가능한 기록 매체
JP2014241124A (ja) 排他制御システム
WO2022193108A1 (zh) 一种集成芯片及数据搬运方法
WO2023103434A1 (zh) 一种锁管理方法、装置及***
US20220309015A1 (en) Device and method for sharing resource via bus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14788024

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14788024

Country of ref document: EP

Kind code of ref document: A1