Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Multiple Cores, and the Wiki?  (Read 2864 times)

Porpoisepower

  • Bay Watcher
  • For Surely he is the Cuisinart Hat Rack
    • View Profile
Re: Multiple Cores, and the Wiki?
« Reply #30 on: September 21, 2009, 01:54:48 pm »

someone suggested running DF in a virtual PC (vmware,ESX, etc)... stating that the virtualization software will handle the threading.
Logged
That's what DF needs, The gutbuster brigade.  Screw that elf and his cat. Thibbledorf Pwent is the real hero.

Locriani

  • Bay Watcher
  • Locriani == Briess
    • View Profile
    • dwarf fortress wiki
Re: Multiple Cores, and the Wiki?
« Reply #31 on: September 21, 2009, 02:02:10 pm »

someone suggested running DF in a virtual PC (vmware,ESX, etc)... stating that the virtualization software will handle the threading.

Yes, by simulating one core for DF to run on, and using the rest of your processor time with system call overhead  ???
Logged
I am one of many administrators of the wiki.  Please use my user page (http://dwarffortresswiki.org/index.php/User_talk:Briess) on the wiki to contact me, as I check that more often than these forums.

DeathOfRats

  • Bay Watcher
    • View Profile
Re: Multiple Cores, and the Wiki?
« Reply #32 on: September 21, 2009, 02:05:56 pm »

someone suggested running DF in a virtual PC (vmware,ESX, etc)... stating that the virtualization software will handle the threading.

I very much doubt it. Current state of the art for automatic multi-threading is (as far as I'm aware) either compilation-time analysis or very limited (i.e., at the instruction level) at run-time, and neither does incredibly well for general-purpose problems. There are domain-specific tools that make certain assumptions about the code and data that have better results (as long as you code in a way that maintains those assumptions).

If a virtualization company had found the solution to that problem, which is very much non-trivial, they'd be selling it (probably as a separate product - or at least it'd be a *major* selling point for their platform), and raking in the big bucks.
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Multiple Cores, and the Wiki?
« Reply #33 on: September 21, 2009, 02:20:53 pm »

I can only speak from personal experience, but i did a multi-threaded game for my major project last semester, and i spent most of the semester sorting out problems like what happens when two threads try and use the same piece of memory\variable at the same time (a problem you never have with single threaded stuff, as it's always sequential.)

It was entertaining, but quite annoying at times.
That's where Mutexes(sp?)/Locking come in handy.

That, or good design. You want to avoid a mutex as much as possible. In general, if there is any way to prevent race conditions, concurrent access, etc. without using a mutex, it will be more efficient than using a mutex. You want to give each thread as much data independence as possible, even if it means duplicating data.

someone suggested running DF in a virtual PC (vmware,ESX, etc)... stating that the virtualization software will handle the threading.

That won't work at all. There is no way to dynamically split code between two processors if it wasn't designed and written explicitly to be split.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Draco18s

  • Bay Watcher
    • View Profile
Re: Multiple Cores, and the Wiki?
« Reply #34 on: September 21, 2009, 04:00:10 pm »

What does that have to do with threading or am I missing some joke here?  nm, I see your other post now.

"Multithreading is an annoyance"
"Change religion after a minor annoyance"
It still doesn't really explain how they are similar.  I could compare many texts and pick out specific words that are the same.  It doesn't mean they are in any way related or have any specific meaning.  The only meaning I draw from that comparison is that this person is easily annoyed.  But I can't make an educated decision based solely on those two situations.

Is not, the similarity between two situations, the essence of certain types of jokes, puns, and humor?

Why to the French never starve and never drown?
Because an egg is enough and the water is low.
Logged

Andir

  • Bay Watcher
    • View Profile
Re: Multiple Cores, and the Wiki?
« Reply #35 on: September 21, 2009, 04:36:57 pm »

I can only speak from personal experience, but i did a multi-threaded game for my major project last semester, and i spent most of the semester sorting out problems like what happens when two threads try and use the same piece of memory\variable at the same time (a problem you never have with single threaded stuff, as it's always sequential.)

It was entertaining, but quite annoying at times.
That's where Mutexes(sp?)/Locking come in handy.

That, or good design. You want to avoid a mutex as much as possible. In general, if there is any way to prevent race conditions, concurrent access, etc. without using a mutex, it will be more efficient than using a mutex. You want to give each thread as much data independence as possible, even if it means duplicating data.
Yes, but I didn't want to get into the whole debate over some things being non-parallel and all that.  It definitely takes a different thought process, but I wouldn't call it annoying... it's a fun challenge to think of things in alternative algorithms and not cut/paste the nearest chunk of code just to get the job done.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Multiple Cores, and the Wiki?
« Reply #36 on: September 22, 2009, 09:27:10 am »

Why to the French never starve and never drown?
Because an egg is enough and the water is low.
Winpun!  :D
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...
Pages: 1 2 [3]