Solved

shmem and mmap

Posted on 1997-08-29
2
590 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle SQL syntax check  without executing 6 107
Java string replace 11 63
Eclipse Help Java EE 5,6,7 Documentation, why not Java EE 8 8 44
java mysql insert application 14 45
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

733 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