当前位置:网站首页>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
forkIOis (almost) negligible? namely , We can say useforkIOestablish 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边栏推荐
- NFT:使用 EIP-2981 開啟 NFT 版稅之旅
- MySQL function variable stored procedure
- Use selenium automated test tool to climb the enrollment score line and ranking of colleges and universities related to the college entrance examination
- “目标检测“+“视觉理解“实现对输入图像的理解
- Loop filtering based on Unet
- Volley parsing data shows networking failure
- 205. isomorphic string
- What are permissions? What are roles? What are users?
- 241. Design priorities for operational expressions
- 【TA-霜狼_may-《百人计划》】1.2.2 矩阵计算
猜你喜欢

After many job hopping, the monthly salary is equal to the annual salary of old colleagues

Go learning --- unit test subtest

Quickly filter data such as clock in time and date: Excel filter to find whether a certain time point is within a certain time period

NFT: utilisez EIP - 2981 pour commencer un voyage de redevances NFT

Embedded System Development Notes 79: why should I get the IP address of the local network card

【深度学习】(4) Transformer 中的 Decoder 机制,附Pytorch完整代码

ThreeJS开篇

JD intelligent customer service Yanxi intention system construction and intention recognition technology introduction

Use selenium automated test tool to climb the enrollment score line and ranking of colleges and universities related to the college entrance examination

283.移动零
随机推荐
Web components series (VIII) -- custom component style settings
Loop filtering based on Unet
LeetCode 1827. Increment array with minimal operation
10. regular expression matching
Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
[ta - Frost Wolf May - 100 people plan] 1.2.1 base vectorielle
Custom components in applets
【历史上的今天】6 月 30 日:冯·诺依曼发表第一份草案;九十年代末的半导体大战;CBS 收购 CNET
HoloLens2开发环境搭建及部署app
[Master / slave] router election in DD message
NFT: start NFT royalty journey with eip-2981
206.反转链表
TS type gymnastics: illustrating a complex advanced type
Procurement intelligence is about to break out, and Alipay'3+2'system helps enterprises build core competitive advantages
Embedded System Development Notes 80: using QT designer to design the main interface
283. move zero
Introduction of Spock unit test framework and its practice in meituan optimization___ Chapter I
Concurrent mode of different performance testing tools
NFT:使用 EIP-2981 开启 NFT 版税之旅
TASK04|數理統計