Jump to content
Sign in to follow this  
Guest Chris Wallace

FlyLegacy will require pthreads soon

Recommended Posts

Guest Chris Wallace

Laurent, Roland and others,Just a heads-up that you will need to add another dependent library for FlyLegacy soon. Get the latest stable pthreads-win32 library from http://sources.redhat.com/pthreads-win32/I'll be adding multithreading to the terrain code soon to handle loading/unloading of terrain textures in the background.Chris WallaceOttawa, Canada

Share this post


Link to post
Share on other sites
Guest roland_lfor

Thanks Chris, I'm waiting to upload the material (FTP is overloaded !)Would you have a small doc giving an overview of the software architecture, multithreading issues and others global information ?As it's a big project, don't you think that the unique actual project should be divide in different subprojects modules in a head workspace (each creating DLL's) ?For example :- Physical simulation- Gauges and electrical stuff- Audio- 3D rendering- external SDk access- Weather- ATC....This should allow smaller compilation time and could help for the project understanding.- roland -

Share this post


Link to post
Share on other sites
Guest Chris Wallace

Documentation?!? What's that? :-) Unfortunately it would not be a "small" document. I'll do what I can, when I can, to add some additional information in the 'docs' CVS branch, but for now the code is the authority.Building subprojects into separate libraries is a good idea. I haven't done it yet because a lot of the interfaces have not really "congealed". IMO it's more trouble than it's worth to manage separate libraries when the interfaces are changing on a regular basis.It would be another question whether to build these as static or dynamic libraries...I would prefer to see DLLs used only where a subproject was required by more than one application. For example, a DLL of the Pod utilities would be a good idea since that could then be used by any other application like a standalone POD explorer-type application. But I would envision most of the libraries being statically linked into the FlyLegacy .exeThis is certainly a worthwhile area for future development.Chris WallaceOttawa, Canada

Share this post


Link to post
Share on other sites

>I'll be adding multithreading to the terrain code soon to>handle loading/unloading of terrain textures in the>background.>Hi Chris,Small question: will processsors with Hyperthreading (Eg. Pentium 4 HT) benefit from this multithreading?So many thanks for keeping us updated regarding the Fly!Legacy development.Best RegardsFrank

Share this post


Link to post
Share on other sites
Guest roland_lfor

Franck,The multithreading in high level software consists in running different tasks or processes in parallel inside the same application. This involve some messaging and synchronisation mechanism at application level, and also a special handling in the OS kernel level.The hyperthreading technology is independant of high level applications like Fly! as it's at bios/cpu level.The goal is to let Windows believe that the system has 2 processors when there is physically only one. Then some low level fucntions in the OS that regulates the multitasking, is handle by the CPU itself. And it seems that the CPU handling is more efficient that the Windows kernel, saving in some circumstances CPU cycles during context change phases.I have P4 hyperthreading (as you ?) and get the benefit with all my system and also with Fly! as there is many processes and threads running in windows background.Chris will correct me if I'm wrong ;-)- roland -

Share this post


Link to post
Share on other sites
Guest Chris Wallace

Well it certainly won't hurt :-)From my limited understanding of HT, it tries to ensure that the processor's internal resources are utilized as fully as possible by allowing two threads to run concurrently...so if for example one thread doesn't need to use the floating point unit, and the other thread does, then they can both run at essentially the same time.I am pretty sure that some of the free third-party libraries that I am using in Fly! Legacy already use multithreading, so HT would already be providing some benefit (assuming HT actually provides a benefit and isn't just marketing hype) but implementing more "threadiness" can't hurt. The biggest advantage of using threads in the application will (hopefully) be more smooth, consistent frame rates without sudden jerks and stops, since time-consuming background tasks like searching databases, loading terrain textures, etc. can be done in lower-priority threads in the background rather than delaying the main processing thread.Chris WallaceOttawa, Canada

Share this post


Link to post
Share on other sites

Roland,Many thanks for the info regarding multithreading.I have P4 3,3 HT (+ nvidia GT6900) and noticed in Fly!2 at least double fps compared to my previous P4 1,4 (nvidia 5800).I presume HT in combination with increased L1 & L2 CPU cache contributes to the increased fps.Mes salutations / Best regards,Frank

Share this post


Link to post
Share on other sites

Hi Chris,Many thanks for the explanation regarding "theading".Nice to hear that Fly!Legacy make use of libraries allowing multithreading.Best regards,Frank

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...