This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Context switch time threads vs processes

 

Hello,

I am currently working on builidng an embedded application using the AM335x and the linux ti SDK v7.

I was wondering how long context switches take on this processor? I've seen there are tools to estimate it and numbers around for other CPUs and varying linux kernels and the numbers varied wildly with both stack size CPU and OS. What I'm trying to determine is whether there is signifigant performance advantages of threads over processes.

Is there any existing numbers for process switch vs thread switch? What is the easiest way to test for this platform?

  • In Linux, threads and processes are the same.

    So you will not expect big differences.

    The biggest time lag is because of the reloading of the data and instruction caches. So you pay a price for each context switch. This is not avoidable.

    regards

    Wolfgang