Editing
Portal:HPC - High Performance Computing
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Shared memory in Perl === Shared memory is another important parallel-programming idea. In a shared-memory model, multiple processes or threads can access a common memory region rather than sending every piece of data through files, sockets, or pipes. Perl has general shared-memory modules. `IPC::Shareable` allows a Perl variable to be tied to shared memory, making it possible to share the contents of that variable with other Perl processes and scripts. Its documentation says scalars, arrays, hashes, and even objects can be tied.<ref>MetaCPAN, βIPC::Shareable,β https://metacpan.org/pod/IPC%3A%3AShareable, accessed July 3, 2026.</ref> `IPC::ShareLite` provides a lightweight interface to shared memory and uses SysV IPC shared memory and semaphores where supported by the operating system.<ref>MetaCPAN, βIPC::ShareLite,β https://metacpan.org/pod/IPC%3A%3AShareLite, accessed July 3, 2026.</ref> `IPC::SharedMem` provides a SysV shared-memory IPC object class, including attach, detach, read, and write operations around shared-memory segments.<ref>MetaCPAN, βIPC::SharedMem,β https://metacpan.org/pod/IPC%3A%3ASharedMem, accessed July 3, 2026.</ref> These modules are useful for local interprocess communication, caching, coordination, and single-node shared state. They are not the same as OpenMP, MPI, or OpenSHMEM. They do not automatically turn a Perl program into a scalable scientific application. But they show that Perl can work with operating-system shared-memory mechanisms when needed.
Summary:
Please note that all contributions to Perl Guilds - Getting Medieval with Perl may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Perl Guilds - Getting Medieval with Perl:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Tools
What links here
Related changes
Page information