LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Any programmers and people that understand the OS (https://www.linuxquestions.org/questions/programming-9/any-programmers-and-people-that-understand-the-os-876855/)

nec207 04-24-2011 07:04 PM

Any programmers and people that understand the OS
 
Well I get my other 2 questions answered , I have one last question that has been buggy me.

Anyone know why windows use so many files just to keep the OS going and so bloated?

The under line of files of windows is messy and loads self every where and very bloated with windows and windows vista and windows 7 very much so.I'm not sure if Linux /Mac OS X is like this or not .


I know windows needs to support alot more software and hardwar but is that not where drivers come in for the hardware.And programmers need to write the software for windows or Linux / Mac OS X.


And is Linux / Mac OS X like this too or just windows?

MS3FGX 04-24-2011 07:19 PM

I'm not 100% sure what you are asking, but any modern OS requires many hundreds of files to be open and accessible at any given time to operate. You could look at it as bloat, but it could just as easily be considered a necessary evil with how much we expect a desktop OS to do anymore.

Woodypecker 04-25-2011 03:03 AM

Well, "everything is a file" or can be represented as one. Even though some/a lot of them are (named) pipes or represent devices or just semaphores.
Now don't get mad on windows, install kde4.6 and the akonadi stuff :)

nec207 04-25-2011 03:30 AM

Quote:

Originally Posted by Woodypecker (Post 4335244)
Well, "everything is a file" or can be represented as one. Even though some/a lot of them are (named) pipes or represent devices or just semaphores.
Now don't get mad on windows, install kde4.6 and the akonadi stuff :)


Are you saying kde4.6 is more bloated than windows and needs many more files just to keep the OS running? Windows is known for under line of files of windows being very messy and loads self every where , where by Mac computers running OS X shine in this area light years from windows.Any Mac user will say you just drag and drop one application one computer to other and it will work or if you want drag the application to trash if you do not want to ever use the application again.Where windows nust use install or uninstall utility.

TobiSGD 04-25-2011 04:27 AM

Quote:

Originally Posted by nec207 (Post 4335268)
Where windows nust use install or uninstall utility.

Same in Linux. It is called package manager. Just for comparison about the number of files. I have a fresh Slackware install, with just a few added programs. I gave it a try, and I have 370777 files on my system.

nec207 04-25-2011 05:45 AM

Quote:

Originally Posted by TobiSGD (Post 4335314)
Same in Linux. It is called package manager. Just for comparison about the number of files. I have a fresh Slackware install, with just a few added programs. I gave it a try, and I have 370777 files on my system.

I think windows need install or uninstall utility do to DLL files and the registry. There is no way it can do this with out using the install or uninstall utility.The files are not link with application but must be copying to directory and sub directory the files for the application so the application works and makes registry entry for the application .

So the install utility will make directory and sub directory and copy the files for the application to work and make registry entry for the application .The files are not link to application where by when you move the application all the files move with it.


Quote:

Just for comparison about the number of files. I have a fresh Slackware install, with just a few added programs. I gave it a try, and I have 370777 files on my system.
On a fresh install of OS no programs 370777 files is crazy talk about bloated OS.I don't think windows will be that bad.

SigTerm 04-25-2011 06:46 AM

Quote:

Originally Posted by nec207 (Post 4334955)
Anyone know why windows use so many files just to keep the OS going and so bloated?

Is this a flamebait?

Quote:

Originally Posted by nec207 (Post 4334955)
The under line of files of windows is messy and loads self every where and very bloated with windows and windows vista and windows 7 very much so.

Your question is unclear.

Anyway, windows tries to maintain backward compatibility (which is the reason why you can run win95 applications on winxp). Backward compatibility increases code size.
Another thing is that windows allows multiple versions of the same library to exist at same time (and be available system-wide) this way new version of a library won't break existing application. I haven't heard of similar mechanism on Linux, and AFAIK multiple versions of same library rarely coexist on Linux system(on Linux it is normally assumed that newer version is better, so older version is removed). This mechanism has been introduced in WinXP SP2.
There are many backups (dll backups, system restore points) that tend to eat disk space, and some applications forget to delete temporary files.

Quote:

Originally Posted by nec207 (Post 4335268)
Are you saying kde4.6 is more bloated than windows and needs many more files just to keep the OS running?

More files doesn't necessarily mean "bloated".
kde includes more applications than fresh windows installation. Another thing is that (AFAIK) linux doesn't have registry mechanism (configs are frequently stored as plaintext). If there were registry API on Linux, number of files would have been reduced.

Quote:

Originally Posted by nec207 (Post 4335268)
Any Mac user will say you just drag and drop one application one computer to other and it will work or if you want drag the application to trash if you do not want to ever use the application again.Where windows nust use install or uninstall utility.

Currently, there is no such mechanism on windows. Microsoft may add it eventually, but I wont hold my breath. I also haven't heard about similar mechanism on Linux.
If you like Mac OS, use Mac OS. Nobody forces you to use Windows or Linux.

Anyway, I think that having 300000+ files on a fresh system is not a problem, as long as the system works fine. If you want small OS, either try MS-DOS or Linux from Scratch. There is no point in reducing disk usage - right now it is quite easy to buy 1TB HDD.

nec207 04-25-2011 07:43 AM

Quote:

Currently, there is no such mechanism on windows. Microsoft may add it eventually, but I wont hold my breath. I also haven't heard about similar mechanism on Linux.
If you like Mac OS, use Mac OS. Nobody forces you to use Windows or Linux..
I think has stated install utility will make directory and sub directory and copy the files for the application to work and make registry entry for the application .The files are not link to application I think is the reason windows and Linux will not have this .If windows was to have this it will have to do away of DLL files and registry .

Quote:

Anyway, I think that having 300000+ files on a fresh system is not a problem, as long as the system works fine. If you want small OS, either try MS-DOS or Linux from Scratch. There is no point in reducing disk usage - right now it is quite easy to buy 1TB HDD.
May be so with hard-drives that have over 1TB but very hard to troubleshoot or deel with malware with 300000+ files and alot can go wrong with OS or program.

I will get back to you on the other parts soon.


Quote:

Another thing is that windows allows multiple versions of the same library to exist at same time (and be available system-wide) this way new version of a library won't break existing application. I haven't heard of similar mechanism on Linux, and AFAIK multiple versions of same library rarely coexist on Linux system(on Linux it is normally assumed that newer version is better, so older version is removed).


Well is this not better ? If you open each program it loads a new system file
that way if one programs locks up it does not lock up the OS.

If it is tries to share it well if a program locks up it can lock up the OS

Sergei Steshenko 04-25-2011 07:49 AM

Quote:

Originally Posted by nec207 (Post 4334955)
Well I get my other 2 questions answered , I have one last question that has been buggy me.

Anyone know why windows use so many files just to keep the OS going and so bloated?

The under line of files of windows is messy and loads self every where and very bloated with windows and windows vista and windows 7 very much so.I'm not sure if Linux /Mac OS X is like this or not .


I know windows needs to support alot more software and hardwar but is that not where drivers come in for the hardware.And programmers need to write the software for windows or Linux / Mac OS X.


And is Linux / Mac OS X like this too or just windows?

AFAIK, Windows can be configured to be pretty "mean and lean". But Windows coming with retail computers is bloated with adware.

SigTerm 04-25-2011 09:20 AM

Quote:

Originally Posted by nec207 (Post 4335488)
I think has stated install utility will make directory and sub directory and copy the files for the application to work and make registry entry for the application. The files are not link to application I think is the reason windows and Linux will not have this. If windows was to have this it will have to do away of DLL files and registry.

DLLs and registry have nothing to do with being able to move application around. As long as application doesn't expect to be located in certain folder (i.e. it doesn't rely on absolute file paths), it can be moved, regardless of registry/dll usage. It isn't difficult to make app for windows platform that can be easily moved around, however it is not a standard practice among software developers.
And as I already said, if you like a Mac - use a Mac.

