Via fewer hardware locks

Jan 5, 2009 21:01 GMT  ·  By

Microsoft is optimizing Windows 7 in order to increase performance, and, in this context, the dispatcher lock is one of the components that has got cut off . According to the Redmond company, fewer hardware locks are synonymous with boosted parallelism, namely a new level of efficiency when it comes down to taking advantage of modern processing architectures. This is valid for Windows Server 2008 R2, namely Windows 7 Server, and, naturally, also for the Windows 7 client, since the two operating systems share the same code base.

With Windows 7, the dispatcher lock is replaced with several finer-grained synchronization techniques, thus effectively distributing resource contention. The main benefits for applications include increased system performance and more optimal use of available hardware resources,” Phil Pennington, Windows Server Technical Evangelism, revealed.

Evolving from Windows Vista, Windows 7 is embracing the many core CPU world, delivering the promise of enhanced performance through the advantage represented by parallel computing. However, in order for Win7 to be tailored to many core processors, the platform's kernel had to be freed from past relics such as the dispatcher lock.

As the scalability demands on the NT kernel have increased, many improvements were made relative to synchronization granularity in the kernel. However, the kernel dispatcher lock has persisted since NT’s inception, in order to ensure proper coordination of the activities outlined above. Since it is fairly large in scope, the dispatcher lock was the most contended spinlock in the kernel, and, depending upon the workload, a significant scalability consideration on systems with more than 16 processors,” Pennington stated.

The dispatcher lock, along with the rest of the spinlocks as well as lock-free algorithms are used by the Windows kernel as internal synchronization techniques, for tasks involving the scheduling of threads on multiple processors and various management processes for system facilities, but also for timers, memory, etc. Without the dispatcher lock, Windows 7 will be able to deliver not only boosted performance, but also the optimal use of the hardware resources available on the machine it is installed on.

Minimizing resource contention and maximizing concurrency reduces overall system latency and increases server performance. In the case of resource locks, several strategies exist including lock elimination, resource partitioning, or even designing faster lock scenarios. One such significant improvement is the removal of the kernel dispatcher lock.”