Thank you for your comments.
And sorry for replying late to clarify your confusion regarding original post.
Actually I meant like the below code snippet:-
disk_read(); or disk_write(); //can be either read() or write()
pthread_create(…, &test_fn, &args);
if (two partitions to be tested)
pthread_create(…, &test_fn, &args1);
Hope you understood the code snippet. If user need to test two partitions at the same time, I will create two threads which execute the same function test_fn. The only difference is the logical partition name in the thread arguments. Thus two threads will be executing simultaneously testing two partitions of the same volume. If the user needs to test only one partition, only one thread will be created for performing the test.
The following is my observation:-
As mario said, when I execute only a single logical partition test (that means, only single thread is present), I get , say X MB/s.
If I execute two logical partition test (that means, 2 threads with different arguments; only difference in partition name), I get almost equal to X/2 MB/s for both partitions. This reduction in speed remains for almost 7 to 8 seconds. After that the pattern of speed is like X MB/s, X/2 MB/s, X/2 MB/s, X MB/s, X MB/s, X/2 MB/s, … This behaviour is similar in the case of HDD and SSD.
I also thought the speed reduction may be because of the Physics, as Maschoen told. But this behaviour is reproduced while testing in SSD also.
Anyways, if you have any more points that is relevant to this observation, could you please share it?