Global Information Lookup Global Information

Spinlock information


In software engineering, a spinlock is a lock that causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking whether the lock is available. Since the thread remains active but is not performing a useful task, the use of such a lock is a kind of busy waiting. Once acquired, spinlocks will usually be held until they are explicitly released, although in some implementations they may be automatically released if the thread being waited on (the one that holds the lock) blocks or "goes to sleep".

Because they avoid overhead from operating system process rescheduling or context switching, spinlocks are efficient if threads are likely to be blocked for only short periods. For this reason, operating-system kernels often use spinlocks. However, spinlocks become wasteful if held for longer durations, as they may prevent other threads from running and require rescheduling. The longer a thread holds a lock, the greater the risk that the thread will be interrupted by the OS scheduler while holding the lock. If this happens, other threads will be left "spinning" (repeatedly trying to acquire the lock), while the thread holding the lock is not making progress towards releasing it. The result is an indefinite postponement until the thread holding the lock can finish and release it. This is especially true on a single-processor system, where each waiting thread of the same priority is likely to waste its quantum (allocated time where a thread can run) spinning until the thread that holds the lock is finally finished.

Implementing spinlocks correctly is challenging because programmers must take into account the possibility of simultaneous access to the lock, which could cause race conditions. Generally, such an implementation is possible only with special assembly language instructions, such as atomic (i.e. un-interruptible) test-and-set operations and cannot be easily implemented in programming languages not supporting truly atomic operations.[1] On architectures without such operations, or if high-level language implementation is required, a non-atomic locking algorithm may be used, e.g. Peterson's algorithm. However, such an implementation may require more memory than a spinlock, be slower to allow progress after unlocking, and may not be implementable in a high-level language if out-of-order execution is allowed.

  1. ^ Silberschatz, Abraham; Galvin, Peter B. (1994). Operating System Concepts (Fourth ed.). Addison-Wesley. pp. 176–179. ISBN 0-201-59292-4.

and 20 Related for: Spinlock information

Request time (Page generated in 0.5352 seconds.)

Spinlock

Last Update:

In software engineering, a spinlock is a lock that causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking whether...

Word Count : 1730

Spinlock SRL

Last Update:

Spinlock is a technology based company specialized in the manufacture and development of nuclear magnetic resonance (NMR) and nuclear quadrupole resonance...

Word Count : 471

Busy waiting

Last Update:

strategy in certain circumstances, most notably in the implementation of spinlocks within operating systems designed to run on SMP systems. The following...

Word Count : 843

Ticket lock

Last Update:

is a synchronization mechanism, or locking algorithm, that is a type of spinlock that uses "tickets" to control which thread of execution is allowed to...

Word Count : 2203

Spin lock

Last Update:

a part of artillery fuze mechanism which arms the munition upon firing Spinlock, a concept in multithread programming This disambiguation page lists articles...

Word Count : 57

Dumbbell

Last Update:

the dumbbell and secured with clips or collars. Shown to the right is a "spinlock" dumbbell, whose ends are threaded to accept large nuts as collars. Alternatively...

Word Count : 748

Improvised weapon

Last Update:

A spinlock adjustable dumbbell...

Word Count : 2063

Mutual exclusion

Last Update:

become ready to run after being blocked in a particular situation, then spinlocks are an acceptable solution (for that situation only).[citation needed]...

Word Count : 2336

Microsoft SQL Server

Last Update:

includes two more lightweight mutual exclusion solutions—latches and spinlocks—which are less robust than locks but are less resource intensive. SQL...

Word Count : 7116

Barbell

Last Update:

though more permanent fixings are available. Other variations include spinlock end bars with screw on nut collars and many others. The thickness of the...

Word Count : 2662

X86 instruction listings

Last Update:

inactive (used with floating-point unit) 0x9B XCHG Exchange data r :=: r/m; A spinlock typically uses xchg as an atomic operation. (coma bug). 0x86, 0x87, 0x91...

Word Count : 15653

Pthreads

Last Update:

variables Synchronization between threads using read write locks and barriers Spinlocks The POSIX semaphore API works with POSIX threads but is not part of the...

Word Count : 1086

Computer virus

Last Update:

control. They are used for testing CPUs, for example, when overclocking. Spinlock in a poorly written program may cause similar symptoms, if it lasts sufficiently...

Word Count : 9368

Linux kernel

Last Update:

types (which can only be manipulated by a set of specific operators), spinlocks, semaphores, mutexes,: 176–198  and lockless algorithms (e.g., RCUs)....

Word Count : 17714

Weight plate

Last Update:

original on 29 July 2017. Retrieved 20 November 2016. "Bodymax 6 ft Standard Spinlock Barbell with collars". Powerhouse Fitness. Archived from the original on...

Word Count : 1613

Infinite loop

Last Update:

user to either respond to a prompt to continue, or reset the device. Spinlocks are low-level synchronization mechanisms used in concurrent programming...

Word Count : 2613

Nuclear magnetic resonance

Last Update:

include Thermo Fisher Scientific, Magritek, Oxford Instruments, Bruker, Spinlock SRL, General Electric, JEOL, Kimble Chase, Philips, Siemens AG, and formerly...

Word Count : 10087

Volvo Ocean 65

Last Update:

"Remote Operation Clutches & Jammers – Hardware Support – Support". www.spinlock.co.uk. Retrieved 20 November 2017. "New specifications on Volvo Ocean Race's...

Word Count : 1225

Seqlock

Last Update:

debugger is slow enough to make the read race occur always. Synchronization Spinlock fast reader/writer lock for gettimeofday 2.5.30 Effective synchronisation...

Word Count : 577

TBOX

Last Update:

lower precision timer implements atomic and atomic64 operation implements spinlock, mutex, event, semaphore, thread and thread pool implements file, socket...

Word Count : 381

PDF Search Engine © AllGlobal.net