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. Program Multi Processor !

Program Multi Processor !

Scheduled Pinned Locked Moved C#
tutorial
2 Posts 2 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.
  • L Offline
    L Offline
    lucdt
    wrote on last edited by
    #1

    Hi all ! My computer have 3 Processor ( 3 CPU). My Application use only 1 processor for the work. Now I want to use all 3 Processor. Pls, show me How to program in order to using all 3 Processor. Thank you alots !

    D 1 Reply Last reply
    0
    • L lucdt

      Hi all ! My computer have 3 Processor ( 3 CPU). My Application use only 1 processor for the work. Now I want to use all 3 Processor. Pls, show me How to program in order to using all 3 Processor. Thank you alots !

      D Offline
      D Offline
      Dario Solera
      wrote on last edited by
      #2

      How is it possible your that computer has an odd number of CPUs? Am I missing something? However, you have to use multiple threads in order to use *more* than 1 CPU. In this case there are so many problems so the program should be re-designed. For example: is the main job (task) subdivisible in two or more separate execution lines? If the job, for example, computes a result from an array of values, it can be easily broken in some parts. Each part will be executed by a Thread. Other problems are: re-assembly the results of the various threads, manage their synchronization, manage the stop of the threads, that (if not manually stopped), will continue their execution until the end or the system shutdown (even if you close the app!). Moreover, you cannot know if the threads are REALLY executed, because the OS decides which thread(s) are to be executed. So multithreading is very hard to achieve without (unexpected) performance drops, strange behaviors, and so on. In C# the base namespace is System.Threading, try to search on CodeProject: you'll find many good articles. Hope this helps.


      [ITA] Tozzi ha ragione: Gaia si sta liberando di noi. [ENG] Tozzi is right: Gaia is getting rid of us.

      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