What are quad/dual cores used for?

666 views

I know its supposed to be able to do multiple tasks at once, but what are these task? For example, is it like playing video games while listening music or something. Im sure its probably a lot more advanced than that, so please give examples.

In: Technology

5 Answers

Anonymous 0 Comments

Your CPU currently checking if you moved your mouse, it’s checking if mouse has been clicked, it’s checking what’s under the mouse and sending a signal to a program that’s responsible for the window that the mouse is on about mouse being there. It’s also receiving the signal as the program whose window is there, deciding if it needs to change something due to mouse position. Program also might be doing something else, like making requests to web servers, and CPU handles that too…

With single-core CPU, all those myriard tasks are done sequentially. Processor however swaps between tasks very fast, like, once every millisecond at least, or more, so it seems like everything is done simultaneously, but actually all those tiny things happen by processor switching tasks.

Even before multicore processors, it was found out that it was good idea to logically separate these tasks into first programs(so each program got its own slot), and later this was refined even further to be threads. Each program basically got onto a queue, and when it was their turn, they had like a millisecond to do things on CPU. After the time was up, or program voluntarily gave up CPU, next program would come in, and the program would get back into the queue. Operating systems would manage this. CPU only did one thing at once, but because of constant swapping, it seemed like your multiple programs were running simultaneously.

This was further developed into threads, so single program could kinda have “mini-programs” in it, like, if you calculate trillion digits of pi and show a cute dancing triangle that made a sound, while waiting for the computation to finish, you could have one mini-program calculate the digits of pi with no worries, and second miniprogram to check every couple of milliseconds if you have clicked the triangle so the program can make the sound. It’s a bit of a mess but the basic idea is that even just one program can be split into many logical tasks that can be handed to the CPU separately. If that doesn’t make sense to you, then you’re not missing much if you just ignore threads and think of it all being programs in a queue.

And now, with multiple cores, you can split the queue. So instead of just letting one program use processor at a time, you can now have multiple programs do their stuff simultaneously, so theoretically you could have computer get 4x faster by having 4 core processor.

But also, if all your computer runs is a single program(single-threaded), then having 4 cores is not any better than 1 core. That program gets to the CPU and the individual core presumably isn’t any faster at executing it than the mono-core processor. But modern computers tend to run so many programs the same time that you’re guaranteed at least some speed boost from multiple cores. How much? It’s hard to tell exactly.

You are viewing 1 out of 5 answers, click here to view all answers.