Dolphin, the GameCube and Wii emulator - Forums

Full Version: Graphics Card Upgrade Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
(11-02-2011, 01:30 AM)Runo Wrote: [ -> ]Yeah... I guess I wrote too much, this was more like a personal thinking than a forum post, feel free to ignore it. ^^
...
[some text here]

Unlike Daco, I love wall sized texts, they make me lazy but I want all the details, so I can go right back to the ground and build the concept inside my mind so I can see it working, as a giant logical machine. Tongue

i was talking to NV Tongue

and dont get em wrong. i love information and details but actually reading them depends on how they are presented to me. cause i have issues staying focused reading wall of text
Yeah sorry I sounded rude there :p Not what I meant, I was just joking about what you had said ^^
And I have focusing problems with that kind of text too Tongue

I'm not the exactly the most focused person out there.. Big Grin
Quote:but i didn't directly notice you mention that the performance of a DC cpu also depends on the the code of the programs and that for example doing the following will process faster on , lets say, a 6Ghz single core then a 3Ghz dual core

Didn't feel it was relevant. I simply wanted to explain why you can't say that a 3GHz dual core cpu is a 6 GHz cpu, performance was irrelevant to my explanation of frequency.

Quote: actually that was what gave me the idea about the pendulums, because there I wasn't talking about what a cycle does

Let's use this example. Let's say that the speed the pendulum is swaying at is the clock rate. In a single core cpu you have one person that "does stuff" whenever the pendulum oscillates. In a dual core cpu you have two people that can do stuff whenever the pendulum oscillates. If the speed of the pendulum is the same then the clock rate is the same regardless of how many people are syncing their actions with the pendulum.

Quote:so that's why I didn't understand why a 3GHz dual core won't perform like a 6GHZ single core

I'm guessing you meant to say single there. I didn't understand that you were asking about performance. I just thought you were asking "why doesn't a dual core 3GHz cpu run at 6 GHz" which to me is pretty straight forward if you grasp the concept of a clock signal, which apparently you do.

Quote: because even on that simple CPU it's thousands of transistors

Fixed that for you.

Quote:In fact, I'm very curious to know how CPUs are designed today, because I can't imagine those engineers seeing the logical ways and adresses for a milions of elements and imagine how all of that will work simoutaneously.

They are designed the same way anything big and complex is designed in the modern world, not by one person. The microarchitecture is designed component by component with seperate teams of engineers each in charge of certain components. The components are put together into a working microarchitecture afterwards.

Quote:It's even harder for me to understand when we take it to a higher level as the CPU working along with peripherals and other processors. Even harder to imagine how it is for the processor when a Windows is running. There are too much layers of logical systems running one over the other, so I guess there are things I just have to accept. Still, I would really like to know how this works, I would like to see it like the people who projected it, but a lot of things seems just to big to be understood.

