7,798 views
6 votes
6 votes

2 Answers

Best answer
11 votes
11 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 votes
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!!

Related questions

4 votes
4 votes
2 answers
1
Akanksha Kesarwani asked Dec 10, 2016
4,892 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 ?