473,564 Members | 2,768 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 2481
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******** ***********@nos pam.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
1874
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 queueing ip fragments as struct ipq { struct ipq *next; /* linked list pointers */ struct list_head lru_list; /* lru list member */ u32 user;...
24
5061
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 these two ? How can a C programmer, prevent the reordering of instructions by compiler
0
7888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2082
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 we have to send another system

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.