From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7b17c7e8b77cdcfe,start X-Google-Attributes: gidfee84,public From: rsurwilo@usa.pipeline.com(Richard A. Surwilo) Subject: Alpha UNIX Shared Memory - Need Ideas Date: 1996/04/20 Message-ID: <4lbbq3$8ft@news1.h1.usa.pipeline.com>#1/1 X-Deja-AN: 150537130 x-pipeuser: rsurwilo x-pipehub: usa.pipeline.com organization: Pipeline USA newsgroups: comp.unix.osf.osf1 x-pipegcos: (Richard A. Surwilo) We are contemplating porting an OLTP application that runs on Stratus hardware under their proprietary VOS operating system to an Alpha running UNIX. This application was originally designed for a port to UNIX and VOS-specific code has been kept to an absolute minimum. However, the application does make heavy use of shared memory with multiple processes requiring access to shared resources. The biggest potential snag would seem to be coming up with an efficient method of shared memory locking under UNIX. Stratus VOS allows processes to connect to shared memory and designate a mode (read-only, read/write, or read/write interlock) for this shared memory region. Connecting using read/write interlock mode configures the memory locations in this region as hardware-based locks. Processes can interrogate and set these memory locations using atomic operations to effect mutual exclusion in a very efficient manner. Obtaining a lock essentially consists of testing a memory location waiting for a bit to be flipped. In this way developers can work out very efficient locking schemes. Our application is a very high volume message switching system and each process currently utilizes thousands of locks. UNIX semaphores would appear to be too inefficient. Using UNIX file/record locking has been suggested but I think it too would exact too much of a performance penalty. Is there a library of low-level, granular, atomic locking routines available on an Alpha running UNIX? SVR4 compliance is immaterial. It just needs to be fast. TIA Rick Surwilo