POSIX threads and fairness (semaphores)

前端 未结 2 1571
广开言路
广开言路 2021-01-15 18:30

I have created a program in C that creates 2 buffers. The buffer indices hold single characters, \'A\' or \'b\' etc... In order to learn more about multithreading, I creat

2条回答
  •  死守一世寂寞
    2021-01-15 18:58

    Multi-threaded software only makes sense when

    1. You have multiple core to play with
    2. Some algorithms are easier to program

    How do you define fair. Surely it is better if a core has nothing to do then they take on the work. Does it matter if one core never gets a lookin?

提交回复
热议问题