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.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 