#mutex — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #mutex, aggregated by home.social.
-
Разбор пяти ошибок в модулях Linux, которые проходят сборку и валят систему под нагрузкой
Модуль ядра может собраться без предупреждений, успешно загрузиться и несколько минут выглядеть полностью исправным. А потом под нагрузкой поймать гонку, зависнуть на блокировке или уронить всю систему. Разберём пять типичных ошибок, которые не видит компилятор, но хорошо видит продакшен. Разобрать ошибки
https://habr.com/ru/companies/otus/articles/1058386/
#модули_ядра_Linux #kernel_space #гонка_данных #атомарные_операции #обработчики_прерываний #spinlock #mutex #ioctl #управление_памятью #отладка_ядра
-
Многопоточность в SCADA системах
Пишу SCADA-ядро на C++ для инженерных систем: опрос ПЛК, кэширование значений, правила автоматики и управление исполнительными механизмами. На текущем этапе упёрся в практический вопрос многопоточности: как правильно разделять потоки чтения и записи, как сериализовать доступ к одному каналу связи, и насколько оправдано использование std::condition_variable. В статье показываю текущую реализацию потока опроса ПЛК и хочу услышать мнение коллег, которые разрабатывали промышленные SCADA-системы.
https://habr.com/ru/articles/1029582/
#scada #c++ #modbus #thread #mutex #многопоточность #плк #диспетчеризация #автоматизация #асутп
-
#Rust #Mutex #Deadlocks I didn't know that we know how to solve deadlocks since the seventies! The problem seems to be that there is no convenient interface available in most languages...
https://notes.brooklynzelenka.com/Blog/Surelock
Tries to give a template how to use mutexes in a way that all deadlocks (with one exception) are detected at runtime.
-
#Rust #Mutex #Deadlocks I didn't know that we know how to solve deadlocks since the seventies! The problem seems to be that there is no convenient interface available in most languages...
https://notes.brooklynzelenka.com/Blog/Surelock
Tries to give a template how to use mutexes in a way that all deadlocks (with one exception) are detected at runtime.
-
🦀🔒 "Surelock" confidently declares a #mutex revolution for #Rust, as if #deadlocks 💥 are the Loch Ness Monster of coding—mythical and only appearing at 3am. But let's face it, their "solution" is basically just a love letter to Haskell's #TVars, like a high school crush longing for the one that got away. 😆❤️
https://notes.brooklynzelenka.com/Blog/Surelock #Surelock #Haskell #HackerNews #ngated -
🦀🔒 "Surelock" confidently declares a #mutex revolution for #Rust, as if #deadlocks 💥 are the Loch Ness Monster of coding—mythical and only appearing at 3am. But let's face it, their "solution" is basically just a love letter to Haskell's #TVars, like a high school crush longing for the one that got away. 😆❤️
https://notes.brooklynzelenka.com/Blog/Surelock #Surelock #Haskell #HackerNews #ngated -
Ah, the riveting saga of std:shared_mutex in C++17—a tale as thrilling as watching paint dry 🖌️! Dive into the labyrinthine world of #mutex #bottlenecks and #cache #concerns, because nothing screams fun like counting operations in a "more realistic" example. 🕸️ For a real adventure, stay tuned for the exhilarating sequel: "Reading Compiler Error Messages for Fun and Profit!" 🤓💥
https://www.cppstories.com/2026/shared_mutex/ #C++17 #std_shared_mutex #programming #humor #HackerNews #ngated -
Ah, the riveting saga of std:shared_mutex in C++17—a tale as thrilling as watching paint dry 🖌️! Dive into the labyrinthine world of #mutex #bottlenecks and #cache #concerns, because nothing screams fun like counting operations in a "more realistic" example. 🕸️ For a real adventure, stay tuned for the exhilarating sequel: "Reading Compiler Error Messages for Fun and Profit!" 🤓💥
https://www.cppstories.com/2026/shared_mutex/ #C++17 #std_shared_mutex #programming #humor #HackerNews #ngated -
mutex vs atomic<bool>
Сравним разные варианты реализации блокировок с точки зрения накладных расходов. mutex, ptr, atomic в нескольких вариантах. Рассматриваем случай без контеншена.
-
[Перевод] Атомарные операции против мьютексов в Go: когда скорость становится проблемой
Команда Go for Devs подготовила перевод статьи о том, действительно ли атомарные операции всегда быстрее и лучше мьютексов в конкурентном коде. Автор разбирает реальные сценарии, показывает бенчмарки и объясняет, почему рост производительности часто оборачивается ростом сложности и рисков для корректности.
https://habr.com/ru/articles/986732/
#concurrency #atomic #mutex #rwmutex #performance #goroutines #синхронизация
-
Под капотом многопоточной синхронизации в Java: как потоки договариваются через Mark Word
Когда вы пишете synchronized(obj), под капотом происходит целая цепочка событий, которую можно отследить до Mark Word — восьмибайтового служебного поля в каждом Java-объекте. В современных реализациях JVM (таких как HotSpot, OpenJ9, GraalVM) используется динамическая, адаптивная система, которая выбирает наиболее эффективную стратегию блокировки в зависимости от реального поведения потоков.
-
🔧🚗 Rust's #mutex showdown: Who will reign supreme? Find out by... enabling #JavaScript and cookies! 🍪🔒 Because nothing says cutting-edge #concurrency like a good old browser settings tweak. 🙃
https://blog.cuongle.dev/p/inside-rusts-std-and-parking-lot-mutexes-who-win #Rust #BrowserSettings #HackerNews #ngated -
🔧🚗 Rust's #mutex showdown: Who will reign supreme? Find out by... enabling #JavaScript and cookies! 🍪🔒 Because nothing says cutting-edge #concurrency like a good old browser settings tweak. 🙃
https://blog.cuongle.dev/p/inside-rusts-std-and-parking-lot-mutexes-who-win #Rust #BrowserSettings #HackerNews #ngated -
Concurrency на примерах. Собственная реализация Mutex на Go + сравнение с sync.Mutex
Хочу поделиться с вами заметкой о своем опыте написания с нуля примитивов синхронизации на чистом Go, совместимых c реализациями из стандартной библиотеки. Цель заметки - на понятных примерах посмотреть как работает под капотом то чем мы пользуемся регулярно как разработчики, а также разобраться с популярными проблемами возникающими при написании многопоточных программ.
-
Потоки, горутины, синхронизация и мьютексы в Go
Go (Golang) создан для эффективной параллельной и конкурентной работы. Его killer feature — легковесные потоки выполнения, называемые горутины (goroutines), и мощные средства синхронизации. Приглашаю разобраться подробно.
-
🔒💻 Behold, the latest masterpiece for those who dream of locking their #bash scripts in eternal embrace with a mutex! Because who doesn't love making the simplest tasks into a cryptic #semaphore puzzle? 🚀🤖 Meanwhile, #GitHub casually hints that #AI should write your code, perhaps after it untangles this weave of command line wizardry. 🙄
https://github.com/bigattichouse/waitlock #scripting #mutex #coding #HackerNews #ngated -
🔒💻 Behold, the latest masterpiece for those who dream of locking their #bash scripts in eternal embrace with a mutex! Because who doesn't love making the simplest tasks into a cryptic #semaphore puzzle? 🚀🤖 Meanwhile, #GitHub casually hints that #AI should write your code, perhaps after it untangles this weave of command line wizardry. 🙄
https://github.com/bigattichouse/waitlock #scripting #mutex #coding #HackerNews #ngated -
Linux CLI tool to provide mutex locks for long running bash ops
https://github.com/bigattichouse/waitlock
#HackerNews #Linux #CLI #mutex #locks #bash #scripting #open #source #tools #GitHub
-
Linux CLI tool to provide mutex locks for long running bash ops
https://github.com/bigattichouse/waitlock
#HackerNews #Linux #CLI #mutex #locks #bash #scripting #open #source #tools #GitHub
-
Обработка повторных запусков приложения в Windows
Один экземпляр — множество вызовов: Как обеспечить работу вашего приложения так, чтобы оно запускалось только один раз, а все последующие вызовы — передавали данные уже работающему экземпляру? Предлагаю рассмотреть решение с использованием Mutex и Named Pipes на примере заглушки, которая должна обрабатывать ссылки протокола ask: для ЛОЦМАН:PLM.
-
Some brave soul decided to reinvent the wheel by building their own #mutex in C, because, apparently, mastering pre-existing solutions just wasn't challenging (or fun) enough. 🤦♂️ Instead of taking a nice walk outside, they've chosen to dance with futexes, as if Linux needed more accidental 'optimizations.' 🧐🔧
https://blog.fredrb.com/2025/06/02/futex-fun/ #reinventthewheel #Cprogramming #futex #Linuxoptimization #codinghumor #HackerNews #ngated -
Some brave soul decided to reinvent the wheel by building their own #mutex in C, because, apparently, mastering pre-existing solutions just wasn't challenging (or fun) enough. 🤦♂️ Instead of taking a nice walk outside, they've chosen to dance with futexes, as if Linux needed more accidental 'optimizations.' 🧐🔧
https://blog.fredrb.com/2025/06/02/futex-fun/ #reinventthewheel #Cprogramming #futex #Linuxoptimization #codinghumor #HackerNews #ngated -
Nice read! @mamantoha published a short and nice ✍️ blog post about 🚥 #semaphores in :crystal: @CrystalLanguage at @thepracticaldev:
https://dev.to/mamantoha/semaphores-in-crystal-5eha
#CrystalLang #CrystalLanguage #concurrency #waitgroup #mutex #parallel #paralellism #concurrency #programming #crystal
-
Nice read! @mamantoha published a short and nice ✍️ blog post about 🚥 #semaphores in :crystal: @CrystalLanguage at @thepracticaldev:
https://dev.to/mamantoha/semaphores-in-crystal-5eha
#CrystalLang #CrystalLanguage #concurrency #waitgroup #mutex #parallel #paralellism #concurrency #programming #crystal
-
Баг SRWLock в Windows вешает многопоточные программы
std::shared_mutex — стандартный примитив синхронизации, появившийся в C++17, призванный упростить реализацию паттерна «многие читатели — один писатель». Однако, как показывают некоторые практические кейсы, его реализация на Windows, использующая SRWLock (Slim Reader/Writer Lock), может привести к серьёзным проблемам: в определённых ситуациях многопоточное приложение может зависнуть (дедлок).
-
[Перевод] Решение проблемы race condition в Kotlin корутина
Синхронизация корутин в Android имеет огромное значение для обеспечения безопасности и эффективности многопоточности. Коррутины упрощают управление асинхронными задачами, но без должной синхронизации могут возникнуть проблемы, такие как race condition, что приведет к неправильному поведению приложения.
https://habr.com/ru/articles/853266/
#coroutine #race_conditions #multithreading #mutex #semaphore
-
[Перевод] Самые быстрые мьютексы
Cosmopolitan Libc хорошо известна своим « полиглотным жирным бинарным » хаком, который позволяем исполняемым файлам запускаться на шести операционных системах для AMD64/ARM64. Вас может удивить, что при этом она может быть лучше С‑библиотекой для вашего продакшена. Чтобы продемонстрировать это, давайте сравним библиотеку мьютексов Cosmo с другими платформами. Мы напишем простой тест, который создает 30 потоков, увеличивающих одно и то же число 100 000 раз. Это поможет проверить, насколько хорошо реализация мьютексов справляется с задачей при интенсивном использовании.
-
Точки соприкосновения: Java & GC
Можно писать на Java, вообще не задумываясь, как работает сборка мусора: «ну оно же там само собой происходит как-то». Однако разобраться как следует — не только интересно, но и полезно: например, какой из подходов к GC лучше соответствует конкретно вашему проекту? На нашей конференции JPoint 2024 был доклад Дмитрия Силина об этом, участникам он понравился, и мы решили сделать для Хабра текстовую версию. Публикуем и текст, и видеозапись.
-
> Raspberry Pi projects?
Solved a month long mystery!
How to manage Raspberry Pi I2C device access inside ROS2/Ubuntu/Docker container **AND** outside the container in Raspberry PiOS Bookworm?
Docker invocation must map both the bus AND the mutex lock folder /var/lock/
#RaspberryPi5 #RaspberryPiOS
#I2C #Mutex #Docker #ROS2humble #Robot #GoPiGo3 -
@drfootleg Another tip that has been plaguing me for a month!
If you have processes inside a Docker container and other processes outside the Docker container that need mutex protection such as I2C bus or SPI bus accesses, you need to map the bus (obviously) **and** the mutex folder!
I had the sensor access working great but could not figure out why my inside and outside "mutex protected" accesses were colliding...
-
Make Your Code Slower With Multithreading https://hackaday.com/2024/06/07/make-your-code-slower-with-multithreading/ #MULTITHREADING #SoftwareHacks #performance #profiling #spinlocks #syscall #futex #mutex #Perf+
-
Make Your Code Slower With Multithreading - With the performance of modern CPU cores plateauing recently, the main performance... - https://hackaday.com/2024/06/07/make-your-code-slower-with-multithreading/ #multithreading #softwarehacks #performance #profiling #spinlocks #syscall #futex #mutex #perf
-
⬆️ @vidyarthi
>> Shoe #Semaphore
> Any source?Are you contesting this to claim there was NO protection between the 5 #Brothers simultaneously entering a #criticalSection, or are you claiming the #mutex was of a DIFFERENT form?
-
Debugging lock ordering inversions 😫
#softwareEngineering #concurrency #mutex #lock #lockOrder #debugging
-
Kotlin Mutex: A Comprehensive Guide
-
I knew I'd get to this bullshit eventually.
-
Spent a decent portion of the weekend trying to get my head around threading, #Arc and #Mutex in #RustLang. The idea is to provide safe multithreaded access to an SQLite DB and allow for many concurrent reads but only one writer at a time (per SQLite).
It was pretty interesting to say the least and I ended up with a threadsafe wrapper around diesel.rs that I’m fairly happy with!
Now... to try hooking it into something useful.