README: fix lists
This commit is contained in:
parent
7a1ccac676
commit
a990b014df
20
README.md
20
README.md
@ -26,15 +26,15 @@ You have to write a program for the mandatory part and another one for the bonus
|
||||
- Your(s) program(s) should take the following arguments:
|
||||
number_of_philosophers time_to_die time_to_eat time_to_sleep
|
||||
[number_of_times_each_philosopher_must_eat]
|
||||
* number_of_philosophers: The number of philosophers and also the number
|
||||
* number_of_philosophers: The number of philosophers and also the number
|
||||
of forks.
|
||||
* time_to_die (in milliseconds): If a philosopher didn’t start eating time_to_die
|
||||
* time_to_die (in milliseconds): If a philosopher didn’t start eating time_to_die
|
||||
milliseconds since the beginning of their last meal or the beginning of the sim-
|
||||
ulation, they die.
|
||||
* time_to_eat (in milliseconds): The time it takes for a philosopher to eat.
|
||||
* time_to_eat (in milliseconds): The time it takes for a philosopher to eat.
|
||||
During that time, they will need to hold two forks.
|
||||
* time_to_sleep (in milliseconds): The time a philosopher will spend sleeping.
|
||||
* number_of_times_each_philosopher_must_eat (optional argument): If all
|
||||
* time_to_sleep (in milliseconds): The time a philosopher will spend sleeping.
|
||||
* number_of_times_each_philosopher_must_eat (optional argument): If all
|
||||
philosophers have eaten at least number_of_times_each_philosopher_must_eat
|
||||
times, the simulation stops. If not specified, the simulation stops when a
|
||||
philosopher dies.
|
||||
@ -46,11 +46,11 @@ pher number N + 1.
|
||||
Philosophers I never thought philosophy would be so deadly
|
||||
About the logs of your program:
|
||||
- Any state change of a philosopher must be formatted as follows:
|
||||
* timestamp_in_ms X has taken a fork
|
||||
* timestamp_in_ms X is eating
|
||||
* timestamp_in_ms X is sleeping
|
||||
* timestamp_in_ms X is thinking
|
||||
* timestamp_in_ms X died
|
||||
* timestamp_in_ms X has taken a fork
|
||||
* timestamp_in_ms X is eating
|
||||
* timestamp_in_ms X is sleeping
|
||||
* timestamp_in_ms X is thinking
|
||||
* timestamp_in_ms X died
|
||||
Replace timestamp_in_ms with the current timestamp in milliseconds
|
||||
and X with the philosopher number.
|
||||
- A displayed state message should not be mixed up with another message.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user