Computer Repair Home
Computer Help Articles
Answered Computer Questions
Ask a Question
 
 
 

  

 

Windows Vista File System

Windows Vista interface comes in two flavors. The basic user interface or the Aero, Microsoft's "best-designed, highest-performing desktop experience". In order to use the Aero interface, the user needs a PC with a compatible graphics adapter and also the Premium or Business edition of Vista software.

Windows Vista also has several user friendly and intuitive advancements. One of the popular changes to the user interface is the easy Search window on the Start button as well as on all the explorer windows. Also, all applications are shown on the task bar as "live icons" which offer us a preview of the actual contents of the document. In the picture below, there are two Internet Explorers open and when you click on the group icon on the task bar and move the mouse to either of the two explorer bars, a mini version of the actual webpage is displayed! This helps us when we have several similar windows open and saves time by not having to open each one in turn.


Windows Vista Desktop

Some of us may remember that the first personal computers used a file system called FAT16, which was introduced way back in 1981 with MS-DOS. It handled files on a floppy drive and could only handle short file names. This was upgraded to FAT32 which was introduced in Windows95. Then came NTFS, the "New Technology File System" which was a super hit and stayed the course for almost a decade in WINNT, WIN 2000, XP as well as other versions of the Operating system.

NTFS has been outsmarted by a newer file system called the Transactional File system which has been introduced in Windows Vista. This new file system uses a database type of approach to everything that takes place on the computer.

This important change in Vista is not visible to the regular users, but it impacts the entire way the files and folders are handled. This is accomplished by a variant of NTFS, the TxF or the Transactional File System. TxF has the ability to take part in distributed transactions, between processes in the machine as well as between processes on multiple machines with the standard two phase commit functionality that is inherent in relational database systems.

Everything we do with a database is considered a "transaction". A bank deposit is completed as a transaction only when the user saves or "commits" the changes. Similarly, a withdrawal is treated as a transaction which is complete provided that the user agrees to the changes and finalizes or commits the work. These two transactions cannot take place simultaneously. They have to be performed as two separate transactions because of the possibility that the intention of the bank user may be to first deposit a large amount and then later withdraw a part of the amount. So these two transactions need to occur in the correct order.

Similarly, in the Vista environment, most operations such as creating folders and files or editing files, saving files etc by concurrent users are considered transactions and care is taken to not allow changes to the same file by multiple users at the same time. When one transaction ends, the next one on the same account/file/folder is performed.

The new Vista file system works on the following (ACID) transaction principles:

  1. Atomicity - In a transaction involving two or more discrete pieces of information, either all of the pieces are committed or none are.
  2. Consistency - A transaction either creates a new and valid state of data, or if any failure occurs, returns all data to its state before the transaction started.
  3. Isolation - A transaction in process and not yet committed must remain isolated from any other transaction.
  4. Durability - Committed data is saved by the system such that, even in the event of a failure and system restart, the data is available in its correct state.   

From a regular Windows user perspective, this may not be a major change, but from a developer perspective, this is a major change that will enable them to safeguard the integrity of stored data.

For regular windows users, these are the main changes:

  1. In earlier versions of Windows, if the computer happens to crash in the middle of a File->Save operation, the file would most certainly be corrupted. In Vista, the file system is intelligent enough to either complete the save successfully or roll-back (revert) to the same file that existed before the application. So you may lose the changes, but not the entire file.
  2. Similarly if one single command or script was updating several files with the same set of changes, all files will retain their original information in case of a power failure.
  3. When an operation is performed over the network and changes are made to multiple computers at the same time, none of the files will be updated unless the change is successfully completed on all machines without any disruption of service.
  4. Similar controls are applied on registry changes so that the updates are successful or rolled back to original state.
  5. During file sharing, if one user changes the file, s/he will have to complete and save the change before another user can save any changes.

Developers need to understand the technical details of the new Transactional File System or TxF which is a new kernel construct added to the updated Vista NTFS. Surendra Varma, Development Manager of the Vista Kernel team explains the basics of the new TxF file system and why it is an improvement over the original NTFS methods. (see video link below).


Kernel Transaction Manager

Microsoft has created an API for the explicit model based on the Transaction class, as well an implicit model using the TransactionScope class which allows transactions to be automatically managed by the system. Transactions may be local or distributed with one or multiple participants. The infrastructure for the transaction is proceeded in the operating system kernel. Operating system services are allowed to participate in the transactions. The Kernel Transaction Manager (KTM) provides I/O support for the transactional file in the NTFS system. Any application can use the Transactional NTFS to safeguard the integrity of the data and isolate changes from other users. One of the requirements for TxF developers is that they have a working knowledge of transactions using either the Distributed Transaction Coordinator (DTC) or the Kernel Transaction Manager.

The designers and developers who will need to update or create their own transactional application and resource manager can refer to the System.Transactions Namespace. These classes provide an infrastructure to create simple and efficient transactional interfaces. These classes support transactions initiated by SQL server, ADO.NET, Message Queuing, and Microsoft Distributed Transaction Coordinator (MSTDC).

The key methods by which the System.Transactions API led to enhanced system performance are:

  1. Based on the System.Transactions namespace, Windows developers can implement a resource manager so that volatile resources or a single durable resource can commit or rollback efficiently.
  2. Local transactions may be escalated to distributed transactions if an additional durable resource manager enlists itself with a transaction.
  3. Dynamic Escalation, which ensures that the MSDTC is engaged only when a transaction spans across multiple distributed resources.
  4. Promotable Enlistments, which allows the only entity participating in transaction to take ownership of it.

Three levels of trust that restrict access to the resources it exposes are defined by the System.Transactions namespace. They are:

  1. AllowPartiallyTrustedCallers(APTCA)
  2. DistributedTransactionPermission(DTP)
  3. Full Trust

 



Home l Help l Privacy Policy l User Agreement l About Us l Contact Us l Link to Us