Skip navigation links
Tools
SDKs
Libraries
Samples & Demos
Docs
Zones
Community
Support
Ten Things Developers Should Know About Windows 7 
Skip Navigation LinksHome > Docs > Articles & Whitepapers
AMD Staff  6/26/2009 

Software developers recognize the need to develop applications of greater scope and quality than ever before, while operating under tighter schedules. Windows® 7, Microsoft’s latest Operating System (OS), provides developers with the tools to quickly build ground-breaking applications that can help unleash the latest advancements in computer hardware. Windows 7 provides developers with the framework and tools help to create applications that are attractive, user-friendly, power-efficient and high performing. The following article describes ten innovations of Windows 7 that all serious developers should know about.

Environment-Aware Applications

Windows 7 empowers developers to take advantage of programming location services in new ways. Connected to the Internet, location services can provide the end-user with the most helpful information about nearby events, local traffic conditions, weather forecasts, or the location and status of nearby friends, all of which are useful for developing today’s smart applications. Similarly, sensor devices can provide information to a computer system about ambient light conditions, temperature, or motion for creating a wide variety of environment-aware applications, which can also be used in applications.

Developers can tap into location services in Windows 7 by accessing the Windows Sensor and Location Application Programming Interfaces (APIs). These APIs in Windows 7 allow applications to seamlessly access sensor information by abstracting the source of that information, whether it is GPS, a wi-fi signal, an accelerometer or a light meter. You can simply use the SensorManagerclass to get a handle on any available sensors and then query the SensorDataReport,which provides you with sensor data in a standard, ready-to-use format. With this base class in hand, you could then create sub-classes to deal with specific sensors as shown in Figure 1.

Figure 1: SensorDataReport Class Extensions

These base class definitions provide functions for more than just grabbing sensor data, however. The base class contains a broad set of properties for getting general sensor information including SensorState, FriendlyName, SensorID, SensorSerialNumber, and SensorDescription. Another particularly useful set of properties deals with the reporting interval of the sensor. Properties such as ReportIntervaland MinReportInterval do exactly as their name would suggest, and provide you with the means to control the rate at which a sensor generates reports to the system. This is important because an accelerometer, for example, may need to provide more frequent data reports than, say, an ambient light sensor.

Distributed Applications

Windows 7 introduces a technology called BranchCache that eases congestion on Wide Area Networks (WANs), where remote branches frequently need to access data stored at a central location. Rather than require each client to download the information directly from the central server, BranchCache allows clients to keep a copy locally that can then be served up to other clients requesting the same data. Since the BranchCache APIs are built into the Windows APIs, if you’re using HTTP and SMB protocols that sit on top of existing security protocols, you don’t need to worry about adding additional security measures to your environment. This is because BranchCache does not do any protocol optimization or touch the underlying protocol in any way. This enables your applications to seamlessly acquire necessary data quicker than they otherwise would, helping to provide a more responsive experience to the end-user and simplifying development and deployment decisions for you by mitigating WAN bottleneck problems.

In a related vein, Windows Web Services (WWS) provides a native-code implementation of SOAP to reduce the dependence on .NET that Windows Communication Foundation (WCF) APIs require. The WWS API is a layered API (see Figure 2), where each layer gives you access to a set of APIs and associated types for that layer. The Service Model is the highest level that most developers will interact with. This layer provides you with the ability to execute data exchange between the client and server through method calls rather than data messages. At this level, the mechanics of exchanging data are very effectively abstracted, which simplifies the task of developing application code because remote method calls look very much like local method calls. If you need lower level details then the Channel Layer and the XML Layer are also exposed. The Channel layer provides an abstract view of the transport channel as well as messages transmitted on the channel and gives you the means to do explicit message exchanges. You can use the Channel Layer for serialization of C data types to and from SOAP structures. Finally, the XML layer API is based on XML Reader and XML Writer objects and provides you with the ability to read or write XML data at various levels of granularity.

Figure 2: Windows Web Services Layers

Updated Media Support

