Answers/Solutions to Exercises in Chapter 11, Exercise 3

E3: Repeat exercise 2 with one change, this time before the first fork() let the program create a shared memory segment and let logi point to it. Check the log and the sequential numbers of messages from all the processes involved. Compare it with the log from exercise 2.

S3: See sample solution of Exercise 1, it does exactly that. Notice that the log entries have correct and unique sequential numbers (no duplications as in Exercise 2).

Back to Answers/Solutions Index                          Back to Answers/Solutions for Chapter 11 Index