LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2009, 01:57 PM   #1
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Fedora 9
Posts: 192

Rep: Reputation: 30
Question what are 32 bit and 64 systems


Hi friends,
Please tell me what does it mean by a 32 bit and 64 bit operating system?
I use Linux fedora. Is this 32 bit or 64 bit? How we note this?
Regards
 
Old 05-09-2009, 02:09 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by mq15 View Post
Hi friends,
Please tell me what does it mean by a 32 bit and 64 bit operating system?
I use Linux fedora. Is this 32 bit or 64 bit? How we note this?
Regards
A 32 bit system is designed to run on a 32 bit processor. A 64 bit system is designed to run on a 64 bit processor. You can however run a 32 bit system on a 64 bit processor but not the other way around. Which one you run is restricted by which type of processor you have. There are other requirements to make the running of a 64 bit system beneficial.

Do:
Code:
uname -a
in a terminal and post the output to this thread.
 
Old 05-09-2009, 02:22 PM   #3
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Code:
$ grep lm /proc/cpuinfo
If you get the flags displayed then you have a 64bit processor.
Code:
$ uname -m
Will display the machine type the kernel was built for.

The Linux kernel can be compiled to support many different machine processor types.
In most case's a precompiled kernel is supplied with most distribution's so you have to install the matching one ... though, as noted above, you can run a 32bit OS on a 64bit processor (the OS will not have specific processor functionality enabled).
 
Old 05-09-2009, 02:23 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
You should also read about it on wiki, it's more comprehensive (although sometimes obscure):
http://en.wikipedia.org/wiki/X86-64
 
Old 05-09-2009, 02:30 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by mq15 View Post
what does it mean by a 32 bit and 64 bit operating system?
In x86 systems a 32-bit OS is one that runs the hardware in 32 bit mode and a 64-bit OS is one that runs the hardware in 64 bit mode (see below).

Any x86 hardware that can run in 64-bit mode can also run in 32-bit mode, so if you have a recent x86 CPU with support for 64 bit mode you have your choice of 32 bit or 64 bit OS. But if the hardware is older (doesn't support 64 bit) only a 32 bit OS can be used.

A 64-bit OS can run application programs in 32 bit mode or 64 bit mode. A 32 bit OS (even on hardware that could support 64 bit mode) can only run applications in 32 bit mode.

For an application, the big differences between 32 bit mode and 64 bit mode are the size of a virtual address (32 or 64 bits) and the number of general and xmm registers (twice as many in 64 bit mode).

For the OS itself, there are some additional differences (physical address size, etc.) to running in 64 bit mode.

When the hardware and OS are in 64 bit mode and the application is in 32 bit mode, the application can use only 32 bit virtual addresses (max 4GB virtual memory) and can use only the smaller number of general and xmm registers (even though the hardware has more) but it can use the full physical address space. Even if your PC has more than the 32-bit mode limit of 64GB of physical ram, a 32 bit mode program can still be mapped by the OS anywhere in physical ram.

Quote:
I use Linux fedora. Is this 32 bit or 64 bit?
I'm sure there is a 32 bit version of Fedora. I'm pretty sure there is also a 64 bit version. Earlier posts suggested uname -a or -m. Either way, when you look at the result "X86_64" should be in there if it is a 64 bit Linux OS and will not be in there if it is 32 bit. In uname -a you may see "X86_64" a few times for 64 bit, but certainly zero times for 32 bit. For 32 bit you would see i386 or i686 (or both) or something like that.

A 64 bit OS can run 64 bit applications. A 32 bit OS can't.

A 64 bit OS can run 32 bit applications better than on a 32 bit OS (if you have a lot of ram):

1) A 32 bit OS normally splits the 4GB virtual memory, 3GB for the application and 1GB for the kernel. A 64 bit OS lets a 32 bit application use a full 4GB of virtual address space, while the kernel virtual memory is elsewhere.

2) If you have a lot of physical ram (8GB to 64GB) to run a lot of 32 bit applications at once, the 1GB kernel virtual memory in a 32 bit OS may be overloaded reducing performance or even failing entirely. The kernel virtual memory in a 64 bit OS is big enough for any amount of ram anyone currently has (and for most of us, enough for many years in the future).

3) If you have a LOT of physical ram (over 64GB) to run a lot of 32 bit applications at once, a 32 bit OS simply can't use it. A 64 bit OS has no problem.

Last edited by johnsfine; 05-09-2009 at 02:50 PM.
 
Old 05-09-2009, 02:33 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Fedora is available in both version. You pick whichever you like providing you have a 64 bit CPU (basically every Athlon64/X2/ X3/Phenom, Intel Core 2/Quad/7 and some Pentiums 4s).
 
Old 05-10-2009, 11:44 AM   #7
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Fedora 9
Posts: 192

Original Poster
Rep: Reputation: 30
Thanks dxqcanada. Thanks to johnsfine as well, your reply is just awesome.

