this post was submitted on 02 Jul 2023
260 points (96.4% liked)

Technology

59106 readers
3246 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

Interesting take on comparability vs performance. I gotta imaging capturing user data and sending to a cloud collector is also a big culprit.

you are viewing a single comment's thread
view the rest of the comments
[–] smoll_pp_operator@vlemmy.net 2 points 1 year ago (3 children)

So what I want to know is why do we still have programs that run on a single core when nearly every Windows PC out there is running a multi-core processor?

What are we missing to have the OS adapt any program to take advantage of the hardware?

[–] CoderKat@lemm.ee 14 points 1 year ago

You can't automatically adapt that. Multi thread safe programming takes extra work (or certain languages or frameworks that are able to optimize this). And even then, not all types of tasks make sense to multithread.

The OS still does take advantage of multiple cores, though. You never have just one process running. The OS will schedule different processes on different cores.

[–] Giooschi@lemmy.world 10 points 1 year ago

To run something on multiple cores you need to detect a bunch of different tasks it is doing that don't depend on one another. Then you can execute each task in its own thread. The problem is that most often these different task don't exist, or, if they do, figuring them out automatically by the code is likely equivalent to solving the halting problem, that is it's undecidable and there can't exist a program that does this.

[–] Thassar@lemmy.blahaj.zone 3 points 1 year ago

Multi-threaded programming is hard. You can't just write some code and expect it to work across 4 cores, you need to know what to parallelise and how to do it. If you think normal bugs are hard to fix, just wait until you have a calculation that gives a different answer each time you run it thanks to race conditions.