Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Is perl scalable?

by hardburn (Abbot)
on Dec 06, 2002 at 14:41 UTC ( [id://218076]=note: print w/replies, xml ) Need Help??


in reply to Is perl scalable?

Their main point was that java only spawned one process . . .

Last time I checked the output of 'ps -A' with a JVM running, Java spawned a lot more than one process. It could just be my Virtual Machine (IBM on GNU/Linux), and I suspect those extra processes are for the JVM, not the actual program. Java might have some superiority with threads, but this is probably a temperary issue as Perl threads continue to get better.

Replies are listed 'Best First'.
Re: Re: Is perl scalable?
by perrin (Chancellor) on Dec 06, 2002 at 16:07 UTC
    They're just talking about web programming with servlets, not normal programs started with java SomeClass. With servlets it's true that each request goes to a thread and there is only one process (although many servlet containers can run multiple processes to take better advantage of multi-CPU systems).

    Also, I remember I used to see separate entries for each thread in top on Linux. Not sure if this is still the case or if ps does the same thing.

      For those of you who wonder why your JVM in Linux spawns so many processes:

      "Unlike some other implementations of Unix (such as AIX or Solaris), the Linux kernel itself does not provide an abstraction of allowing several kernel threads to be packaged inside a process. Instead, a special version of the fork() system call (also known as clone()) has been implemented that allows you to specify that the child process should execute in the same address space as its parent. This system call is then used by the Linux threading library to present a thread programming abstraction to the user. From the user interface standpoint, practically all of the POSIX thread interfaces are fully supported under Linux; however, the implementation is not fully POSIX-compliant due to some problems in signaling. The result, however, is that each Java thread in the IBM Java VM for Linux is implemented by a corresponding user process whose process id and status can be displayed using the Linux ps command."

      http://www-106.ibm.com/developerworks/library/java2/

      Updated 2002-12-10 by mirod: turned the URL into a real link

        Mac OS X does the same thing. It spawns new Mach processes for each Java thread. It was my understanding that it was not a bad thing. But I don't know enough about Darwin to really know for sure.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://218076]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found