0

Possible Duplicate:
What are the thread limitations when working on Linux compared to processes for network/IO-bound apps?

What is meant by context switches in threads or processes ? Also which is better : Threads or Processes ? I mean which is more space efficient and which is more time efficient ?

Community
  • 1
  • 1

3 Answers3

3

Take a look at this answer.

Community
  • 1
  • 1
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
0

I don't think you can say one is better than the other - it depends what you are doing.

There is a detailed overview of context switches here: http://en.wikipedia.org/wiki/Context_switch

In the most basic sense a context switch is when the processor pauses execution of a task to do another task.

Adam Butler
  • 3,023
  • 5
  • 35
  • 40
0

Also, you have to remember that threads may be your only choice if your OS is embedded and doesn't support multiple processes ;)

BigSandwich
  • 2,768
  • 2
  • 22
  • 26