diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-7C533836-0D27-5519-BC1D-7153AC8BE4C0.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-7C533836-0D27-5519-BC1D-7153AC8BE4C0.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,47 @@ + + + + + +Media +Driver GuideDescribes the issues that need to be considered, when writing a +media device driver for a writable data demand paging environment. +
Purpose

This +document explains the points that have to be considered when writing a media +driver in an environment that uses writable data paging.

+
Issues to consider

The +main issue to consider when writing a media device driver for a writable demand +paging environment is to avoid page faults from occurring in DFCs, since this +can lead to a deadlock condition between the driver and the client process.

This +can be avoided using the following methods:

    +
  • Use shared chunks.

    Shared +chunks are memory areas that are accessible by both kernel-side and user-side +and they are never paged.

    This is the best solution for drivers that +involve fast throughput such as media drivers.

  • +
  • Use synchronous rather +than asynchronous data transfer

    This could be done by implementing +the following steps:

      +
    1. The client requests +a notification when data is available.

    2. +
    3. The data arrives.

    4. +
    5. The driver writes data +into an internal buffer and completes the client request.

    6. +
    7. The client makes a read +request.

    8. +
    9. The driver writes the +data back to the client in the client thread context.

    10. +

    This approach is easy to implement, however it requires the buffering +of data.

  • +
  • Use the flexible +memory model

    This provides the ability for the memory to be +mapped into a drive's address space as unpaged.

    This is an alternative +to the use of shared chunks.

    However, this is not supported on the +moving or multiple memory models.

  • +
+
\ No newline at end of file