Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method for accessing shared resources in a distributed system and the distributed system

A technology of distributed systems and shared resources, applied in transmission systems, electrical components, etc., can solve the problem of high system risk and achieve the effect of reducing system security risks

Active Publication Date: 2016-09-28
阿里巴巴(成都)软件技术有限公司
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] The purpose of this application is to provide a method for accessing shared resources in a distributed system and a distributed system to solve the problem in the prior art of relying on an external lock service system to achieve synchronization and mutual exclusion control of a distributed system. problems resulting in higher system risk

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
  • A method for accessing shared resources in a distributed system and the distributed system
  • A method for accessing shared resources in a distributed system and the distributed system
  • A method for accessing shared resources in a distributed system and the distributed system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] Embodiment 1 of the present application provides a method for accessing shared resources in a distributed system, and the method can be applied in a distributed system with multiple nodes. When the distributed system is running, a master node will be selected from each node, and other nodes will become slave nodes. The master node and the slave nodes can be connected through Transmission Control Protocol (Transmission Control Protocol, TCP) long connection or TCP short connection. way to keep in touch.

[0025] Specifically, the distributed system can implement the election of the master node and the consistency of data in the distributed system through algorithms such as Fast Paxos.

[0026] Preferably, each node in the distributed system has the same structure, including four structural components: a local lock, a global lock state array, a Log (log) record, and a waiting queue.

[0027] The local lock is the lock of the node itself, and each process in the node comp...

Embodiment 2

[0067] Such as image 3 As shown, it is a schematic structural diagram of a distributed system in Embodiment 2 of the present application. The distributed system includes a master node 31 and at least one slave node 32. Each node includes a local lock, a global lock state array, a Log record, and Waiting queues have four structural components.

[0068] Specifically, the distributed system can realize the election of the master node 31 and the consistency of data in the distributed system through algorithms such as Fast Paxos, and the mode of TCP long connection or TCP short connection between the master node 31 and the slave node 32 Keep in touch.

[0069] The slave node 32 is configured to judge whether the shared resource is being accessed according to the global lock state of the shared resource stored in the local global lock state array when the local process initiates access to the shared resource, and determine whether the shared resource is being accessed. When the sha...

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 discloses a method for accessing sharing resources in a distributed system and the distributed system. The method comprises the steps: a. when a sub node in the distributed system starts to access the sharing resources in a local process, the sub node judges that that the sharing resources are not accessed according to the global lock state of the sharing resources stored in a local global lock state array and sends a sharing resource access request to a host node in the distributed system; b. a host node obtains the global lock of the sharing resources when the host node judges that the access request of the sub node can be executed according to the order of the sharing resource access request in a local waiting list. According to the technical scheme, the distributed system can achieve synchronous and mutual exclusive control on the whole system through a lock mechanism of itself instead of through a lock service provided by a third part integrated type system, therefore, dependence on the external integrated type lock system is reduced, and the risk of the system is reduced.

Description

technical field [0001] The present application relates to the field of distributed systems, in particular to a method for accessing shared resources in a distributed system and a distributed system. Background technique [0002] A distributed system is a system composed of geographically and physically dispersed independent multiple nodes (such as servers, processing units, etc.), and the multiple nodes are connected together to realize the sharing of different resources. A distributed system equivalent to a unified whole. [0003] For a distributed system, multiple nodes in the system are running in parallel. At the same time, there may be multiple nodes or multiple processes on the same node that initiate concurrent access to the same shared resource. This kind of timing correlation and non-deterministic behavior is out of control, leading to the occurrence of abnormal conditions, such as shared resource data destruction, process damage and so on. Therefore, it is necess...

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 Patents(China)
IPC IPC(8): H04L29/08H04L29/06
Inventor 舒宏旺
Owner 阿里巴巴(成都)软件技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products