A Resource Locking Method for Memory Read and Write Process

A memory resource and resource technology, applied in the direction of resource allocation, program synchronization, multi-program installation, etc., can solve the problems of affecting the number of concurrency, occupying operating system CPU resources, system deadlock, etc., to increase the number and efficiency of concurrency, improve Scalability, the effect of avoiding deadlock

A memory resource and resource technology, applied in the direction of resource allocation, program synchronization, multi-program installation, etc., can solve the problems of affecting the number of concurrency, occupying operating system CPU resources, system deadlock, etc., to increase the number and efficiency of concurrency, improve Scalability, the effect of avoiding deadlock

CN109857566BActive Publication Date: 2020-09-29TIANYI LOVE ANIMATION CULTURE MEDIA CO LTD

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A Resource Locking Method for Memory Read and Write Process
  • A Resource Locking Method for Memory Read and Write Process
  • A Resource Locking Method for Memory Read and Write Process

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0067] In the web server using the resource locking method, the server caches the web page content in memory so as to quickly respond to customer access requirements. When a web page needs to be modified and maintained, the resource locking method 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 method modifies the permission of the mirror space L to read-only, and redirects the access of external customers to the web page to the mirr...

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 method 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, reso...

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
29 Sep 2020
Publication
CN109857566B
IPC
G06F9/52; G06F9/50
Inventors
陈建华