Tuesday, March 8, 2011

Windows Registry

The Windows Registry is a hierarchical database that stores configuration settings and options on Microsoft Windows operating systems. It contains settings for low-level operating system components as well as the applications running on the platform: the kernel, device drivers, services, SAM, user interface and third party applications all make use of the Registry. The registry also provides a means to access counters for profiling system performance.

When first introduced with Windows 3.1, the Windows registry's primary purpose was to store configuration information for COM-based components. With the introduction of Windows 95 and Windows NT, its use was extended to tidy up the profusion of per-program INI files that had previously been used to store configuration settings for Windows programs.

.INI files stored each program's settings into a text file, often located in a shared location that did not allow for user-specific settings in a multi-user scenario. By contrast, the Windows registry stores all application settings in one central repository and in a standardized form. This offers several advantages over INI files. Since accessing the registry does not require parsing, it may be read from or written to more quickly than an INI file. As well, strongly-typed data can be stored in the registry, as opposed to the text information stored in INI files. Because user-based registry settings are loaded from a user-specific path rather than from a read-only system location, the registry allows multiple users to share the same machine, and also allows programs to work for less privileged users. Backup and restoration is also simplified as the registry can be accessed over a network connection for remote management/support, including from scripts, using the standard set of APIs, as long as the Remote Registry service is running and firewall rules permit this.

The registry has features that improve system integrity, as the registry is constructed as a database and offers database-like features such as atomic updates. If two processes attempt to update the same registry value at the same time, one process's change will precede the other's and the overall consistency of the data will be maintained. Where changes are made to INI files, such race conditions can result in inconsistent data which doesn't match either attempted update. Windows Vista and Windows 7 provide transactional updates to the registry, extending the atomicity guarantees across multiple key and/or value changes, with traditional commit-abort semantics. (Note however that NTFS provides such support for the file system as well, so the same guarantees could, in theory, be obtained with traditional configuration files.)

While offering improvements over application-specific .INI files, the organization and implementation of the registry also had potential problems:
  • The registry duplicates much of the functionality of the file system.
  • Centralizing configurations makes it more difficult to back up and recover individual applications.
  • Installers and uninstallers may become more complicated if applications rely on Registry configuration settings that need to be created by installation applications because these Registry settings cannot be transferred by simply copying the application files that comprise the application. Use of the Registry by non-COM based applications is optional; .Net applications leverage a configuration file instead of the Registry. Some other operating systems (e.g., OS X) also support installation through simple file copy.
  • Because information required for loading device drivers is stored in the registry,a damaged System registry may prevent a Windows system from booting successfully, since some device drivers won't be loaded, preventing the affected devices from working.[dubious – discuss] Device drivers are stored in a key called HKLM\System\CurrentControlSet, which is a symbolic link that alternates between HKLM\System\CurrentControlSet001 and HKLM\System\CurrentControlSet002, thereby allowing the "last known configutation" boot option to provide a mechanism of reverting to the last configutation that successfully started the system.
  • The parts of the registry may have to be kept in sync with the file system (e.g., deleting an application rather than uninstalling it, may leave associated configuration items such as COM registration entries in the registry if the application is legacy and does not leverage side-by-side registry-free configuration.[5])
  • Applications that make use of the registry to store and retrieve their settings may be unsuitable for use on portable devices used to carry applications from one system to another. Similarly, it is often not possible to copy installed applications that use the Registry to another computer. This means that software usually has to be reinstalled from original media after a computer upgrade or rebuild. Application virtualization addresses this problem.
  • The Windows Registry is claimed by some third parties to be a single point of failure.

source: wikipedia.org

0 comments:

Post a Comment

 
Yahoo bot last visit powered by  Ybotvisit.com Alexa Certified Site Stats for ictbilingual.blogspot.comonline counter