Note that there are some explanatory texts on larger screens.

plurals
  1. POlock free CAS confusion
    primarykey
    data
    text
    <p>Hey guys,<br> I am reading these so called non-blocking techniques, but i have few doubts :</p> <p>1) lock-free operation are performed using atomic operation, now what are these atomic operation ? i mean at certain level they also need to have a lock right ? so Does this lock-free approach provides us locking at finer granularity only ? <br> 2) they say non-blocking list, Now what a non-blocking list should be : if more than one threads comes at the same insertion, only one is going to get succeed, another one will do some other work right ?, but if other thread has no choice except inserting a node then how come it is non-blocking ? won't it will get blocked until previous one is done ?? <br> 3) In java, how do they atomic operation ? doesn't they do something like <code> synchronized boolean ..... </code> so how it is lock-free since they are acquiring lock i.e. synchronized section ? 4) CAS is usually used to implement atomic operation. So doesn't cas allow only one operation to happen on the same object , and stops ( <strong>block</strong> ) others those want to operate on the same object ? Sorry for so many doubts... please clarify...</p> <p><strong>EDIT</strong> what happens when i have a structure to update ? does it also supported by hardware ? No right, So doesn't language would be acquiring locks at some level to make these structure operation atomic ?<br> About <strong>JAVA</strong> : there are AtomicReference and AtomicReferenceFieldUpdater class which provides updation to a object ( structure or any kind of object) , so can we compare them in terms of performance i mean speed ? Both in tern uses Unsafe class which uses Native class . </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload