Solved

shmem and mmap

Posted on 1997-08-29
2
579 Views
Last Modified: 2006-11-17
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
Comment
Question by:xorcon
2 Comments
 
LVL 4

Accepted Solution

by:
rembo earned 100 total points
ID: 1225999


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
 

Author Comment

by:xorcon
ID: 1226000
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now