Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Record locking
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Exclusive locks=== Exclusive locks are exclusively held by a single entity, usually for the purpose of writing to the record. If the locking schema was represented by a list, the '''holder list''' would contain only one entry. Since this type of lock effectively blocks any other entity that requires the lock from processing, care must be used to: *ensure the lock is held for the shortest time possible; *not hold the lock across system or function calls where the entity is no longer running on the processor β this can lead to deadlock; *ensure that if the entity is unexpectedly exited for any reason, the lock is freed. Non-holders of the lock (a.k.a. '''waiters''') can be held in a list that is serviced in a round-robin fashion, or in a [[FIFO (computing and electronics)|FIFO]] queue. This would ensure that any possible waiter would get equal chance to obtain the lock and not be locked out. To further speed up the process, if an entity has gone to sleep waiting for a lock, performance is improved if the entity is notified of the grant, instead of discovering it on some sort of system timeout driven wake-up.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)