datacamp-logo

Socket vs. Fork (II)

There were two problems in the previous exercise:

  1. The socket cluster failed to print a_global_var.
  2. The fork cluster did not update a_global_var after it was updated.

Which of the following statements are true?

  • A. Workers in a socket cluster start with an empty environment. Thus, a_global_var was not defined.
  • B. Workers in a fork cluster start with an empty environment. Thus, a_global_var was not updated.
  • C. Workers in a fork cluster start with a copy of the master environment. After forking, they do not see changes on the master. Thus, a_global_var was not updated.
  • D. Workers in a socket cluster start with a copy of the master environment. Since a_global_var was not defined on master, it was not known to the workers.
Answer the question
50 XP
Possible Answers
  • press
  • press
  • press
  • press