Tuesday, April 30, 2013

Process vs Thread

Process 1 and process 2 are two tasks, In OS level ,at a given time once process can executes (if is has only one processor). So each process has it own address space,file descriptor and stack. while process 1 is waiting for some information from disk then process 2 will execute.
Here are some performance drawbacks while executing process 2 
1.Context switch happens (means process 1 in wait state so next process (process 2) will execute)
2.While context switch happens at that time OS will save previous process information like sate of process and ....

But Threads are sharing the address space,file descriptor and stack and there is no context switch between the thread switching.

So threads are light weight process, so LR has these two features

2 comments:

Unknown said...

Hi Madhu,

Thanks....

Q)I am ruuning 2 scripts(data dependency) on PC .From 1st script i will get some ID's,those ID's i have parameterized in 2 script with randomly.How can it possible?

Unknown said...

Scenario: 10 Vu's, 10 Iterations, 1hr, 5 transactions. Could u please give some idea on how to calculate the THINKTIME and PACING.??