3 ms·
Yes¹. I don't think I've ever heard of using the word mutex, namely, for synchronizing access to data over a network. Mutex kind of implies that there's the sy
by yason 12y ago
Yes¹.
I don't think I've ever heard of using the word mutex, namely, for synchronizing access to data over a network. Mutex kind of implies that there's the synchronization primitive and there's the data, and both can be touched separately but it's just an agreement that we touch the mutex first. However, network protocols usually just transfer updates to/from the data and then let the server do the synchronization and access pairing for each connection.
I don't think it would make sense at all to run a "mutex service" on one server and asking clients to grab that mutex before accessing another "data service" which would obviously allow any data updates by anyone without any synchronization at all.
¹ or just multiple tasks, in general. Even a single-core machine needs mutexed access to shared data because several tasks could try to concurrently use that memory location and the scheduler could switch tasks at a critical point. However, if strictly limited to single-core, and the system allows to, you can just disable interrupts while you're manipulating the data.
- twic 12y ago> I don't think it would make sense at all to run a "mutex service" on one server and asking clients to grab that mutex before accessing another "data service" And yet such things exist: http://en.m.wikipedia.org/wiki/Distributed_lock_manager http://en.m.wikipedia.org/wiki/Distributed_lock_manager I first came across one in the context of a distributed cache which sat on top of a database. I'm not at all convinced it was a good design, but it was there!