techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.6K
active users

#futex

0 posts0 participants0 posts today
GripNews<p>🌖 Futex 趣味:用 C 打造我自己的互斥鎖 (Mutex)<br>➤ 從旋轉鎖到 Futex:優化鎖定機制的探索<br>✤ <a href="https://blog.fredrb.com/2025/06/02/futex-fun/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.fredrb.com/2025/06/02/fut</span><span class="invisible">ex-fun/</span></a><br>本文探討瞭如何在 Linux 環境下實作一個高效的鎖定機制。作者首先介紹了簡單的旋轉鎖 (spin lock),並指出其高 CPU 佔用率的缺點。接著,深入研究了 Linux 的 Futex 系統呼叫,利用其將等待鎖的線程置於睡眠狀態,而非不斷迴圈檢測,從而大幅降低 CPU 消耗。作者詳細解釋了 Futex 的運作原理、不同情境下的行為,並提供了使用 Futex 實作互斥鎖的具體程式碼,並與旋轉鎖進行效能比較。<br>+ 寫得真棒!詳細解釋了 Futex 的原理和使用方法,對理解 Linux 核心的鎖定機制非常有幫助。<br>+ 程式碼很清晰易懂,實際跑了一下,CPU 佔用率果然有明顯改善。<br><a href="https://mastodon.social/tags/%E7%A8%8B%E5%BC%8F%E8%A8%AD%E8%A8%88" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>程式設計</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/%E5%90%8C%E6%AD%A5%E8%99%95%E7%90%86" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>同步處理</span></a> <a href="https://mastodon.social/tags/Futex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Futex</span></a></p>
N-gated Hacker News<p>Some brave soul decided to reinvent the wheel by building their own <a href="https://mastodon.social/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> 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.' 🧐🔧<br><a href="https://blog.fredrb.com/2025/06/02/futex-fun/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.fredrb.com/2025/06/02/fut</span><span class="invisible">ex-fun/</span></a> <a href="https://mastodon.social/tags/reinventthewheel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>reinventthewheel</span></a> <a href="https://mastodon.social/tags/Cprogramming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Cprogramming</span></a> <a href="https://mastodon.social/tags/futex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>futex</span></a> <a href="https://mastodon.social/tags/Linuxoptimization" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linuxoptimization</span></a> <a href="https://mastodon.social/tags/codinghumor" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>codinghumor</span></a> <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/ngated" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ngated</span></a></p>
:rss: Hacker News<p>Fun with Futex<br><a href="https://blog.fredrb.com/2025/06/02/futex-fun/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.fredrb.com/2025/06/02/fut</span><span class="invisible">ex-fun/</span></a><br><a href="https://rss-mstdn.studiofreesia.com/tags/ycombinator" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ycombinator</span></a> <a href="https://rss-mstdn.studiofreesia.com/tags/concurrency" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>concurrency</span></a> <a href="https://rss-mstdn.studiofreesia.com/tags/futex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>futex</span></a> <a href="https://rss-mstdn.studiofreesia.com/tags/linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>linux</span></a> <a href="https://rss-mstdn.studiofreesia.com/tags/locks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>locks</span></a></p>
Max<p>follow me if you like <a href="https://mk.noob.quest/tags/luigimangione" rel="nofollow noopener" target="_blank">#luigimangione</a> <a href="https://mk.noob.quest/tags/gaysex" rel="nofollow noopener" target="_blank">#gaysex</a> <a href="https://mk.noob.quest/tags/drugs" rel="nofollow noopener" target="_blank">#drugs</a> <a href="https://mk.noob.quest/tags/antartica" rel="nofollow noopener" target="_blank">#antartica</a> <a href="https://mk.noob.quest/tags/lesbians" rel="nofollow noopener" target="_blank">#lesbians</a> <a href="https://mk.noob.quest/tags/iceshrimp" rel="nofollow noopener" target="_blank">#iceshrimp</a> <a href="https://mk.noob.quest/tags/iceland" rel="nofollow noopener" target="_blank">#iceland</a> <a href="https://mk.noob.quest/tags/libtoilet" rel="nofollow noopener" target="_blank">#libtoilet</a> <a href="https://mk.noob.quest/tags/futex" rel="nofollow noopener" target="_blank">#futex</a></p>
Pyrzout :vm:<p>Make Your Code Slower With Multithreading <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://social.skynetcloud.site/tags/MULTITHREADING" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MULTITHREADING</span></a> <a href="https://social.skynetcloud.site/tags/SoftwareHacks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SoftwareHacks</span></a> <a href="https://social.skynetcloud.site/tags/performance" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>performance</span></a> <a href="https://social.skynetcloud.site/tags/profiling" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>profiling</span></a> <a href="https://social.skynetcloud.site/tags/spinlocks" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>spinlocks</span></a> <a href="https://social.skynetcloud.site/tags/syscall" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>syscall</span></a> <a href="https://social.skynetcloud.site/tags/futex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>futex</span></a> <a href="https://social.skynetcloud.site/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a> <a href="https://social.skynetcloud.site/tags/Perf" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Perf</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>