Jump to content

sooo I was thinking about this for a few days and it has been bugging me about it

 

I might sound like a noob, but here it goes....

 

if the computer processes tasks in binary, or 0s and 1s, how does the computer distinguish between 0s and 1s from other 0s and 1s to run the tasks simultaneously?

 

or simply put

 

how does a computer distinguish let's say 2 tasks from each other when these tasks are essentially the same 0s and 1s?

Link to post
Share on other sites

In the simplest way. You have the right idea that everything inside a computer is interpreted in binary. However, the CPU can only "compute" a single task per physical computation core that exists. Each process identified by its process identifier, or PID, each process is loaded into system memory and the CPU accesses the specific block set aside for each process. The notion of "everything happening at once" is done through complex scheduling and swapping processes on and off the CPU extremely quickly. If you are interested in this type of stuff definitely take some Computer Science classes and you will learn more about this stuff in lower level classes like Operating Systems.  ;) If you look in Task manager in the processes tab you can see the process identifiers listed for all the processes currently running. In Mac OS X you can quit an application by getting the PID and in the terminal entering "kill (PID)" and the application quits. So thats a real world example 

CPU: Intel Core i5 2500K | Case: Bitfenix Prodigy | Motherboard: GA-H61N-USB3 | RAM: Corsair 8GB 1333 MHz Video CardEVGA GTX 660 Superclocked 2GB DDR5

Power Supply: Corsair CX 430 | SSD: Samsung 840 120GB | HDD: 2X Seagate Barracuda 500GB 7200rpm | Monitor Asus PB238Q & Asus PB278Q

Mouse: Lenovo N50 | Keyboard: Apple Pro Keyboard | Operating Systems: Hackintosh OS X 10.8.5 & Windows 8.1

Link to post
Share on other sites

sooo I was thinking about this for a few days and it has been bugging me about it

 

I might sound like a noob, but here it goes....

 

if the computer processes tasks in binary, or 0s and 1s, how does the computer distinguish between 0s and 1s from other 0s and 1s to run the tasks simultaneously?

 

or simply put

 

how does a computer distinguish let's say 2 tasks from each other when these tasks are essentially the same 0s and 1s?

If I were a computer I would give each process a number and then I could just refrence each process by its number value. But otherwise I actualy dont know.

Link to post
Share on other sites

In the simplest way. You have the right idea that everything inside a computer is interpreted in binary. However, the CPU can only "compute" a single task per physical computation core that exists. Each process identified by its process identifier, or PID, each process is loaded into system memory and the CPU accesses the specific block set aside for each process. The notion of "everything happening at once" is done through complex scheduling and swapping processes on and off the CPU extremely quickly. If you are interested in this type of stuff definitely take some Computer Science classes and you will learn more about this stuff in lower level classes like Operating Systems.  ;) If you look in Task manager in the processes tab you can see the process identifiers listed for all the processes currently running. In Mac OS X you can quit an application by getting the PID and in the terminal entering "kill (PID)" and the application quits. So thats a real world example 

 

actually, I plan to major in Computer Science so I'll learn this in more depth once I get to college

 

but thanks anyway for clearing things up for me!

Link to post
Share on other sites

If I were a computer I would give each process a number and then I could just refrence each process by its number value. But otherwise I actualy dont know.

 

 

So basically a set of blocks mentioned by @Sundanc3 is what you would call number references?

Link to post
Share on other sites

You probably won't cover off on CPU scheduling, threads and processes until; second year college or university. Though basically a process is any active (or inactive) application that's been loaded into the CPU's memory. One binay application can spawn multiple independent processes on the CPU but one process is not started by multiple binaries (Ignoring dependencies).

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

×