当前位置:网站首页>Haskell lightweight threads overhead and use on multicores
Haskell lightweight threads overhead and use on multicores
2022-07-01 04:15:00 【Technology feast】
problem :
I've been reading the "Real World Haskell" book, the chapter on concurrency and parallelism. I've been reading “ real world Haskell” A Book , Chapter on concurrency and parallelism .My question is as follows: My question is as follows :
Since Haskell threads are really just multiple "virtual" threads inside one "real" OS-thread, does this mean that creating a lot of them (like 1000) will not have a drastic impact on performance? because Haskell A thread is really just a “ real ”OS Multiple in thread “ fictitious ” Threads , Does this mean creating them ( Such as 1000) Will not have a significant impact on performance ?Ie, can we say that the overhead incurred from creating a Haskell thread with
forkIO
is (almost) negligible? namely , We can say useforkIO
establish Haskell Is the overhead of threading almost negligible ?Please bring pactical examples if possible. If possible , Please bring typical examples .Doesn't the concept of lightweight threads prevent us from using the benefints of multicore architectures? Does the concept of lightweight threads prevent us from using the benefits of multi-core architecture ?As I understand, it is not possible for two Haskell threads to execute concurrently on two separate cores, because they are really one single thread from the operating system's point of view. as far as I am concerned , Two Haskell Threads cannot execute concurrently on two separate kernels , Because from the perspective of the operating system , They are actually a separate thread .Or does the Haskell runtime do some clever tricks to ensure that multiple CPU's can be made use of? perhaps Haskell Does the runtime do some clever tricks to ensure that multiple CPU?
Solution :
Reference resources : https://stackoom.com/en/question/OXEo边栏推荐
- 242. valid Letter heteronyms
- Redis(七)优化建议
- 京东智能客服言犀意图体系搭建和意图识别技术介绍
- 嵌入式系统开发笔记80:应用Qt Designer进行主界面设计
- JMeter login failure, extracting login token, and obtaining token problem solving
- LeetCode 1400. Construct K palindrome strings
- 25.k sets of flipped linked lists
- Class and object finalization
- 嵌入式系統開發筆記80:應用Qt Designer進行主界面設計
- [Master / slave] router election in DD message
猜你喜欢
使用WinMTR软件简单分析跟踪检测网络路由情况
Huawei simulator ENSP - hcip - Hybrid Experiment 2
js 图片路径转换base64格式
【深度学习】(4) Transformer 中的 Decoder 机制,附Pytorch完整代码
MFC window scroll bar usage
TASK04|数理统计
使用scroll-view实现滑块视图可能遇到的问题及其解决方法
"Target detection" + "visual understanding" realizes the understanding of the input image
TASK04|數理統計
Recommend the best product development process in the Internet industry!
随机推荐
[today in history] June 30: von Neumann published the first draft; The semiconductor war in the late 1990s; CBS acquires CNET
Huawei simulator ENSP - hcip - Hybrid Experiment 2
[JPCs publication] the Third International Conference on control theory and application in 2022 (icocta 2022)
[TA frost wolf \u may- hundred people plan] 1.2.1 vector basis
Embedded System Development Notes 81: Using Dialog component to design prompt dialog box
Volley parsing data shows networking failure
72. edit distance
TS type gymnastics: illustrating a complex advanced type
Loop filtering based on Unet
Knowledge supplement: redis' basic data types and corresponding commands
跳槽一次涨8k,5年跳了3次...
Web components series (VIII) -- custom component style settings
Redis(七)优化建议
程序员女友给我做了一个疲劳驾驶检测
Go learning --- unit test subtest
LetCode 1829. Maximum XOR value per query
187. repeated DNA sequences
LeetCode 1827. Increment array with minimal operation
674. longest continuous increasing sequence force buckle JS
LeetCode 1380. Lucky number in matrix