Differences between System V and Posix semaphores
2012-07-09 17:57
501 查看
One marked difference between the System V and POSIX semaphore implementations is that in System V you can control how much the semaphore count can be increased or decreased; whereas in POSIX, the semaphore count is increased
and decreased by 1.
POSIX semaphores do not allow manipulation of semaphore permissions, whereas System V semaphores allow you to change the permissions of semaphores to a subset of the original permission.
Initialization and creation of semaphores is atomic (from the user's perspective) in POSIX semaphores.
From a usage perspective, System V semaphores are clumsy, while POSIX semaphores are straight-forward
The scalability of POSIX semaphores (using unnamed semaphores) is much higher than System V semaphores. In a user/client scenario, where each user creates her own instances of a server, it would be better to use POSIX semaphores.
System V semaphores, when creating a semaphore object, creates an array of semaphores whereas POSIX semaphores create just one. Because of this feature, semaphore creation (memory footprint-wise) is costlier in System V semaphores
when compared to POSIX semaphores.
It has been said that POSIX semaphore performance is better than System V-based semaphores.
POSIX semaphores provide a mechanism for process-wide semaphores rather than system-wide semaphores. So, if a developer forgets to close the semaphore, on process exit the semaphore is cleaned up. In simple terms, POSIX semaphores
provide a mechanism for non-persistent semaphores.
此贴转自:http://stackoverflow.com/questions/368322/differences-between-system-v-and-posix-semaphores
and decreased by 1.
POSIX semaphores do not allow manipulation of semaphore permissions, whereas System V semaphores allow you to change the permissions of semaphores to a subset of the original permission.
Initialization and creation of semaphores is atomic (from the user's perspective) in POSIX semaphores.
From a usage perspective, System V semaphores are clumsy, while POSIX semaphores are straight-forward
The scalability of POSIX semaphores (using unnamed semaphores) is much higher than System V semaphores. In a user/client scenario, where each user creates her own instances of a server, it would be better to use POSIX semaphores.
System V semaphores, when creating a semaphore object, creates an array of semaphores whereas POSIX semaphores create just one. Because of this feature, semaphore creation (memory footprint-wise) is costlier in System V semaphores
when compared to POSIX semaphores.
It has been said that POSIX semaphore performance is better than System V-based semaphores.
POSIX semaphores provide a mechanism for process-wide semaphores rather than system-wide semaphores. So, if a developer forgets to close the semaphore, on process exit the semaphore is cleaned up. In simple terms, POSIX semaphores
provide a mechanism for non-persistent semaphores.
此贴转自:http://stackoverflow.com/questions/368322/differences-between-system-v-and-posix-semaphores
相关文章推荐
- The difference between the 'Local System' account and the 'Network Service' account?
- Difference between End-to-end testing and System testing
- SharePoint : The difference and relation between SPListItem.Update and SPListItem.SystemUpdate Methods 【转载】
- Difference between End-to-end testing and System testing
- SharePoint : The difference and relation between SPListItem.Update and SPListItem.SystemUpdate Methods 【转载】
- The Differences Between BSD and System V Unix
- Differences between z/OS tasks and POSIX threads
- What is the difference between distributed and parallel processing operating system?
- Differences Between a BI/Data Warehouse System and an OLTP System
- Shared memory on Linux(difference posix and systemv )
- difference between qemu-kvm and qemu-system-x86_64
- What’s the difference between <system.web> and <system.webServer>?
- difference between SPListItem.SystemUpdate and SPListItem.Update Method
- What is the difference between a pack slip and a pick slip?
- The Difference between <resource-ref> and <resource-env-ref>,the title should be long...
- Java: Difference between ArrayList and LinkedList
- Difference between CPPFLAGS and CXXFLAGS in GNU Make
- What’s the difference between an interface and an abstract class in Java?
- The difference between null and DBNull.Value
- 【BAdI】Difference Between BADI and User Exits (转)