Does Linux Time Division Processes Or Threads

前端 未结 3 1382
耶瑟儿~
耶瑟儿~ 2020-12-16 08:01

A prof once told us in class that Windows, Linux, OS X and UNIX scale on threads and not processes, so threads would likely benefit your application even on a single process

3条回答
  •  时光取名叫无心
    2020-12-16 08:51

    I'm not sure exactly what you're asking, but here is an answer which may help.

    Under Linux, processes and threads are essentially exactly the same. The scheduler understands things called "tasks" which it doesn't really care whether they share address space or not. Sharing or not sharing things really depends on how they were created.

    Whether to use threads or processes is a key design decision and should not be taken lightly, but performance of the scheduler is probably not a factor (of course things like IPC requirements will vary the design wildly)

提交回复
热议问题