From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,ccba21c3a09cd1b8,start X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,ccba21c3a09cd1b8,start X-Google-Attributes: gidfee84,public From: dyuan@win20.rch.mci.com (David Yuan) Subject: Speed comparison of Posix named and SysV semaphore operations Date: 1996/04/15 Message-ID: <4ktur4$r5f@news.internetmci.com>#1/1 X-Deja-AN: 147619144 organization: MCI, Dallas newsgroups: comp.unix.osf.osf1,comp.unix.osf.misc hi, I am using an Alphaserver 2100 4/275 which has 1 gb memory, 1 21064 CPU. OS is Digital UNIX v3.2c. I found that P1003.1b named semaphore operations (sem_create, sem_wait, sem_post) are faster than System V implementation (semget,semop). The following is the result of pure semaphore acquire and release operations (at test time, the system load is very low, actually, only myself was using the machine): iterations Posix Sys V 1000000 3.544193 18.788549 # normal process 1000000 3.867264 18.703296 # change priority to max priority Is the result comparable? If I change the priority of the process to top priority and reschedule it. the performance of the test is even slower (surprise). Is ther anybody out there who did such test or have any opinion? thanks, David -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ David Yuan MCI Telecommunications Corporation 901 International Pkwy. || Office Number: 214 498 1129