With media becoming a central part of the computing experience, the Media Foundation Platform (MFP) has been updated in Windows 7 and is intended to completely replace DirectShow. MFP enables you to create applications that handle the latest media formats, take advantage of hardware advances, and use less system resources than previous versions. Windows 7 includes codecs for H.264, MJPEG, and MP3. Furthermore, Windows 7 also includes source support for AVI, MPEG2-TS, MP4, and the 3GP format common to mobile phones. With the MFP framework in place you have virtually everything necessary to write applications that can manipulate both video and audio without worrying about what underlying formats are in use or how to best take advantage of hardware features.

Some of the high-level APIs available in MFP include FastTranscode, MFPlay, and SinkWriter.  FastTranscode is designed to support a common set of audio and video encoding scenarios, making it simple for you to create applications that you need to convert from one format to another.  MFPlayis intended for audio and video playback, and essentially provides you with an interface to deal with typical playback operations while hiding the media session details from your application.  SinkWriterprovides a means of authoring media files by passing in either uncompressed or encoded data, again abstracting the details so that your application can do things like re-encode a video or capture a live stream from a webcam.

Another interesting new feature in MFP is new support for hardware devices that can help increase performance for tasks such as video transcoding, video and audio capture and video processors. You can take advantage of these specialized devices the same way a software component would be used, because they are represented by a proxy object in MFP. Typical uses might include transcoding a video from AVI format to 3GP format just before downloading the video to a cell phone.

Finally, MFP has optimized the video pipeline, enabling optimal power consumption and usage of system resources. These optimizations enable you to provide high-quality user experiences on even ultra-mobile systems without sacrificing media quality. In general, your applications will benefit from these improvements indirectly, but advanced developers can delve into the details of APIs such as Microsoft® DirectX® Video Acceleration High Definition (DXVA-HD), which is designed to better support HD video formats.

High-Fidelity Graphics

Windows 7 builds on past graphics successes with the DirectX (DX) APIs and provides improvements in both Direct3D and Direct2D graphics capabilities. DX 11 provides the foundation for developers to take advantage of the latest generation of GPUs as well as modern multi-core CPUs. Tessellation and compute shaders, two of the most important new DX 11 features, and have now become industry standards. AMD first introduced integer tessellation in 2001 on the ATI Radeon™ 8500 graphics card and later added floating point tessellation in 2006 on the ATI Radeon™ HD 2600 graphics card. In addition, the Direct3D runtime will be capable of running on older DX 9 and 10 hardware. This permits you to exploit multithreading capabilities and enables better resource administration even on previous-generation cards. To get a more comprehensive view of the capabilities provided by these new features, refer to the AMD articles listed in Resources.

Perhaps one of the most exciting new features enabled by Windows 7 is compute shaders. Compute shaders allow you to harness the computational power in the GPU in addition to what the CPU offers by exposing the shader pipeline to tasks that the CPU would traditionally handle. Compute shaders can dramatically speedup computation involving physics acceleration, audio signal processing, digital image processing, stream processing and many other tasks. Windows 7 will specifically leverage compute shader support to speed up transcoding of video files.    To get a feel for what compute shaders and tessellation make possible, check out the Froblins demo on AMD.com, which showcases these two features running side by side! AMD plans to release DX 11 solutions that will coincide with the release of Windows 7 later in 2009.

Windows Environment Improvements

Windows 7 offers several new or improved tools that can help increase efficiency and facilitate the development process. For starters, the Ribbon Interface from Office 2007 has been made available for you to use in your own applications. The Ribbon Interface combines menu bars, toolbars, and task panes into a single interface, consolidating related functionality into one place. Not only can you use the Ribbon Interface in the applications you write, but the Ribbon Interface will be part of other Microsoft products, which can help increase development efficiency.

The Windows taskbar has been improved in small ways to provide a better user experience. For example, applications can use their taskbar slot as a progress indicator, making it simple for you to monitor the progress of a task without bringing up the application window. The Start Menu has been tweaked to use jump lists which provide a quick link to bring up a recent task in the appropriate application. For example, rather than opening your development environment and then opening your project from inside that application, a link to your project is provided right in the Start Menu. Finally, the control over application grouping and application “pinning” has been improved, effectively merging the taskbar with the quick launch menu, enabling you to create a taskbar layout that suits your needs exactly and helps you to be more productive.

Touch Sensitive Devices

Windows 7 gives developers the APIs for developing applications that work on the latest touch sensitive devices. Support for multi-touch, manipulation, and inertia enable you to easily create very intuitive and engaging applications. Windows 7 also includes APIs for things like handwriting, math recognition and pen-input diagramming.

With multi-touch, many of the functions that a mouse would perform are done by touching the object on screen that would otherwise be clicked with the mouse pointer. Beyond pointing, clicking, and dragging, multi-touch also includes support for gestures. Gestures provide a way to interact with screen content in intuitive ways like zooming, panning, and rotating. If that’s not enough, Windows 7 also exposes the lower-level touch input APIs so that you can create your own custom gestures.

Inertia APIs enable you to create realistic physical responses from interactions with screen objects. For example, when flipping through a set of digital photos, a user might flick the top one aside. With the inertia APIs, you can control how far the photo flies, how quickly it flies, if it bounces off the side of the screen or not, and so forth.

Power Efficient Applications

In light of both the increasingly mobile nature of many computing platforms and the need to reduce power consumption of non-mobile platforms, Windows 7 provides a variety of features to help developers create power-efficient applications that still achieve high performance.

Timer coalescing helps applications to be energy efficient by taking advantage of the fact that modern hardware is designed to enter lower power states when idle, as is the case with AMD Cool’n’Quiet™ and AMD CoolCore™ technologies. With these technologies, there is an overhead in terms of power cost in both the powering down and powering up functions of the hardware. Whenever an application needs to be serviced, this overhead cost must be paid in order to power on the hardware again to execute the waiting task (and return the hardware to an idle state after the task is completed). Previously, applications were just allowed to power up the hardware as needed, unnecessarily burning power. However, with timer coalescing, multiple distinct software timers are caused to expire at the same time, thereby reducing the number of power state changes and allowing the processor to stay idle longer, taking full advantage of AMD’s power efficient hardware features. Furthermore, AMD and Microsoft have collaborated to improve power policy parameters on AMD processors leading to non-trivial improvements in SPECPower scores. As a result, AMD's products coupled with Windows 7 is expected to continue to help improve AMD’s performance-per-watt metrics.

The Windows 7 Service Control Manager provides you with a set of triggers for starting and stopping application services upon defined events. Moreover, you can also create custom triggers if the pre-defined set of triggers fail to satisfy a particular application’s needs. Through this mechanism, Windows 7 can streamline the services that are actively running on a system at any given time, helping to further reducing power consumption by eliminating or suspending superfluous application services.

PowerShell 2.0

Windows 7 brings PowerShell up to version 2.0. PowerShell is a .NET managed scripting language that includes both a graphical Integrated Scripting Environment (ISE) as well as an interactive command line shell. High-level programming constructs such as looping, functions, branching, exception handling, and modularity are all supported in PowerShell 2.0.

One of the new features PowerShell 2.0 provides is a remoting feature. With remoting you can run commands on multiple remote computers from a system running PowerShell 2.0. In the latest release, the target machines for the remote operation must be running Windows 7 or Windows Vista®, but Microsoft is working on enabling support for Windows XP  as well. Remoting is a powerful tool in scenarios where you need to launch predefined computing tasks on multiple systems such as rebuilding an application or running a set of regression tests on a new build.

Finally, PowerShell 2.0 gives you the ability to run transactions. A transaction can consist of multiple operations, but the transaction is applied atomically with PowerShell 2.0. That is, if the transaction commences and runs into an error halfway through, then the operations that have already been made can easily be rolled back without leaving the system in an inconsistent state.

Security

