TGTGInsighttelegram intelligenceLIVE / telegram public index
← Linuxgram 🐧

TGINSIGHT SIMILAR POSTS

Sib kontenut simili

Kanal tas-sors @linuxgram · Post #17841 · Fra 19

📰 AI Helped Uncover A "50-80x Improvement" For Linux's IO_uring Linux block maintainer and IO_uring lead developer Jens Axboe recently was debugging some slowdowns in the AHCI/SCSI code with IO_uring usage. When turning to Claude AI to help in sorting through the issue, patches were devised that can deliver up to a "literally yield a 50-80x improvement on the io_uring side for idle systems." The code is on its way to the Linux kernel... 🔗 Source: https://www.phoronix.com/news/AI-50-80x-IO-uring #linux#kernel

Riżultati

5 postijiet simili nstabu

Tfittxija: #haskell

当前筛选 #haskell清除筛选
宇宙航海誌

@uchuukoukaishi · Post #368 · 31/07/2023 13:36

今天下午碰到一个并发问题,之前写的 Haskell 并发代码有考虑不周的地方,在特定情况下会死锁,简化一下是这样的: replicateM_ n_workers . forkIO $ do { -- Worker 线程 doSomethingThatMayFail; signalTSem semaphore; } -- 主线程 waitTSem semaphore 如果 doSomethingThatMayFail 抛异常导致线程挂了,那么 signal 就 unreachable,于是主线程会卡住。而 GHC 直接检测到了这个问题并在主线程(比较及时地)抛出了 BlockedIndefinitelyOnSTM 异常。 有点好奇是怎么实现的,于是读了一下 GHC,目前初步的理解是:Haskell 中的线程本身是一个会被 GC 的堆分配对象,当前线程 block 时这个线程会被放到 TVar 的 wait queue 里。如果 TVar 被 GC 了,那么这个线程本身也就 unreachable 了(线程本身并不是 GC root),会被 mark 掉。GC 过程中,如果发现某个 thread 是 unreachable 的,那么在最后关头会调用一个叫 resurrectThreads 的函数(Schedule.c),这个函数会检查线程状态对象的 "why_blocked" 字段,如果是 BlockedOnSTM(在 park 的时候设置的),那么就会在这个线程里抛出一个 BlockedIndefinitelyOnSTM 异常(相应地,其他 block 理由也会有其他种类的异常抛出)。 这个机制不使用任何 timer,并且一旦抛出异常就是真的发生 deadlock 了。缺点大概是不 complete ,比如用一个 StablePtr 维持住线程对象的命,就可以 hang forever 了。 #haskell

Hashtags

The Devs

@thedevs · Post #2075 · 30/08/2023 09:03

Leaving Haskell behind. #article#haskell @thedevs https://thedevs.link/EuJ9XK

每日 AWESOME 观察

@awesomeopensource · Post #88 · 29/03/2018 05:42

​​xmonad xmonad 是一种窗口管理器(window manager),用来管理软件窗口的位置和大小,会自动在桌面上平铺(tiling)窗口。xmonad 的所有操作都通过键盘,只适合命令行的重度用户。 语言:#Haskell 分类:#窗口管理器