Here is the result:
Quote:
[root@localhost ~]# uname -m
i686
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 i686 i386 GNU/Linux
[root@localhost ~]#
So as johnsfine explained, my OS is 32-bit as i686 and i386 are there but no X86_64 is there in the result. Now how can I get to know the same info about my processor? (I use HP pavilion dv6000)

Thanks a lot all of you.
 
Old 05-10-2009, 01:41 PM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by mq15 View Post
Now how can I get to know the same info about my processor? (I use HP pavilion dv6000)
grep -w lm /proc/cpuinfo

That finds the lm as a whole word in the flags line of each core in cpuinfo. That lm means the CPU supports "long mode" which is 64 bit mode.

So when that displays the flags line(s) from cpuinfo, that means you have a 64 bit CPU. If it displayed nothing, that would normally mean you have a 32 bit CPU. But the HP pavilion dv6000 has an AMD Turion 64, dual core processor, so if that grep command doesn't display two copies of your flags line, that means either you or I made some mistake.

BTW, make sure you have some form of CPU power control daemon properly installed and configured (sorry, I can't tell you how to even check that in Fedora, much less fix it if it is wrong. I barely figured it out for myself in Mepis). IIUC, your computer will run hot and have rotten battery life if you don't have that software (which reduces the CPU clock speed when the CPU is idle).

On some AMD systems, you can use
grep MHz /proc/cpuinfo
to see what the power saving daemon has done. If the system was idle just before that command, it will report a lower clock rate than the full speed of whatever you have. If you start a background compute intensive process and then give the above command it should report your full CPU speed. But I'm not sure all AMD power saving daemons will behave that way.

Edit: I didn't notice until after posting the above that your processor question was answered before you even asked
http://www.linuxquestions.org/questi...11#post3535611

Last edited by johnsfine; 05-10-2009 at 02:13 PM.
 
Old 05-10-2009, 05:43 PM   #9
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by mq15 View Post
Now how can I get to know the same info about my processor?
A nice gui app to install is HardInfo it presents you with comprehensive information about your system.
 
Old 05-11-2009, 10:02 AM   #10
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Fedora 9
Posts: 192

Original Poster
Rep: Reputation: 30
Thanks a lot again.
for
Quote:
[root@localhost ~]# grep lm /proc/cpuinfo
I got this:
Quote:
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 cx16 xtpr lahf_lm
So the machine is 64 bit but as I posted earlier, the OS is 32-bit because
Quote:
[root@localhost ~]# uname -a
results this:
Quote:
Linux localhost.localdomain 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 i686 i386 GNU/Linux
[root@localhost ~]#
Now would someone tell me how can I compile the kernal for 64-bit and if would change/erase the existing applications?

Regards

Last edited by mq15; 05-11-2009 at 10:03 AM.
 
Old 05-11-2009, 11:11 AM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by mq15 View Post
Now would someone tell me how can I compile the kernal for 64-bit and if would change/erase the existing applications?
I think you can't simply replace a 32 bit kernel with a 64 bit kernel and have the rest of the system continue to work.

I've never tried it myself. I hope to find some time to try it, because I am curious about the issue and I've seen some contradictory info about it in various threads. I'd like to see for myself what actually goes wrong when you try that.

If you could just replace the kernel, you almost certainly could find the right Fedora 64 bit kernel package to download. You wouldn't need to compile it.

All your 32 bit applications can run under a 64 bit kernel. So I expect an expert could replace a fairly small fraction of a 32 bit Fedora install to get a 64 bit kernel working with mostly 32 bit applications. I don't know whether a beginner could.

Most people would reinstall the entire distribution to switch from 32 bit to 64 bit.
 
Old 05-11-2009, 02:26 PM   #12
mq15
Member
 
Registered: Apr 2009
Location: Pakistan
Distribution: Fedora 9
Posts: 192

Original Poster
Rep: Reputation: 30
Thanks a lot dear johnsfine. You made a great help. In fact I myself want to perform such experiments. But these days I am working on my project, so I cannot afford something bad happening to my system.
So would some experienced user tell us how can I safely switch from 32-bit to 64-bit fedora without a domage/erase of existing data/applications ?
Regards
 
Old 05-11-2009, 03:10 PM   #13
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 40
mq15,

You may dual boot into a 64 bit or a 32 bit system if you have both installed.
You can also install a 32 bit system into a chroot on a 64 bit system that supports 32 bit software.

Howver, there is no easy upgrade path between 32 bit and 64 bit systems. Mostly because you get into a state where you will have a mix of the two that will no longer work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox plugins on 64-bit systems pwabrahams Linux - Software 7 01-18-2008 08:01 PM
Ok so what all can I not get for 64 bit Linux systems? comcastuser Linux - General 14 09-17-2007 02:06 PM
Qt and GTK on 64 bit systems Bjorne Linux - Desktop 4 03-24-2007 02:56 PM
How is it possible to use hldsupdatetool on amd 64-bit systems? hondo Linux - Software 1 10-08-2006 10:49 AM
Assembly Language on 64 Bit systems Sleevy Programming 1 09-06-2004 02:58 AM


All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration