Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CPU instruction on multi-physical-cpu machine

I have 2 questions: 1. Can a machine have two or more CPUs which are different in model? 2. If I call CPUID instrucion, will result be any different when different CPUs perform it? (If the answer to quesions1 is right, this is obvious). If so, how can I get all CPUs' infomation by CPUID instrucion.

like image 835
cuihao Avatar asked Jul 16 '11 15:07

cuihao


People also ask

How does a CPU work step by step?

The working of the CPU is defined as a three-step process. First, an instruction is fetched from memory. Second, the instruction is decoded and the processor figures out what it's being told to do. Third, the instruction is executed and an operation is performed.

How do I use multiple CPU cores?

Core Settings In Windows 10Type 'msconfig' into the Windows Search Box and hit Enter. Select the Boot tab and then Advanced options. Check the box next to Number of processors and select the number of cores you want to use (probably 1, if you are having compatibility issues) from the menu. Select OK and then Apply.

Can a machine have multiple CPUs?

Multicore MachinesA multicore processor incorporates multiple processors on the same chip, sharing main memory and sometimes second level caches and bus. Each processor will have its own level 1 cache. The different processors execute independently, allowing for embedded task- or thread-level parallelism.

How does a CPU work physically?

The actual mathematical operation for each instruction is performed by a combinational logic circuit within the CPU's processor known as the arithmetic–logic unit or ALU. In general, a CPU executes an instruction by fetching it from memory, using its ALU to perform an operation, and then storing the result to memory.


1 Answers

Yes and no. There are many systems that multiple processors, and vastly different. The gameboy advance, has both the arm based and z80 based gameboy (cannot use both at the same time). but the nds has an arm9 and arm7 (can/do use both at the same time). The omap you would find in a beagleboard has an arm and a TI dsp (can use both at the same time). I assume you were talking about x86 systems. Most desktops are just an x86. Your mouse and keyboard and things like that probably have 8051s or other various flavors of microcontrollers. But you dont care because these are just USB HID devices or cdrom drives or hard disks. You cant really get at the processor so it doesnt matter that it shows up. Laptops and high end server systems and likely dekstops soon have a second processor or computer in there, for the laptop it is probably an arm, significantly lower power, so the x86 can be turned off in a standby mode, the arm keeps things alive, you wake it up it comes up very fast. On a server the other system is there as a bulletproof watchdog, keeps an eye on the server, provides monitoring and some remote reset and other capabilities. Likewise you cant get at this processor so it does not matter if you cannot find in a CPUID deal. Another one is your video card, hundreds to thousands of gpus. You can get access to those with your programs, as with the omap dsp, but you dont do general purpose processing so again the CPUID wouldnt need to provide that info.

So yes and no. Your computer system as a whole, including peripherals, has many different processors, but the general purpose processing is usually a single or multicore of the same family usually inside the same chip. So CPUID only really needs to give you that core/family.

like image 127
old_timer Avatar answered Oct 20 '22 16:10

old_timer