Windows 7 includes improved tools for creating secure applications as well as security applications such as firewalls, anti-virus, and parental controls. Windows 7 also provides a unified framework for working with biometric devices.

The Windows Filtering Platform (WFP) has been enhanced on Windows 7 to give independent software vendors (ISVs) more visibility into the TCP/IP packet processing of Windows. This increased visibility allows an application to examine and, if necessary, modify any incoming or outgoing packet before further (and potentially damaging) processing can occur. While WFP is not a firewall in itself, it does provide you with critical visibility for developing such an application.

Next, biometric devices are natively supported in Windows 7. This means that ISVs and independent hardware developers (IHVs) will no longer need to build their products from the ground up, but can rely on the Windows Biometric Framework (WBF) to provide a consistent API, interface and look for their applications. With the WBF, you can easily build security around your applications that rely on biometric device input rather than more vulnerable solutions like simple passwords.

Windows 7 Scheduler - User Mode Scheduling

The latest CPU designs have moved away from only pushing frequency as the main selling point, and have moved to putting multiple processor cores on a single chip. These CPUs are able to literally execute multiple threads at once as opposed to multi-tasking, where in reality only one task is being handled at any given time. The difficulty lies in creating applications that can more readily take advantage of this latent parallelism. With traditional threading, the Windows Kernel manages thread scheduling when a thread quantum expires or when a thread yields. For computations that require fine grained parallelism with many smaller pieces of work, it is often advantageous to manage and schedule the execution of tasks in user mode. The reason for this is that the user mode scheduler can be more tightly coupled to the application and thus make better scheduling decisions, which can help reduce overhead from context switching (see Figure 3). When a user mode task cooperatively yields, the scheduler can begin executing another task in user mode without entering the kernel. Windows 7 introduces User Mode Scheduling (UMS) to help improve performance of user mode applications that do their own scheduling, such as the Microsoft Concurrency Runtime and a future version of Microsoft SQL Server.

Figure 3: UMS vs. KMS

With UMS, the idea is to increase the usage of the available compute cores by using them more effectively and thereby increasing application performance. This is accomplished by moving decisions that were previously handled in the OS kernel closer to the application itself.

Windows 7 will support the Concurrency Runtime that supplies developers with synchronization primitives such as critical_section, reader_writer_lock, event, as well as parallel loop constructs and asynchronous agents for message based concurrency. With these primitives, a thread will cooperatively yield to the runtime when it blocks, which will allow another task to execute on that compute resource. This is helpful because while a UMS thread scheduler is an extremely complex piece of code to write, the Concurrency Runtime’s scheduler will natively use UMS on Windows 7 64-bit platforms with no additional effort on the part of the developer. With UMS and the Concurrency Runtime you are provided with the means to develop applications that can take full advantage of AMD’s latest multi-core CPUs.

Conclusion

Windows 7 is designed to raise the bar in numerous areas to give developers the tools they need to take advantage of advances in AMD’s CPU and GPU technologies and other hardware advances. In addition, Windows 7 helps meet the needs of today’s mobile devices, whether those needs are superior performance-per-watt or applications that can be deployed across dispersed networks. As a result of these capabilities, Windows 7 can help be the vehicle for developing and delivering the next generation of applications across market segments.

Resources

Back to top
� 2010 Advanced Micro Devices, Inc. AMD, the AMD Arrow logo, AMD Opteron, AMD Athlon, AMD Turion, AMD Sempron, AMD Phenom, ATI Radeon, Catalyst, AMD LIVE!, and combinations thereof, are trademarks of Advanced Micro Devices, Inc. Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States and/or other jurisdictions. Linux is a registered trademark of Linus Torvalds. Other names are for informational purposes only and may be trademarks of their respective owners.

This website may be linked to other websites which are not in the control of and are not maintained by AMD. AMD is not responsible for the content of those sites. AMD provides these links to you only as a convenience, and the inclusion of any link to such sites does not imply endorsement by AMD of those sites. AMD reserves the right to terminate any link or linking program at any time.