Learn how to use message queues, semaphores, and shared memory to connect your applications
UNIX provides several methods for IPC. The SysV IPC methods are message queues, semaphores, and shared memory. Message queues allow one application to submit a message that other applications can pick up later, even after the sending application has finished. Semaphores ensure that multiple applications can lock resources and avoid race conditions. Shared memory allows multiple applications to share a common segment of memory, which provides a fast method of communicating and sharing large amounts of data. You can also use these methods together. For example, you can use a semaphore to control access to a shared memory segment.
IPC methods are helpful to application developers because they provide a standard way to communicate between applications and are portable across different UNIX flavors. The next time you find yourself needing to lock resources or share data between processes, try the SysV IPC mechanisms.
Read more at IBM developerworksTwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop