[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 617
  • Last Modified:

shmem and mmap

Is there a package that provides the same functionality
as "shmem" (shared memory) and "mmap" (memory mapped
file I/O)?  Or are these capabilities too Unix-specific
to be available in Java?
0
xorcon
Asked:
xorcon
1 Solution
 
remboCommented:


As far as performing the same functionality as shmem and
mmap, yes, they are too UNIX-specific.  However, since
Java is multithreaded and has good straightforward networking
capabilities, you can use either Threads or multiple apps
using socket() connections to perform inter-process
communication.

As for mmap, what is it you would like to do?  In terms
of mapping a file into memory and the doing reads on
it as if it were local memory, there is no capability
for that.  There is random access file I/O, but it will
not give you the kind of performance you've come to
expect from mmap.

Sorry :)

-Tony


0
 
xorconAuthor Commented:
I figured this was true.  Shmem is much faster for local
inter-process communication than sockets are.  And mmap
is a good way to access the contents of a huge file, putting
the burden of I/O and caching on the O/S.  Unfortunately,
the designers of Java have yet to address efficiency -- even
JIT produces code 3-5 times slower than the equivalent
C application (IRIX 6.2, SGI R10K processor).
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now