Citace Původně odeslal Eagle Zobrazit příspěvek
Ty neumíš číst? Přímo na CDR ti to v diskuzi vysvětlil WoodyIS. Dovolím si citaci:

"Nic ve zlem, ale docela jsem se pobavil u vety: "Přistupují k tomu celkem logicky tak, že pustí o jedno méně podřízených vláken, než je počet jader a k tomu jedno hlavní vlákno, které se stará mimo jiné i o synchronizaci". Problem totiz neni v tom, kolik vlaken vytvorit, ale co do nich dat tak, aby intenzivne pracovala na svych datech a byla navzajem nezavisla, aby na sebe navzajem nemusela cekat. Protoze je to jedna cast me prace, tak sem se tesil, jak nam to Gabe prozradi a ono nic "
"We gravitated towards creating a custom work management system that's designed specifically for gaming problems - its job is to keep the cores 100% utilised. We make it so that there are N-1 threads for N cores, with the other thread being the master synchronisation thread. The system allows the main thread to throw off work to as many cores as there might be available to run on, and it also allows itself to be subjugated to other threads if needs be."

The engine uses lock-free algorithms to solve one of the major problems of threading - access to data. Many of us have come across a similar problem before - if you're trying to edit a database or a web page whilst someone else is already doing a similar thing, you end up with one person overwriting the other person's data. The problem is the same when it comes to multiple threads accessing one data set in-game.

"We realised that, 95% of the time, you're trying to read from a data set, and only 5% of the time are you actually trying to write to it, to modify it. So, we just allowed all the threads to read any time they want, and only write when the data was locked to that thread."


viac -> http://www.bit-tech.net/gaming/2006/...e_Engin/1.html