Operating System (linux)
Budget: $10 USD
Write a program for the producer/consumer problem using processes instead of threads.
Use the following functions for process creation, etc: fork, execlp, waitpid
Use the following functions for sharing stuff between processes:
shm_open, ftruncate, mmap
Use the following functions to synchronize the producers and consumers:
sem_init, sem_wait, sem_post
The producers can exit when they've produced their whole string, e.g. "hello world"
Use the following functions for process creation, etc: fork, execlp, waitpid
Use the following functions for sharing stuff between processes:
shm_open, ftruncate, mmap
Use the following functions to synchronize the producers and consumers:
sem_init, sem_wait, sem_post
The producers can exit when they've produced their whole string, e.g. "hello world"