Clarification about Lab 2 Task 2

salpha.2004
Neuling
Neuling
Beiträge: 2
Registriert: 23. Okt 2014 21:27

Clarification about Lab 2 Task 2

Beitrag von salpha.2004 » 28. Mai 2016 08:57

Hi,

What should be the output written to the file in the following cases:

1.
# ./task2.out output.txt
$ 2
2
0
$ -1
$ x

-----------------------------------

2.
# ./task2.out output.txt
$ 2
1
2
$ 1
0
$ x

Thanks in advance!

Best Regards,
Saeed

nicolas
Windoof-User
Windoof-User
Beiträge: 37
Registriert: 29. Jan 2010 12:56

Re: Clarification about Lab 2 Task 2

Beitrag von nicolas » 30. Mai 2016 11:03

As stated in the lab task, the file should contain all generated numbers, one per line. So the expected output would be

Code: Alles auswählen

# cat output.txt
2
0
for the first case, and

Code: Alles auswählen

# cat output.txt
1
2
0
for the second case.

In the first case, this requires the worker process to be successfully restored. Naturally, if you have not implemented checkpointing yet (as in Task 2.1) or no checkpoint is taken between the generation of the random numbers and the worker crash (possible in both Task 2.2 or 2.3, depending on the interval), your output file would instead be empty.

Antworten

Zurück zu „Archiv“