DLLs/libraries are result of modular program design. Trying to work without using them isn't a good idea.

Quote:

Originally Posted by nec207 (Post 4335488)
May be so with hard-drives that have over 1TB but very hard to troubleshoot or deel with malware with 300000+ files and alot can go wrong with OS or program.

This is incorrect. To troubleshoot a problem, you won't have to deal with every single file on the system. Malware scanners use on-access virus check, and nothing can go wrong because of large number of files. When you deal with large system, you don't have to understand entire system in order to fix the problem. Data on the disc doesn't mutate into viruses, so number of files is irrelevant. Keep in mind that majority of files kept on linux are source code, configuration files, documentation and application resources. Another thing is that on properly configured system no application can write into every file it wants. There file access restrictions that can prevent malware infection in first place.

Quote:

Originally Posted by nec207 (Post 4335488)
Well is this not better ?

It is not better. Such approach resulted in "dll hell" on windows system in the past. Replacing old library with new one may break a lot of existing software that relies on functionality present in the old library. Application may rely on undocumented functionality or even a certain bug. Without keeping multiple versions, in such situation you'll have to keep updating all existing software forever, which is a bad idea - sometimes software companies go out of business, for example. Such model is better for people that want to play their favorite game 10 years later. It doesn't preserve disk space, but it increases possibility that a program, once deployed/installed, will keep working as expected.

Quote:

Originally Posted by nec207 (Post 4335488)
If you open each program it loads a new system file
that way if one programs locks up it does not lock up the OS.

