One of the commonly heard topics when its comes to operating system internals or sharing of resources. So what does these objects do ?? SYNCHRONIZE access of re-entrant code or shared resource.
The commonly known and used synchronization objects are mutex, semaphores, spinlock, condition variables and there are events, futex and others like critical section. Futex, many might not have used this much or heard about it so let me throw some light on it.
- Futex also know as fast userspace mutex which is defined by a memory which is shared between different processes.
- Futex is similar to a semaphore where a counter a incremented or decremented atomically.
- Futex is a integer which can be only accessed atomically and processes share this integer over mmap or shared memory.
- Advantage of futex is it is limited to userspace and so like other synchronization object it doesnt need any user to kernel interaction when used in userspace.
*Will sure revisit here with more updates.
No comments:
Post a Comment