473,500 Members | 1,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

spin_lock

Can anybody give me the basics (or a *basic* instructions link)
regarding spinlocks and their usage? I really can't understand their
meaning...
Thanks .
R
Apr 9 '08 #1
4 2480
InuY4sha wrote:
Can anybody give me the basics (or a *basic* instructions link)
regarding spinlocks and their usage? I really can't understand their
meaning...
http://en.wikipedia.org/wiki/Spin_lock

--
Thad
Apr 9 '08 #2
"Antoninus Twink" <no****@nospam.invalidwrote in message
news:sl*******************@nospam.invalid...
On 9 Apr 2008 at 13:12, Thad Smith wrote:
>InuY4sha wrote:
>>Can anybody give me the basics (or a *basic* instructions link)
regarding spinlocks and their usage? I really can't understand their
meaning...

http://en.wikipedia.org/wiki/Spin_lock

That article seems to focus more on implementing spinlocks than on
using them...

A spinlock has the same function as a mutex: they're both mutual
exclusion locks. The only difference is the behavior when a thread tries
to gain a lock, but the lock is already held by another thread. If a
mutex is held by another thread, the current thread is suspended and
doesn't resume until it can gain the lock.
[...]

There are so-called adaptive mutexs that act like spinlocks when contention
arises. The difference is that the spin-count is bounded. When the limit is
reached, the calling threads becomes a member of the mutexs waitset.

Apr 10 '08 #3
On Apr 9, 5:34 pm, InuY4sha <inuY4...@email.itwrote:
Can anybody give me the basics (or a *basic* instructions link)
regarding spinlocks and their usage? I really can't understand their
meaning...
Thanks .
R
It is also known as busy waiting...
Apr 10 '08 #4
On Apr 9, 9:53*am, Antoninus Twink <nos...@nospam.invalidwrote:
A spinlock has the same function as a mutex:
``Spinlock'' is to ``mutex'' what ``linked list'' is to ``abstract
sequence''.
Apr 11 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1870
by: rahul8143 | last post by:
hello, In kernel source code there is ip_fragment.c file my question is regarding pointer function and casting for that look at required snippet from that file There is structure defined for...
24
5052
by: junky_fellow | last post by:
Hi, I read in some of the articles that there are two types of "reordering" of instructions. One at the compiler level and other at the processor/CPU level. What is the difference between...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.