From: Mike At HammockTree on
I'm running a Regina-Rexx application in a gnome-terminal session. From
this app I want to create one or multiple threads (doing some backup
activity). The number of threads is dependent on the number of processor
cores I have available. If, for example, I have 3 cores available, I spin
off the first two backup commands (basically a gzip to a file) with a "&" to
background them, then the third command I leave 'plain' so I don't process
any further files/backups until that third gzip completes. The idea here is
to make full use of as many processors as possible (each gzip will about
fully consume a core) while not starting so many gzips that I creatte too
much disk contention.
However, when I do this and monitor the processes via top and sar I see that
only one processor core is being used. I have three comamnds/threads
running, but they are sharing one core. If I run these manually in three
different gnome-terminals, each command/gnome-terminal gets a full
processor. I assume that starting the three commands from within a
gnome-terminal is somehow limiting the number of independent threads and the
processors they can use.
So, how can I start multiple threads from within a gnome-terminal and
actually be able to access multiple cores??

Thanks
--
C. M. (Mike) Hammock
mike(a)hammocktree.us