> we did not understand why the field +nsems+ is included. > what is the use of this field ?? > plz let us know > semget (key_t key, int nsems, int semflg) Semaphores are allocated in sets, and nsems specifies the number of semaphores needed in the set. All semaphores in a set can be operated on with a signle semop() call. This operation is guaranteed to be atomic. Also, either operations on all semaphores complete, or none of them will. This is helpful when semaphores are used to manage access to multiple resources. 'Unix Network Programming' by Richard Stevens has good explanation and sample programs for System V IPC. Hope this helps, Ravi. __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/