9,815 views

2 Answers

Best answer
10 10 votes

I think everything is different between deadlock and spinlock. 

Dead Lock: In concurrent computing, a deadlock occurs when two competing actions wait for the other to finish, and thus neither ever does. Deadlock is a common problem in multiprocessing systems, parallel computing, and distributed systems, where software and hardware locks are used to handle shared resources and implement process synchronization.

Spinlock: In software engineering, a spinlock is a lock which causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking if 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 (that which holds the lock) blocks, or "goes to sleep".

Summary: Deadlock is a problem, in concurrent programming. While Spinlock is a solution for threads, so that two threads can not access the same resource at a time. 

• selected by
2 2 votes

SPINLOCK- PROCESS CAN PROCEED FURTHER. (ONE WAITING FOR ANOTHER)

DEADLOCK- NO PROCESS CAN PROCEED FURTHER. (2 OR MORE WAITING FOR EACH OTHER)

we can say

in terms of process synchronization process waiting in strict alteration is spinlock.

but for deadlock it's a DEAD END!!

Position:
Show:

Related questions

4 4 votes
2 2 answers
6.7k
6.7k views
Akanksha Kesarwani asked Dec 10, 2016
6,688 views
What is the difference between record & block pointer and any resource with diagram to know more about it?Keys and records are same or not ?
0 0 votes
1 answers 1 answer
1.2k
1.2k views
Prashant 4 asked Nov 11, 2025
1,216 views
0 0 votes
0 0 answers
356
356 views
tbhaxor asked Feb 1, 2024
356 views
A process can receive two kinds of signals classified based on the source and reason.Synchronous are the one that are generated by illegal memory access or division by ze...