Labs and workers are MathWorks terminology, and they mean roughly the same thing.
The laboratory or worker is essentially an instance of MATLAB (no interface). You run several of them, and you can run them either on your own computer (only the Parallel Computing Toolbox is required) or remotely in the cluster (Distributed Computing Server is required). When you execute parallel code (for example, the
parfor loop,
parfor block or the
parfeval command), the code is executed in parallel by workers, and not by your main MATLAB.
The Parallel Computing Toolbox has changed and significantly expanded its functionality compared to the latest releases, and also changed and developed the terminology used to describe how it works. At some point it was convenient to refer to them as laboratories when starting the spmd block, but when working with the parfor or working on tasks and tasks. I believe that they are now moving towards always calling them workers (although there is a legacy in the labSend , labReceive , labBroadcast , labindex and numlabs ).
The kernels and processes are different, and they themselves are not related to MATLAB.
The core is the physical part of your processor โ you can have a dual-core or quad-core processor on your desktop computer, or you can have access to a really large computer with a lot more. With multiple cores, your processor can perform several operations at once.
A process (approximately) is a program in which your operating system runs. Although the OS runs several programs at the same time, it usually does this by interleaving operations from each process. But if you have access to a multi-core machine, these operations can be performed in parallel.
So, as a rule, you would like to tell MATLAB about the start of work of one worker for each of the kernels that you have on your computer. Each of these workers will be launched as an OS process, and as a result, one worker will be executed per core in parallel.
The above is simplified, but hopefully you get a roughly accurate drawing.
Edit : moved the description of the threads from the comment to the answer.
Streams are something else. Themes also have nothing to do with MATLAB.
Back to the processes for a moment. One thing that I did not mention above is that the OS allocates a specific block of memory to each process that other processes cannot touch, so it is difficult for them to interact with each other and ruin things.
A thread is similar to a process within a process โ it is the flow of work performed by the process. As a rule, operations from each thread will alternate, but if you have several cores, they can also be parallelized across all cores.
However, unlike processes, they all share a block of memory, and this is normal, because they are all controlled by the same program, so they should be less important if they are allowed to interact.
Regular MATLAB automatically uses multiple threads to parallelize many of the built-in operations (such as matrix multiplication, svd , eig , linear algebra, etc.) - that does anything without you, and do you have a Parallel Computing Toolbox,
However, MATLAB workers run as a single process with a single thread, so you have full control over the parallelization.