Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

About 64-bit CPU's and multiple cores

  1. Oct 31, 2008 #1
    I was wondering what kind of advantage a 64-bit processor gives you over a 32-bit processor. How much more performance does it give you? How much faster would a 64-bit 3.0+ GHz Intel Core 2 Quad give you over a 32-bit quad core model? Are any of the GPU makers developing 64-bit graphics cards?

    And does Windows XP recognize more than one CPU core? Or does only Vista do that?
  2. jcsd
  3. Oct 31, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    A 64 bit CPU has two advantages.
    With a 64bit OS it can use 64bit memory addresses and so access more than 4Gb of memory. This doesn't necessarily give you a performance boost, since all the memory addresses are twice as large you use up more memory storing data and so the cache becomes less effective.
    Even with a 32bit OS it has th eadvantage that you can process 2 x 32bit instructions in parallel, which is an easier alternative to making a 32bit CPU twice as fast.
    (actually with a modern pipelined long instruction word CPU it's a bit more complicated - but you get the idea)

    The numebr of cores is a licencing limitiation rather than a technical one.
    XP pro is licenced for 2 physical CPUs orrespective of the numbe rof cores.
    Some server versions are licensed for the number of cores.

    GPUs are more suitable for doing lots of things in parallel - since you generally want to do the same operation to every triangle on a game screen or every pixel in an image. So GPUs can have 256bit processors with dozens of cores. Although they have a more limited set of instructions than a general CPU.
  4. Nov 12, 2008 #3
    The only advantage is that each task can access over 4GB of memory (including swap file, or call it paging as you want).

    As programs are bulkier (look at Microsoft's patches: the ones for x64 are 1.4 to 2 times as big), they are slower. Not only because of the caches: the Ram, and worse, the hard disk must move more data.

    64 bits machines don't make more operations in parallel. Their SSE engine is 128 bits wide and MMX/floating is 64 bits wide just as they were on the very first Pentium III. Their only advantage is when some program really needs to compute on 64 bits numbers, but this is very uncommon.

    The Core 2 makes one SSE operation per cycle instead of 2 cycles for previous Intel machines, but this is the same in 32 bits and 64 bits modes.

    The only advantage of 64 bits mode apart from address space is that Intel processors at last have an acceptable number of registers.

    Now, beware that most 64-bits Windows don't give you access to a huge address space...
    Xp64 -> 128GB.
    V64 basic -> 8GB, Premium -> 16GB, Business+ -> 128GB.
    Only Server 2k3 and 2k8, option Entreprise and over, offer the expected 2TB.

    I haven't been really convinced by Linux up to now, but such meanness is going to let me change my mind.
  5. Nov 19, 2008 #4
    Yeah, but maybe it's because they have fewer instructions than CPU's that they can actually be designed to be so complex? But, doesn't a 64-bit processor also have a larger cache as well? Like 64^64 bits is how big a 64-bit CPU's cache is, right? This can make it faster to run a single process on the CPU as less of it will be in memory and on storage (assuming the OS uses paging instead of swapping). If it's a dual-core 64-bit CPU, it'd maybe run two threads from the same process (program in execution) but there's not telling if this will cause it to run twice faster or not. I myself, am not sure exactly how multi-core processors work, but I don't believe that it's twice faster or anything. Throughput is more complicating than that, I think.
  6. Nov 19, 2008 #5
    No, I don't think you can call it whatever you want, maybe in the context of what you're talking about, but swapping and paging are two very distinct things in regards to memory management. Whereas swapping places the entire process onto your hard-disk, paging only places part of a process onto storage - that seems to be the major difference between the two.

    I need to review the material, as we're discussing this in class right now, but I think that address space sizes and 32-bit vs. 64-bit relates to Page Table and Base Registers, where you have a page number then a frame number or something like that. So, depending on the size of each memory block, the formula to determine the size of your address space is like log-base:2 of n = address_size, where n is the number of blocks of memory. So, when talking about 2^32 = n, you're talking about an address size of 32-bits for n blocks of memory.
    When you're talking about page-numbers and frame numbers, things become more complicating as the page number includes p which is the difference of m and n, and d which is the page offset (displacement of memory); where 2^m is the size of the logical address space and a page size 2^n shows how many units of memory a page refers to.
    So, if every fixed-size frame of memory is one byte large, a memory address space of 32-bits is sufficient for up to 2^32 bytes. When implementing paging, we'll divide the 2^32 bytes among 8 pages, each page of a size of 4-bytes. So, the page number itself (32-4) will be 28-bits long. 4-bits will be used to signify the page-offset, which works out since each page is 4-bytes long, thus proving that the logical address is correct.

    Windows uses pages because paging uses hardware support. For instance, the page table - which, references a page number (logical address) to a frame number (physical address) by having array-index: page number equal the corresponding frame-number - can be stored on a set of registers instead of on main memory. Thus, improving the speed of accessing memory by page-table. Since, modern page tables are too large to be stored on a CPU's registers, the registers really point to the page-table, which is stored in main memory - thus, defeating the purpose of registers in the first place.

    So, OS's now make use of this special hardware cache known as the translation look-aside buffer. Which, reduces the delay in accessing memory by 10%.

    When talking about using 64-bit processors and memory management, I think that has to do with the CPU being able to store a memory address space of 64-bits in its registers. I don't know how 64-bits comes into play with swapping, but it seems that swapping isn't as efficient as page-tables anyways.
  7. Nov 21, 2008 #6
    In theory, 64bit and multicore processors are faster than 32bit and singlecore processors. In practice, 64bit and multicore processors often times are slower.

    If you have 2 smaller cores, they would be most efficient if you are running many separate applications, rather than one large one). Most applications you will use are designed for one core, so it will only make use of that one core(ie core 1 will be maxed out while core 2 could be sitting idle). But if you are running multiple applications. Each program can be assigned to a different core, which would lead into an increase of performance.

    64bit processors are on the same boat. While 64 bit processors are faster in theory, in practice they are slower. Most applications are written for 32 bit operating systems. This means your 64 bit operating system has to run a 32 bit emulator to process these applications (which means they will run slower, and perhaps contain glitches).

    64bit processors and multicore processor are best used on servers. Since many software made for servers usually has 64 bit ports now, also servers often run many different pieces of software (mail server, ftp server, firewall, so on) in which a multicore would be advantageous over a single core.

    In short: In desktop computing, there is little to no difference, if not a performance hit, in servers it is a good thing to have most of the time.

    btw swap file AND page file are the same thing. I'm not sure where people got the idea that there is a difference. Typically you use the phrase swap on linux, while you use page on windows. both operating systems do the technique differently, but it is the same thing.
    Last edited: Nov 21, 2008
  8. Nov 21, 2008 #7
    No, dude. They are different - that I'm sure of, because I read it in my textbook, describing them as being two different things. I've talked to my professor about this, and he said they're two different things.

    Basically, with swapping, you swap an entire process onto the harddrive when it's likely to be idle. But, if for some reason, it isn't idle, then you'll likely have to wait a while for that process to be brought back up into memory. Paging differs in that you only have part of the process on storage.

    I think Linux's version of "swapping" is actually paging, however. According to Silberschatz et al., "Linux does not implement whole-process swapping; it uses the newer paging mechanism exclusively". I read in my textbook, that Linux's paging system can be divided into two sections:
    1. policy algorithm - decides which pages to write out to disk and when to write them
    2. paging mechanism - carries out the transfer and pages data back into physical memory when they are needed again.
    "Linux's pageout policy uses a modified version of the standard clock (or second-chance) algorithm", (p. 761).

    source: "Operating Systems Concepts, 7th ed.", by Avi Silberschatz, Peter Baer Galvin, and Greg Gagne. John Wiley & Sons, Inc. 2005. ISBN 0-471-69466-5
  9. Nov 21, 2008 #8


    User Avatar
    Science Advisor
    Homework Helper

    Swapping and paging are different, as michinobu describes.
    However in practice amost all modern OS use a form of paging. The virtual memory mechanism of WindowsNT and Linux is very similair, it's only for historical reasons that one is called a swapfile and the other a pagefile.
  10. Nov 21, 2008 #9
    To be technical, swapping is an older algorithm, however we are speaking in terms of modern operating systems.

    Most linux distros now use the "paging" algorithm, though it uses the term swap throughout.

    Windows also now uses the "paging" algorithm, it mixes the terms pagefile and swap throughout.

    Therefor, unless you are specifying that you are referring to the older algorithm, it is confusing to say swap without meaning "page",
  11. Dec 1, 2008 #10
    Yeah, I guess you're right, but if a person were to start contrasting the two algorithms without explicitly stating that is what they meant, then I think it's safe to assume that they're referring to the swap and paging algorithms. Especially, if they're both basically the same otherwise.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook