PDA

View Full Version : What exactly does 64 bit mean


tony draper
16th Aug 2009, 20:54
As opposed to 32 bit with reference to these new CPUs?:confused:

ORAC
16th Aug 2009, 20:59
Wikipedia - 64 bit (http://en.wikipedia.org/wiki/64-bit)

tony draper
16th Aug 2009, 21:21
Once built a dual CPU pentium3 machine because because supposedly programs were coming out that could use two CPUs multi threading think it was called,only ever came across one that supposedly could and on that it was not fully implemented,will progs have to developed to work in 64 bit systems?
:)

Gertrude the Wombat
16th Aug 2009, 22:11
will progs have to developed to work in 64 bit systems?
That's a complicated question.

There will be some benefit to using 32 bit applications on a 64 bit operating system, as the memory limits (2GB, 3GB, 4GB) disappear. So if you're struggling to fit multiple applications into a 4GB machine that problem will go away.

Individual applications that need to use large amounts of memory will need some degree of rewriting to handle this, where "some degree" is from almost none, if the application does its data thrashing using memory mapped files and already knows that you need 64 bits to address large files, through to a substantial rework.

Some applications will derive performance benefits from being reworked for 64 bits, but others might not. So just because a particular application is "still running in only 32 bits" in ten years' time won't necessarily mean that there's anything wrong with it.

And there is a potential downside: at present there is a tendency to write horrendously unnecessarily greedy Java/Swing applications, that need gigabytes to do what a sane implementation in another language could do in tens of kilobytes. If the Java/Swing weenies have a 64 bit address space available to them they'll have no need to actually learn any software engineering, and this particular madness will be able to grow without limit!

Jofm5
16th Aug 2009, 22:12
Hmmmm Computers studies in 1 post, not easy but the basic theory is this

