MATLAB: Are there multiple MATLAB processes running when I launch MATLAB 7.0.1 (R14SP1) on 64-bit Linux

MATLAB

I launch MATLAB 7.0.1 (R14SP1) on a 64-bit Linux machine.
I then execute the following Linux command :
ps -ef | grep matlab
I see 20 MATLAB processes running.

Best Answer

It is normal to see more than one "process" on launching MATLAB. Each of these "processes" is a thread. There is one main process for MATLAB, but Java and other parts of MATLAB create additional threads. Different operating systems implement threads differently. On 64-bit Linux, threads are a special kind of process and show up individually in the list of processes.
In general, on Linux, you may notice that MATLAB can start up a large number of processes, even to handle simple tasks. These are actually threads, but due to the "one process per thread" model on Linux, they appear as processes. When you use the ps or top commands in Linux to show the processes running on your system, you will see each of these threads listed as a separate process.
It is not uncommon for Linux to create a large number of threads for an application. Even a simple Java program using AWT and native threads on Linux will create nine threads.
Also displayed is the amount and percentage of memory used by each thread. You should be aware that the memory used by the threads started by MATLAB is shared between threads. The memory consumption reported for each thread in this display actually represents the total memory used by all of the MATLAB threads together.