|Graded Discussion Board Announcement||Dated: Feb 11, 14|
Graded Discussion Board for the course “System Programming (CS609)” will be open on Thursday 20th Feb, 2014 and it will be closed on Friday 21th Feb, 2014.
"The methods of DMA mode transfer are limited to protected mode programs." Support or contradict this statement with solid reason.
Read the instructions carefully before sending your comments:
i also contradict this statement.and i think above reason is enough for this
I agree with all of you but we want to solid data to proof this statement. tha is our task
The Process for performing DMA transfer in protect mode and real mode is similar except that use of virtual memory features a linear address is mapped to an arbitrary physical address. In addition, a connecting linear address section that spans page boundaries is mapped to physical pages that are not physically conecting but because the DMA controller bypasses these virtual memory features and works directly with physical addresses, so this difference doesn't matter too and we can say that The methods of DMA mode transfer are NOT limited to protected mode programs.
from where u got this material Rehman Shafi
The Windows 3.1 version of VDMAD does support AutoInit DMA transfers. The major restriction VDMAD places on AutoInit DMA transfers is that the DMA buffer must be physically contiguous. Unless a DMA buffer is allocated by a VxD, a Windows-based application or DLL should not attempt AutoInit transfers using a buffer larger than 4Kb. If you need a DMA buffer larger than 4K that is guaranteed to be physically contiguous, you can use _PageAllocate during the initialization of a VxD.
GlobalDosAlloc() does not guarantee anything about the physical memory properties of the memory it allocates. In particular, the memory may not be physically contiguous, and it may be physically located above one megabyte. However, it does guarantee that the linear address of memory is below one megabyte. What this means in relation to not needing to use VDS is that the linear address can be programmed into a virtual 24-bit DMA controller, and then VDMAD can transparently take care of converting the linear address to a physical address.
The main difference, relevant to DMA transfers, between the real mode MS-DOS environment and the protected mode Windows environment is that with the use of 80386 virtual memory features, a linear address may be mapped to an arbitrary physical address. In addition, a contiguous linear address region that spans page boundaries may be mapped to physical pages that are not physically contiguous. Because the DMA controller bypasses the 80386 page tables and works directly with physical addresses, the DMA controller must be programmed with physical address and the DMA transfer buffer must be physically contiguous.
In enhanced mode Windows, the Virtual DMA Device (VDMAD) attempts to hide the virtual memory issues from device drivers that are not fully aware of the virtual memory environment. The main purpose of VDMAD is to convert linear addresses virtually programmed into the DMA controller into physical addresses. This is necessary because Windows applications and DLLs that are not fully aware of the virtual memory environmentonly deal with linear addresses, but the DMA controller only deals with physical addresses.
VDMAD virtualizes the DMA controller by trapping all port I/O access to the controller. Windows-based applications and DLLs do not have direct access to the DMA controller through port I/O. They only directly affect the VMDAD maintained virtual state of the DMA controller. The virtual state for each channel includes the mode, base address, and transfer count. When a DMA channel is virtually unmasked, VDMAD physically programs the DMA controller with appropriate values based on the channels virtual state.
If the DMA region specified by the virtual base address and transfer count maps to physical memory that is physically contiguous and does not cross a 64K boundary on byte channels or a 128K boundary on word channels, the VDMAD will physically program the DMA controller with the physical base.
The process for performing DMA transfers in the protected mode Windows environment should be similiar to the process for performing DMA transfers in the real mode MS-DOS environment. In both environments, you must initialize the DMA controller with the starting base address, page address, transfer count, and modeIf the DMA region specified by the virtual base address and transfer count maps to physical memory that is physically contiguous and does not cross a 64K boundary on byte channels or a 128K boundary on word channels, the VDMAD will physically program the DMA controller with the physical base
The process for performing DMA transfers in the protected mode Windows environment should be similiar to the process for performing DMA transfers in the real mode MS-DOS environment. In both environments, you must initialize the DMA controller with the starting base address, page address, transfer count, and mode. In both environments, you would usually install a hardware interrupt handler to handle terminal count interrupts when a DMA transfer is complete.
Direct memory access is a technique for the transfer of data within a computer system. The transfer can take place either between memory and an I/O port or between memory and memory. The most significant aspect of the transfer is that it occurs without the intervention of the host processor. Instead, dedicated hardware manages the data transfer, generating the necessary address and control signals on the system bus.
DMA transfers offer speed advantages to a system by decreasing CPU workload. DMA transfers decrease CPU workload by eliminating two kinds of CPU activities:
The decreased CPU workload not only frees up the CPU; it frees up the system bus because it eliminates all CPU instruction fetches required to perform the I/O tasks just described.