Resource locking algorithm for memory read-write process

A memory resource and algorithm technology, applied in the field of resource locking algorithms in memory read and write processes, can solve problems such as affecting the number of concurrency, occupying operating system CPU resources, system deadlock, etc., to improve the number and efficiency of concurrency, improve scalability, The effect of reducing the burden

Active Publication Date: 2019-06-07
TIANYI LOVE ANIMATION CULTURE MEDIA CO LTD
View PDF9 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1. Every time a process (thread) accesses a shared resource, it must apply for a semaphore. A large number of semaphores will occupy a large amount of CPU resources of the operating system and affect the number of concurrency;
[0005] 2. The shared resource operation is protected by the semaphore, which will cause the process (thread) accessing the shared resource to wait, which affects the single process (thread) processing capability of the system;
[0006] 3. Since the process (thread) of writing or modification accesses the shared resource locally, and the frequency is much lower than that of the read access, but the shared resource needs to be protected by a semaphore, resulting in a large number of queuing of the read process (thread)
[0007] Mutually exclusive access to shared resources by multiple processes (threads) can easily cause deadlock in the system

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Resource locking algorithm for memory read-write process
  • Resource locking algorithm for memory read-write process
  • Resource locking algorithm for memory read-write process

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0067] In the web server using the resource locking algorithm, the server caches the content of the web page in the memory so as to quickly respond to the customer's access requirements. When a web page needs to be modified and maintained, the resource locking algorithm finds the memory space S corresponding to the web page. Copy the data blocks in the memory space to form a mirror space L containing the webpage. During the modification and maintenance period, external customers' access to the webpage is uniformly directed to the original memory space S, and the permissions of the mirror space L are modified to only Write, for write process operations only.

[0068] The timestamp of the memory data structure in the memory space S is a millisecond-level timestamp.

[0069] After the maintenance and modification of the web page is completed, the resource locking algorithm modifies the permission of the mirror space L to read-only, and redirects the access of external customers t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a resource locking algorithm for a memory read-write process, which is used for read-write operation of a memory resource D with an addressing mark, and the addressing mark comprises an address interval, an authority identifier and a timestamp; wherein the authority identifiers are in three mutually exclusive states of distributable, read-only and write-only; the locking algorithm directs the read operation request to the memory resource of which the permission identifier is read-only; the locking algorithm directs the write operation request to memory resources only written by permission; when the locking algorithm is in write operation, if the write operation aims at the memory space S of the existing content X, the locking algorithm copies the content X in the memory to form a mirror image space L with only write permission, and the mirror image space L is used for replacing the memory space S to respond to the write operation aiming at the content X and replacing the memory space S after the write operation is finished; according to the method, the memory switching algorithm can be used for replacing a mutual exclusion lock to solve the synchronization problem of shared resource mutual exclusion access in the scenes of memory data block single-process (thread) writing and multi-process (thread) reading.

Description

technical field [0001] The invention relates to the technical field of computing equipment, in particular to a resource locking algorithm for memory reading and writing processes. Background technique [0002] Mutex locks are generally implemented using semaphores, which are used to synchronize or mutually exclude access to shared resources. A large number of operations and uses of semaphores will occupy a large amount of CPU resources in the system, and seriously affect the resource advantages of multiple CPUs or multiple cores in the system. The demand for concurrency is relatively high, and the system with multiple processes (threads) sharing resources is a relatively large bottleneck. Since the resource protection of the semaphore can only allow one process or thread to access at a time, multiple processes or threads accessing a common resource will cause processes or threads to wait in line, which cannot meet the efficient operation of the system. [0003] Currently, r...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/52G06F9/50
Inventor 陈建华
Owner TIANYI LOVE ANIMATION CULTURE MEDIA CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products