sigmoid.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A social space for people researching, working with, or just interested in AI!

Server stats:

575
active users

#mutex

0 posts0 participants0 posts today
ludwigpacifici<p>On deadlock free vs. starvation free: <a href="https://stackoverflow.com/questions/8370098/dead-lock-free-vs-starvation-free#32855505" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">stackoverflow.com/questions/83</span><span class="invisible">70098/dead-lock-free-vs-starvation-free#32855505</span></a></p><p><a href="https://mastodon.sdf.org/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a></p>
Hacker News<p>Linux CLI tool to provide mutex locks for long running bash ops</p><p><a href="https://github.com/bigattichouse/waitlock" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/bigattichouse/waitl</span><span class="invisible">ock</span></a></p><p><a href="https://mastodon.social/tags/HackerNews" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HackerNews</span></a> <a href="https://mastodon.social/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> <a href="https://mastodon.social/tags/CLI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CLI</span></a> <a href="https://mastodon.social/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> <a href="https://mastodon.social/tags/locks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>locks</span></a> <a href="https://mastodon.social/tags/bash" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bash</span></a> <a href="https://mastodon.social/tags/scripting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>scripting</span></a> <a href="https://mastodon.social/tags/open" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>open</span></a> <a href="https://mastodon.social/tags/source" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>source</span></a> <a href="https://mastodon.social/tags/tools" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tools</span></a> <a href="https://mastodon.social/tags/GitHub" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GitHub</span></a></p>
Felix Palmen :freebsd: :c64:<p>More interesting progress trying to make <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a> suitable for very busy sites!</p><p>I realized that <a href="https://mastodon.bsd.cafe/tags/TLS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TLS</span></a> (both with <a href="https://mastodon.bsd.cafe/tags/OpenSSL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenSSL</span></a> and <a href="https://mastodon.bsd.cafe/tags/LibreSSL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LibreSSL</span></a>) is a *major* bottleneck. With TLS enabled, I couldn't cross 3000 requests per second, with somewhat acceptable response times (most below 500ms). Disabling TLS, I could really see the impact of a <a href="https://mastodon.bsd.cafe/tags/lockfree" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lockfree</span></a> queue as opposed to one protected by a <a href="https://mastodon.bsd.cafe/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a>. With the mutex, up to around 8000 req/s could be reached on the same hardware. And with a lockfree design, that quickly went beyond 10k req/s, but crashed. 😆</p><p>So I read some scientific papers 🙈 ... and redesigned a lot (*). And now it finally seems to work. My latest test reached a throughput of almost 25k req/s, with response times below 10ms for most requests! I really didn't expect to see *this* happen. 🤩 Maybe it could do even more, didn't try yet.</p><p>Open issue: Can I do something about TLS? There *must* be some way to make it perform at least a *bit* better...</p><p>(*) edit: Here's the design I finally used, with a much simplified "dequeue" because the queues in question are guaranteed to have only a single consumer: <a href="https://dl.acm.org/doi/10.1145/248052.248106" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">dl.acm.org/doi/10.1145/248052.</span><span class="invisible">248106</span></a></p>
Felix Palmen :freebsd: :c64:<p>Nice, <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> overhaul done. Removed two locks (<a href="https://mastodon.bsd.cafe/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a>) and two condition variables, replaced by a single lock and a single <a href="https://mastodon.bsd.cafe/tags/semaphore" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>semaphore</span></a>. 😎 Simplifies the overall structure a lot, and it's probably safe to assume slightly better performance in contended situations as well. And so far, <a href="https://mastodon.bsd.cafe/tags/valgrind" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>valgrind</span></a>'s helgrind tool doesn't find anything to complain about. 🙃</p><p>Looking at the screenshot, I should probably make <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a> default to *two* threads per CPU and expose the setting in the configuration file. When some thread jobs are expected to block, having more threads than CPUs is probably better.</p><p><a href="https://github.com/Zirias/poser/commit/995c27352615a65723fbd1833b2d36781cbeff4d" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Zirias/poser/commit</span><span class="invisible">/995c27352615a65723fbd1833b2d36781cbeff4d</span></a></p>
alexanderadam<p>Nice read! <span class="h-card" translate="no"><a href="https://ruby.social/@mamantoha" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>mamantoha</span></a></span> published a short and nice ✍️ blog post about 🚥 <a href="https://ruby.social/tags/semaphores" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>semaphores</span></a> in :crystal: <span class="h-card" translate="no"><a href="https://fosstodon.org/@CrystalLanguage" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>CrystalLanguage</span></a></span> at <span class="h-card" translate="no"><a href="https://fosstodon.org/@thepracticaldev" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>thepracticaldev</span></a></span>:</p><p><a href="https://dev.to/mamantoha/semaphores-in-crystal-5eha" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">dev.to/mamantoha/semaphores-in</span><span class="invisible">-crystal-5eha</span></a></p><p><a href="https://ruby.social/tags/CrystalLang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CrystalLang</span></a> <a href="https://ruby.social/tags/CrystalLanguage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CrystalLanguage</span></a> <a href="https://ruby.social/tags/concurrency" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>concurrency</span></a> <a href="https://ruby.social/tags/waitgroup" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>waitgroup</span></a> <a href="https://ruby.social/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> <a href="https://ruby.social/tags/parallel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parallel</span></a> <a href="https://ruby.social/tags/paralellism" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>paralellism</span></a> <a href="https://ruby.social/tags/concurrency" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>concurrency</span></a> <a href="https://ruby.social/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <a href="https://ruby.social/tags/crystal" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>crystal</span></a></p>
cyclical_obsessive<p><span class="h-card" translate="no"><a href="https://mastodon.social/@themagpi" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>themagpi</span></a></span> </p><p>&gt; Raspberry Pi projects?</p><p>Solved a month long mystery! </p><p>How to manage Raspberry Pi I2C device access inside ROS2/Ubuntu/Docker container **AND** outside the container in Raspberry PiOS Bookworm? </p><p>Docker invocation must map both the bus AND the mutex lock folder /var/lock/</p><p> <a href="https://fosstodon.org/tags/RaspberryPi5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RaspberryPi5</span></a> <a href="https://fosstodon.org/tags/RaspberryPiOS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RaspberryPiOS</span></a> <br> <a href="https://fosstodon.org/tags/I2C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>I2C</span></a> <a href="https://fosstodon.org/tags/Mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Mutex</span></a> <a href="https://fosstodon.org/tags/Docker" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Docker</span></a> <a href="https://fosstodon.org/tags/ROS2humble" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ROS2humble</span></a> <a href="https://fosstodon.org/tags/Robot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Robot</span></a> <a href="https://fosstodon.org/tags/GoPiGo3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GoPiGo3</span></a></p>
cyclical_obsessive<p><span class="h-card" translate="no"><a href="https://fosstodon.org/@drfootleg" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>drfootleg</span></a></span> Another tip that has been plaguing me for a month! </p><p>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! </p><p>I had the sensor access working great but could not figure out why my inside and outside "mutex protected" accesses were colliding...</p><p><a href="https://fosstodon.org/tags/GoPiGo3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GoPiGo3</span></a> <a href="https://fosstodon.org/tags/Docker" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Docker</span></a> <a href="https://fosstodon.org/tags/RaspberryPiOS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RaspberryPiOS</span></a> <a href="https://fosstodon.org/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> <a href="https://fosstodon.org/tags/ros2humble" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ros2humble</span></a></p>
cyclical_obsessive<p>Think I solved why my inside Docker (ROS 2) access to I2C INA219 current sensor was colliding with my outside Docker access to the device - forgot to map the /var/lock directory so the mutex is visible from both environments!</p><p><a href="https://fosstodon.org/tags/Docker" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Docker</span></a> <a href="https://fosstodon.org/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> <a href="https://fosstodon.org/tags/ina219" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ina219</span></a> <a href="https://fosstodon.org/tags/robot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>robot</span></a> <a href="https://fosstodon.org/tags/GoPiGo3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GoPiGo3</span></a> <a href="https://fosstodon.org/tags/ros2humble" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ros2humble</span></a></p>
IT News<p>Make Your Code Slower With Multithreading - With the performance of modern CPU cores plateauing recently, the main performance... - <a href="https://hackaday.com/2024/06/07/make-your-code-slower-with-multithreading/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">hackaday.com/2024/06/07/make-y</span><span class="invisible">our-code-slower-with-multithreading/</span></a> <a href="https://schleuss.online/tags/multithreading" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>multithreading</span></a> <a href="https://schleuss.online/tags/softwarehacks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>softwarehacks</span></a> <a href="https://schleuss.online/tags/performance" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>performance</span></a> <a href="https://schleuss.online/tags/profiling" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>profiling</span></a> <a href="https://schleuss.online/tags/spinlocks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>spinlocks</span></a> <a href="https://schleuss.online/tags/syscall" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>syscall</span></a> <a href="https://schleuss.online/tags/futex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>futex</span></a> <a href="https://schleuss.online/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> <a href="https://schleuss.online/tags/perf" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>perf</span></a></p>
we compiled different<p><a href="https://mastodon.social/tags/tui" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tui</span></a> <a href="https://mastodon.social/tags/daw" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>daw</span></a> for <a href="https://mastodon.social/tags/jack" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>jack</span></a> in <a href="https://mastodon.social/tags/rustlang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustlang</span></a> </p><p>Rewrote the UI of the <a href="https://mastodon.social/tags/midi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>midi</span></a> sequencer with <a href="https://mastodon.social/tags/ratatui" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ratatui</span></a> for double buffering.</p><p>We're polyphonic now! Multithreaded, too - I put a <a href="https://mastodon.social/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> between input/render/audio threads instead of message passing.</p><p>Doesn't even properly support Note Off events yet, but it does play a mean cheerful dirge. Playback cursor position still off, though.</p><p>Hooking this up to the VST host every time I restart either is bit of a faff. Gotta teach it to auto-connect the MIDI/audio ports...</p>
lambdageek<p>Debugging lock ordering inversions 😫 </p><p><a href="https://mastodon.social/tags/softwareEngineering" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>softwareEngineering</span></a> <a href="https://mastodon.social/tags/concurrency" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>concurrency</span></a> <a href="https://mastodon.social/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> <a href="https://mastodon.social/tags/lock" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lock</span></a> <a href="https://mastodon.social/tags/lockOrder" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lockOrder</span></a> <a href="https://mastodon.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a></p>