Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover

IL-2 Sturmovik: Cliffs of Dover Latest instalment in the acclaimed IL-2 Sturmovik series from award-winning developer Maddox Games.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-28-2011, 02:10 AM
Heliocon Heliocon is offline
Approved Member
 
Join Date: Dec 2010
Posts: 651
Default

Quote:
Originally Posted by mazex View Post
Good that we have normalized the situation then

No - that memory I'm talking about is just the RAM memory that the threads share and that is allocated to the process and it's subthreads by the OS. That memory is then divided into the stack (variables, structs etc - normally with short lifespan that is "cheap" and fast) and the heap (where objects etc are dynamically stored for a longer time and you allocate and deallocate that memory yourself (and it is slower than the stack)). This is all stored in RAM unless the OS decides to swap it to disk if it runs out of memory (but you are fine with your 12 GB ). The fact that the CPU then uses registers (memory) etc is something a "normal" programmer never mess with in normal cases with modern programming languages....

If you did not like debugging straight single thread code you can imagine doing that in multi threaded code with eight threads messing with each other and you don't really know the state of that 109... Is it dead or alive? The CollisionAndResponse thread thinks it is not but the AIThread does not know that so can we call it the opposite of brain dead?
Thank you for the responses Maze, I know my tone can be abrasive but I am not looking around to pick a fight here. The issue with the ram was I thought you were talking about the CPU cache (for example i7 uses two 4mb cache's, 4mb for 2 cores/4 threads). This is what I was trying to get at originaly, the conversation then nosedived, so from my view I was arguing about hardware allocation. But yes again I never said multi threaded programming was easy, just that it was necessary since clock speeds are not increasing like they used to.

Anyway thanks for the polite and well thought out responses, but be wary my eye in the sky is watching for you to make a minor grammatical error so I can wtf divebomb you and call you an old fart who programmed typewriters for 20 years
Reply With Quote
  #2  
Old 01-28-2011, 06:47 AM
mazex's Avatar
mazex mazex is offline
Approved Member
 
Join Date: Oct 2007
Location: Sweden
Posts: 1,342
Default

P
Quote:
Originally Posted by Heliocon View Post
Anyway thanks for the polite and well thought out responses, but be wary my eye in the sky is watching for you to make a minor grammatical error so I can wtf divebomb you and call you an old fart who programmed typewriters for 20 years
Thanks, and I'm sorry I had a tough attitude too when replying first. As seen here that just escalates an argument which is in most cases built upon a misunderstanding of what the other person is saying and that we then think we understand what they really think

And regarding typewriters I don't have that (yet ) in my cv after many years as a software consultant. The most "boring" project I've been on must be climate control systems (not the small ones for cars), but then again - programming is never boring once you get over the first frustration while learning to write thread safe code for example...
Reply With Quote
  #3  
Old 01-28-2011, 07:38 AM
mazex's Avatar
mazex mazex is offline
Approved Member
 
Join Date: Oct 2007
Location: Sweden
Posts: 1,342
Default

Quote:
Originally Posted by Heliocon View Post
Thank you for the responses Maze, I know my tone can be abrasive but I am not looking around to pick a fight here. The issue with the ram was I thought you were talking about the CPU cache (for example i7 uses two 4mb cache's, 4mb for 2 cores/4 threads). This is what I was trying to get at originaly, the conversation then nosedived, so from my view I was arguing about hardware allocation. But yes again I never said multi threaded programming was easy, just that it was necessary since clock speeds are not increasing like they used to.
o
OK - I understand. If you now get the concept I described that the programmer has to create threads himself or everything runs in one thread etc, then read the wikipedia article about Hyper-threading which I think is what confused you (and many else!):

http://en.wikipedia.org/wiki/Hyper-threading

So in a hyperthreaded CPU the OS thinks it has two CPU:s (or cores - whatever). It can then run the main game loop thread on the first one and the AI thread on the other (from the previous example). The problem (or finesse) is then that the CPU uses it's registers and fat cache to internally switch between the threads without the OS having to care or do that as the CPU has better and faster knowledge about when there is a "slot" of idle time in the game loop so the AI thread can get access to the actual CPU (which is only one). This does not fix the problem of knowing if that 109 is dead or alive though as the two threads running on what both the OS and your code thinks is two really CPU:s don't get any help from this - and they have to be written just like a normal multithreaded application... And if one of the threads constantly uses the single CPU that other thread will not get any cycles to the CPU has to force it into wait and give some CPU time to the AI thread... Therefore HT can be good in some cases but as it's really a smart way to fill available slots of excecution time - but there is really only one "brain"...

Last edited by mazex; 01-28-2011 at 07:43 AM.
Reply With Quote
  #4  
Old 01-28-2011, 10:54 AM
addman's Avatar
addman addman is offline
Approved Member
 
Join Date: Mar 2010
Location: Vasa, Finland
Posts: 1,593
Default

Let this thread be a sticky on how you can resolve arguments without flinging crap at each other. Very well done gentlemen! I also applaud you
__________________
Reply With Quote
  #5  
Old 01-28-2011, 11:03 AM
Heliocon Heliocon is offline
Approved Member
 
Join Date: Dec 2010
Posts: 651
Default

Quote:
Originally Posted by mazex View Post
OK - I understand. If you now get the concept I described that the programmer has to create threads himself or everything runs in one thread etc, then read the wikipedia article about Hyper-threading which I think is what confused you (and many else!):

http://en.wikipedia.org/wiki/Hyper-threading

So in a hyperthreaded CPU the OS thinks it has two CPU:s (or cores - whatever). It can then run the main game loop thread on the first one and the AI thread on the other (from the previous example). The problem (or finesse) is then that the CPU uses it's registers and fat cache to internally switch between the threads without the OS having to care or do that as the CPU has better and faster knowledge about when there is a "slot" of idle time in the game loop so the AI thread can get access to the actual CPU (which is only one). This does not fix the problem of knowing if that 109 is dead or alive though as the two threads running on what both the OS and your code thinks is two really CPU:s don't get any help from this - and they have to be written just like a normal multithreaded application... And if one of the threads constantly uses the single CPU that other thread will not get any cycles to the CPU has to force it into wait and give some CPU time to the AI thread... Therefore HT can be good in some cases but as it's really a smart way to fill available slots of excecution time - but there is really only one "brain"...
I know about hyperthreading (cores vs threads etc).
I wonder how different bulldozer will be interms of programming for it. Havent heard a huge amount on it tbh.
Reply With Quote
  #6  
Old 01-28-2011, 05:13 PM
OldBuzzard OldBuzzard is offline
Approved Member
 
Join Date: Dec 2007
Posts: 18
Default

So far I've seen an argument or two, some speculation, but nothing from anyone that counts.

I like to see an official statement as to whether or not multi-core processing is supported.

Just a simple yes or no.

Is that too much to ask?
Reply With Quote
  #7  
Old 01-28-2011, 06:29 PM
mazex's Avatar
mazex mazex is offline
Approved Member
 
Join Date: Oct 2007
Location: Sweden
Posts: 1,342
Default

Quote:
Originally Posted by OldBuzzard View Post
So far I've seen an argument or two, some speculation, but nothing from anyone that counts.

I like to see an official statement as to whether or not multi-core processing is supported.

Just a simple yes or no.

Is that too much to ask?
Oleg has previously said that the code would be multi threaded, but to what extent is unknown to me at least...
Reply With Quote
  #8  
Old 01-29-2011, 09:03 AM
Skinny Skinny is offline
Approved Member
 
Join Date: Aug 2010
Posts: 30
Default

Quote:
Originally Posted by OldBuzzard View Post
So far I've seen an argument or two, some speculation, but nothing from anyone that counts.

I like to see an official statement as to whether or not multi-core processing is supported.

Just a simple yes or no.

Is that too much to ask?
Given that dual core chips are minimum requirement and quad core recommended, it safe to assume it makes use of (3 or) 4 threads.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.