Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How can i use my multi thread in multi core ?

How can i use my multi thread in multi core ?

Scheduled Pinned Locked Moved C#
questioncsharpasp-netdesignbusiness
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SungBae Han
    wrote on last edited by
    #1

    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

    D L 2 Replies Last reply
    0
    • S 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

      D Offline
      D Offline
      Dalek Dave
      wrote on last edited by
      #2

      This[^] Stack Overflow article may help.

      ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

      S 1 Reply Last reply
      0
      • D Dalek Dave

        This[^] Stack Overflow article may help.

        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

        S Offline
        S Offline
        SungBae Han
        wrote on last edited by
        #3

        oops. i understand. thanks for your reply.

        S 1 Reply Last reply
        0
        • S SungBae Han

          oops. i understand. thanks for your reply.

          S Offline
          S Offline
          SungBae Han
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          • S 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

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups