✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
We want to use a semaphore to ensure that a process that creates a single thread waits until the thread finishes before continuing. To do this, we will have the process call sem_wait() after creating the thread and the child will call sem_post() after it finishes. We are unsure what to initialize the semaphore to, but we decide on -1. What will be the result?
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!