This may sound a little odd but this is a concept I first began to understand when I played a game called eve online for a few months (mmorpg, it's more of a future space age life simulator though). The game is a super complex sandbox game where you can pretty much do anything you can imagine, but doing even the simplest things takes a lot of repetitive work and time (just like real life). Some of the things players had done in this game were so impressive I simply could not grasp how it was even possible. I'll give you a great example. Titans are the largest class of spaceship in the game, total value of the raw resources alone needed to make all of the parts is 220,000,000,000 isk (in game currency) which is equivalent of $7,500 real currency. The manufacturing process is also extremely complex. Raw resources need to be gathered from asteroid fields, refined into materials, materials used to builds parts, parts used to build bigger parts, which are used to build bigger parts, and so on. Now how did any player afford to make one of these ships? Simply, they didn't. These ships are made through a collaborative effort of hundreds or thousands of players working together towards this goal for months with management tasking them to do things like mining or manufacturing so that the peoples labor is efficiently utilized towards the goal. No single group of people has any clue how the whole thing works or is capable of doing the entire process on their own. Many groups doing smaller simpler things independently can end up producing something amazing when somebody decides to put everything together into something incredible. This is how computers work. Nobody has a clue how the whole thing works because they don't need to, they just understand their part of it (their niche) and how it interacts with a few other things, that's all they need to know.

I had an epiphany when I realized this was how the world works. If you run a company that mines and refines aluminum, that's usually all you do. You don't turn the aluminum into any working products you just sell it to other companies. No company truly makes their products from scratch all the way down to gathering the raw materials. The market consists of many companies providing different materials and services that work together in a big system to accomplish amazing things. This big system (the market as I call it) is really only completely visible to financial institutions. And nothing that requires lots of time/work can be done without lots of capital regardless of whether the technology is ready or not. Everything big and impressive in this world comes from smaller easier to understand concepts, parts, or steps.

In eve it's virtually impossible to build a ship completely on your own from scratch. Every person has there own niche in the market, something that they do and understand. For example I might gather nitrogen from planets and use it to produce, bottle, and ship liquid nitrogen. A lot of other players could use that for all kinds of things.

Quote:So is this thing about multithreading, I started reading about it a while ago, but they never explained as much as I wanted to understand, so soon I had to accept some concepts without explanation, so I couldn't understand how it really worked, physically talking, that made me quickly frustrated, as I couldn't find what I wanted anywhere, so I guess that's one more piece of information that only the people who invented could understand for real, then with time I stopped searching on this subject.

Multithreading is different than multicore, be careful with how you use the terms. Multithreading is simply building applications with multiple threads. It does not need to be processed by a multicore processor. The OS switches between different threads, giving each thread a certain amount of time on the cpu to do work. An SMT (simultaneous multithreading) system that is capable of simultaneously processing more than one thread. This includes multiprocessor systems (servers with multiple cpus for example) where each processor can process a thread independently of one another, HT (hyperthreading) and other single core SMT technologies which allow a single core to run multiple threads simultaneously where the threads compete for resources within the core, and multicore, where multiple processors are integrated into a single chip and share cache, bus, and memory resources. Multicore is the most ideal out of the three. Multicore gives each thread it's own set of processor resources to work with independent of the other threads (still shares memory space and some cache space though) so that the threads don't have to compete for resources (except cache resources). Multiprocessor is less ideal because it makes both the motherboard and the overall system more expensive and more complex. An SMT system can also be any combination of the above three technologies (a multiprocessor xeon server where each processor has multiple cores with HT would be a great example of combining all three).

Then you have AMDs CMT (cluster multithreading) with bulldozer which they say is even better than conventional multicore, not getting into that unless you want me too (its basically just multicore with certain less commonly used resources like the FPU shared by each pair of cores to reduce die space and allow mores cores to fit on the die).

This was very clarifying. I like the market example, because the economy is another thing that I feel like that when I try to thing about. There's a lot of elements for each step of the system.

About multicore, I have some questions after reading:

1- So, every core have the same/simultaneous access to the rest of the hardware? How is the division made, which is going to execute each thread on a multithreaded aplication?

2- An OS (Windows for instance) can be/is multithreaded, or is it a single thread.

3- If I got what you said right, one single thread can't be executed by two cores, right? So, is there a specific order or way for the cores to be assigned? Like, if I run at the same time two diferent single threaded aplications, will they run in two different cores or in the same one?

4- And this one about processors overall: While a code is executed, how is the work coordinated within the peripherals and other hardware? For instance, how the communication between the processor and the GFX card works. About this I know basically what's the GPU hole in graphics rendering and rasterization, but I would like to know how this hole process between the processing of what must happen on the program and the generation of the next frame happens.

Thanks for your time, really Wink
Quote:1- So, every core have the same/simultaneous access to the rest of the hardware? How is the division made, which is going to execute each thread on a multithreaded aplication?

I don't understand the question.

Quote:2- An OS (Windows for instance) can be/is multithreaded, or is it a single thread.

It has many processes each of which could be multithreaded or single threaded, but usually single threaded.

Quote:3- If I got what you said right, one single thread can't be executed by two cores, right?

Correct. The whole point of SMT is to allow more than one thread to be processed at the same time.

Quote:So, is there a specific order or way for the cores to be assigned?

Threads are given an affinity by the OS. The afifnity sets which core that thread will run on. The OS can change the affinity of a thread and the program can manually specify the affinity of each thread (dolphin does this when you check the lock threads to cores option).

http://code.google.com/p/dolphin-emu/source/browse/Source/Core/Core/Src/Core.cpp

Take a look at lines 285 and 338-341.

Quote:Like, if I run at the same time two diferent single threaded aplications, will they run in two different cores or in the same one?

Two different cores. Each process has a single thread. The OS will assign those two threads different affinity.

Quote:About this I know basically what's the GPU hole in graphics rendering and rasterization, but I would like to know how this hole process between the processing of what must happen on the program and the generation of the next frame happens.

"Whole" not "hole". This requires a lot of elaboration to answer so I'll answer this later when I have time (prepare for another wall of text). Also neobrain/delroth/billiard/other graphics devs know 100x as much as me about GPU stuff, I can only give you a basic overview.
Actually, I think I meant "role" there Tongue

About the first question, turns out it was pretty useless, I wanted to understand how the cores are assigned to execute threads, what you explained with the affinity assignment, but the question came in a weird form because I didn't know how it was done, so I failed to explain my doubt, which you got later on the third one.

Thanks for your answers, I'll be prepared Wink Tongue
I think you meant "role" the first time and "whole" the second time.

Quote:While a code is executed, how is the work coordinated within the peripherals and other hardware? For instance, how the communication between the processor and the GFX card works. About this I know basically what's the GPU role in graphics rendering and rasterization, but I would like to know how this whole process between the processing of what must happen on the program and the generation of the next frame happens.

And to be honest I have no idea how the OS actually assigns work to each core and manages everything. The affinity is essentially a way of the program telling the OS what core to run the thread on, and if the OS doesn't receive one then it assigns an affinity for the thread itself. How the OS makes sure that threads with affinity 1 are processed on core 1 I have no idea.

(11-02-2011, 10:37 AM)NaturalViolence Wrote: [ -> ]I don't understand the question.

Quote:2- An OS (Windows for instance) can be/is multithreaded, or is it a single thread.

It has many processes each of which could be multithreaded or single threaded, but usually single threaded.
i'd say the os is multithreaded. the windows service application can do multiple services at the same time; resolving into > 30 threads
at the very least every application of windows has more then 1.

...unless you mean the kernel, then i wouldn't know if its single or multi

EDIT: btw, i LOVE eve online :o . tho i didn't pay attention to mining since i was more of a mission/pirate killer to earn my money. so in the end i funded you to kill the pirates XD
Quote:EDIT: btw, i LOVE eve online :o . tho i didn't pay attention to mining since i was more of a mission/pirate killer to earn my money. so in the end i funded you to kill the pirates XD

We're way off topic now but whatever, eve is worth talking about. I played for 7 months, I still do the "come back free for 5 days and check out all the changes we've made" offer that CCP sends me whenever they release an expansion pack but I never resubscribe (eve friends keep trying to convince me that I don't need to sink lots of time into the game because of skill training but I know better, without playing you don't know what skills to train next Tongue, plus what's the point of paying for it if you're just going to train skills and never actually play). It's still neat to see all the changes they make every time, CCP truly is an amazing company even if the game is boring at times.

I was knee deep into manufacturing and marketing more than mining (though I did that as well, and I did a lot of exploration). Quickly learned that noobs can't hope to compete with the big dogs by building T1 shit that almost anyone can make. The experienced players can produce the items for less and can mass manufacture so well that they don't have to make very much profit on each item (if it costs 350 isk to make they can sell it for 355 isk and still make a huge profit by selling millions of them in volume). You simply can't compete with them unless you invest the time into finding a niche market that they haven't found their way into yet (a particular system might be low on a particular item and nobody is selling it in that system). Still your profits at the beginning are so paper thin that you have to use other activities like mining to finance your operations, and often times you actually make a loss because you can't sell the item for more than it costs you to manufacture it (due to competition from the experienced players).

But I saw hope despite being trapped in an unprofitable nightmare. While most people have the capabilities to make T1 stuff themselves only a small number of industry focused players can make T2 stuff. That means less supply, less competition, and therefore more profits to be had. So I spent months getting to the point where I could do that. And near the end of my 7 months I reached the point where I could make a lot of different T2 stuff. At first it was great, I was making huge profits. I could sometimes sell stuff for double or even triple the price it cost me to make it. For the first time I was able to gain a decent income off of industry alone by being able to do something few people could do (made me realize rl is like that too, the less people can do it the more valuable the service is to the economy, being successful is all about being able to do things that are useful to society yet few people can do, making it worth more money to the society). I started to diversify my products into many different markets and "test" each market to see how much competition there was and how much profit could be had. Some items were far more difficult to sell at a profit than others, and I found a few niche markets along the way (my cash cow quickly became void ammo). The laws of supply and demand were revealed to me in an eye opening way, as I saturated a market with high supply of an item its value quickly diminished as did my potential profit margins. I realized industry was a progression, as I continued to progress I would be able to make items that fewer and fewer players could make and my profits would continue to rise. Bigger more expensive stuff tends to be more risky to invest into manufacturing but has a higher potential payoff. Money can't be made without starting capital. And the more money you have the more money you can make.

I wanted to get into T2 ship manufacturing since I now had the money for it and it seemed like making such expensive items would produce much greater profits. That was a big mistake, a really big mistake. I started doing the math and it just didn't add up. It seemed like T2 ships cost a similar amount to manufacture as they are sold for (sometimes more in fact), considering even fewer people can make them than T2 modules that didn't make sense when T2 modules make such huge profits. One day I decided I was going to go for it. I did the math and calculated how much it would cost me to make a falcon and checked the prices. It would cost me twice as much to make it as it was selling for, how the fuck? I checked it again, then I started checking other ships, same thing with nearly every ship. The price of ferrogel (a major compound needed to make some of the components of T2 ships) had doubled in 1 week and was quickly rising, this is why it cost so damn much. This didn't make any sense at all. Want to guess what caused it? Bannings. Perfect example of "the butterfly effect" in eve and how everything is interconnected. CCP caught a bunch of players who were using an exploit to mass manufacture processed minerals without the need for moon minerals (normally processed minerals are made from combining moon minerals but this exploit allowed them to make the processed minerals without any raw materials). CCP caught them and after fixing the exploit banned all 138 of them. Problem is these people accounted for about half the production of all moon minerals in eve. With the sudden shortage of moon minerals the price of moon minerals sky rocketed. This caused processed minerals to spike in price (processed minerals are made from moon minerals), which caused compound prices to spike (compounds are made from processed minerals), which caused T2 components prices to spike (T2 components are made from processed minerals, compounds, and asteroid minerals). Then sure enough next week the prices of T2 ship began to skyrocket (T2 ships are made from T2 components among other things). The effect was felt throughout the entire economy. I just couldn't believe what I was watching unfold before my eyes. The T2 economy has never fully recovered from this after 3 years. God damn I love talking about this game, so many awesome stories. It's boring repetitive shit 99% of the time but 1% of the time something truly amazing happens and you have an amazing story of that event that you will always remember. I would have quit after the first month if it wasn't for the civil war that I led in my corporation to overthrow the current ceo, that was fun and hilarious when we were won. *sleeps*
there is a reason i went for missions and pirates. more action and more profit...somewhat (specially in .0 space. but that requires team work from time to time seeing how i only got to a T1 fitted drake and was going for a raven. (yes, caldari ;D. let me guess, you were gallente ? Tongue )
i quit cause i didn't have the money nor had the interest to proceed but yes, i also go on the "play a few days for free to figure what we've done" ad cause it is indeed fun.

either way, sometimes i find it sad eve has such a steep learning curve cause it scares so many ppl away
...but then again, what makes eve so special is that there are hardly any noobs in the game unless you look around at systems between 1 & 0.7. and everyone was a noob at eve in the beginning and everyone knows that.
the only way to learn something decent in eve, is the hard way Tongue by almost loosing your shit(or loosing it XD)


also, im surprised you didn't notice my avatar then. its my character in eve Smile
Pages: 1 2 3 4 5 6