Skip to content

Comment on Multithreading or Light-weight processes ?parent

Comments

Don't forget also that when your CPU shares time, it divides up the time equally among the processes. So if your application creates 20 processes, it takes a disproportionate amount of CPU time (I believe, someone correct me if I'm wrong).

It depends on the OS. In most cases, threads are the only schedulable entity (think of a classic process as containing one thread), so there is no difference between 20 single-threaded processes and one process with 20 threads.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.