How can i use my multi thread in multi core ?
-
Hello... :) i have found some issue during, design my project. my client request is they want improve system performance to almost max limit. so i suggest Parallel programming solution to my client. but how can i run my each multi thread in each core ? i need each thread to run on each core. ( that base on c# language. ) current system model is running multi thread on multi core, but they can't control one to one structure. For example, on quad core system model that have three business logic thread and have one monitor thread And they need running one to one. do you have any solution in this case? thank for your read.
SungBae.Han
-
Hello... :) i have found some issue during, design my project. my client request is they want improve system performance to almost max limit. so i suggest Parallel programming solution to my client. but how can i run my each multi thread in each core ? i need each thread to run on each core. ( that base on c# language. ) current system model is running multi thread on multi core, but they can't control one to one structure. For example, on quad core system model that have three business logic thread and have one monitor thread And they need running one to one. do you have any solution in this case? thank for your read.
SungBae.Han
-
oops. i understand. thanks for your reply.
-
oops. i understand. thanks for your reply.
Thread pool is more nice solution about multi thread. but current status is max in cpu. even always each cpu is full. client will be add more server. but, current status will be continues. because they are running every day big size request process. so i want more detail control cpu core. can i do it?
-
Hello... :) i have found some issue during, design my project. my client request is they want improve system performance to almost max limit. so i suggest Parallel programming solution to my client. but how can i run my each multi thread in each core ? i need each thread to run on each core. ( that base on c# language. ) current system model is running multi thread on multi core, but they can't control one to one structure. For example, on quad core system model that have three business logic thread and have one monitor thread And they need running one to one. do you have any solution in this case? thank for your read.
SungBae.Han
You could have a look at the Thread class, paying attention to "processor affinity". I have strong doubts it makes much sense on any Windows system though, in my experience it isn't worth anything, i.e. the Windows scheduler does a good job distributing the load over the cores, and not switching threads around unduly. The one situation I would use it is when I had N groups of threads where each group needs to share a limited amount of cached data, so having all its threads on the same core really is relevant. When I have a number of similar/identical jobs, I tend to create up to 2*N threads where N equals Environment.ProcessorCount; then I let Windows make the best of it, which it does. And I don't use the ThreadPool in such situations. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.