Final answer:
The dining-philosophers problem, related to topics of synchronization in computer science, occurs in the classic scenario of 5 philosophers and 5 chopsticks. This setup allows for the possibility of deadlock, where all philosophers hold one chopstick and wait indefinitely for the other, thus preventing anyone from eating. The correct option is a) 5 philosophers and 5 chopsticks.
Step-by-step explanation:
The dining-philosophers problem is a well-known synchronization problem within the field of computer science, particularly within the context of operating systems and concurrency. The problem involves a certain number of philosophers seated around a circular table with chopsticks placed between them.
Each philosopher must alternately think and eat; however, a philosopher can only eat when they have both chopsticks adjacent to them. Upon finishing eating, they put down the chopsticks and start thinking again.
The challenge is to create a protocol that allows the philosophers to eat without causing a deadlock, where each philosopher is waiting for a chopstick that is never released, or starvation, where a philosopher waits indefinitely to acquire chopsticks.
The problem will occur in the case of 5 philosophers and 5 chopsticks (option a), which is the classic setup for this problem. With an equal number of philosophers and chopsticks, the potential for a deadlock exists because each philosopher might pick up one chopstick and wait for the other, leading to a situation where all philosophers are holding one chopstick and waiting indefinitely for the next.
This would prevent any philosopher from eating, demonstrating the crux of the problem.
The correct option is a) 5 philosophers and 5 chopsticks.