Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for requesting exclusive resource

A resource and requester technology, applied in the computer field, can solve the problems of reducing the life of storage media, unable to obtain exclusive resources, unable to execute the release of disk locks, etc., to reduce the frequency of writing and improve the lifespan.

Active Publication Date: 2013-03-20
HUAWEI CLOUD COMPUTING TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] In the first solution above, if the virtual machine that is using the exclusive resource fails, the operation of releasing the disk lock cannot be performed, so that other virtual machines can never obtain the exclusive resource;
[0008] In the second solution above, the user who is using the exclusive resource periodically writes the occupancy flag frequently in a specific storage space, reducing the life of the storage medium

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
  • Method and device for requesting exclusive resource
  • Method and device for requesting exclusive resource
  • Method and device for requesting exclusive resource

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] The embodiment of the present invention provides a method for requesting exclusive resources. Wherein, in this embodiment, the first space for storing the identity of the resource requester is preset, see figure 1 , the method includes:

[0026] Step 101: The resource requester stores its own identity in the first space according to the storage conditions of the first space;

[0027] Step 102: After waiting for the first time threshold, the resource requester checks whether there is its own identity in the first space;

[0028] Wherein, if the exclusive resource is normally used by the user, the user periodically clears the first space within the first time threshold, and the length of the cycle for the user to clear the first space is less than the first time threshold;

[0029] Step 103: If it exists, the resource requester obtains the exclusive resource.

[0030] In the embodiment of the present invention, when requesting exclusive resources, the resource request...

Embodiment 2

[0032] Such as figure 2 As shown, the embodiment of the present invention provides a method for requesting exclusive resources, including:

[0033] Step 201: When the resource requester requests exclusive resources, check whether the first space is empty, if not, execute step 202, and if yes, execute step 203;

[0034] Wherein, the first space is used to store the identity of the resource requester who is currently requesting the exclusive resource and the resource requester who is currently requesting the exclusive resource has not obtained the exclusive resource yet.

[0035] Step 202: The resource requester judges whether the corresponding resource requester still has the ability to request exclusive resources according to the identity of the resource requester stored in the first space. If not, execute step 203. If yes, the operation ends;

[0036] Specifically, according to the resource requester's identity stored in the first space, the resource requester obtains the c...

Embodiment 3

[0066] An embodiment of the present invention provides a device for requesting exclusive resources, and the first space for storing the identity of the resource requester is preset, such as image 3 shown, including:

[0067] The storage module 301 is used for the resource requester to store its own identity in the first space according to the storage conditions of the first space;

[0068] The checking module 302 is configured to check whether the first space has its own identity after the resource requester waits for the first time threshold; wherein, if the exclusive resource is normally used by the user, the user periodically checks within the first time threshold emptying the first space, the length of the period during which the user clears the first space is less than a first time threshold;

[0069] The obtaining module 303 is configured to obtain the exclusive resource for the resource requester if it exists.

[0070] Storage module 301 includes:

[0071] The check...

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

A method and a device for requesting an exclusive resource belong to the field of computers. The method comprises: presetting a first space used for storing an identity identifier of a resource requestor, and the resource requestor storing its own identity identifier into the first space according to a storage status of the first space; after waiting for a first time threshold, the resource requestor checking whether its own identity identifier exists in the first space, wherein if the exclusive resource is used normally by a user, the user periodically empties the first space in the first time threshold, and a period in which the user empties the first space is shorter than the first time threshold; and if existing, the resource requestor obtaining the exclusive resource. The device for requesting an exclusive resource comprises: a storing module, a checking module and an obtaining module. Through the solution, the case that other requestors cannot request the exclusive resource because the user has a failure can be avoided, and the service life of a storing medium can be increased.

Description

technical field [0001] The invention relates to the field of computers, in particular to a method and device for requesting exclusive resources. Background technique [0002] In a storage virtualization scenario, when a virtual machine of a user exclusively uses a resource, other virtual machines cannot use the resource, and the resource is called an exclusive resource. Any virtual machine needs to request exclusive resources before using them. [0003] Currently, there are two solutions for requesting exclusive resources, including: [0004] The first solution, when any virtual machine requests an exclusive resource, it needs to obtain the disk lock corresponding to the exclusive resource first, then request the exclusive resource and use the disk lock to lock the exclusive resource, so that other virtual machines It is no longer possible to request the exclusive resource. After the exclusive resource is used, the disk lock of the exclusive resource is released, and then ...

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): G06F9/50G06F11/00
CPCG06F9/526
Inventor 和江涛袁京王学俭
Owner HUAWEI CLOUD COMPUTING TECH CO LTD