This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
im making a program that do the sorting using the quicksort technique in a concurrent way. I also put the time and memory usage in the program to identified how much will it take performing the task. I also take note on the CPU performance and the memory usage in the CPU (so far i used the windows task manager taking the result of the CPU performance and the memory).
i have try several test using different number of threads.
Time performance in the program: 1 thread takes longer than 5 threads to execute. but 10 threads takes longer and almost the same as thread 1 and thread 15 and so on takes the most time to execute Memory usage in the program: more threads use LESS memory
CPU usage: more threads give HIGHER percentage of CPU usage
memory usage in the CPU: more threads use LESS memory
Why does my time performance give results like that? Is there something wrong in my coding that might lead that way? perhaps because of the deadlock? Is there a way to make sure that this program will be time consuming?
Is there a way to get the CPU performance and the memory usage of the CPU while running the task? perhaps by using codes or any software that would be help? I believe snipping the task manager's performance is not accurate and effective.
Your code is very convoluted. The way I see it your threads are basically useless and based on how the stars are aligned, your entire collection will be most probably sorted only once or might be sorted twice or so, but will probably be never sorted in parallel.
Tell me one thing, How many times do you see "Proceed" in the output.. what exactly are you trying to accomplish here?
Joined: Feb 22, 2012
The proceed output is only a test for me that it read that portion. There is no function in it.
can you guide me little bit to make the program can run in concurrent way? i thought just by adding the executor, it will work out.
The "procede" output will come up only when the lists are sorted. If it comes up only once it means that your lists are only sorted once
It's hard to help without knowing exactly what you are trying to do. Just throwing an Executor on a single threaded sort will not work. A multi threaded sort will have to be algorthimically much differrent than a single threaded sort.
Joined: Feb 22, 2012
thank you Jayesh A Lalwani. now i understand why you asked about the procede.
the procede only appears one time. so it means this program is definitely sorted once.
about the algorithmic, how should i do?im still blur. can you help perhaps by showing some example on this algorithmic multithreading. different between the sequential and multithreaded algorithmic would be the best.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: how to make sure the program is time consuming