 |
11-11-2006, 11:30 PM
|
#1 (permalink)
|
|
Just another linux lover.
Join Date: Jun 2006
Location: Bangalore, KA
Posts: 562
|
Why linux can be updated without rebooting
One of the most frustrating things about installing or upgrading programs on certain operating systems is the constant need to have to reboot. This is especially true with drivers or system files. Why is it that linux can be upgraded without rebooting? Read on to find out.
It all comes down to how linux and the file system handles files. When linux runs an executable it loads the whole file into memory and accesses it from there. This means that there is no connection to the physical file on the disk drive. When the program is closed and all connections to the file are cut the file is deleted from memory.
So while the program is running, from memory, the physical file on the disk can be updated or changed at will and the running program is not affected. If the program is then closed, and the copy is deleted from memory, it can then be started again using the new file version.
This method works with all files on a linux system, including drivers and system files, with the exception of just one file. That file is the actual linux kernel itself and of course it stands to reason that if that file is closed down then the entire operating system is closed down.
To sum it all up every single program on a linux system can be upgraded while the system is running. All that needs to be done to start using the upgraded program is to restart it. The only reason to need a computer reboot is to start using a new linux kernel. There is no other reason at all to need a computer reboot when using linux.
What all this means is that a linux system can be upgraded in real time while it is working and still have a hundred percent uptime. It has been this way with linux from the start while another operating system is still nowhere near this capability even with its latest and greatest(?) release.
Source: http://blogs.ittoolbox.com/linux/loc...ebooting-12826
__________________
Today is a most unusual day, because we have never lived it before; we will never live it again; it is the only day we have.
(Registered Linux User #432737 - subratabera.blogspot.com)
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
11-11-2006, 11:35 PM
|
#2 (permalink)
|
|
String Phreak
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
|
Re: Why linux can be updated without rebooting
Yea thats rite!
__________________
Bad Bad server.....No candy for u!
|
|
|
12-11-2006, 12:28 AM
|
#3 (permalink)
|
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
Re: Why linux can be updated without rebooting
I think Microsoft can learn something from this!!!
__________________
* Imagination is more important than knowledge.
-Albert Einstein
|
|
|
12-11-2006, 01:08 AM
|
#4 (permalink)
|
|
Salieri Family
Join Date: Feb 2004
Location: Somewhere in Internet.......Have dynamic IP address
Posts: 357
|
Re: Why linux can be updated without rebooting
Thanx 4 da information.. I never thought about this.. One new doubt cleared.
|
|
|
12-11-2006, 06:57 AM
|
#5 (permalink)
|
|
The Thread Killer >:)
Join Date: Apr 2006
Location: Bangalore
Posts: 1,185
|
Re: Why linux can be updated without rebooting
Thanks for the great info. Linux rocks all the way
__________________
Want to make this world a better place? Then, start seeding and don't be just a leecher :)
|
|
|
12-11-2006, 10:13 AM
|
#6 (permalink)
|
|
Just another linux lover.
Join Date: Jun 2006
Location: Bangalore, KA
Posts: 562
|
Re: Why linux can be updated without rebooting
Thanks friends. Linux rocks in many more areas also...You just have to discover it...
__________________
Today is a most unusual day, because we have never lived it before; we will never live it again; it is the only day we have.
(Registered Linux User #432737 - subratabera.blogspot.com)
|
|
|
12-11-2006, 01:14 PM
|
#7 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Why linux can be updated without rebooting
If the copy of the whole app is stored in the memory how doesn't the memory usage so decent in Linux?
__________________
http://www.bash.org/?258908
|
|
|
12-11-2006, 02:33 PM
|
#8 (permalink)
|
|
Just another linux lover.
Join Date: Jun 2006
Location: Bangalore, KA
Posts: 562
|
Re: Why linux can be updated without rebooting
The entire file is NOT loaded into memory, they are read into buffers in clusters (which is a technical term, it's typically 4k, but you can set it when setting up your filesystems).
When you open a file, the kernel follows the link, and assigns the inode a file descriptor (a number that it keeps track of internally). When you delete the file, you are "unlinking" the inode; the file descriptor still points to it. You can create a new file with the exact same name as the old file after deleting it, effectively "replacing" it, but it will point to a different inode. Any programs that still have the old file open can still access the old file via the file descriptor, but you have effectively upgraded the program in place. As soon as the program terminates (or closes the file), and starts up (or tries to access it again), it accesses the new file, and there you have it, a completely in-place replacement of a file!
__________________
Today is a most unusual day, because we have never lived it before; we will never live it again; it is the only day we have.
(Registered Linux User #432737 - subratabera.blogspot.com)
|
|
|
12-11-2006, 02:47 PM
|
#9 (permalink)
|
|
In The Zone
Join Date: Oct 2006
Location: Bangalore
Posts: 429
|
Re: Why linux can be updated without rebooting
I dont think restarting your PC is tough job!
|
|
|
12-11-2006, 03:01 PM
|
#10 (permalink)
|
|
GaurishSharma.com
Join Date: May 2005
Location: Jaipur
Posts: 4,116
|
Re: Why linux can be updated without rebooting
^^
but certainly a irritating one because on every reboot i have to close my torrents  thats why windows sucks for me
|
|
|
12-11-2006, 03:09 PM
|
#11 (permalink)
|
|
Salieri Family
Join Date: Feb 2004
Location: Somewhere in Internet.......Have dynamic IP address
Posts: 357
|
Re: Why linux can be updated without rebooting
Quote:
|
Originally Posted by shashank_re
I dont think restarting your PC is tough job!
|
Note the fact that LINUX is mostly used for SERVERS and servers need 100% Uptime...
|
|
|
12-11-2006, 03:52 PM
|
#12 (permalink)
|
|
The Lord of Death
Join Date: May 2005
Location: यमलोक
Posts: 253
|
Re: Why linux can be updated without rebooting
This isn't a unique feature of Linux. All Unixen have the same ability to update themselves without rebooting. This is because of the robust UNIX architecture, which has the concept of everything as a file. Windows obviously takes a beating here for its inefficient architecture and design of system internals. Windows registry is a very ugly part of the operating system, which even Microsoft has been thinking about disposing off.
As I've said before, Windows needs a solid UNIX-like kernel. I won't complain this time if Microsoft copied Apple in this regard.
|
|
|
12-11-2006, 04:13 PM
|
#13 (permalink)
|
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
Re: Why linux can be updated without rebooting
@Yamaraj, You are absolutely right. Windows Registry is the culprit!! For the things
to be updated in the Registry, Windows has to reboot.
Quote:
|
Originally Posted by shashank_re
I dont think restarting your PC is tough job!
|
Suppose you install 15 or 20 applications. And after every application is installed,
you have to reboot!! ie., in total you have to reboot 15 or more times!!
This is more annoying & ridiculous!!
__________________
* Imagination is more important than knowledge.
-Albert Einstein
|
|
|
12-11-2006, 05:04 PM
|
#14 (permalink)
|
|
Indian by heart
Join Date: Nov 2003
Location: Bangalore
Posts: 343
|
Re: Why linux can be updated without rebooting
The new technology in linux lets you install and use the OS without restarting  Thats something really cool
__________________
प्रासादशिखरेऽपि सन्न काको गरुडायते ॥
No matter how high a fool may rise, he remains a fool -RigVeda
|
|
|
12-11-2006, 06:21 PM
|
#15 (permalink)
|
|
Human Spambot
Join Date: May 2005
Location: Noida
Posts: 5,601
|
Re: Why linux can be updated without rebooting
Quote:
|
Originally Posted by Yamaraj
This isn't a unique feature of Linux. All Unixen have the same ability to update themselves without rebooting. This is because of the robust UNIX architecture, which has the concept of everything as a file. Windows obviously takes a beating here for its inefficient architecture and design of system internals. Windows registry is a very ugly part of the operating system, which even Microsoft has been thinking about disposing off.
As I've said before, Windows needs a solid UNIX-like kernel. I won't complain this time if Microsoft copied Apple in this regard. 
|
Yeah, the Macintosh also does not need to be restarted after any upgrade except for kernel updates. It does need a restart after a QuickTime update though, I don't know why.
And Mac goes one step further. Suppose you have a word file open and you are editing it. You can move the physical file around, rename it - do anything except deleting it. This is true for almost every application on the Macintosh. I know it is not possible on Windows but I am not sure about Linux. Does Linux allow you the flexibility to work with busy files?
|
|
|
12-11-2006, 06:46 PM
|
#16 (permalink)
|
|
Just another linux lover.
Join Date: Jun 2006
Location: Bangalore, KA
Posts: 562
|
Re: Why linux can be updated without rebooting
Yes, you can do it in Linux also, but whenever you move or rename your original file while editing it, a new file is created when you save the file (with original name)...
__________________
Today is a most unusual day, because we have never lived it before; we will never live it again; it is the only day we have.
(Registered Linux User #432737 - subratabera.blogspot.com)
|
|
|
12-11-2006, 08:01 PM
|
#17 (permalink)
|
|
Human Spambot
Join Date: May 2005
Location: Noida
Posts: 5,601
|
Re: Why linux can be updated without rebooting
Oh, so Linux basically moves a copy of the file to the location you want to. At least it's much better than Windows.
On a Mac, when you move the file and then save it through the application, it is saved at the moved location - two files are not created. Similarly, when you rename a busy file, the name at the top bar of the application changes to reflect that.
|
|
|
12-11-2006, 08:11 PM
|
#18 (permalink)
|
|
Just another linux lover.
Join Date: Jun 2006
Location: Bangalore, KA
Posts: 562
|
Re: Why linux can be updated without rebooting
That's cool...
__________________
Today is a most unusual day, because we have never lived it before; we will never live it again; it is the only day we have.
(Registered Linux User #432737 - subratabera.blogspot.com)
|
|
|
12-11-2006, 08:45 PM
|
#19 (permalink)
|
|
In The Zone
Join Date: Oct 2006
Location: Mumbai
Posts: 365
|
Re: Why linux can be updated without rebooting
may be mac save 2nd file in temp folder?
__________________
Dhiraj Thakur
thakur.dheeraj(@)gmail.com
|
|
|
12-11-2006, 11:48 PM
|
#20 (permalink)
|
|
Human Spambot
Join Date: May 2005
Location: Noida
Posts: 5,601
|
Re: Why linux can be updated without rebooting
Quote:
|
Originally Posted by subratabera
That's cool...
|
Everything about a Mac is, my dear friend!
Quote:
|
Originally Posted by Desi-Tek.com
may be mac save 2nd file in temp folder?
|
Maybe. I don't know what it does but it does not store two copies of the file on your system.
OS X allows files to be renamed and/or moved to a different location while they are open. The majority of applications will update to reflect these changes transparently to the user, although some applications behave differently. TextEdit, for example, will not recognize the new file name or location, and resaving the file will simply create a brand new version of it in its original location with its original filename (like Linux). Script Editor behaves differently as well. I renamed a script that was open in Script Editor, and was prompted with the following dialog (attached image) when attempting to resave the file.
Most applications, however, will simply reflect the new name in their titlebar as soon as you switch back to the application, and if you've also changed the location, resaving the document will automatically save it to the new location.
|
|
|
13-11-2006, 02:20 PM
|
#21 (permalink)
|
|
GaurishSharma.com
Join Date: May 2005
Location: Jaipur
Posts: 4,116
|
Re: Why linux can be updated without rebooting
@aryayush
would u mind if I tell you that please don't go off topic???
|
|
|
14-11-2006, 11:45 PM
|
#22 (permalink)
|
|
Human Spambot
Join Date: May 2005
Location: Noida
Posts: 5,601
|
Re: Why linux can be updated without rebooting
No, I wouldn't.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|