1 bit is your basic switch = its either on or off a zero or a 1.
8 bits = 1 byte, if you look at the ascii character set (Ascii Table - ASCII character codes and html, octal, hex and decimal chart conversion (http://www.asciitable.com/)) you will see each of the characters in the table with a number 0-255 with 255 being the highest binary value achievable with 8 bits aka a byte (ignoring multibyte character sets for the time being).

Early CPU's were 8 bit machines, thus they moved data round at 1 byte at a time, later cpu's e.g. 16 bit could move more around at a time. A 32 bit cpu can move 4 bytes at a time and 64bit cpu's 8 bytes at a time. Thus for a single clock cycle a 64bit machine is capable of moving twice as much data as a 32 bit machine.

Where the big difference comes in is memory addressing, a memory register (think of it as being a pigeon hole) has an address for the CPU to reference it by, this address is represented by unsigned integer in binary notation the size of the cpu's addressing capability (e.g. 32bit) so for example a 32bit CPU can have 4 billion addresses which equates to the CPU being natively able to address 4gb of memory. Because a 64bit CPU is much wider it can address much more memory (16 exabytes).

In summary the benefits of a 64bit CPU over a 32bit one are the amount of memory it can natively address (Operating systems can page memory to use more than the native addressing but involved processing computations and thus a performance hit) and also the amount of data that can be moved and thus processed in a single clock cycle.


will progs have to developed to work in 64 bit systems?


The simple answer is Yes, but the correct answer in the home pc context is No. If we are referring to 64 Bit x86 compatible CPU's then because legacy support is built in a 32bit, 16bit or even 8bit developed/compiled application will run on a 64bit CPU - however they will have the constraints on them the application was developed for. E.G. a 32bit application running on a 64bit processor will still only be able to utilise 4gb of ram even though the processor can address more.

A good example is to see windows XP or Vista 32bit running on a Core 2 chip - the Core 2 chips are 64bit chips yet when running 32 bit operating systems are restricted to the constraint of 32bit memory addressing.

This may lead the question to be asked as to why most suppliers supply a 32bit operating system on a 64bit platform. This is explained by the fact for a 64bit chip to run 32 bit applications it has to switch contexts to 32bit addressing - so running a 64bit operating system with primarily 32 bit applications will result in heavy context switching between 32bit and 64bit modes which as a single context switch takes 1 clock cycle means a performance degredation.

Jofm5
16th Aug 2009, 22:15
There will be some benefit to using 32 bit applications on a 64 bit operating system, as the memory limits (2GB, 3GB, 4GB) disappear. So if you're struggling to fit multiple applications into a 4GB machine that problem will go away.



Not exactly true - a 32 bit application can address only 4gb of memory - the limitation does not go away when a 32bit application is run in a 64bit environment. What is true is that each 32bit application may have its own 4gb if there is enough memory available which will result in less swap file being used.

Jofm5
16th Aug 2009, 22:27
Mr Draper,

I decided to post seperatley on the multiprocessor/multi core issue as this is a different subject all together.

A single application running is referred to as a process, within a process there is typically one thread of execution unless the developer themselves decide to start up particular tasks on a seperate thread.

Common practice nowadays is to have the user interface on one thread and a second thread (or indeed more) for the actual processing, this allows the user interface to continue to be responsive even while heavy computation takes place.

A multi-core machine is effectively more than 1 CPU on a single chip - thus a dual core machine allows two threads to be executed simultaneously. A multi-processor machine is one as in your example where more than one chip is implemented (each chip could have multiple cores).

It is the operating systems task scheduler that decides what will run on which cores/cpu's - typically (as is the case with Windows) the first CPU is the only CPU the operating system itself will run on so will achieve the highest utilisation.

Writing multi-threaded code is not simple to do by any means as you have many timing issues - for example one thread may try reading an area of memory as another is writing to it and thus garbage may be read as it was changed half way through the operation. In programming parlence Semaphores and Critical Sections are often used to prevent this, however if you read up on those and why they are used you will gain an appreciation on why multi-threaded applications are more costly and time consuming to develop.

Multi-threading an application only makes sense if you can perform two operations at the same time that are not interdependent. Server based applications are a prime example of good use of multi-threading however typical user based applications spend most of the time waiting for the user so benefit little.

Because each process has at least a single thread, the more concurrent applications running the more the cores/cpu's will be utilised.

tony draper
17th Aug 2009, 17:07
Thanks for the edumacation chaps,a secondary question if I may.
My mother board has two memory channels A @ B,(four slots)as I understand it XP pro can only use 4 gig of ram, I have two 2 gig chips,would it be best to install the 4 gig in one memory channel or split it up and fit two gig in each channel,the CPU is a dual core jobby.
Would it make any difference?
:)

Jimmy Macintosh
17th Aug 2009, 17:47
A couple of minor things to add, though nothing as impressive as Jofm5.

The memory address is maximum 4 Gb total, I think it's actually a little less, but the total includes graphics card, cache etc. so if you have two 512Mb graphics cards, and 4 Gb RAM, only 3 Gb of your RAM can be addressed.

Apparently 64 bit isn't completely compatible with 8 bit. So if your favourite program has been through many reworks/updates there is a chance that it has a buried module with 8 bit code, so the software rolls over and dies. This is what has been causing all of the incompatibility issues between Vista and older software (unless you used the 32 bit version).

I stand by for corretion.

Saab Dastard
17th Aug 2009, 18:01
Tony, best to check with your mobo manual as to which slots you should use.

SD

Jofm5
17th Aug 2009, 18:08
split it up and fit two gig in each channel


Most manufacturers colour code the memory slots into channels - so you may have two blue and two yellow (and not necessarily side by side).

The idea behind the above is so you can put matching pairs in the same channel - this will allow the memory controller to perform "wide" memory operations and write/read from the two memory modules at the same time.

Putting the memory modules in different channels will result in the memory controller having to perform two operations rather than the one. In real life this is hardly noticeable unless you are really hammering the machine.