My prof introduced us an algorithm with semaphores that was used to solve the "dining philosophers" problem. The algo is ok, apart from that it limits concurrency.
What does mean that it "limits concurrency" and why this happens ?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.
Sign up to join this communityMy prof introduced us an algorithm with semaphores that was used to solve the "dining philosophers" problem. The algo is ok, apart from that it limits concurrency.
What does mean that it "limits concurrency" and why this happens ?
You (or the algo) probably assigns a constant amount of time slice per process. Since amount is constant, as with number of process increases this effectively hinders concurrency. If this is the case, you need a fair scheduler type algorithm. Check on different algo's on a linux kernel may have.