1

Semaphores problem

view story
linux-howto

http://www.unix.com – hallo! if there are many processes running and I initialize the semaphore like this: Code: my_sem = sem_open(SEM_NAME, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 10); (the last argument is 10) and then i use sem_wait(my_sem); sleep(5); sem_post; Will 10 processes be able to access the critical section on the same time and sleep or only one process can do that? And if not how is it possible to make max 10 processes sleep at the same time? Moderator's Comments: Review Homework Rules. Thank (HowTos)