Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the problem with DLLs and the Registry?

I was watching the WWDC 2009 Keynote and something someone said about Windows 7/Vista got me curious..

The speaker claimed that 7 was still a poor operating system because it still used the same technologies such as DLLs and the registry. How accurate are his claims and how different is OS X doing it? Even os x has dynamically loaded libraries right? I guess the Registry thing might have some weight..

Can anyone explain to me the differences in each OS' strategy?

I'm not trying to incite fanboys here or anything, I just want to know how both operating systems tackle problems in general..

Thanks,

kreb

like image 568
krebstar Avatar asked Jun 10 '09 06:06

krebstar


People also ask

What is DLL problem?

dll errors. Software calls for functions that do not exist in User32. dll: If a software program calls for functions in User32. dll that are not present, an error message occurs. This problem can occur if software is run on the wrong version of Windows.

What happens when a DLL is registered?

The end result of registering a DLL is that all of the CLSIDs for the components in the DLL are registered under HKEY_CLASSES_ROOT\CLSID . This allows CoCreateInstance to find the correct server when instantiating COM objects from another DLL or application.

What are DLL issues why DLL issues are used explain?

The use of DLLs helps promote modularization of code, code reuse, efficient memory usage, and reduced disk space. So, the operating system and the programs load faster, run faster, and take less disk space on the computer. When a program uses a DLL, an issue that is called dependency may cause the program not to run.

Why do DLL errors occur?

dll error messages may occur due to several reasons such as faulty applications, malicious software, damaged Windows registry, corrupt system files, etc. Many Windows users are reporting different types of dll errors on Microsoft, Google and other technology forums and are looking for ways to fix them.


2 Answers

Of course both operating systems have facilities for using DLLs (they're called dylibs or Frameworks on OS X depending on how they're packaged).dylibs are very much like DLLs--they are a dynamically linked library and as such there may be multiple versions of them floating around. Frameworks, on the other hand, are really a directory structure. They contain dynamically linked libraries (potentially multiple versions of them), resources, headers, documentation, etc. The dynamic linker on OS X automatically handles choosing the correct library version from the framework for each executable. The system appears to work better than Windows' DLL management which is, well, quite a mess still (of course, Windows' system is tied by legacy issues that Apple dropped when they moved to OS X). To be fair, Unix has had a solution to this problem for a long time, as well using symbolic links to link dylibs to their correct versioned implementation, allowing multiple installed versions.

There is no OS X equivalent of the Windows registry. This is good and bad. The good side is that it's much harder to corrupt an entire OS X system with a registry screw up. OS X instead stores configuration in many separate files, usually one or more per application, user, whatever. These files are generally a plist (an XML schema representing dictionaries, arrays, and primitive types) formatted file. The bad side is that, by retaining this Unix-y heritage, OS X doesn't have the same über-admin tools that can churn through the registry and do all sorts of crazy things.

like image 184
Barry Wark Avatar answered Sep 21 '22 09:09

Barry Wark


DLLs

The major difference between OS X and Windows is that Windows historically tried to save space/memory by having everyone share code (i.e. you install one DLL, everyone can use it). Apple statically compiles (well, not really, but it may as well be) all of the non-system libraries into every application. Wastes disk space/memory, but makes app deployment way easier and no versioning issues.

Registry

OS X does have a registry, they're just flat files called plists, instead of a magic component that's mostly like a filesystem except where it's not. Apple's approach makes it easy to migrate settings from one machine to another, whereas Windows' approach is faster in-memory, and allows apps to easily "watch" a key without taking a big perf hit (i.e. one app changes a key and the other instantly knows about it).

In conclusion

The keynote presenter's full of it, 10.6 is mostly the same code as 10.5, which was mostly the same code as 10.4 et al, just like Win7 is mostly Vista, which is mostly Server '03, etc. There's far too much tested code in an operating system to throw it away every release, especially if you actually want your customers' apps to work.

like image 23
Ana Betts Avatar answered Sep 21 '22 09:09

Ana Betts