1

Possible Duplicate:
Context switch internals

can anyone please explain how the process switching is done & what info is copied in the kernel stack in detail. i have read that there is only one kernel stack for all processes with fixed size of 4/8K in size.

Community
  • 1
  • 1
akp
  • 1,753
  • 3
  • 18
  • 26
  • Briefly, process switch can be viewed in two parts, firstly switch current running PCB context registers(Saved and General purpose) followed by finding the highest priority process from the queue and resume it copying the registers from where it switched earlier and returns to its return address. In between if the queue has no other processes to run, the core's are move idle or running power saving cycles. Also care should be taken if it is a Multi-Processor, meaning the context switch of current process happened on one core and it is switched to run on other cores. – Sunil Bojanapally Nov 30 '12 at 11:12
  • thanx @caf can u explain what is stored in the kernel stack & user stack for a user thread or process(because i think in linux processes are also called light weight thread). – akp Nov 30 '12 at 11:32

0 Answers0