Loading a dll does not lock up the system. To cause serious lock up or a bsod, you'll need hardware problem or a driver-level/kernel-level bug. It is a multithreaded multi-user protected mode operating system, after all, not some kind of MS-DOS desktop software.

nec207 04-25-2011 09:57 AM

Quote:

DLLs and registry have nothing to do with being able to move application around.
How can it work if the path is moved to other folder ?

Quote:

As long as application doesn't expect to be located in certain folder (i.e. it doesn't rely on absolute file paths), it can be moved, regardless of registry/dll usage. It isn't difficult to make app for windows platform that can be easily moved around, however it is not a standard practice among software developers.
And as I already said, if you like a Mac - use a Mac.
This is the part I'm having trouble to understand I thought for the program to work install utility will make directory and sub directory and copy the files for the application and if you try to move any of the files it is broken.

That say a application need x number of files to work and when you move the application the x number of files do not move with it so is broken and does not work.

Quote:

DLLs/libraries are result of modular program design. Trying to work without using them isn't a good idea
.

Why are DLLs/libraries so good? What do they do so much that make them so good?Why do some people like them and other people not.



Quote:

This is incorrect. To troubleshoot a problem, you won't have to deal with every single file on the system.
Okay I don't know much about the troubleshoot so will not say much here.

Quote:

Malware scanners use on-access virus check, and nothing can go wrong because of large number of files. When you deal with large system, you don't have to understand entire system in order to fix the problem. Data on the disc doesn't mutate into viruses, so number of files is irrelevant.
May be I should clarify having not too many files on system is easy to spot if malware gets on a system .Having large number files just to keep the OS running if a malware got on the system how would you know what is malware file or OS file.I know there are anti-virus scanners and other malware remover tools but some time you have to delete the file the old fashioned way if the anti-virus scanners and other malware remover tools cannot remove it.


Not say it may be hard to find the malware with so many files on the computer.

Quote:

Keep in mind that majority of files kept on linux are source code, configuration files, documentation and application resources.
What is the configuration files and documentation files.How does windows hide the other stuff so you cannot see it?

Quote:

Another thing is that on properly configured system no application can write into every file it wants. There file access restrictions that can prevent malware infection in first place.
If you the user have read and write permission so does the malware .On less you set up a other account for internet surfing that does not have read and write permission .


Also I find it strange why windows allows multiple versions of the same library to exist at same time , but I think I'm getting confused of the understanding of DLLs/libraries why we use it and why some people think it good and other people bad.

Sergei Steshenko 04-25-2011 10:03 AM

Quote:

Originally Posted by SigTerm (Post 4335585)
... "dll hell" on windows system in the past. Replacing old library with new one may break a lot of existing software that relies on functionality present in the old library. Application may rely on undocumented functionality or even a certain bug. Without keeping multiple versions, in such situation you'll have to keep updating all existing software forever, which is a bad idea - sometimes software companies go out of business, for example. Such model is better for people that want to play their favorite game 10 years later. It doesn't preserve disk space, but it increases possibility that a program, once deployed/installed, will keep working as expected.
...

The same is true for UNIXish systems too. I.e. DLL hell is not Windows-specific.

The DLL hell was the main reason I decided to develop my own AppsFromScratch - I build and install stuff in places I want, not using root privileges, not changing anything at system level, having as many version of the same library as I want.

Sergei Steshenko 04-25-2011 10:06 AM

Quote:

Originally Posted by nec207 (Post 4335634)
...
Why are DLLs/libraries so good? What do they do so much that make them so good?Why do some people like them and other people not.
...

Because DLLs can be cached in memory and shared between different applications. So, after a DLL is cached, both startup time is shorter and memory footprint is smaller because of sharing.

The above statement is independent of OS.

MrCode 04-25-2011 10:07 AM

Quote:

Originally Posted by nec207
Why are DLLs/libraries so good? What do they do so much that make them so good?Why do some people like them and other people not.

The idea (as I see it) is to conserve memory: if you have multiple programs running that rely on functions in a DLL (or any other form of shared library), you only need to load one instance of the shared library into memory, which all the programs share usage of.

EDIT: Sergei beat me to it.

nec207 04-25-2011 10:14 AM

Quote:

Originally Posted by MrCode (Post 4335650)
The idea (as I see it) is to conserve memory: if you have multiple programs running that rely on functions in a DLL (or any other form of shared library), you only need to load one instance of the shared library into memory, which all the programs share usage of.

EDIT: Sergei beat me to it.

But from what I understand it works that way in Linux only not windows.Each program will load its own DLL into memory .Where in Linux it loads it in memory and share it .

That say you open a program windows loads it in memory ,open other program loads it in memory so on.In Linux open a program loads it in memory and open a other program it shares it with the other program.So windows is loading alot more DLL into memory than Linux.


All times are GMT -5. The time now is 12:41 AM.